#pragma once

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

#include <string>

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

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

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

/**
 * 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, 0, 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;
}

/**
 * This class is a base class for all TDLib API classes.
 */
class Object: public TlObject {
 public:
};

/**
 * This class is a base class for all TDLib API functions.
 */
class Function: public TlObject {
 public:
};

/**
 * 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:
  /// Accent color identifier.
  int32 id_;
  /// Identifier of a built-in color to use in places, where only one color is needed; 0-6.
  int32 built_in_accent_color_id_;
  /// 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_;
  /// 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_;
  /// The minimum chat boost level required to use the color in a channel chat.
  int32 min_channel_chat_boost_level_;

  /**
   * 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;

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

/**
 * 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:
  /// Number of days of inactivity before the account will be flagged for deletion; 30-730 days.
  int32 days_;

  /**
   * 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;

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

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:
  /// Type of the reaction.
  object_ptr<ReactionType> type_;
  /// Identifier of the chat member, applied the reaction.
  object_ptr<MessageSender> sender_id_;
  /// True, if the reaction was added by the current user.
  bool is_outgoing_;
  /// Point in time (Unix timestamp) when the reaction was added.
  int32 date_;

  /**
   * 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;

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

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:
  /// The total number of found reactions.
  int32 total_count_;
  /// The list of added reactions.
  array<object_ptr<addedReaction>> reactions_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

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

/**
 * 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:
  /// A two-letter ISO 3166-1 alpha-2 country code.
  string country_code_;
  /// State, if applicable.
  string state_;
  /// City.
  string city_;
  /// First line of the address.
  string street_line1_;
  /// Second line of the address.
  string street_line2_;
  /// Address postal code.
  string postal_code_;

  /**
   * 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;

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

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:
  /// The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner.
  int32 commission_per_mille_;
  /// Identifier of the chat which received the commission.
  int53 affiliate_chat_id_;
  /// The amount of Telegram Stars that were received by the affiliate; can be negative for refunds.
  object_ptr<starAmount> star_amount_;

  /**
   * 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 amount of Telegram Stars that were 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;

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

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:
  /// Parameters of the affiliate program.
  object_ptr<affiliateProgramParameters> parameters_;
  /// 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 connectChatAffiliateProgram, but active connections will work until the date.
  int32 end_date_;
  /// 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_;

  /**
   * 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 connectChatAffiliateProgram, 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;

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

/**
 * 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:
  /// 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_;
  /// Number of months the program will be active; 0-36. If 0, then the program is eternal.
  int32 month_count_;

  /**
   * 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;

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

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:
  /// Video width.
  int32 width_;
  /// Video height.
  int32 height_;
  /// Codec used for video file encoding, for example, &quot;h264&quot;, &quot;h265&quot;, or &quot;av1&quot;.
  string codec_;
  /// HLS file describing the video.
  object_ptr<file> hls_file_;
  /// File containing the video.
  object_ptr<file> video_;

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

  /**
   * Describes an alternative re-encoded quality of a video 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;, or &quot;av1&quot;.
   * \param[in] hls_file_ HLS file describing the video.
   * \param[in] video_ File containing the video.
   */
  alternativeVideo(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 = -1076216909;

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

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:
  /// Animation width and height.
  int32 length_;
  /// Information about the animation file.
  object_ptr<file> file_;
  /// Timestamp of the frame, used as a static chat photo.
  double main_frame_timestamp_;

  /**
   * 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;

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

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:
  /// 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_;
  /// Expected width of the sticker, which can be used if the sticker is null.
  int32 sticker_width_;
  /// Expected height of the sticker, which can be used if the sticker is null.
  int32 sticker_height_;
  /// Emoji modifier fitzpatrick type; 0-6; 0 if none.
  int32 fitzpatrick_type_;
  /// 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_;

  /**
   * 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;

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

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:
  /// Duration of the animation, in seconds; as defined by the sender.
  int32 duration_;
  /// Width of the animation.
  int32 width_;
  /// Height of the animation.
  int32 height_;
  /// Original name of the file; as defined by the sender.
  string file_name_;
  /// MIME type of the file, usually &quot;image/gif&quot; or &quot;video/mp4&quot;.
  string mime_type_;
  /// True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets.
  bool has_stickers_;
  /// Animation minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  /// Animation thumbnail in JPEG or MPEG4 format; may be null.
  object_ptr<thumbnail> thumbnail_;
  /// File containing the animation.
  object_ptr<file> animation_;

  /**
   * 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;

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

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:
  /// List of animations.
  array<object_ptr<animation>> animations_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;
  /// True, if unmuted chats will be kept in the Archive chat list when they get a new message.
  bool keep_unmuted_chats_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.
  bool keep_chats_from_folders_archived_;

  /**
   * 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;

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

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:
  /// User identifier of the bot.
  int53 bot_user_id_;
  /// True, if the bot supports opening from attachment menu in the chat with the bot.
  bool supports_self_chat_;
  /// True, if the bot supports opening from attachment menu in private chats with ordinary users.
  bool supports_user_chats_;
  /// True, if the bot supports opening from attachment menu in private chats with other bots.
  bool supports_bot_chats_;
  /// True, if the bot supports opening from attachment menu in basic group and supergroup chats.
  bool supports_group_chats_;
  /// True, if the bot supports opening from attachment menu in channel chats.
  bool supports_channel_chats_;
  /// True, if the user must be asked for the permission to send messages to the bot.
  bool request_write_access_;
  /// 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_;
  /// True, if the bot must be shown in the attachment menu.
  bool show_in_attachment_menu_;
  /// True, if the bot must be shown in the side menu.
  bool show_in_side_menu_;
  /// True, if a disclaimer, why the bot is shown in the side menu, is needed.
  bool show_disclaimer_in_side_menu_;
  /// Name for the bot in attachment menu.
  string name_;
  /// Color to highlight selected name of the bot if appropriate; may be null.
  object_ptr<attachmentMenuBotColor> name_color_;
  /// Default icon for the bot in SVG format; may be null.
  object_ptr<file> default_icon_;
  /// Icon for the bot in SVG format for the official iOS app; may be null.
  object_ptr<file> ios_static_icon_;
  /// Icon for the bot in TGS format for the official iOS app; may be null.
  object_ptr<file> ios_animated_icon_;
  /// Icon for the bot in PNG format for the official iOS app side menu; may be null.
  object_ptr<file> ios_side_menu_icon_;
  /// Icon for the bot in TGS format for the official Android app; may be null.
  object_ptr<file> android_icon_;
  /// Icon for the bot in SVG format for the official Android app side menu; may be null.
  object_ptr<file> android_side_menu_icon_;
  /// Icon for the bot in TGS format for the official native macOS app; may be null.
  object_ptr<file> macos_icon_;
  /// Icon for the bot in PNG format for the official macOS app side menu; may be null.
  object_ptr<file> macos_side_menu_icon_;
  /// Color to highlight selected icon of the bot if appropriate; may be null.
  object_ptr<attachmentMenuBotColor> icon_color_;
  /// Default placeholder for opened Web Apps in SVG format; may be null.
  object_ptr<file> web_app_placeholder_;

  /**
   * 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;

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

/**
 * 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:
  /// Color in the RGB format for light themes.
  int32 light_color_;
  /// Color in the RGB format for dark themes.
  int32 dark_color_;

  /**
   * 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;

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

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:
  /// Duration of the audio, in seconds; as defined by the sender.
  int32 duration_;
  /// Title of the audio; as defined by the sender.
  string title_;
  /// Performer of the audio; as defined by the sender.
  string performer_;
  /// Original name of the file; as defined by the sender.
  string file_name_;
  /// The MIME type of the file; as defined by the sender.
  string mime_type_;
  /// The minithumbnail of the album cover; may be null.
  object_ptr<minithumbnail> album_cover_minithumbnail_;
  /// 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_;
  /// 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_;
  /// File containing the audio.
  object_ptr<file> audio_;

  /**
   * 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;

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

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:
  /// A phone number that is being authenticated.
  string phone_number_;
  /// The way the code was sent to the user.
  object_ptr<AuthenticationCodeType> type_;
  /// The way the next code will be sent to the user; may be null.
  object_ptr<AuthenticationCodeType> next_type_;
  /// Timeout before the code can be re-sent, in seconds.
  int32 timeout_;

  /**
   * 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;

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

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:
};

/**
 * 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:
  /// Length of the code.
  int32 length_;

  /**
   * 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;

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

/**
 * 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:
  /// Length of the code.
  int32 length_;

  /**
   * 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;

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

/**
 * 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:
  /// The first letters of the word if known.
  string first_letter_;

  /**
   * 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;

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

/**
 * 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:
  /// The first word of the phrase if known.
  string first_word_;

  /**
   * 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;

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

/**
 * 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:
  /// Length of the code.
  int32 length_;

  /**
   * 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;

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

/**
 * 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:
  /// Pattern of the phone number from which the call will be made.
  string pattern_;

  /**
   * 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;

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

/**
 * 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:
  /// Prefix of the phone number from which the call will be made.
  string phone_number_prefix_;
  /// Number of digits in the code, excluding the prefix.
  int32 length_;

  /**
   * 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;

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

/**
 * 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:
  /// URL to open to receive the code.
  string url_;
  /// Length of the code.
  int32 length_;

  /**
   * 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;

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

/**
 * 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:
  /// Parameters to be used for device verification.
  object_ptr<FirebaseDeviceVerificationParameters> device_verification_parameters_;
  /// Length of the code.
  int32 length_;

  /**
   * 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;

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

/**
 * 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:
  /// Receipt of successful application token validation to compare with receipt from push notification.
  string receipt_;
  /// Time after the next authentication method is expected to be used if verification push notification isn't received, in seconds.
  int32 push_timeout_;
  /// Length of the code.
  int32 length_;

  /**
   * 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;

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

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:
};

/**
 * 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:

  /**
   * 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;

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

/**
 * TDLib needs the user's phone number to authorize. Call setAuthenticationPhoneNumber to provide the phone number, or use requestQrCodeAuthentication 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:

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

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

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

/**
 * 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:
  /// True, if authorization through Apple ID is allowed.
  bool allow_apple_id_;
  /// True, if authorization through Google ID is allowed.
  bool allow_google_id_;

  /**
   * 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;

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

/**
 * 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:
  /// True, if authorization through Apple ID is allowed.
  bool allow_apple_id_;
  /// True, if authorization through Google ID is allowed.
  bool allow_google_id_;
  /// Information about the sent authentication code.
  object_ptr<emailAddressAuthenticationCodeInfo> code_info_;
  /// Reset state of the email address; may be null if the email address can't be reset.
  object_ptr<EmailAddressResetState> email_address_reset_state_;

  /**
   * 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;

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

/**
 * 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:
  /// Information about the authorization code that was sent.
  object_ptr<authenticationCodeInfo> code_info_;

  /**
   * 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;

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

/**
 * 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:
  /// A tg:// URL for the QR code. The link will be updated frequently.
  string link_;

  /**
   * 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;

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

/**
 * The user is unregistered and need 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:
  /// Telegram terms of service.
  object_ptr<termsOfService> terms_of_service_;

  /**
   * The user is unregistered and need 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 need 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;

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

/**
 * 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:
  /// Hint for the password; may be empty.
  string password_hint_;
  /// True, if a recovery email address has been set up.
  bool has_recovery_email_address_;
  /// True, if some Telegram Passport elements were saved.
  bool has_passport_data_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

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

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

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

  /**
   * 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;

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

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:
  /// Preset with lowest settings; expected to be used by default when roaming.
  object_ptr<autoDownloadSettings> low_;
  /// Preset with medium settings; expected to be used by default when using mobile data.
  object_ptr<autoDownloadSettings> medium_;
  /// Preset with highest settings; expected to be used by default when connected on Wi-Fi.
  object_ptr<autoDownloadSettings> high_;

  /**
   * 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;

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

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:
  /// Default autosave settings for private chats.
  object_ptr<scopeAutosaveSettings> private_chat_settings_;
  /// Default autosave settings for basic group and supergroup chats.
  object_ptr<scopeAutosaveSettings> group_settings_;
  /// Default autosave settings for channel chats.
  object_ptr<scopeAutosaveSettings> channel_settings_;
  /// Autosave settings for specific chats.
  array<object_ptr<autosaveSettingsException>> exceptions_;

  /**
   * 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;

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

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Autosave settings for the chat.
  object_ptr<scopeAutosaveSettings> settings_;

  /**
   * 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;

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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;

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

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:
  /// Type of the reaction.
  object_ptr<ReactionType> type_;
  /// True, if Telegram Premium is needed to send the reaction.
  bool needs_premium_;

  /**
   * 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;

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

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:
  /// List of reactions to be shown at the top.
  array<object_ptr<availableReaction>> top_reactions_;
  /// List of recently used reactions.
  array<object_ptr<availableReaction>> recent_reactions_;
  /// List of popular reactions.
  array<object_ptr<availableReaction>> popular_reactions_;
  /// True, if any custom emoji reaction can be added by Telegram Premium subscribers.
  bool allow_custom_emoji_;
  /// True, if the reactions will be tags and the message can be found by them.
  bool are_tags_;
  /// 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_;

  /**
   * 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;

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

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:
  /// Unique background identifier.
  int64 id_;
  /// True, if this is one of default backgrounds.
  bool is_default_;
  /// True, if the background is dark and is recommended to be used with dark theme.
  bool is_dark_;
  /// Unique background name.
  string name_;
  /// Document with the background; may be null. Null only for filled and chat theme backgrounds.
  object_ptr<document> document_;
  /// Type of the background.
  object_ptr<BackgroundType> type_;

  /**
   * 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;

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

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

/**
 * 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:
  /// A color of the background in the RGB format.
  int32 color_;

  /**
   * 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;

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

/**
 * 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:
  /// A top color of the background in the RGB format.
  int32 top_color_;
  /// A bottom color of the background in the RGB format.
  int32 bottom_color_;
  /// Clockwise rotation angle of the gradient, in degrees; 0-359. Must always be divisible by 45.
  int32 rotation_angle_;

  /**
   * 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;

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

/**
 * 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:
  /// A list of 3 or 4 colors of the freeform gradient in the RGB format.
  array<int32> colors_;

  /**
   * 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;

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

class BackgroundFill;

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

/**
 * 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:
  /// True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12.
  bool is_blurred_;
  /// True, if the background needs to be slightly moved when device is tilted.
  bool is_moving_;

  /**
   * 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;

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

/**
 * 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:
  /// Fill of the background.
  object_ptr<BackgroundFill> fill_;
  /// Intensity of the pattern when it is shown above the filled background; 0-100.
  int32 intensity_;
  /// 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_;
  /// True, if the background needs to be slightly moved when device is tilted.
  bool is_moving_;

  /**
   * 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;

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

/**
 * 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:
  /// The background fill.
  object_ptr<BackgroundFill> fill_;

  /**
   * 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;

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

/**
 * A background from a chat theme; 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:
  /// Name of the chat theme.
  string theme_name_;

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

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

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

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

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:
  /// A list of backgrounds.
  array<object_ptr<background>> backgrounds_;

  /**
   * 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;

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

/**
 * 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:
  /// Action text.
  string text_;
  /// The URL to be opened.
  string url_;

  /**
   * 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;

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

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:
  /// Title of the bank card description.
  string title_;
  /// Actions that can be done with the bank card number.
  array<object_ptr<bankCardActionOpenUrl>> actions_;

  /**
   * 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;

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

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:
  /// Group identifier.
  int53 id_;
  /// Number of members in the group.
  int32 member_count_;
  /// Status of the current user in the group.
  object_ptr<ChatMemberStatus> status_;
  /// True, if the group is active.
  bool is_active_;
  /// Identifier of the supergroup to which this group was upgraded; 0 if none.
  int53 upgraded_to_supergroup_id_;

  /**
   * 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;

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

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:
  /// 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_;
  /// Group description. Updated only after the basic group is opened.
  string description_;
  /// User identifier of the creator of the group; 0 if unknown.
  int53 creator_user_id_;
  /// Group members.
  array<object_ptr<chatMember>> 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.
  bool can_hide_members_;
  /// 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_;
  /// 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_;
  /// List of commands of bots in the group.
  array<object_ptr<botCommands>> bot_commands_;

  /**
   * 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;

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

/**
 * 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:
  /// Day of the month; 1-31.
  int32 day_;
  /// Month of the year; 1-12.
  int32 month_;
  /// Birth year; 0 if unknown.
  int32 year_;

  /**
   * 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;

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Text of the bot command.
  string command_;
  /// Description of the bot command.
  string description_;

  /**
   * 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;

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

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

/**
 * 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:

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

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

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

/**
 * 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:

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

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

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

/**
 * 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:

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

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// User identifier.
  int53 user_id_;

  /**
   * 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;

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

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:
  /// Bot's user identifier.
  int53 bot_user_id_;
  /// List of bot commands.
  array<object_ptr<botCommand>> commands_;

  /**
   * 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;

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

class InternalLinkType;

class affiliateProgramInfo;

class animation;

class botCommand;

class botMenuButton;

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:
  /// 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_;
  /// The text shown in the chat with the bot if the chat is empty.
  string description_;
  /// Photo shown in the chat with the bot if the chat is empty; may be null.
  object_ptr<photo> photo_;
  /// Animation shown in the chat with the bot if the chat is empty; may be null.
  object_ptr<animation> animation_;
  /// 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_;
  /// List of the bot commands.
  array<object_ptr<botCommand>> commands_;
  /// 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_;
  /// Default administrator rights for adding the bot to basic group and supergroup chats; may be null.
  object_ptr<chatAdministratorRights> default_group_administrator_rights_;
  /// Default administrator rights for adding the bot to channels; may be null.
  object_ptr<chatAdministratorRights> default_channel_administrator_rights_;
  /// Information about the affiliate program of the bot; may be null if none.
  object_ptr<affiliateProgramInfo> affiliate_program_;
  /// Default light background color for bot Web Apps; -1 if not specified.
  int32 web_app_background_light_color_;
  /// Default dark background color for bot Web Apps; -1 if not specified.
  int32 web_app_background_dark_color_;
  /// Default light header color for bot Web Apps; -1 if not specified.
  int32 web_app_header_light_color_;
  /// Default dark header color for bot Web Apps; -1 if not specified.
  int32 web_app_header_dark_color_;
  /// True, if the bot's revenue statistics are available to the current user.
  bool can_get_revenue_statistics_;
  /// True, if the bot can manage emoji status of the current user.
  bool can_manage_emoji_status_;
  /// True, if the bot has media previews.
  bool has_media_previews_;
  /// The internal link, which can be used to edit bot commands; may be null.
  object_ptr<InternalLinkType> edit_commands_link_;
  /// The internal link, which can be used to edit bot description; may be null.
  object_ptr<InternalLinkType> edit_description_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.
  object_ptr<InternalLinkType> edit_description_media_link_;
  /// The internal link, which can be used to edit bot settings; may be null.
  object_ptr<InternalLinkType> edit_settings_link_;

  /**
   * 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] 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] 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_, 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_, 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 = 759416187;

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

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:
  /// Point in time (Unix timestamp) when the preview was added or changed last time.
  int32 date_;
  /// Content of the preview.
  object_ptr<StoryContent> content_;

  /**
   * 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.
   */
  botMediaPreview(int32 date_, object_ptr<StoryContent> &&content_);

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

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

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:
  /// List of media previews.
  array<object_ptr<botMediaPreview>> previews_;
  /// List of language codes for which the bot has dedicated previews.
  array<string> language_codes_;

  /**
   * 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;

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

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:
  /// List of media previews.
  array<object_ptr<botMediaPreview>> previews_;

  /**
   * 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;

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

/**
 * 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:
  /// Text of the button.
  string text_;
  /// 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_;

  /**
   * 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;

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

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:
};

/**
 * 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:
  /// Domain name of the connected website.
  string domain_name_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Information about the Web App.
  object_ptr<webApp> web_app_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes conditions for sending of away messages by a Telegram Business account.
 */
class BusinessAwayMessageSchedule: public Object {
 public:
};

/**
 * 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:

  /**
   * Send away messages always.
   */
  businessAwayMessageScheduleAlways();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Point in time (Unix timestamp) when the away messages will start to be sent.
  int32 start_date_;
  /// Point in time (Unix timestamp) when the away messages will stop to be sent.
  int32 end_date_;

  /**
   * 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;

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

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:
  /// Unique quick reply shortcut identifier for the away messages.
  int32 shortcut_id_;
  /// Chosen recipients of the away messages.
  object_ptr<businessRecipients> recipients_;
  /// Settings used to check whether the current user is away.
  object_ptr<BusinessAwayMessageSchedule> schedule_;
  /// True, if the messages must not be sent if the account was online in the last 10 minutes.
  bool offline_only_;

  /**
   * 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;

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

/**
 * 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:
  /// User identifier of the bot.
  int53 bot_user_id_;
  /// URL to be opened to manage the bot.
  string manage_url_;
  /// True, if the bot is paused. Use toggleBusinessConnectedBotChatIsPaused to change the value of the field.
  bool is_bot_paused_;
  /// True, if the bot can reply.
  bool can_bot_reply_;

  /**
   * 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;

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

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:
  /// The HTTPS link.
  string link_;
  /// Message draft text that will be added to the input field.
  object_ptr<formattedText> text_;
  /// Link title.
  string title_;
  /// Number of times the link was used.
  int32 view_count_;

  /**
   * 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;

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

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:
  /// Identifier of the private chat that created the link.
  int53 chat_id_;
  /// Message draft text that must be added to the input field.
  object_ptr<formattedText> text_;

  /**
   * 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;

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

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:
  /// List of links.
  array<object_ptr<businessChatLink>> links_;

  /**
   * 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;

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

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:
  /// User identifier of the bot.
  int53 bot_user_id_;
  /// Private chats that will be accessible to the bot.
  object_ptr<businessRecipients> recipients_;
  /// True, if the bot can send messages to the private chats; false otherwise.
  bool can_reply_;

  /**
   * 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] can_reply_ True, if the bot can send messages to the private chats; false otherwise.
   */
  businessConnectedBot(int53 bot_user_id_, object_ptr<businessRecipients> &&recipients_, bool can_reply_);

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

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

/**
 * 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:
  /// Unique identifier of the connection.
  string id_;
  /// Identifier of the business user that created the connection.
  int53 user_id_;
  /// Chat identifier of the private chat with the user.
  int53 user_chat_id_;
  /// Point in time (Unix timestamp) when the connection was established.
  int32 date_;
  /// True, if the bot can send messages to the connected user; false otherwise.
  bool can_reply_;
  /// True, if the connection is enabled; false otherwise.
  bool is_enabled_;

  /**
   * 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 that 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] can_reply_ True, if the bot can send messages to the connected user; false otherwise.
   * \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_, bool can_reply_, bool is_enabled_);

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

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

/**
 * This class is an abstract base class.
 * Describes a feature available to Business user accounts.
 */
class BusinessFeature: public Object {
 public:
};

/**
 * 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:

  /**
   * The ability to set location.
   */
  businessFeatureLocation();

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

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

/**
 * 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:

  /**
   * The ability to set opening hours.
   */
  businessFeatureOpeningHours();

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

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

/**
 * 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:

  /**
   * The ability to use quick replies.
   */
  businessFeatureQuickReplies();

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

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

/**
 * 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:

  /**
   * The ability to set up a greeting message.
   */
  businessFeatureGreetingMessage();

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

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

/**
 * 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:

  /**
   * The ability to set up an away message.
   */
  businessFeatureAwayMessage();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * The ability to customize start page.
   */
  businessFeatureStartPage();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * Allowed to use many additional features for stories.
   */
  businessFeatureUpgradedStories();

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

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

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:
  /// Business feature.
  object_ptr<BusinessFeature> feature_;
  /// Promotion animation for the feature.
  object_ptr<animation> animation_;

  /**
   * 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;

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

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:
  /// The list of available business features.
  array<object_ptr<BusinessFeature>> features_;

  /**
   * 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;

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

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:
  /// Unique quick reply shortcut identifier for the greeting messages.
  int32 shortcut_id_;
  /// Chosen recipients of the greeting messages.
  object_ptr<businessRecipients> recipients_;
  /// 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_;

  /**
   * 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;

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

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:
  /// Location of the business; may be null if none.
  object_ptr<businessLocation> location_;
  /// 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_;
  /// 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_;
  /// 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_;
  /// 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_;
  /// The greeting message; may be null if none or the Business account is not of the current user.
  object_ptr<businessGreetingMessageSettings> greeting_message_settings_;
  /// The away message; may be null if none or the Business account is not of the current user.
  object_ptr<businessAwayMessageSettings> away_message_settings_;
  /// Information about start page of the account; may be null if none.
  object_ptr<businessStartPage> start_page_;

  /**
   * 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;

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

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:
  /// The location; may be null if not specified.
  object_ptr<location> location_;
  /// Location address; 1-96 characters.
  string address_;

  /**
   * 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;

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

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:
  /// The message.
  object_ptr<message> message_;
  /// Message that is replied by the message in the same chat; may be null if none.
  object_ptr<message> reply_to_message_;

  /**
   * 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;

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

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:
  /// List of business messages.
  array<object_ptr<businessMessage>> messages_;

  /**
   * 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;

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

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:
  /// Unique time zone identifier.
  string time_zone_id_;
  /// Intervals of the time when the business is open.
  array<object_ptr<businessOpeningHoursInterval>> opening_hours_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifiers of selected private chats.
  array<int53> chat_ids_;
  /// Identifiers of private chats that are always excluded; for businessConnectedBot only.
  array<int53> excluded_chat_ids_;
  /// True, if all existing private chats are selected.
  bool select_existing_chats_;
  /// True, if all new private chats are selected.
  bool select_new_chats_;
  /// True, if all private chats with contacts are selected.
  bool select_contacts_;
  /// True, if all private chats with non-contacts are selected.
  bool select_non_contacts_;
  /// If true, then all private chats except the selected are chosen. Otherwise, only the selected chats are chosen.
  bool exclude_selected_;

  /**
   * 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;

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

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:
  /// Title text of the start page.
  string title_;
  /// Message text of the start page.
  string message_;
  /// Greeting sticker of the start page; may be null if none.
  object_ptr<sticker> sticker_;

  /**
   * 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;

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

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:
  /// Call identifier, not persistent.
  int32 id_;
  /// User identifier of the other call participant.
  int53 user_id_;
  /// True, if the call is outgoing.
  bool is_outgoing_;
  /// True, if the call is a video call.
  bool is_video_;
  /// Call state.
  object_ptr<CallState> state_;

  /**
   * Describes a call.
   */
  call();

  /**
   * Describes a call.
   *
   * \param[in] id_ Call identifier, not persistent.
   * \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_, 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 = 920360804;

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

/**
 * This class is an abstract base class.
 * Describes the reason why a call was discarded.
 */
class CallDiscardReason: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Call identifier.
  int32 id_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes the exact type of problem with a call.
 */
class CallProblem: public Object {
 public:
};

/**
 * 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:

  /**
   * The user heard their own voice.
   */
  callProblemEcho();

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

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

/**
 * 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:

  /**
   * The user heard background noise.
   */
  callProblemNoise();

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

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

/**
 * 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:

  /**
   * The other side kept disappearing.
   */
  callProblemInterruptions();

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

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

/**
 * 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:

  /**
   * The speech was distorted.
   */
  callProblemDistortedSpeech();

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

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

/**
 * 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:

  /**
   * The user couldn't hear the other side.
   */
  callProblemSilentLocal();

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

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

/**
 * 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:

  /**
   * The other side couldn't hear the user.
   */
  callProblemSilentRemote();

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

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

/**
 * 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:

  /**
   * The call ended unexpectedly.
   */
  callProblemDropped();

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

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

/**
 * 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:

  /**
   * The video was distorted.
   */
  callProblemDistortedVideo();

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

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

/**
 * 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:

  /**
   * The video was pixelated.
   */
  callProblemPixelatedVideo();

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

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

/**
 * 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:
  /// True, if UDP peer-to-peer connections are supported.
  bool udp_p2p_;
  /// True, if connection through UDP reflectors is supported.
  bool udp_reflector_;
  /// The minimum supported API layer; use 65.
  int32 min_layer_;
  /// The maximum supported API layer; use 92.
  int32 max_layer_;
  /// List of supported tgcalls versions.
  array<string> library_versions_;

  /**
   * 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;

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

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:
  /// Server identifier.
  int64 id_;
  /// Server IPv4 address.
  string ip_address_;
  /// Server IPv6 address.
  string ipv6_address_;
  /// Server port number.
  int32 port_;
  /// Server type.
  object_ptr<CallServerType> type_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes the type of call server.
 */
class CallServerType: public Object {
 public:
};

/**
 * 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:
  /// A peer tag to be used with the reflector.
  bytes peer_tag_;
  /// True, if the server uses TCP instead of UDP.
  bool is_tcp_;

  /**
   * 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;

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

/**
 * 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:
  /// Username to be used for authentication.
  string username_;
  /// Authentication password.
  string password_;
  /// True, if the server supports TURN.
  bool supports_turn_;
  /// True, if the server supports STUN.
  bool supports_stun_;

  /**
   * 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;

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

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:
};

/**
 * 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:
  /// True, if the call has already been created by the server.
  bool is_created_;
  /// True, if the call has already been received by the other party.
  bool is_received_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Call protocols supported by the other call participant.
  object_ptr<callProtocol> protocol_;
  /// List of available call servers.
  array<object_ptr<callServer>> servers_;
  /// A JSON-encoded call config.
  string config_;
  /// Call encryption key.
  bytes encryption_key_;
  /// Encryption key fingerprint represented as 4 emoji.
  array<string> emojis_;
  /// True, if peer-to-peer connection is allowed by users privacy settings.
  bool allow_p2p_;
  /// Custom JSON-encoded call parameters to be passed to tgcalls.
  string custom_parameters_;

  /**
   * 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] 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_, string const &custom_parameters_);

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// The reason why the call has ended.
  object_ptr<CallDiscardReason> reason_;
  /// True, if the call rating must be sent to the server.
  bool need_rating_;
  /// True, if the call debug information must be sent to the server.
  bool need_debug_information_;
  /// True, if the call log must be sent to the server.
  bool need_log_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Text of the answer.
  string text_;
  /// True, if an alert must be shown to the user instead of a toast notification.
  bool show_alert_;
  /// URL to be opened.
  string url_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Represents a payload of a callback query.
 */
class CallbackQueryPayload: public Object {
 public:
};

/**
 * 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:
  /// Data that was attached to the callback button.
  bytes data_;

  /**
   * 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;

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

/**
 * 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:
  /// The 2-step verification password for the current user.
  string password_;
  /// Data that was attached to the callback button.
  bytes data_;

  /**
   * 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;

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

/**
 * 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:
  /// A short name of the game that was attached to the callback button.
  string game_short_name_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes result of canSendMessageToUser.
 */
class CanSendMessageToUserResult: public Object {
 public:
};

/**
 * 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:

  /**
   * The user can be messaged.
   */
  canSendMessageToUserResultOk();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Represents result of checking whether the current user can send a story in the specific chat.
 */
class CanSendStoryResult: public Object {
 public:
};

/**
 * A story can be sent.
 */
class canSendStoryResultOk final : public CanSendStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:

  /**
   * A story can be sent.
   */
  canSendStoryResultOk();

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

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

/**
 * The user must subscribe to Telegram Premium to be able to post stories.
 */
class canSendStoryResultPremiumNeeded final : public CanSendStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:

  /**
   * The user must subscribe to Telegram Premium to be able to post stories.
   */
  canSendStoryResultPremiumNeeded();

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

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

/**
 * 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 canSendStoryResultBoostNeeded final : public CanSendStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:

  /**
   * The chat must be boosted first by Telegram Premium subscribers to post more stories. Call getChatBoostStatus to get current boost status of the chat.
   */
  canSendStoryResultBoostNeeded();

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

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

/**
 * 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 canSendStoryResultActiveStoryLimitExceeded final : public CanSendStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:

  /**
   * 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.
   */
  canSendStoryResultActiveStoryLimitExceeded();

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

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

/**
 * The weekly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time.
 */
class canSendStoryResultWeeklyLimitExceeded final : public CanSendStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Time left before the user can send the next story.
  int32 retry_after_;

  /**
   * The weekly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time.
   */
  canSendStoryResultWeeklyLimitExceeded();

  /**
   * 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 send the next story.
   */
  explicit canSendStoryResultWeeklyLimitExceeded(int32 retry_after_);

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

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

/**
 * The monthly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time.
 */
class canSendStoryResultMonthlyLimitExceeded final : public CanSendStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Time left before the user can send the next story.
  int32 retry_after_;

  /**
   * The monthly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time.
   */
  canSendStoryResultMonthlyLimitExceeded();

  /**
   * 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 send the next story.
   */
  explicit canSendStoryResultMonthlyLimitExceeded(int32 retry_after_);

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

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

/**
 * 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:
};

/**
 * 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:

  /**
   * The session can be used.
   */
  canTransferOwnershipResultOk();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Time left before the session can be used to transfer ownership of a chat, in seconds.
  int32 retry_after_;

  /**
   * 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;

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

/**
 * 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:
  /// Time left before the session can be used to transfer ownership of a chat, in seconds.
  int32 retry_after_;

  /**
   * 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;

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

class BlockList;

class ChatActionBar;

class ChatAvailableReactions;

class ChatList;

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 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:
  /// Chat unique identifier.
  int53 id_;
  /// Type of the chat.
  object_ptr<ChatType> type_;
  /// Chat title.
  string title_;
  /// Chat photo; may be null.
  object_ptr<chatPhotoInfo> photo_;
  /// Identifier of the accent color for message sender name, and backgrounds of chat photo, reply header, and link preview.
  int32 accent_color_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.
  int64 background_custom_emoji_id_;
  /// Identifier of the profile accent color for the chat's profile; -1 if none.
  int32 profile_accent_color_id_;
  /// 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_;
  /// Actions that non-administrator chat members are allowed to take in the chat.
  object_ptr<chatPermissions> permissions_;
  /// Last message in the chat; may be null if none or unknown.
  object_ptr<message> last_message_;
  /// Positions of the chat in chat lists.
  array<object_ptr<chatPosition>> positions_;
  /// Chat lists to which the chat belongs. A chat can have a non-zero position in a chat list even it doesn't belong to the chat list and have no position in a chat list even it belongs to the chat list.
  array<object_ptr<ChatList>> chat_lists_;
  /// 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_;
  /// Block list to which the chat is added; may be null if none.
  object_ptr<BlockList> block_list_;
  /// True, if chat content can't be saved locally, forwarded, or copied.
  bool has_protected_content_;
  /// True, if translation of all messages in the chat must be suggested to the user.
  bool is_translatable_;
  /// True, if the chat is marked as unread.
  bool is_marked_as_unread_;
  /// 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_;
  /// True, if the chat has scheduled messages.
  bool has_scheduled_messages_;
  /// 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_;
  /// True, if the chat messages can be deleted for all users.
  bool can_be_deleted_for_all_users_;
  /// True, if the chat can be reported to Telegram moderators through reportChat or reportChatPhoto.
  bool can_be_reported_;
  /// Default value of the disable_notification parameter, used when a message is sent to the chat.
  bool default_disable_notification_;
  /// Number of unread messages in the chat.
  int32 unread_count_;
  /// Identifier of the last read incoming message.
  int53 last_read_inbox_message_id_;
  /// Identifier of the last read outgoing message.
  int53 last_read_outbox_message_id_;
  /// Number of unread messages with a mention/reply in the chat.
  int32 unread_mention_count_;
  /// Number of messages with unread reactions in the chat.
  int32 unread_reaction_count_;
  /// Notification settings for the chat.
  object_ptr<chatNotificationSettings> notification_settings_;
  /// Types of reaction, available in the chat.
  object_ptr<ChatAvailableReactions> available_reactions_;
  /// 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_;
  /// Emoji status to be shown along with chat title; may be null.
  object_ptr<emojiStatus> emoji_status_;
  /// Background set for the chat; may be null if none.
  object_ptr<chatBackground> background_;
  /// If non-empty, name of a theme, set for the chat.
  string theme_name_;
  /// Information about actions which must be possible to do through the chat action bar; may be null if none.
  object_ptr<ChatActionBar> action_bar_;
  /// Information about bar for managing a business bot in the chat; may be null if none.
  object_ptr<businessBotManageBar> business_bot_manage_bar_;
  /// Information about video chat of the chat.
  object_ptr<videoChat> video_chat_;
  /// Information about pending join requests; may be null if none.
  object_ptr<chatJoinRequestsInfo> pending_join_requests_;
  /// Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat.
  int53 reply_markup_message_id_;
  /// A draft of a message in the chat; may be null if none.
  object_ptr<draftMessage> draft_message_;
  /// 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_;

  /**
   * 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] 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 it doesn't belong to the chat list and have no position in a chat list even 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] 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_name_ If non-empty, name of a theme, set for the chat.
   * \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 default custom 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_, 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_, object_ptr<chatNotificationSettings> &&notification_settings_, object_ptr<ChatAvailableReactions> &&available_reactions_, int32 message_auto_delete_time_, object_ptr<emojiStatus> &&emoji_status_, object_ptr<chatBackground> &&background_, string const &theme_name_, 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 = 830601369;

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

/**
 * This class is an abstract base class.
 * Describes the different types of activity in a chat.
 */
class ChatAction: public Object {
 public:
};

/**
 * 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:

  /**
   * The user is typing a message.
   */
  chatActionTyping();

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

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

/**
 * 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:

  /**
   * The user is recording a video.
   */
  chatActionRecordingVideo();

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

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

/**
 * 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:
  /// Upload progress, as a percentage.
  int32 progress_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * The user is recording a voice note.
   */
  chatActionRecordingVoiceNote();

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

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

/**
 * 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:
  /// Upload progress, as a percentage.
  int32 progress_;

  /**
   * 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;

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

/**
 * 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:
  /// Upload progress, as a percentage.
  int32 progress_;

  /**
   * 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;

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

/**
 * 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:
  /// Upload progress, as a percentage.
  int32 progress_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * The user is picking a sticker to send.
   */
  chatActionChoosingSticker();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * The user is picking a contact to send.
   */
  chatActionChoosingContact();

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

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

/**
 * 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:

  /**
   * The user has started to play a game.
   */
  chatActionStartPlayingGame();

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

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

/**
 * 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:

  /**
   * The user is recording a video note.
   */
  chatActionRecordingVideoNote();

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

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

/**
 * 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:
  /// Upload progress, as a percentage.
  int32 progress_;

  /**
   * 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;

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

/**
 * 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:
  /// The animated emoji.
  string emoji_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * The user has canceled the previous action.
   */
  chatActionCancel();

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

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

/**
 * 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:
};

/**
 * 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:
  /// 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_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// 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_;

  /**
   * 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.
   */
  explicit chatActionBarReportAddBlock(bool can_unarchive_);

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Title of the chat to which the join request was sent.
  string title_;
  /// True, if the join request was sent to a channel chat.
  bool is_channel_;
  /// Point in time (Unix timestamp) when the join request was sent.
  int32 request_date_;

  /**
   * 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;

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

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:
  /// Identifier of the chat that posted the stories.
  int53 chat_id_;
  /// 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_;
  /// A parameter used to determine order of the stories in the story list; 0 if the stories doesn't need to be shown in the story list. Stories must be sorted by the pair (order, story_sender_chat_id) in descending order.
  int53 order_;
  /// Identifier of the last read active story.
  int32 max_read_story_id_;
  /// 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_;

  /**
   * 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 doesn't need to be shown in the story list. Stories must be sorted by the pair (order, story_sender_chat_id) in descending order.
   * \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_, int32 max_read_story_id_, array<object_ptr<storyInfo>> &&stories_);

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

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

/**
 * 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:
  /// User identifier of the administrator.
  int53 user_id_;
  /// Custom title of the administrator.
  string custom_title_;
  /// True, if the user is the owner of the chat.
  bool is_owner_;

  /**
   * 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.
   */
  chatAdministrator(int53 user_id_, string const &custom_title_, bool is_owner_);

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

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

/**
 * 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:
  /// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report supergroup spam messages and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only.
  bool can_manage_chat_;
  /// True, if the administrator can change the chat title, photo, and other settings.
  bool can_change_info_;
  /// True, if the administrator can create channel posts or view channel statistics; applicable to channels only.
  bool can_post_messages_;
  /// True, if the administrator can edit messages of other users and pin messages; applicable to channels only.
  bool can_edit_messages_;
  /// True, if the administrator can delete messages of other users.
  bool can_delete_messages_;
  /// True, if the administrator can invite new users to the chat.
  bool can_invite_users_;
  /// True, if the administrator can restrict, ban, or unban chat members or view supergroup statistics; always true for channels.
  bool can_restrict_members_;
  /// True, if the administrator can pin messages; applicable to basic groups and supergroups only.
  bool can_pin_messages_;
  /// True, if the administrator can create, rename, close, reopen, hide, and unhide forum topics; applicable to forum supergroups only.
  bool can_manage_topics_;
  /// 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_;
  /// True, if the administrator can manage video chats.
  bool can_manage_video_chats_;
  /// 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_;
  /// 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_;
  /// True, if the administrator can delete stories posted by other users; applicable to supergroups and channels only.
  bool can_delete_stories_;
  /// True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only.
  bool is_anonymous_;

  /**
   * 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 and ignore slow mode. 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 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; always true for channels.
   * \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] 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 is_anonymous_);

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

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

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:
  /// A list of chat administrators.
  array<object_ptr<chatAdministrator>> administrators_;

  /**
   * 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;

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

class affiliateProgramParameters;

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

 public:
  /// The link that can be used to refer users if the program is still active.
  string url_;
  /// User identifier of the bot created the program.
  int53 bot_user_id_;
  /// The parameters of the affiliate program.
  object_ptr<affiliateProgramParameters> parameters_;
  /// Point in time (Unix timestamp) when the affiliate program was connected.
  int32 connection_date_;
  /// True, if the program was canceled by the bot, or disconnected by the chat owner and isn't available anymore.
  bool is_disconnected_;
  /// The number of users that used the affiliate program.
  int64 user_count_;
  /// The number of Telegram Stars that were earned by the affiliate program.
  int64 revenue_star_count_;

  /**
   * Describes an affiliate program that was connected to a chat.
   */
  chatAffiliateProgram();

  /**
   * Describes an affiliate program that was connected to a chat.
   *
   * \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.
   */
  chatAffiliateProgram(string const &url_, int53 bot_user_id_, object_ptr<affiliateProgramParameters> &&parameters_, int32 connection_date_, bool is_disconnected_, int64 user_count_, int64 revenue_star_count_);

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

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

class chatAffiliateProgram;

/**
 * Represents a list of affiliate programs that were connected to a chat.
 */
class chatAffiliatePrograms final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// The total number of affiliate programs that were connected to the chat.
  int32 total_count_;
  /// The list of connected affiliate programs.
  array<object_ptr<chatAffiliateProgram>> programs_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * Represents a list of affiliate programs that were connected to a chat.
   */
  chatAffiliatePrograms();

  /**
   * Represents a list of affiliate programs that were connected to a chat.
   *
   * \param[in] total_count_ The total number of affiliate programs that were connected to the chat.
   * \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.
   */
  chatAffiliatePrograms(int32 total_count_, array<object_ptr<chatAffiliateProgram>> &&programs_, string const &next_offset_);

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

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

class ReactionType;

/**
 * This class is an abstract base class.
 * Describes reactions available in the chat.
 */
class ChatAvailableReactions: public Object {
 public:
};

/**
 * 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:
  /// The maximum allowed number of reactions per message; 1-11.
  int32 max_reaction_count_;

  /**
   * 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;

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

/**
 * 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:
  /// The list of reactions.
  array<object_ptr<ReactionType>> reactions_;
  /// The maximum allowed number of reactions per message; 1-11.
  int32 max_reaction_count_;

  /**
   * 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;

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

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:
  /// The background.
  object_ptr<background> background_;
  /// 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_;

  /**
   * 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;

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

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:
  /// Unique identifier of the boost.
  string id_;
  /// The number of identical boosts applied.
  int32 count_;
  /// Source of the boost.
  object_ptr<ChatBoostSource> source_;
  /// Point in time (Unix timestamp) when the chat was boosted.
  int32 start_date_;
  /// Point in time (Unix timestamp) when the boost will expire.
  int32 expiration_date_;

  /**
   * 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;

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

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:
  /// The list of features.
  array<object_ptr<chatBoostLevelFeatures>> features_;
  /// The minimum boost level required to set custom emoji for profile background.
  int32 min_profile_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.
  int32 min_background_custom_emoji_boost_level_;
  /// The minimum boost level required to set emoji status.
  int32 min_emoji_status_boost_level_;
  /// The minimum boost level required to set a chat theme background as chat background.
  int32 min_chat_theme_background_boost_level_;
  /// The minimum boost level required to set custom chat background.
  int32 min_custom_background_boost_level_;
  /// 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_;
  /// 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_;
  /// The minimum boost level allowing to disable sponsored messages in the chat; for channel chats only.
  int32 min_sponsored_message_disable_boost_level_;

  /**
   * 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_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_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 = 866182642;

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

/**
 * 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:
  /// Target chat boost level.
  int32 level_;
  /// Number of stories that the chat can publish daily.
  int32 story_per_day_count_;
  /// Number of custom emoji reactions that can be added to the list of available reactions.
  int32 custom_emoji_reaction_count_;
  /// Number of custom colors for chat title.
  int32 title_color_count_;
  /// Number of custom colors for profile photo background.
  int32 profile_accent_color_count_;
  /// True, if custom emoji for profile background can be set.
  bool can_set_profile_background_custom_emoji_;
  /// Number of custom colors for background of empty chat photo, replies to messages and link previews.
  int32 accent_color_count_;
  /// True, if custom emoji for reply header and link preview background can be set.
  bool can_set_background_custom_emoji_;
  /// True, if emoji status can be set.
  bool can_set_emoji_status_;
  /// Number of chat theme backgrounds that can be set as chat background.
  int32 chat_theme_background_count_;
  /// True, if custom background can be set in the chat for all users.
  bool can_set_custom_background_;
  /// True, if custom emoji sticker set can be set for the chat.
  bool can_set_custom_emoji_sticker_set_;
  /// True, if speech recognition can be used for video note and voice note messages by all users.
  bool can_recognize_speech_;
  /// True, if sponsored messages can be disabled in the chat.
  bool can_disable_sponsored_messages_;

  /**
   * 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_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_recognize_speech_, bool can_disable_sponsored_messages_);

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

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

/**
 * 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:
  /// The link.
  string link_;
  /// True, if the link will work for non-members of the chat.
  bool is_public_;

  /**
   * 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;

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

/**
 * 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:
  /// True, if the link will work for non-members of the chat.
  bool is_public_;
  /// Identifier of the chat to which the link points; 0 if the chat isn't found.
  int53 chat_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the slot.
  int32 slot_id_;
  /// Identifier of the currently boosted chat; 0 if none.
  int53 currently_boosted_chat_id_;
  /// Point in time (Unix timestamp) when the chat was boosted; 0 if none.
  int32 start_date_;
  /// Point in time (Unix timestamp) when the boost will expire.
  int32 expiration_date_;
  /// Point in time (Unix timestamp) after which the boost can be used for another chat.
  int32 cooldown_until_date_;

  /**
   * 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;

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

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:
  /// List of boost slots.
  array<object_ptr<chatBoostSlot>> slots_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes source of a chat boost.
 */
class ChatBoostSource: public Object {
 public:
};

/**
 * 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:
  /// Identifier of a user, for which the gift code was created.
  int53 user_id_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifier of a user that won in the giveaway; 0 if none.
  int53 user_id_;
  /// 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_;
  /// Number of Telegram Stars distributed among winners of the giveaway.
  int53 star_count_;
  /// Identifier of the corresponding giveaway message; can be an identifier of a deleted message.
  int53 giveaway_message_id_;
  /// True, if the winner for the corresponding giveaway prize wasn't chosen, because there were not enough participants.
  bool is_unclaimed_;

  /**
   * The chat created a giveaway.
   */
  chatBoostSourceGiveaway();

  /**
   * The chat created a giveaway.
   *
   * \param[in] user_id_ Identifier of a user that 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;

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

/**
 * 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:
  /// Identifier of the user.
  int53 user_id_;

  /**
   * 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;

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

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:
  /// An HTTP URL, which can be used to boost the chat.
  string boost_url_;
  /// Identifiers of boost slots of the current user applied to the chat.
  array<int32> applied_slot_ids_;
  /// Current boost level of the chat.
  int32 level_;
  /// 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_;
  /// The number of boosts received by the chat.
  int32 boost_count_;
  /// The number of boosts added to reach the current level.
  int32 current_level_boost_count_;
  /// The number of boosts needed to reach the next level; 0 if the next level isn't available.
  int32 next_level_boost_count_;
  /// 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_;
  /// 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_;
  /// The list of prepaid giveaways available for the chat; only for chat administrators.
  array<object_ptr<prepaidGiveaway>> prepaid_giveaways_;

  /**
   * 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;

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

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:
  /// Chat event identifier.
  int64 id_;
  /// Point in time (Unix timestamp) when the event happened.
  int32 date_;
  /// Identifier of the user or chat who performed the action.
  object_ptr<MessageSender> member_id_;
  /// The action.
  object_ptr<ChatEventAction> action_;

  /**
   * 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;

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

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:
};

/**
 * 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:
  /// The original message before the edit.
  object_ptr<message> old_message_;
  /// The message after it was edited.
  object_ptr<message> new_message_;

  /**
   * 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;

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

/**
 * 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:
  /// Deleted message.
  object_ptr<message> message_;
  /// True, if the message deletion can be reported via reportSupergroupAntiSpamFalsePositive.
  bool can_report_anti_spam_false_positive_;

  /**
   * 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;

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

/**
 * 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:
  /// Pinned message.
  object_ptr<message> message_;

  /**
   * 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;

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

/**
 * 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:
  /// Unpinned message.
  object_ptr<message> message_;

  /**
   * 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;

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

/**
 * 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:
  /// The message with the poll.
  object_ptr<message> message_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * A new member joined the chat.
   */
  chatEventMemberJoined();

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

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

/**
 * 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:
  /// Invite link used to join the chat.
  object_ptr<chatInviteLink> invite_link_;
  /// True, if the user has joined the chat using an invite link for a chat folder.
  bool via_chat_folder_invite_link_;

  /**
   * 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;

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

/**
 * 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:
  /// User identifier of the chat administrator, approved user join request.
  int53 approver_user_id_;
  /// Invite link used to join the chat; may be null.
  object_ptr<chatInviteLink> invite_link_;

  /**
   * 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;

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

/**
 * 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:
  /// New member user identifier.
  int53 user_id_;
  /// New member status.
  object_ptr<ChatMemberStatus> status_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * A member left the chat.
   */
  chatEventMemberLeft();

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

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

/**
 * 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:
  /// Affected chat member user identifier.
  int53 user_id_;
  /// Previous status of the chat member.
  object_ptr<ChatMemberStatus> old_status_;
  /// New status of the chat member.
  object_ptr<ChatMemberStatus> new_status_;

  /**
   * 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;

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

/**
 * 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:
  /// Affected chat member identifier.
  object_ptr<MessageSender> member_id_;
  /// Previous status of the chat member.
  object_ptr<ChatMemberStatus> old_status_;
  /// New status of the chat member.
  object_ptr<ChatMemberStatus> new_status_;

  /**
   * 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;

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

/**
 * 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:
  /// Affected chat member user identifier.
  int53 user_id_;
  /// Previous status of the chat member.
  object_ptr<ChatMemberStatus> old_status_;
  /// New status of the chat member.
  object_ptr<ChatMemberStatus> new_status_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous chat available reactions.
  object_ptr<ChatAvailableReactions> old_available_reactions_;
  /// New chat available reactions.
  object_ptr<ChatAvailableReactions> new_available_reactions_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous background; may be null if none.
  object_ptr<chatBackground> old_background_;
  /// New background; may be null if none.
  object_ptr<chatBackground> new_background_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous chat description.
  string old_description_;
  /// New chat description.
  string new_description_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous emoji status; may be null if none.
  object_ptr<emojiStatus> old_emoji_status_;
  /// New emoji status; may be null if none.
  object_ptr<emojiStatus> new_emoji_status_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous supergroup linked chat identifier.
  int53 old_linked_chat_id_;
  /// New supergroup linked chat identifier.
  int53 new_linked_chat_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous location; may be null.
  object_ptr<chatLocation> old_location_;
  /// New location; may be null.
  object_ptr<chatLocation> new_location_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous value of message_auto_delete_time.
  int32 old_message_auto_delete_time_;
  /// New value of message_auto_delete_time.
  int32 new_message_auto_delete_time_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous chat permissions.
  object_ptr<chatPermissions> old_permissions_;
  /// New chat permissions.
  object_ptr<chatPermissions> new_permissions_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous chat photo value; may be null.
  object_ptr<chatPhoto> old_photo_;
  /// New chat photo value; may be null.
  object_ptr<chatPhoto> new_photo_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous value of slow_mode_delay, in seconds.
  int32 old_slow_mode_delay_;
  /// New value of slow_mode_delay, in seconds.
  int32 new_slow_mode_delay_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous identifier of the chat sticker set; 0 if none.
  int64 old_sticker_set_id_;
  /// New identifier of the chat sticker set; 0 if none.
  int64 new_sticker_set_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous identifier of the chat sticker set; 0 if none.
  int64 old_sticker_set_id_;
  /// New identifier of the chat sticker set; 0 if none.
  int64 new_sticker_set_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous chat title.
  string old_title_;
  /// New chat title.
  string new_title_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous chat username.
  string old_username_;
  /// New chat username.
  string new_username_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous list of active usernames.
  array<string> old_usernames_;
  /// New list of active usernames.
  array<string> new_usernames_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous identifier of chat accent color.
  int32 old_accent_color_id_;
  /// Previous identifier of the custom emoji; 0 if none.
  int64 old_background_custom_emoji_id_;
  /// New identifier of chat accent color.
  int32 new_accent_color_id_;
  /// New identifier of the custom emoji; 0 if none.
  int64 new_background_custom_emoji_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous identifier of chat's profile accent color; -1 if none.
  int32 old_profile_accent_color_id_;
  /// Previous identifier of the custom emoji; 0 if none.
  int64 old_profile_background_custom_emoji_id_;
  /// New identifier of chat's profile accent color; -1 if none.
  int32 new_profile_accent_color_id_;
  /// New identifier of the custom emoji; 0 if none.
  int64 new_profile_background_custom_emoji_id_;

  /**
   * 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;

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

/**
 * 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:
  /// New value of has_protected_content.
  bool has_protected_content_;

  /**
   * 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;

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

/**
 * 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:
  /// New value of can_invite_users permission.
  bool can_invite_users_;

  /**
   * 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;

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

/**
 * 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:
  /// New value of is_all_history_available.
  bool is_all_history_available_;

  /**
   * 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;

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

/**
 * 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:
  /// New value of has_aggressive_anti_spam_enabled.
  bool has_aggressive_anti_spam_enabled_;

  /**
   * 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;

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

/**
 * 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:
  /// New value of sign_messages.
  bool sign_messages_;

  /**
   * 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;

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

/**
 * 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:
  /// New value of show_message_sender.
  bool show_message_sender_;

  /**
   * 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;

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

/**
 * 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:
  /// Previous information about the invite link.
  object_ptr<chatInviteLink> old_invite_link_;
  /// New information about the invite link.
  object_ptr<chatInviteLink> new_invite_link_;

  /**
   * 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;

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

/**
 * 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:
  /// The invite link.
  object_ptr<chatInviteLink> invite_link_;

  /**
   * 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;

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

/**
 * 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:
  /// The invite link.
  object_ptr<chatInviteLink> invite_link_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifier of the video chat. The video chat can be received through the method getGroupCall.
  int32 group_call_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifier of the video chat. The video chat can be received through the method getGroupCall.
  int32 group_call_id_;

  /**
   * 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;

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

/**
 * 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:
  /// New value of the mute_new_participants setting.
  bool mute_new_participants_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifier of the affected group call participant.
  object_ptr<MessageSender> participant_id_;
  /// New value of is_muted.
  bool is_muted_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifier of the affected group call participant.
  object_ptr<MessageSender> participant_id_;
  /// New value of volume_level; 1-20000 in hundreds of percents.
  int32 volume_level_;

  /**
   * 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;

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

/**
 * 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:
  /// New value of is_forum.
  bool is_forum_;

  /**
   * 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;

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

/**
 * 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:
  /// Information about the topic.
  object_ptr<forumTopicInfo> topic_info_;

  /**
   * 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;

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

/**
 * 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:
  /// Old information about the topic.
  object_ptr<forumTopicInfo> old_topic_info_;
  /// New information about the topic.
  object_ptr<forumTopicInfo> new_topic_info_;

  /**
   * 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;

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

/**
 * 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:
  /// New information about the topic.
  object_ptr<forumTopicInfo> topic_info_;

  /**
   * 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;

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

/**
 * 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:
  /// New information about the topic.
  object_ptr<forumTopicInfo> topic_info_;

  /**
   * 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;

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

/**
 * 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:
  /// Information about the topic.
  object_ptr<forumTopicInfo> topic_info_;

  /**
   * 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;

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

/**
 * 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:
  /// Information about the old pinned topic; may be null.
  object_ptr<forumTopicInfo> old_topic_info_;
  /// Information about the new pinned topic; may be null.
  object_ptr<forumTopicInfo> new_topic_info_;

  /**
   * 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;

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

/**
 * 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:
  /// True, if message edits need to be returned.
  bool message_edits_;
  /// True, if message deletions need to be returned.
  bool message_deletions_;
  /// True, if pin/unpin events need to be returned.
  bool message_pins_;
  /// True, if members joining events need to be returned.
  bool member_joins_;
  /// True, if members leaving events need to be returned.
  bool member_leaves_;
  /// True, if invited member events need to be returned.
  bool member_invites_;
  /// True, if member promotion/demotion events need to be returned.
  bool member_promotions_;
  /// True, if member restricted/unrestricted/banned/unbanned events need to be returned.
  bool member_restrictions_;
  /// True, if changes in chat information need to be returned.
  bool info_changes_;
  /// True, if changes in chat settings need to be returned.
  bool setting_changes_;
  /// True, if changes to invite links need to be returned.
  bool invite_link_changes_;
  /// True, if video chat actions need to be returned.
  bool video_chat_changes_;
  /// True, if forum-related actions need to be returned.
  bool forum_changes_;
  /// True, if subscription extensions need to be returned.
  bool subscription_extensions_;

  /**
   * 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] 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 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 = -1032965711;

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

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:
  /// List of events.
  array<object_ptr<chatEvent>> events_;

  /**
   * 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;

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

class chatFolderIcon;

/**
 * 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:
  /// The title of the folder; 1-12 characters without line feeds.
  string title_;
  /// 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_;
  /// 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_;
  /// True, if at least one link has been created for the folder.
  bool is_shareable_;
  /// 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_;
  /// 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_;
  /// 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_;
  /// True, if muted chats need to be excluded.
  bool exclude_muted_;
  /// True, if read chats need to be excluded.
  bool exclude_read_;
  /// True, if archived chats need to be excluded.
  bool exclude_archived_;
  /// True, if contacts need to be included.
  bool include_contacts_;
  /// True, if non-contact users need to be included.
  bool include_non_contacts_;
  /// True, if bots need to be included.
  bool include_bots_;
  /// True, if basic groups and supergroups need to be included.
  bool include_groups_;
  /// True, if channels need to be included.
  bool include_channels_;

  /**
   * Represents a folder for user chats.
   */
  chatFolder();

  /**
   * Represents a folder for user chats.
   *
   * \param[in] title_ The title of the folder; 1-12 characters without line feeds.
   * \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(string const &title_, 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 = -474905057;

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

/**
 * 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:
  /// 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_;

  /**
   * 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;

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

class chatFolderIcon;

/**
 * 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:
  /// Unique chat folder identifier.
  int32 id_;
  /// The title of the folder; 1-12 characters without line feeds.
  string title_;
  /// The chosen or default icon for the chat folder.
  object_ptr<chatFolderIcon> icon_;
  /// The identifier of the chosen color for the chat folder icon; from -1 to 6. If -1, then color is disabled.
  int32 color_id_;
  /// True, if at least one link has been created for the folder.
  bool is_shareable_;
  /// True, if the chat folder has invite links created by the current user.
  bool has_my_invite_links_;

  /**
   * Contains basic information about a chat folder.
   */
  chatFolderInfo();

  /**
   * Contains basic information about a chat folder.
   *
   * \param[in] id_ Unique chat folder identifier.
   * \param[in] title_ The title of the folder; 1-12 characters without line feeds.
   * \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_, string const &title_, 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 = 190948485;

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

/**
 * 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:
  /// The chat folder invite link.
  string invite_link_;
  /// Name of the link.
  string name_;
  /// Identifiers of chats, included in the link.
  array<int53> chat_ids_;

  /**
   * 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;

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

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:
  /// 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_;
  /// Identifiers of the chats from the link, which aren't added to the folder yet.
  array<int53> missing_chat_ids_;
  /// Identifiers of the chats from the link, which are added to the folder already.
  array<int53> added_chat_ids_;

  /**
   * 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;

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

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:
  /// List of the invite links.
  array<object_ptr<chatFolderInviteLink>> invite_links_;

  /**
   * 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;

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

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:
  /// Chat invite link.
  string invite_link_;
  /// Name of the link.
  string name_;
  /// User identifier of an administrator created the link.
  int53 creator_user_id_;
  /// Point in time (Unix timestamp) when the link was created.
  int32 date_;
  /// Point in time (Unix timestamp) when the link was last edited; 0 if never or unknown.
  int32 edit_date_;
  /// Point in time (Unix timestamp) when the link will expire; 0 if never.
  int32 expiration_date_;
  /// 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_;
  /// 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_;
  /// Number of chat members, which joined the chat using the link.
  int32 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.
  int32 expired_member_count_;
  /// Number of pending join requests created using this link.
  int32 pending_join_request_count_;
  /// True, if the link only creates join request. If true, total number of joining members will be unlimited.
  bool creates_join_request_;
  /// 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_;
  /// True, if the link was revoked.
  bool is_revoked_;

  /**
   * 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;

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

/**
 * 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:
  /// Administrator's user identifier.
  int53 user_id_;
  /// Number of active invite links.
  int32 invite_link_count_;
  /// Number of revoked invite links.
  int32 revoked_invite_link_count_;

  /**
   * 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;

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

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:
  /// List of invite link counts.
  array<object_ptr<chatInviteLinkCount>> invite_link_counts_;

  /**
   * 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;

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

class InviteLinkChatType;

class chatInviteLinkSubscriptionInfo;

class chatPhotoInfo;

/**
 * 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:
  /// Chat identifier of the invite link; 0 if the user has no access to the chat before joining.
  int53 chat_id_;
  /// If non-zero, the amount of time for which read access to the chat will remain available, in seconds.
  int32 accessible_for_;
  /// Type of the chat.
  object_ptr<InviteLinkChatType> type_;
  /// Title of the chat.
  string title_;
  /// Chat photo; may be null.
  object_ptr<chatPhotoInfo> photo_;
  /// Identifier of the accent color for chat title and background of chat photo.
  int32 accent_color_id_;
  /// Chat description.
  string description_;
  /// Number of members in the chat.
  int32 member_count_;
  /// User identifiers of some chat members that may be known to the current user.
  array<int53> member_user_ids_;
  /// 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_;
  /// True, if the link only creates join request.
  bool creates_join_request_;
  /// 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_;
  /// True, if the chat is verified.
  bool is_verified_;
  /// True, if many users reported this chat as a scam.
  bool is_scam_;
  /// True, if many users reported this chat as a fake account.
  bool is_fake_;

  /**
   * 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] is_verified_ True, if the chat is verified.
   * \param[in] is_scam_ True, if many users reported this chat as a scam.
   * \param[in] is_fake_ True, if many users reported this chat as a fake account.
   */
  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_, bool is_verified_, bool is_scam_, bool is_fake_);

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

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

/**
 * 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:
  /// User identifier.
  int53 user_id_;
  /// Point in time (Unix timestamp) when the user joined the chat.
  int32 joined_chat_date_;
  /// True, if the user has joined the chat using an invite link for a chat folder.
  bool via_chat_folder_invite_link_;
  /// User identifier of the chat administrator, approved user join request.
  int53 approver_user_id_;

  /**
   * 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;

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

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:
  /// Approximate total number of chat members found.
  int32 total_count_;
  /// List of chat members, joined a chat via an invite link.
  array<object_ptr<chatInviteLinkMember>> members_;

  /**
   * 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;

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

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:
  /// Information about subscription plan that must be paid by the user to use the link.
  object_ptr<starSubscriptionPricing> pricing_;
  /// True, if the user has already paid for the subscription and can use joinChatByInviteLink to join the subscribed chat again.
  bool can_reuse_;
  /// Identifier of the payment form to use for subscription payment; 0 if the subscription can't be paid.
  int64 form_id_;

  /**
   * 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;

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

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:
  /// Approximate total number of chat invite links found.
  int32 total_count_;
  /// List of invite links.
  array<object_ptr<chatInviteLink>> invite_links_;

  /**
   * 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;

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

/**
 * Describes a user that 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:
  /// User identifier.
  int53 user_id_;
  /// Point in time (Unix timestamp) when the user sent the join request.
  int32 date_;
  /// A short bio of the user.
  string bio_;

  /**
   * Describes a user that sent a join request and waits for administrator approval.
   */
  chatJoinRequest();

  /**
   * Describes a user that 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;

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

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:
  /// Approximate total number of requests found.
  int32 total_count_;
  /// List of the requests.
  array<object_ptr<chatJoinRequest>> requests_;

  /**
   * 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;

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

/**
 * 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:
  /// Total number of pending join requests.
  int32 total_count_;
  /// Identifiers of at most 3 users sent the newest pending join requests.
  array<int53> user_ids_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes a list of chats.
 */
class ChatList: public Object {
 public:
};

/**
 * 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:

  /**
   * A main list of chats.
   */
  chatListMain();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Chat folder identifier.
  int32 chat_folder_id_;

  /**
   * 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;

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

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:
  /// List of chat lists.
  array<object_ptr<ChatList>> chat_lists_;

  /**
   * 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;

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

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:
  /// The location.
  object_ptr<location> location_;
  /// Location address; 1-64 characters, as defined by the chat owner.
  string address_;

  /**
   * 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;

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

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:
  /// 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_;
  /// Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown.
  int53 inviter_user_id_;
  /// Point in time (Unix timestamp) when the user joined/was promoted/was banned in the chat.
  int32 joined_chat_date_;
  /// Status of the member in the chat.
  object_ptr<ChatMemberStatus> status_;

  /**
   * 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] inviter_user_id_ Identifier of a user that 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_, 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 = 1829953909;

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

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:
};

/**
 * 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:
  /// A custom title of the owner; 0-16 characters without emoji; applicable to supergroups only.
  string custom_title_;
  /// True, if the creator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only.
  bool is_anonymous_;
  /// True, if the user is a member of the chat.
  bool is_member_;

  /**
   * 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] custom_title_ A custom title of the owner; 0-16 characters without emoji; applicable to supergroups only.
   * \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(string const &custom_title_, bool is_anonymous_, bool is_member_);

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

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

/**
 * 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:
  /// A custom title of the administrator; 0-16 characters without emoji; applicable to supergroups only.
  string custom_title_;
  /// True, if the current user can edit the administrator privileges for the called user.
  bool can_be_edited_;
  /// Rights of the administrator.
  object_ptr<chatAdministratorRights> rights_;

  /**
   * 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] custom_title_ A custom title of the administrator; 0-16 characters without emoji; applicable to supergroups only.
   * \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(string const &custom_title_, bool can_be_edited_, object_ptr<chatAdministratorRights> &&rights_);

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

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

/**
 * 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:
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// True, if the user is a member of the chat.
  bool is_member_;
  /// 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_;
  /// User permissions in the chat.
  object_ptr<chatPermissions> permissions_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// 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_;

  /**
   * 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;

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

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:
  /// Approximate total number of chat members found.
  int32 total_count_;
  /// A list of chat members.
  array<object_ptr<chatMember>> members_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Specifies the kind of chat members to return in searchChatMembers.
 */
class ChatMembersFilter: public Object {
 public:
};

/**
 * 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:

  /**
   * Returns contacts of the user.
   */
  chatMembersFilterContacts();

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

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

/**
 * 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:

  /**
   * Returns the owner and administrators.
   */
  chatMembersFilterAdministrators();

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

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

/**
 * 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:

  /**
   * Returns all chat members, including restricted chat members.
   */
  chatMembersFilterMembers();

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

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

/**
 * 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:
  /// If non-zero, the identifier of the current message thread.
  int53 message_thread_id_;

  /**
   * Returns users which can be mentioned in the chat.
   */
  chatMembersFilterMention();

  /**
   * Returns users which can be mentioned in the chat.
   *
   * \param[in] message_thread_id_ If non-zero, the identifier of the current message thread.
   */
  explicit chatMembersFilterMention(int53 message_thread_id_);

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * Returns bot members of the chat.
   */
  chatMembersFilterBots();

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

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

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:
  /// The message sender.
  object_ptr<MessageSender> sender_;
  /// True, if Telegram Premium is needed to use the message sender.
  bool needs_premium_;

  /**
   * 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;

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

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:
  /// List of available message senders.
  array<object_ptr<chatMessageSender>> senders_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;
  /// Time left before notifications will be unmuted, in seconds.
  int32 mute_for_;
  /// If true, the value for the relevant type of chat or the forum chat is used instead of sound_id.
  bool use_default_sound_;
  /// Identifier of the notification sound to be played for messages; 0 if sound is disabled.
  int64 sound_id_;
  /// 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_;
  /// True, if message content must be displayed in notifications.
  bool show_preview_;
  /// If true, the value for the relevant type of chat is used instead of mute_stories.
  bool use_default_mute_stories_;
  /// True, if story notifications are disabled for the chat.
  bool mute_stories_;
  /// If true, the value for the relevant type of chat is used instead of story_sound_id.
  bool use_default_story_sound_;
  /// Identifier of the notification sound to be played for stories; 0 if sound is disabled.
  int64 story_sound_id_;
  /// If true, the value for the relevant type of chat is used instead of show_story_sender.
  bool use_default_show_story_sender_;
  /// True, if the sender of stories must be displayed in notifications.
  bool show_story_sender_;
  /// 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_;
  /// If true, notifications for incoming pinned messages will be created as for an ordinary unread message.
  bool disable_pinned_message_notifications_;
  /// 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_;
  /// If true, notifications for messages with mentions will be created as for an ordinary unread message.
  bool disable_mention_notifications_;

  /**
   * 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_sender_ If true, the value for the relevant type of chat is used instead of show_story_sender.
   * \param[in] show_story_sender_ True, if the sender of stories 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_sender_, bool show_story_sender_, 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 = -572779825;

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

/**
 * 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:
  /// True, if the user can send text messages, contacts, giveaways, giveaway winners, invoices, locations, and venues.
  bool can_send_basic_messages_;
  /// True, if the user can send music files.
  bool can_send_audios_;
  /// True, if the user can send documents.
  bool can_send_documents_;
  /// True, if the user can send photos.
  bool can_send_photos_;
  /// True, if the user can send videos.
  bool can_send_videos_;
  /// True, if the user can send video notes.
  bool can_send_video_notes_;
  /// True, if the user can send voice notes.
  bool can_send_voice_notes_;
  /// True, if the user can send polls.
  bool can_send_polls_;
  /// True, if the user can send animations, games, stickers, and dice and use inline bots.
  bool can_send_other_messages_;
  /// True, if the user may add a link preview to their messages.
  bool can_add_link_previews_;
  /// True, if the user can change the chat title, photo, and other settings.
  bool can_change_info_;
  /// True, if the user can invite new users to the chat.
  bool can_invite_users_;
  /// True, if the user can pin messages.
  bool can_pin_messages_;
  /// True, if the user can create topics.
  bool can_create_topics_;

  /**
   * 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.
   * \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_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_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 = -118334855;

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

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:
  /// Unique photo identifier.
  int64 id_;
  /// Point in time (Unix timestamp) when the photo has been added.
  int32 added_date_;
  /// Photo minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  /// Available variants of the photo in JPEG format, in different size.
  array<object_ptr<photoSize>> sizes_;
  /// A big (up to 1280x1280) animated variant of the photo in MPEG4 format; may be null.
  object_ptr<animatedChatPhoto> animation_;
  /// A small (160x160) animated variant of the photo in MPEG4 format; may be null even the big animation is available.
  object_ptr<animatedChatPhoto> small_animation_;
  /// Sticker-based version of the chat photo; may be null.
  object_ptr<chatPhotoSticker> sticker_;

  /**
   * 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 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;

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

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:
  /// A small (160x160) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed.
  object_ptr<file> small_;
  /// A big (640x640) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed.
  object_ptr<file> big_;
  /// Chat photo minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  /// True, if the photo has animated variant.
  bool has_animation_;
  /// True, if the photo is visible only for the current user.
  bool is_personal_;

  /**
   * 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;

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

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:
  /// Type of the sticker.
  object_ptr<ChatPhotoStickerType> type_;
  /// The fill to be used as background for the sticker; rotation angle in backgroundFillGradient isn't supported.
  object_ptr<BackgroundFill> background_fill_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes type of sticker, which was used to create a chat photo.
 */
class ChatPhotoStickerType: public Object {
 public:
};

/**
 * 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:
  /// Sticker set identifier.
  int64 sticker_set_id_;
  /// Identifier of the sticker in the set.
  int64 sticker_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifier of the custom emoji.
  int64 custom_emoji_id_;

  /**
   * 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;

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

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:
  /// Total number of photos.
  int32 total_count_;
  /// List of photos.
  array<object_ptr<chatPhoto>> photos_;

  /**
   * 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;

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

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:
  /// The chat list.
  object_ptr<ChatList> list_;
  /// 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_;
  /// True, if the chat is pinned in the chat list.
  bool is_pinned_;
  /// Source of the chat in the chat list; may be null.
  object_ptr<ChatSource> source_;

  /**
   * 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;

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

/**
 * 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:
  /// Cryptocurrency in which revenue is calculated.
  string cryptocurrency_;
  /// Total amount of the cryptocurrency earned, in the smallest units of the cryptocurrency.
  int64 total_amount_;
  /// Amount of the cryptocurrency that isn't withdrawn yet, in the smallest units of the cryptocurrency.
  int64 balance_amount_;
  /// Amount of the cryptocurrency available for withdrawal, in the smallest units of the cryptocurrency.
  int64 available_amount_;
  /// True, if Telegram Stars can be withdrawn now or later.
  bool withdrawal_enabled_;

  /**
   * 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;

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

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:
  /// A graph containing amount of revenue in a given hour.
  object_ptr<StatisticalGraph> revenue_by_hour_graph_;
  /// A graph containing amount of revenue.
  object_ptr<StatisticalGraph> revenue_graph_;
  /// Amount of earned revenue.
  object_ptr<chatRevenueAmount> revenue_amount_;
  /// Current conversion rate of the cryptocurrency in which revenue is calculated to USD.
  double usd_rate_;

  /**
   * 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;

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

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:
  /// Cryptocurrency in which revenue is calculated.
  string cryptocurrency_;
  /// The withdrawn amount, in the smallest units of the cryptocurrency.
  int64 cryptocurrency_amount_;
  /// Type of the transaction.
  object_ptr<ChatRevenueTransactionType> type_;

  /**
   * 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;

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

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:
};

/**
 * Describes earnings from sponsored messages in a chat in some time frame.
 */
class chatRevenueTransactionTypeEarnings 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:
  /// Point in time (Unix timestamp) when the earnings started.
  int32 start_date_;
  /// Point in time (Unix timestamp) when the earnings ended.
  int32 end_date_;

  /**
   * Describes earnings from sponsored messages in a chat in some time frame.
   */
  chatRevenueTransactionTypeEarnings();

  /**
   * 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.
   */
  chatRevenueTransactionTypeEarnings(int32 start_date_, int32 end_date_);

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

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

/**
 * Describes a withdrawal of earnings.
 */
class chatRevenueTransactionTypeWithdrawal 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:
  /// Point in time (Unix timestamp) when the earnings withdrawal started.
  int32 withdrawal_date_;
  /// Name of the payment provider.
  string provider_;
  /// State of the withdrawal.
  object_ptr<RevenueWithdrawalState> state_;

  /**
   * Describes a withdrawal of earnings.
   */
  chatRevenueTransactionTypeWithdrawal();

  /**
   * Describes a withdrawal of earnings.
   *
   * \param[in] withdrawal_date_ Point in time (Unix timestamp) when the earnings withdrawal started.
   * \param[in] provider_ Name of the payment provider.
   * \param[in] state_ State of the withdrawal.
   */
  chatRevenueTransactionTypeWithdrawal(int32 withdrawal_date_, string const &provider_, object_ptr<RevenueWithdrawalState> &&state_);

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

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

/**
 * Describes a refund for failed withdrawal of earnings.
 */
class chatRevenueTransactionTypeRefund 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:
  /// Point in time (Unix timestamp) when the transaction was refunded.
  int32 refund_date_;
  /// Name of the payment provider.
  string provider_;

  /**
   * Describes a refund for failed withdrawal of earnings.
   */
  chatRevenueTransactionTypeRefund();

  /**
   * Describes a refund for failed withdrawal of earnings.
   *
   * \param[in] refund_date_ Point in time (Unix timestamp) when the transaction was refunded.
   * \param[in] provider_ Name of the payment provider.
   */
  chatRevenueTransactionTypeRefund(int32 refund_date_, string const &provider_);

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

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

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:
  /// Total number of transactions.
  int32 total_count_;
  /// List of transactions.
  array<object_ptr<chatRevenueTransaction>> transactions_;

  /**
   * Contains a list of chat revenue transactions.
   */
  chatRevenueTransactions();

  /**
   * Contains a list of chat revenue transactions.
   *
   * \param[in] total_count_ Total number of transactions.
   * \param[in] transactions_ List of transactions.
   */
  chatRevenueTransactions(int32 total_count_, array<object_ptr<chatRevenueTransaction>> &&transactions_);

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

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

/**
 * 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:
};

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// The type of the announcement.
  string type_;
  /// The text of the announcement.
  string text_;

  /**
   * 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;

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

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:
};

/**
 * 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:
  /// A period to which the statistics applies.
  object_ptr<dateRange> period_;
  /// Number of members in the chat.
  object_ptr<statisticalValue> member_count_;
  /// Number of messages sent to the chat.
  object_ptr<statisticalValue> message_count_;
  /// Number of users who viewed messages in the chat.
  object_ptr<statisticalValue> viewer_count_;
  /// Number of users who sent messages to the chat.
  object_ptr<statisticalValue> sender_count_;
  /// A graph containing number of members in the chat.
  object_ptr<StatisticalGraph> member_count_graph_;
  /// A graph containing number of members joined and left the chat.
  object_ptr<StatisticalGraph> join_graph_;
  /// A graph containing number of new member joins per source.
  object_ptr<StatisticalGraph> join_by_source_graph_;
  /// A graph containing distribution of active users per language.
  object_ptr<StatisticalGraph> language_graph_;
  /// A graph containing distribution of sent messages by content type.
  object_ptr<StatisticalGraph> message_content_graph_;
  /// A graph containing number of different actions in the chat.
  object_ptr<StatisticalGraph> action_graph_;
  /// A graph containing distribution of message views per hour.
  object_ptr<StatisticalGraph> day_graph_;
  /// A graph containing distribution of message views per day of week.
  object_ptr<StatisticalGraph> week_graph_;
  /// List of users sent most messages in the last week.
  array<object_ptr<chatStatisticsMessageSenderInfo>> top_senders_;
  /// List of most active administrators in the last week.
  array<object_ptr<chatStatisticsAdministratorActionsInfo>> top_administrators_;
  /// List of most active inviters of new members in the last week.
  array<object_ptr<chatStatisticsInviterInfo>> top_inviters_;

  /**
   * 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;

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

/**
 * 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:
  /// A period to which the statistics applies.
  object_ptr<dateRange> period_;
  /// Number of members in the chat.
  object_ptr<statisticalValue> member_count_;
  /// Mean number of times the recently sent messages were viewed.
  object_ptr<statisticalValue> mean_message_view_count_;
  /// Mean number of times the recently sent messages were shared.
  object_ptr<statisticalValue> mean_message_share_count_;
  /// Mean number of times reactions were added to the recently sent messages.
  object_ptr<statisticalValue> mean_message_reaction_count_;
  /// Mean number of times the recently sent stories were viewed.
  object_ptr<statisticalValue> mean_story_view_count_;
  /// Mean number of times the recently sent stories were shared.
  object_ptr<statisticalValue> mean_story_share_count_;
  /// Mean number of times reactions were added to the recently sent stories.
  object_ptr<statisticalValue> mean_story_reaction_count_;
  /// A percentage of users with enabled notifications for the chat; 0-100.
  double enabled_notifications_percentage_;
  /// A graph containing number of members in the chat.
  object_ptr<StatisticalGraph> member_count_graph_;
  /// A graph containing number of members joined and left the chat.
  object_ptr<StatisticalGraph> join_graph_;
  /// A graph containing number of members muted and unmuted the chat.
  object_ptr<StatisticalGraph> mute_graph_;
  /// A graph containing number of message views in a given hour in the last two weeks.
  object_ptr<StatisticalGraph> view_count_by_hour_graph_;
  /// A graph containing number of message views per source.
  object_ptr<StatisticalGraph> view_count_by_source_graph_;
  /// A graph containing number of new member joins per source.
  object_ptr<StatisticalGraph> join_by_source_graph_;
  /// A graph containing number of users viewed chat messages per language.
  object_ptr<StatisticalGraph> language_graph_;
  /// A graph containing number of chat message views and shares.
  object_ptr<StatisticalGraph> message_interaction_graph_;
  /// A graph containing number of reactions on messages.
  object_ptr<StatisticalGraph> message_reaction_graph_;
  /// A graph containing number of story views and shares.
  object_ptr<StatisticalGraph> story_interaction_graph_;
  /// A graph containing number of reactions on stories.
  object_ptr<StatisticalGraph> story_reaction_graph_;
  /// A graph containing number of views of associated with the chat instant views.
  object_ptr<StatisticalGraph> instant_view_interaction_graph_;
  /// Detailed statistics about number of views and shares of recently sent messages and stories.
  array<object_ptr<chatStatisticsInteractionInfo>> recent_interactions_;

  /**
   * 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 sent stories were viewed.
   * \param[in] mean_story_share_count_ Mean number of times the recently sent stories were shared.
   * \param[in] mean_story_reaction_count_ Mean number of times reactions were added to the recently sent 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 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;

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

/**
 * 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:
  /// Administrator user identifier.
  int53 user_id_;
  /// Number of messages deleted by the administrator.
  int32 deleted_message_count_;
  /// Number of users banned by the administrator.
  int32 banned_user_count_;
  /// Number of users restricted by the administrator.
  int32 restricted_user_count_;

  /**
   * 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;

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

class ChatStatisticsObjectType;

/**
 * Contains statistics about interactions with a message sent in the chat or a story sent by 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:
  /// Type of the object.
  object_ptr<ChatStatisticsObjectType> object_type_;
  /// Number of times the object was viewed.
  int32 view_count_;
  /// Number of times the object was forwarded.
  int32 forward_count_;
  /// Number of times reactions were added to the object.
  int32 reaction_count_;

  /**
   * Contains statistics about interactions with a message sent in the chat or a story sent by the chat.
   */
  chatStatisticsInteractionInfo();

  /**
   * Contains statistics about interactions with a message sent in the chat or a story sent by 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;

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

/**
 * 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:
  /// User identifier.
  int53 user_id_;
  /// Number of new members invited by the user.
  int32 added_member_count_;

  /**
   * 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;

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

/**
 * 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:
  /// User identifier.
  int53 user_id_;
  /// Number of sent messages.
  int32 sent_message_count_;
  /// Average number of characters in sent messages; 0 if unknown.
  int32 average_character_count_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes type of object, for which statistics are provided.
 */
class ChatStatisticsObjectType: public Object {
 public:
};

/**
 * 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:
  /// Message identifier.
  int53 message_id_;

  /**
   * 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;

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

/**
 * Describes a story sent by 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:
  /// Story identifier.
  int32 story_id_;

  /**
   * Describes a story sent by the chat.
   */
  chatStatisticsObjectTypeStory();

  /**
   * Describes a story sent by 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;

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

class themeSettings;

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

 public:
  /// Theme name.
  string name_;
  /// Theme settings for a light chat theme.
  object_ptr<themeSettings> light_settings_;
  /// Theme settings for a dark chat theme.
  object_ptr<themeSettings> dark_settings_;

  /**
   * Describes a chat theme.
   */
  chatTheme();

  /**
   * Describes a chat theme.
   *
   * \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.
   */
  chatTheme(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 = -113218503;

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

/**
 * This class is an abstract base class.
 * Describes the type of chat.
 */
class ChatType: public Object {
 public:
};

/**
 * 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:
  /// User identifier.
  int53 user_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Basic group identifier.
  int53 basic_group_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Supergroup or channel identifier.
  int53 supergroup_id_;
  /// True, if the supergroup is a channel.
  bool is_channel_;

  /**
   * 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;

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

/**
 * 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:
  /// Secret chat identifier.
  int32 secret_chat_id_;
  /// User identifier of the other user in the secret chat.
  int53 user_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Approximate total number of chats found.
  int32 total_count_;
  /// List of chat identifiers.
  array<int53> chat_ids_;

  /**
   * 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;

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

/**
 * 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:
};

/**
 * 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:

  /**
   * The username can be set.
   */
  checkChatUsernameResultOk();

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

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

/**
 * 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:

  /**
   * The username is invalid.
   */
  checkChatUsernameResultUsernameInvalid();

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

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

/**
 * 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:

  /**
   * The username is occupied.
   */
  checkChatUsernameResultUsernameOccupied();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
};

/**
 * 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:

  /**
   * The name can be set.
   */
  checkStickerSetNameResultOk();

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

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

/**
 * 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:

  /**
   * The name is invalid.
   */
  checkStickerSetNameResultNameInvalid();

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

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

/**
 * 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:

  /**
   * The name is occupied.
   */
  checkStickerSetNameResultNameOccupied();

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

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

class birthdate;

/**
 * Describes a user that 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:
  /// User identifier.
  int53 user_id_;
  /// Birthdate of the user.
  object_ptr<birthdate> birthdate_;

  /**
   * Describes a user that had or will have a birthday soon.
   */
  closeBirthdayUser();

  /**
   * Describes a user that 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;

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

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:
  /// List of vector path commands.
  array<object_ptr<VectorPathCommand>> commands_;

  /**
   * 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;

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

/**
 * 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:
  /// Point in time (Unix timestamp) when the item was purchased.
  int32 purchase_date_;
  /// Currency for the paid amount.
  string currency_;
  /// The paid amount, in the smallest units of the currency.
  int53 amount_;
  /// Cryptocurrency used to pay for the item.
  string cryptocurrency_;
  /// The paid amount, in the smallest units of the cryptocurrency.
  int64 cryptocurrency_amount_;
  /// Individual URL for the item on https://fragment.com.
  string url_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes a collectible item that can be purchased at https://fragment.com.
 */
class CollectibleItemType: public Object {
 public:
};

/**
 * 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:
  /// The username.
  string username_;

  /**
   * 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;

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

/**
 * 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:
  /// The phone number.
  string phone_number_;

  /**
   * 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;

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

/**
 * 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:
  /// Website identifier.
  int64 id_;
  /// The domain name of the website.
  string domain_name_;
  /// User identifier of a bot linked with the website.
  int53 bot_user_id_;
  /// The version of a browser used to log in.
  string browser_;
  /// Operating system the browser is running on.
  string platform_;
  /// Point in time (Unix timestamp) when the user was logged in.
  int32 log_in_date_;
  /// Point in time (Unix timestamp) when obtained authorization was last used.
  int32 last_active_date_;
  /// IP address from which the user was logged in, in human-readable format.
  string ip_address_;
  /// Human-readable description of a country and a region from which the user was logged in, based on the IP address.
  string location_;

  /**
   * 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;

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

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:
  /// List of connected websites.
  array<object_ptr<connectedWebsite>> websites_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes the current state of the connection to Telegram servers.
 */
class ConnectionState: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * Establishing a connection with a proxy server.
   */
  connectionStateConnectingToProxy();

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

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

/**
 * 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:

  /**
   * Establishing a connection to the Telegram servers.
   */
  connectionStateConnecting();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * Describes a user contact.
 */
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:
  /// Phone number of the user.
  string phone_number_;
  /// First name of the user; 1-255 characters in length.
  string first_name_;
  /// Last name of the user.
  string last_name_;
  /// Additional data about the user in a form of vCard; 0-2048 bytes in length.
  string vcard_;
  /// Identifier of the user, if known; 0 otherwise.
  int53 user_id_;

  /**
   * Describes a user contact.
   */
  contact();

  /**
   * Describes a user contact.
   *
   * \param[in] phone_number_ Phone number of the user.
   * \param[in] first_name_ First name of the user; 1-255 characters in length.
   * \param[in] last_name_ Last name of the user.
   * \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;

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

/**
 * 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:
  /// Count.
  int32 count_;

  /**
   * 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;

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

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:
  /// The list of countries.
  array<object_ptr<countryInfo>> countries_;

  /**
   * 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;

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

/**
 * 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:
  /// A two-letter ISO 3166-1 alpha-2 country code.
  string country_code_;
  /// Native name of the country.
  string name_;
  /// English name of the country.
  string english_name_;
  /// True, if the country must be hidden from the list of all countries.
  bool is_hidden_;
  /// List of country calling codes.
  array<string> calling_codes_;

  /**
   * 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;

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

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Information about failed to add members.
  object_ptr<failedToAddMembers> failed_to_add_members_;

  /**
   * 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;

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

/**
 * 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:
  /// Temperature, in degree Celsius.
  double temperature_;
  /// Emoji representing the weather.
  string emoji_;

  /**
   * 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;

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

/**
 * 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:
  /// A JSON-serialized result.
  string result_;

  /**
   * 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;

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

/**
 * 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:
  /// Database statistics in an unspecified human-readable format.
  string statistics_;

  /**
   * 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;

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

/**
 * 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:
  /// Day of the month; 1-31.
  int32 day_;
  /// Month; 1-12.
  int32 month_;
  /// Year; 1-9999.
  int32 year_;

  /**
   * 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;

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

/**
 * 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:
  /// Point in time (Unix timestamp) at which the date range begins.
  int32 start_date_;
  /// Point in time (Unix timestamp) at which the date range ends.
  int32 end_date_;

  /**
   * 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;

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

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:
  /// The file.
  object_ptr<file> file_;
  /// Point in time (Unix timestamp) when the file was uploaded.
  int32 date_;

  /**
   * 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;

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

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:
  /// Text to be shown to the user.
  object_ptr<formattedText> text_;
  /// True, if the user must be asked to update the application.
  bool need_update_application_;

  /**
   * 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;

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

/**
 * 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:
};

/**
 * 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:
  /// Device registration token; may be empty to deregister a device.
  string token_;
  /// True, if push notifications must be additionally encrypted.
  bool encrypt_;

  /**
   * 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;

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

/**
 * 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:
  /// Device token; may be empty to deregister a device.
  string device_token_;
  /// True, if App Sandbox is enabled.
  bool is_app_sandbox_;

  /**
   * 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;

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

/**
 * 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:
  /// Device token; may be empty to deregister a device.
  string device_token_;
  /// True, if App Sandbox is enabled.
  bool is_app_sandbox_;
  /// True, if push notifications must be additionally encrypted.
  bool encrypt_;

  /**
   * 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;

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

/**
 * 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:
  /// The access token that will be used to send notifications; may be empty to deregister a device.
  string access_token_;

  /**
   * 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;

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

/**
 * 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:
  /// Push notification channel URI; may be empty to deregister a device.
  string channel_uri_;

  /**
   * 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;

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

/**
 * 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:
  /// Push notification channel URI; may be empty to deregister a device.
  string channel_uri_;

  /**
   * 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;

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

/**
 * 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:
  /// Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device.
  string endpoint_;
  /// Base64url-encoded P-256 elliptic curve Diffie-Hellman public key.
  string p256dh_base64url_;
  /// Base64url-encoded authentication secret.
  string auth_base64url_;

  /**
   * 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;

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

/**
 * 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:
  /// Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device.
  string endpoint_;

  /**
   * 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;

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

/**
 * 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:
  /// Token; may be empty to deregister a device.
  string token_;

  /**
   * 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;

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

/**
 * 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:
  /// Token; may be empty to deregister a device.
  string token_;

  /**
   * 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;

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

/**
 * 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:
  /// Push service registration identifier; may be empty to deregister a device.
  string reg_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Device registration token; may be empty to deregister a device.
  string token_;
  /// True, if push notifications must be additionally encrypted.
  bool encrypt_;

  /**
   * 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;

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

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:
};

/**
 * 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:
  /// The animated sticker with the dice animation.
  object_ptr<sticker> sticker_;

  /**
   * 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;

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

/**
 * 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:
  /// The animated sticker with the slot machine background. The background animation must start playing after all reel animations finish.
  object_ptr<sticker> background_;
  /// The animated sticker with the lever animation. The lever animation must play once in the initial dice state.
  object_ptr<sticker> lever_;
  /// The animated sticker with the left reel.
  object_ptr<sticker> left_reel_;
  /// The animated sticker with the center reel.
  object_ptr<sticker> center_reel_;
  /// The animated sticker with the right reel.
  object_ptr<sticker> right_reel_;

  /**
   * 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;

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

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:
  /// Original name of the file; as defined by the sender.
  string file_name_;
  /// MIME type of the file; as defined by the sender.
  string mime_type_;
  /// Document minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  /// 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_;
  /// File containing the document.
  object_ptr<file> document_;

  /**
   * 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;

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

/**
 * 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:
  /// Number of active file downloads found, including paused.
  int32 active_count_;
  /// Number of paused file downloads found.
  int32 paused_count_;
  /// Number of completed file downloads found.
  int32 completed_count_;

  /**
   * 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;

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

class InputMessageContent;

class InputMessageReplyTo;

/**
 * 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:
  /// Information about the message to be replied; must be of the type inputMessageReplyToMessage; may be null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  /// Point in time (Unix timestamp) when the draft was created.
  int32 date_;
  /// Content of the message draft; must be of the type inputMessageText, inputMessageVideoNote, or inputMessageVoiceNote.
  object_ptr<InputMessageContent> input_message_text_;
  /// Identifier of the effect to apply to the message when it is sent; 0 if none.
  int64 effect_id_;

  /**
   * Contains information about a message draft.
   */
  draftMessage();

  /**
   * Contains information about a message draft.
   *
   * \param[in] reply_to_ Information about the message to be replied; must be of the type inputMessageReplyToMessage; 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.
   */
  draftMessage(object_ptr<InputMessageReplyTo> &&reply_to_, int32 date_, object_ptr<InputMessageContent> &&input_message_text_, int64 effect_id_);

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

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

/**
 * This class is an abstract base class.
 * Contains authentication data for an email address.
 */
class EmailAddressAuthentication: public Object {
 public:
};

/**
 * 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:
  /// The code.
  string code_;

  /**
   * 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;

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

/**
 * 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:
  /// The token.
  string token_;

  /**
   * 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;

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

/**
 * 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:
  /// The token.
  string token_;

  /**
   * 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;

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

/**
 * 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:
  /// Pattern of the email address to which an authentication code was sent.
  string email_address_pattern_;
  /// Length of the code; 0 if unknown.
  int32 length_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes reset state of an email address.
 */
class EmailAddressResetState: public Object {
 public:
};

/**
 * 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:
  /// Time required to wait before the email address can be reset; 0 if the user is subscribed to Telegram Premium.
  int32 wait_period_;

  /**
   * 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;

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

/**
 * 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:
  /// Left time before the email address will be reset, in seconds. updateAuthorizationState is not sent when this field changes.
  int32 reset_in_;

  /**
   * 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;

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

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:
  /// List of categories.
  array<object_ptr<emojiCategory>> categories_;

  /**
   * 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;

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

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:
  /// Name of the category.
  string name_;
  /// Custom emoji sticker, which represents icon of the category.
  object_ptr<sticker> icon_;
  /// Source of stickers for the emoji category.
  object_ptr<EmojiCategorySource> source_;
  /// True, if the category must be shown first when choosing a sticker for the start page.
  bool is_greeting_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes source of stickers for an emoji category.
 */
class EmojiCategorySource: public Object {
 public:
};

/**
 * 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:
  /// List of emojis to search for.
  array<string> emojis_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes type of emoji category.
 */
class EmojiCategoryType: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// The emoji.
  string emoji_;
  /// The keyword.
  string keyword_;

  /**
   * 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;

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

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:
  /// List of emojis with their keywords.
  array<object_ptr<emojiKeyword>> emoji_keywords_;

  /**
   * 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;

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

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:
  /// Text representation of the reaction.
  string emoji_;
  /// Reaction title.
  string title_;
  /// True, if the reaction can be added to new messages and enabled in chats.
  bool is_active_;
  /// Static icon for the reaction.
  object_ptr<sticker> static_icon_;
  /// Appear animation for the reaction.
  object_ptr<sticker> appear_animation_;
  /// Select animation for the reaction.
  object_ptr<sticker> select_animation_;
  /// Activate animation for the reaction.
  object_ptr<sticker> activate_animation_;
  /// Effect animation for the reaction.
  object_ptr<sticker> effect_animation_;
  /// Around animation for the reaction; may be null.
  object_ptr<sticker> around_animation_;
  /// Center animation for the reaction; may be null.
  object_ptr<sticker> center_animation_;

  /**
   * 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;

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

/**
 * Describes a custom 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:
  /// Identifier of the custom emoji in stickerFormatTgs format.
  int64 custom_emoji_id_;
  /// Point in time (Unix timestamp) when the status will expire; 0 if never.
  int32 expiration_date_;

  /**
   * Describes a custom emoji to be shown instead of the Telegram Premium badge.
   */
  emojiStatus();

  /**
   * Describes a custom emoji to be shown instead of the Telegram Premium badge.
   *
   * \param[in] custom_emoji_id_ Identifier of the custom emoji in stickerFormatTgs format.
   * \param[in] expiration_date_ Point in time (Unix timestamp) when the status will expire; 0 if never.
   */
  emojiStatus(int64 custom_emoji_id_, int32 expiration_date_);

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

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

/**
 * Contains a list of custom emoji identifiers for 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:
  /// The list of custom emoji identifiers.
  array<int64> custom_emoji_ids_;

  /**
   * Contains a list of custom emoji identifiers for emoji statuses.
   */
  emojiStatuses();

  /**
   * Contains a list of custom emoji identifiers for emoji statuses.
   *
   * \param[in] custom_emoji_ids_ The list of custom emoji identifiers.
   */
  explicit emojiStatuses(array<int64> &&custom_emoji_ids_);

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

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

/**
 * 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:
  /// List of emojis.
  array<string> emojis_;

  /**
   * 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;

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

/**
 * 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:
  /// The encrypted credentials.
  bytes data_;
  /// The decrypted data hash.
  bytes hash_;
  /// Secret for data decryption, encrypted with the service's public key.
  bytes secret_;

  /**
   * 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;

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

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:
  /// Type of Telegram Passport element.
  object_ptr<PassportElementType> type_;
  /// Encrypted JSON-encoded data about the user.
  bytes data_;
  /// The front side of an identity document.
  object_ptr<datedFile> front_side_;
  /// The reverse side of an identity document; may be null.
  object_ptr<datedFile> reverse_side_;
  /// Selfie with the document; may be null.
  object_ptr<datedFile> selfie_;
  /// List of files containing a certified English translation of the document.
  array<object_ptr<datedFile>> translation_;
  /// List of attached files.
  array<object_ptr<datedFile>> files_;
  /// Unencrypted data, phone number or email address.
  string value_;
  /// Hash of the entire element.
  string hash_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;
  /// Error message; subject to future changes.
  string message_;

  /**
   * 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;

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

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:
  /// Text of the fact-check.
  object_ptr<formattedText> text_;
  /// A two-letter ISO 3166-1 alpha-2 country code of the country for which the fact-check is shown.
  string country_code_;

  /**
   * 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;

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

/**
 * Contains information about a user that 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:
  /// User identifier.
  int53 user_id_;
  /// True, if subscription to Telegram Premium would have allowed to add the user to the chat.
  bool premium_would_allow_invite_;
  /// True, if subscription to Telegram Premium is required to send the user chat invite link.
  bool premium_required_to_send_messages_;

  /**
   * Contains information about a user that has failed to be added to a chat.
   */
  failedToAddMember();

  /**
   * Contains information about a user that 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;

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

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:
  /// Information about users that weren't added to the chat.
  array<object_ptr<failedToAddMember>> failed_to_add_members_;

  /**
   * 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;

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

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:
  /// Unique file identifier.
  int32 id_;
  /// File size, in bytes; 0 if unknown.
  int53 size_;
  /// Approximate file size in bytes in case the exact file size is unknown. Can be used to show download/upload progress.
  int53 expected_size_;
  /// Information about the local copy of the file.
  object_ptr<localFile> local_;
  /// Information about the remote copy of the file.
  object_ptr<remoteFile> remote_;

  /**
   * 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;

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

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:
  /// File identifier.
  int32 file_id_;
  /// The message with the file.
  object_ptr<message> message_;
  /// Point in time (Unix timestamp) when the file was added to the download list.
  int32 add_date_;
  /// Point in time (Unix timestamp) when the file downloading was completed; 0 if the file downloading isn't completed.
  int32 complete_date_;
  /// True, if downloading of the file is paused.
  bool is_paused_;

  /**
   * 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;

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

/**
 * 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:
  /// The prefix size, in bytes.
  int53 size_;

  /**
   * 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;

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

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

 public:
  /// File bytes.
  bytes data_;

  /**
   * Contains a part of a file.
   */
  filePart();

  /**
   * Contains a part of a file.
   *
   * \param[in] data_ File bytes.
   */
  explicit filePart(bytes const &data_);

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

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

/**
 * This class is an abstract base class.
 * Represents the type of file.
 */
class FileType: public Object {
 public:
};

/**
 * 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:

  /**
   * The data is not a file.
   */
  fileTypeNone();

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

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

/**
 * 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:

  /**
   * The file is an animation.
   */
  fileTypeAnimation();

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

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

/**
 * 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:

  /**
   * The file is an audio file.
   */
  fileTypeAudio();

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

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

/**
 * 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:

  /**
   * The file is a document.
   */
  fileTypeDocument();

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

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

/**
 * 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:

  /**
   * The file is a notification sound.
   */
  fileTypeNotificationSound();

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

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

/**
 * 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:

  /**
   * The file is a photo.
   */
  fileTypePhoto();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * The file is a profile photo.
   */
  fileTypeProfilePhoto();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * The file is a sticker.
   */
  fileTypeSticker();

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

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

/**
 * 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:

  /**
   * The file is a thumbnail of another file.
   */
  fileTypeThumbnail();

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

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

/**
 * 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:

  /**
   * The file type is not yet known.
   */
  fileTypeUnknown();

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

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

/**
 * 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:

  /**
   * The file is a video.
   */
  fileTypeVideo();

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

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

/**
 * 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:

  /**
   * The file is a video note.
   */
  fileTypeVideoNote();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * The file is a voice note.
   */
  fileTypeVoiceNote();

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

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

/**
 * 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:

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Contains settings for Firebase Authentication in the official applications.
 */
class FirebaseAuthenticationSettings: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Device token from Apple Push Notification service.
  string device_token_;
  /// True, if App Sandbox is enabled.
  bool is_app_sandbox_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes parameters to be used for device verification.
 */
class FirebaseDeviceVerificationParameters: public Object {
 public:
};

/**
 * 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:
  /// Nonce to pass to the SafetyNet Attestation API.
  bytes nonce_;

  /**
   * 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;

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

/**
 * 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:
  /// Base64url-encoded nonce to pass to the Play Integrity API.
  string nonce_;
  /// Cloud project number to pass to the Play Integrity API.
  int64 cloud_project_number_;

  /**
   * 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;

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

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:
  /// The text.
  string text_;
  /// Entities contained in the text. Entities can be nested, but must not mutually intersect with each other. Pre, Code and PreCode 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_;

  /**
   * 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 and PreCode 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;

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

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:
  /// Basic information about the topic.
  object_ptr<forumTopicInfo> info_;
  /// Last message in the topic; may be null if unknown.
  object_ptr<message> last_message_;
  /// True, if the topic is pinned in the topic list.
  bool is_pinned_;
  /// Number of unread messages in the topic.
  int32 unread_count_;
  /// Identifier of the last read incoming message.
  int53 last_read_inbox_message_id_;
  /// Identifier of the last read outgoing message.
  int53 last_read_outbox_message_id_;
  /// Number of unread messages with a mention/reply in the topic.
  int32 unread_mention_count_;
  /// Number of messages with unread reactions in the topic.
  int32 unread_reaction_count_;
  /// Notification settings for the topic.
  object_ptr<chatNotificationSettings> notification_settings_;
  /// A draft of a message in the topic; may be null if none.
  object_ptr<draftMessage> draft_message_;

  /**
   * 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] 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] 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_, 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_, object_ptr<chatNotificationSettings> &&notification_settings_, object_ptr<draftMessage> &&draft_message_);

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

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

/**
 * 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:
  /// Color of the topic icon in RGB format.
  int32 color_;
  /// Unique identifier of the custom emoji shown on the topic icon; 0 if none.
  int64 custom_emoji_id_;

  /**
   * 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;

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

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:
  /// Message thread identifier of the topic.
  int53 message_thread_id_;
  /// Name of the topic.
  string name_;
  /// Icon of the topic.
  object_ptr<forumTopicIcon> icon_;
  /// Point in time (Unix timestamp) when the topic was created.
  int32 creation_date_;
  /// Identifier of the creator of the topic.
  object_ptr<MessageSender> creator_id_;
  /// True, if the topic is the General topic list.
  bool is_general_;
  /// True, if the topic was created by the current user.
  bool is_outgoing_;
  /// True, if the topic is closed.
  bool is_closed_;
  /// True, if the topic is hidden above the topic list and closed; for General topic only.
  bool is_hidden_;

  /**
   * Contains basic information about a forum topic.
   */
  forumTopicInfo();

  /**
   * Contains basic information about a forum topic.
   *
   * \param[in] message_thread_id_ Message thread 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 list.
   * \param[in] is_outgoing_ True, if the topic was created by the current user.
   * \param[in] is_closed_ True, if the topic is closed.
   * \param[in] is_hidden_ True, if the topic is hidden above the topic list and closed; for General topic only.
   */
  forumTopicInfo(int53 message_thread_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_);

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

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

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:
  /// Approximate total number of forum topics found.
  int32 total_count_;
  /// List of forum topics.
  array<object_ptr<forumTopic>> topics_;
  /// Offset date for the next getForumTopics request.
  int32 next_offset_date_;
  /// Offset message identifier for the next getForumTopics request.
  int53 next_offset_message_id_;
  /// Offset message thread identifier for the next getForumTopics request.
  int53 next_offset_message_thread_id_;

  /**
   * 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_message_thread_id_ Offset message thread identifier for the next getForumTopics request.
   */
  forumTopics(int32 total_count_, array<object_ptr<forumTopic>> &&topics_, int32 next_offset_date_, int53 next_offset_message_id_, int53 next_offset_message_thread_id_);

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

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

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:
  /// Identifier of the chat to which the message that was forwarded belonged; may be 0 if unknown.
  int53 chat_id_;
  /// Identifier of the message; may be 0 if unknown.
  int53 message_id_;
  /// 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_;
  /// Name of the sender of the message if the sender is hidden by their privacy settings.
  string sender_name_;
  /// Point in time (Unix timestamp) when the message is sent; 0 if unknown.
  int32 date_;
  /// True, if the message that was forwarded is outgoing; always false if sender is unknown.
  bool is_outgoing_;

  /**
   * 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;

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

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:
  /// User identifier of the bot created the program.
  int53 bot_user_id_;
  /// Information about the affiliate program.
  object_ptr<affiliateProgramInfo> parameters_;

  /**
   * 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] parameters_ Information about the affiliate program.
   */
  foundAffiliateProgram(int53 bot_user_id_, object_ptr<affiliateProgramInfo> &&parameters_);

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

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

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:
  /// The total number of found affiliate programs.
  int32 total_count_;
  /// The list of affiliate programs.
  array<object_ptr<foundAffiliateProgram>> programs_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

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

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:
  /// Total number of boosts applied to the chat.
  int32 total_count_;
  /// List of boosts.
  array<object_ptr<chatBoost>> boosts_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

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

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:
  /// Approximate total number of messages found; -1 if unknown.
  int32 total_count_;
  /// List of messages.
  array<object_ptr<message>> messages_;
  /// The offset for the next request. If 0, there are no more results.
  int53 next_from_message_id_;

  /**
   * 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;

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

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:
  /// Total number of suitable files, ignoring offset.
  object_ptr<downloadedFileCounts> total_counts_;
  /// The list of files.
  array<object_ptr<fileDownload>> files_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

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

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:
  /// Approximate total number of messages found; -1 if unknown.
  int32 total_count_;
  /// List of messages.
  array<object_ptr<message>> messages_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

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

/**
 * 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:
  /// The position of the match.
  int32 position_;

  /**
   * 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;

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

/**
 * 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:
  /// Total number of matched objects.
  int32 total_count_;
  /// The positions of the matched objects.
  array<int32> positions_;

  /**
   * 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;

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

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:
  /// Approximate total number of stories found.
  int32 total_count_;
  /// List of stories.
  array<object_ptr<story>> stories_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifiers of the found users.
  array<int53> user_ids_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

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

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:
  /// The Web App.
  object_ptr<webApp> web_app_;
  /// True, if the user must be asked for the permission to the bot to send them messages.
  bool request_write_access_;
  /// 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_;

  /**
   * 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;

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

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:
  /// Unique game identifier.
  int64 id_;
  /// Game short name.
  string short_name_;
  /// Game title.
  string title_;
  /// Game text, usually containing scoreboards for a game.
  object_ptr<formattedText> text_;
  /// Game description.
  string description_;
  /// Game photo.
  object_ptr<photo> photo_;
  /// Game animation; may be null.
  object_ptr<animation> animation_;

  /**
   * 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;

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

/**
 * 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:
  /// Position in the high score table.
  int32 position_;
  /// User identifier.
  int53 user_id_;
  /// User score.
  int32 score_;

  /**
   * 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;

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

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:
  /// A list of game high scores.
  array<object_ptr<gameHighScore>> scores_;

  /**
   * 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;

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

class sticker;

/**
 * Describes a gift that can be sent to another user.
 */
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:
  /// Unique identifier of the gift.
  int64 id_;
  /// The sticker representing the gift.
  object_ptr<sticker> sticker_;
  /// Number of Telegram Stars that must be paid for the gift.
  int53 star_count_;
  /// Number of Telegram Stars that can be claimed by the receiver instead of the gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed.
  int53 default_sell_star_count_;
  /// True, if the gift is a birthday gift.
  bool is_for_birthday_;
  /// Number of remaining times the gift can be purchased by all users; 0 if not limited or the gift was sold out.
  int32 remaining_count_;
  /// Number of total times the gift can be purchased by all users; 0 if not limited.
  int32 total_count_;
  /// Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.
  int32 first_send_date_;
  /// Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.
  int32 last_send_date_;

  /**
   * Describes a gift that can be sent to another user.
   */
  gift();

  /**
   * Describes a gift that can be sent to another user.
   *
   * \param[in] id_ Unique identifier of the gift.
   * \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 gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed.
   * \param[in] is_for_birthday_ True, if the gift is a birthday gift.
   * \param[in] remaining_count_ Number of remaining times the gift can be purchased by all users; 0 if not limited or the gift was sold out.
   * \param[in] total_count_ Number of total times the gift can be purchased by all users; 0 if not limited.
   * \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_, object_ptr<sticker> &&sticker_, int53 star_count_, int53 default_sell_star_count_, bool is_for_birthday_, int32 remaining_count_, int32 total_count_, int32 first_send_date_, int32 last_send_date_);

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

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

class gift;

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

 public:
  /// The list of gifts.
  array<object_ptr<gift>> gifts_;

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

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

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

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

class GiveawayParticipantStatus;

/**
 * This class is an abstract base class.
 * Contains information about a giveaway.
 */
class GiveawayInfo: public Object {
 public:
};

/**
 * 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:
  /// Point in time (Unix timestamp) when the giveaway was created.
  int32 creation_date_;
  /// Status of the current user in the giveaway.
  object_ptr<GiveawayParticipantStatus> status_;
  /// True, if the giveaway has ended and results are being prepared.
  bool is_ended_;

  /**
   * 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;

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

/**
 * 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:
  /// Point in time (Unix timestamp) when the giveaway was created.
  int32 creation_date_;
  /// 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_;
  /// True, if the giveaway was canceled and was fully refunded.
  bool was_refunded_;
  /// True, if the current user is a winner of the giveaway.
  bool is_winner_;
  /// Number of winners in the giveaway.
  int32 winner_count_;
  /// Number of winners, which activated their gift codes; for Telegram Premium giveaways only.
  int32 activation_count_;
  /// 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_;
  /// The amount of Telegram Stars 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_;

  /**
   * 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 amount of Telegram Stars 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;

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

/**
 * 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:
  /// 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 right is required in the channel, otherwise, the user must be an administrator in the supergroup.
  int53 boosted_chat_id_;
  /// 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_;
  /// 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_;
  /// True, if only new members of the chats will be eligible for the giveaway.
  bool only_new_members_;
  /// True, if the list of winners of the giveaway will be available to everyone.
  bool has_public_winners_;
  /// 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_;
  /// Additional description of the giveaway prize; 0-128 characters.
  string prize_description_;

  /**
   * 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 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;

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

/**
 * This class is an abstract base class.
 * Contains information about status of a user in a giveaway.
 */
class GiveawayParticipantStatus: public Object {
 public:
};

/**
 * 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:

  /**
   * The user is eligible for the giveaway.
   */
  giveawayParticipantStatusEligible();

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

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

/**
 * 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:

  /**
   * The user participates in the giveaway.
   */
  giveawayParticipantStatusParticipating();

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

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

/**
 * 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:
  /// Point in time (Unix timestamp) when the user joined the chat.
  int32 joined_chat_date_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifier of the chat administered by the user.
  int53 chat_id_;

  /**
   * 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;

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

/**
 * 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:
  /// A two-letter ISO 3166-1 alpha-2 country code of the user's country.
  string user_country_code_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Contains information about a giveaway prize.
 */
class GiveawayPrize: public Object {
 public:
};

/**
 * 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:
  /// Number of months the Telegram Premium subscription will be active after code activation.
  int32 month_count_;

  /**
   * 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;

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

/**
 * 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:
  /// Number of Telegram Stars that will be shared by all winners.
  int53 star_count_;

  /**
   * 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;

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

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:
  /// Group call identifier.
  int32 id_;
  /// Group call title.
  string title_;
  /// 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.
  int32 scheduled_start_date_;
  /// True, if the group call is scheduled and the current user will receive a notification when the group call starts.
  bool enabled_start_notification_;
  /// True, if the call is active.
  bool is_active_;
  /// True, if the chat is an RTMP stream instead of an ordinary video chat.
  bool is_rtmp_stream_;
  /// True, if the call is joined.
  bool is_joined_;
  /// True, if user was kicked from the call because of network loss and the call needs to be rejoined.
  bool need_rejoin_;
  /// True, if the current user can manage the group call.
  bool can_be_managed_;
  /// Number of participants in the group call.
  int32 participant_count_;
  /// True, if group call participants, which are muted, aren't returned in participant list.
  bool has_hidden_listeners_;
  /// True, if all group call participants are loaded.
  bool loaded_all_participants_;
  /// At most 3 recently speaking users in the group call.
  array<object_ptr<groupCallRecentSpeaker>> recent_speakers_;
  /// True, if the current user's video is enabled.
  bool is_my_video_enabled_;
  /// True, if the current user's video is paused.
  bool is_my_video_paused_;
  /// True, if the current user can broadcast video or share screen.
  bool can_enable_video_;
  /// True, if only group call administrators can unmute new participants.
  bool mute_new_participants_;
  /// True, if the current user can enable or disable mute_new_participants setting.
  bool can_toggle_mute_new_participants_;
  /// 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_;
  /// True, if a video file is being recorded for the call.
  bool is_video_recorded_;
  /// Call duration, in seconds; for ended calls only.
  int32 duration_;

  /**
   * Describes a group call.
   */
  groupCall();

  /**
   * Describes a group call.
   *
   * \param[in] id_ Group call identifier.
   * \param[in] title_ Group call title.
   * \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.
   * \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.
   * \param[in] is_active_ True, if the call is active.
   * \param[in] is_rtmp_stream_ True, if the chat is an RTMP stream instead of an ordinary video chat.
   * \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] can_be_managed_ True, if the current user can manage the group call.
   * \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.
   * \param[in] loaded_all_participants_ True, if all group call participants are loaded.
   * \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.
   * \param[in] can_toggle_mute_new_participants_ True, if the current user can enable or disable mute_new_participants setting.
   * \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_, string const &title_, int32 scheduled_start_date_, bool enabled_start_notification_, bool is_active_, bool is_rtmp_stream_, bool is_joined_, bool need_rejoin_, bool can_be_managed_, int32 participant_count_, bool has_hidden_listeners_, bool loaded_all_participants_, 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_, int32 record_duration_, bool is_video_recorded_, int32 duration_);

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

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

/**
 * 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:
  /// Group call identifier.
  int32 id_;

  /**
   * 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;

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

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:
  /// Identifier of the group call participant.
  object_ptr<MessageSender> participant_id_;
  /// User's audio channel synchronization source identifier.
  int32 audio_source_id_;
  /// User's screen sharing audio channel synchronization source identifier.
  int32 screen_sharing_audio_source_id_;
  /// Information about user's video channel; may be null if there is no active video.
  object_ptr<groupCallParticipantVideoInfo> video_info_;
  /// 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_;
  /// The participant user's bio or the participant chat's description.
  string bio_;
  /// True, if the participant is the current user.
  bool is_current_user_;
  /// True, if the participant is speaking as set by setGroupCallParticipantIsSpeaking.
  bool is_speaking_;
  /// True, if the participant hand is raised.
  bool is_hand_raised_;
  /// True, if the current user can mute the participant for all other group call participants.
  bool can_be_muted_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).
  bool can_be_unmuted_for_all_users_;
  /// True, if the current user can mute the participant only for self.
  bool can_be_muted_for_current_user_;
  /// True, if the current user can unmute the participant for self.
  bool can_be_unmuted_for_current_user_;
  /// True, if the participant is muted for all users.
  bool is_muted_for_all_users_;
  /// True, if the participant is muted for the current user.
  bool is_muted_for_current_user_;
  /// True, if the participant is muted for all users, but can unmute themselves.
  bool can_unmute_self_;
  /// Participant's volume level; 1-20000 in hundreds of percents.
  int32 volume_level_;
  /// 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_;

  /**
   * 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;

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

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:
  /// List of synchronization source groups of the video.
  array<object_ptr<groupCallVideoSourceGroup>> source_groups_;
  /// Video channel endpoint identifier.
  string endpoint_id_;
  /// True, if the video is paused. This flag needs to be ignored, if new video frames are received.
  bool is_paused_;

  /**
   * 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;

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

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:
  /// Group call participant identifier.
  object_ptr<MessageSender> participant_id_;
  /// True, is the user has spoken recently.
  bool is_speaking_;

  /**
   * 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;

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

/**
 * Describes an available stream in a group call.
 */
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:
  /// Identifier of an audio/video channel.
  int32 channel_id_;
  /// Scale of segment durations in the stream. The duration is 1000/(2**scale) milliseconds.
  int32 scale_;
  /// Point in time when the stream currently ends; Unix timestamp in milliseconds.
  int53 time_offset_;

  /**
   * Describes an available stream in a group call.
   */
  groupCallStream();

  /**
   * Describes an available stream in a group call.
   *
   * \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;

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

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:
  /// A list of group call streams.
  array<object_ptr<groupCallStream>> streams_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes the quality of a group call video.
 */
class GroupCallVideoQuality: public Object {
 public:
};

/**
 * 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:

  /**
   * The worst available video quality.
   */
  groupCallVideoQualityThumbnail();

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

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

/**
 * 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:

  /**
   * The medium video quality.
   */
  groupCallVideoQualityMedium();

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

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

/**
 * 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:

  /**
   * The best available video quality.
   */
  groupCallVideoQualityFull();

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

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

/**
 * 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:
  /// The semantics of sources, one of &quot;SIM&quot; or &quot;FID&quot;.
  string semantics_;
  /// The list of synchronization source identifiers.
  array<int32> source_ids_;

  /**
   * 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;

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

/**
 * 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:
  /// A list of hashtags.
  array<string> hashtags_;

  /**
   * 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;

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

/**
 * 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:
  /// The URL.
  string url_;

  /**
   * 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;

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

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:
  /// Document number; 1-24 characters.
  string number_;
  /// Document expiration date; may be null if not applicable.
  object_ptr<date> expiration_date_;
  /// Front side of the document.
  object_ptr<datedFile> front_side_;
  /// Reverse side of the document; only for driver license and identity card; may be null.
  object_ptr<datedFile> reverse_side_;
  /// Selfie with the document; may be null.
  object_ptr<datedFile> selfie_;
  /// List of files containing a certified English translation of the document.
  array<object_ptr<datedFile>> translation_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;
  /// The number of users that imported the corresponding contact; 0 for already registered users or if unavailable.
  array<int32> importer_count_;

  /**
   * 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;

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

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:
  /// Text of the button.
  string text_;
  /// Type of the button.
  object_ptr<InlineKeyboardButtonType> type_;

  /**
   * 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] type_ Type of the button.
   */
  inlineKeyboardButton(string const &text_, object_ptr<InlineKeyboardButtonType> &&type_);

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

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

class TargetChat;

/**
 * This class is an abstract base class.
 * Describes the type of inline keyboard button.
 */
class InlineKeyboardButtonType: public Object {
 public:
};

/**
 * 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:
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// An HTTP URL to pass to getLoginUrlInfo.
  string url_;
  /// Unique button identifier.
  int53 id_;
  /// If non-empty, new text of the button in forwarded messages.
  string forward_text_;

  /**
   * 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;

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

/**
 * 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:
  /// An HTTP URL to pass to openWebApp.
  string url_;

  /**
   * 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;

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

/**
 * 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:
  /// Data to be sent to the bot via a callback query.
  bytes data_;

  /**
   * 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;

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

/**
 * 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:
  /// Data to be sent to the bot via a callback query.
  bytes data_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// Inline query to be sent to the bot.
  string query_;
  /// Target chat from which to send the inline query.
  object_ptr<TargetChat> target_chat_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:
  /// User identifier.
  int53 user_id_;

  /**
   * 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;

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

/**
 * 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:
  /// The text to copy to clipboard.
  string text_;

  /**
   * 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;

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

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:
};

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// URL of the result, if it exists.
  string url_;
  /// True, if the URL must be not shown.
  bool hide_url_;
  /// Title of the result.
  string title_;
  /// A short description of the result.
  string description_;
  /// Result thumbnail in JPEG format; may be null.
  object_ptr<thumbnail> thumbnail_;

  /**
   * 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] hide_url_ True, if the URL must be not shown.
   * \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_, bool hide_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 = 206340825;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// A user contact.
  object_ptr<contact> contact_;
  /// Result thumbnail in JPEG format; may be null.
  object_ptr<thumbnail> thumbnail_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Location result.
  object_ptr<location> location_;
  /// Title of the result.
  string title_;
  /// Result thumbnail in JPEG format; may be null.
  object_ptr<thumbnail> thumbnail_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Venue result.
  object_ptr<venue> venue_;
  /// Result thumbnail in JPEG format; may be null.
  object_ptr<thumbnail> thumbnail_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Game result.
  object_ptr<game> game_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Animation file.
  object_ptr<animation> animation_;
  /// Animation title.
  string title_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Audio file.
  object_ptr<audio> audio_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Document.
  object_ptr<document> document_;
  /// Document title.
  string title_;
  /// Document description.
  string description_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Photo.
  object_ptr<photo> photo_;
  /// Title of the result, if known.
  string title_;
  /// A short description of the result, if known.
  string description_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Sticker.
  object_ptr<sticker> sticker_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Video.
  object_ptr<video> video_;
  /// Title of the video.
  string title_;
  /// Description of the video.
  string description_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Voice note.
  object_ptr<voiceNote> voice_note_;
  /// Title of the voice note.
  string title_;

  /**
   * 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;

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

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:
  /// Unique identifier of the inline query.
  int64 inline_query_id_;
  /// Button to be shown above inline query results; may be null.
  object_ptr<inlineQueryResultsButton> button_;
  /// Results of the query.
  array<object_ptr<InlineQueryResult>> results_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

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

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:
  /// The text of the button.
  string text_;
  /// Type of the button.
  object_ptr<InlineQueryResultsButtonType> type_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Represents type of button in results of inline query.
 */
class InlineQueryResultsButtonType: public Object {
 public:
};

/**
 * 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:
  /// The parameter for the bot start message.
  string parameter_;

  /**
   * 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;

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

/**
 * 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:
  /// An HTTP URL to pass to getWebAppUrl.
  string url_;

  /**
   * 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;

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

class InputFile;

/**
 * This class is an abstract base class.
 * Contains information about background to set.
 */
class InputBackground: public Object {
 public:
};

/**
 * 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:
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// The background identifier.
  int64 background_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifier of the message with the background.
  int53 message_id_;

  /**
   * 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;

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

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:
  /// Message draft text that will be added to the input field.
  object_ptr<formattedText> text_;
  /// Link title.
  string title_;

  /**
   * 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;

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

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:
  /// Title text of the start page; 0-getOption(&quot;business_start_page_title_length_max&quot;) characters.
  string title_;
  /// Message text of the start page; 0-getOption(&quot;business_start_page_message_length_max&quot;) characters.
  string message_;
  /// 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_;

  /**
   * 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;

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

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:
};

/**
 * 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:
  /// Identifier of the current user's profile photo to reuse.
  int64 chat_photo_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Photo to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed.
  object_ptr<InputFile> photo_;

  /**
   * 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;

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

/**
 * 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:
  /// Animation to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed.
  object_ptr<InputFile> animation_;
  /// Timestamp of the frame, which will be used as static chat photo.
  double main_frame_timestamp_;

  /**
   * 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;

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

/**
 * 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:
  /// Information about the sticker.
  object_ptr<chatPhotoSticker> sticker_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Contains information about the payment method chosen by the user.
 */
class InputCredentials: public Object {
 public:
};

/**
 * 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:
  /// Identifier of the saved credentials.
  string saved_credentials_id_;

  /**
   * 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;

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

/**
 * 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:
  /// JSON-encoded data with the credential identifier from the payment provider.
  string data_;
  /// True, if the credential identifier can be saved on the server side.
  bool allow_save_;

  /**
   * 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;

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

/**
 * 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:
  /// JSON-encoded data with the credential identifier.
  string data_;

  /**
   * 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;

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

/**
 * 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:
  /// JSON-encoded data with the credential identifier.
  string data_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Points to a file.
 */
class InputFile: public Object {
 public:
};

/**
 * 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:
  /// Unique file identifier.
  int32 id_;

  /**
   * 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;

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

/**
 * 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:
  /// Remote file identifier.
  string id_;

  /**
   * 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;

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

/**
 * 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:
  /// Local path to the file.
  string path_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;
  /// 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_;
  /// Expected size of the generated file, in bytes; pass 0 if unknown.
  int53 expected_size_;

  /**
   * 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;

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

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:
  /// Document number; 1-24 characters.
  string number_;
  /// Document expiration date; pass null if not applicable.
  object_ptr<date> expiration_date_;
  /// Front side of the document.
  object_ptr<InputFile> front_side_;
  /// Reverse side of the document; only for driver license and identity card; pass null otherwise.
  object_ptr<InputFile> reverse_side_;
  /// Selfie with the document; pass null if unavailable.
  object_ptr<InputFile> selfie_;
  /// List of files containing a certified English translation of the document.
  array<object_ptr<InputFile>> translation_;

  /**
   * 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;

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

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:
};

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Title of the query result.
  string title_;
  /// URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists.
  string thumbnail_url_;
  /// 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_;
  /// The URL of the video file (file size must not exceed 1MB).
  string video_url_;
  /// MIME type of the video file. Must be one of &quot;image/gif&quot; and &quot;video/mp4&quot;.
  string video_mime_type_;
  /// Duration of the video, in seconds.
  int32 video_duration_;
  /// Width of the video.
  int32 video_width_;
  /// Height of the video.
  int32 video_height_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// URL of the result, if it exists.
  string url_;
  /// True, if the URL must be not shown.
  bool hide_url_;
  /// Title of the result.
  string title_;
  /// A short description of the result.
  string description_;
  /// URL of the result thumbnail, if it exists.
  string thumbnail_url_;
  /// Thumbnail width, if known.
  int32 thumbnail_width_;
  /// Thumbnail height, if known.
  int32 thumbnail_height_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  /// 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_;

  /**
   * 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] hide_url_ True, if the URL must be not shown.
   * \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_, bool hide_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 = 1973670156;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Title of the audio file.
  string title_;
  /// Performer of the audio file.
  string performer_;
  /// The URL of the audio file.
  string audio_url_;
  /// Audio file duration, in seconds.
  int32 audio_duration_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// User contact.
  object_ptr<contact> contact_;
  /// URL of the result thumbnail, if it exists.
  string thumbnail_url_;
  /// Thumbnail width, if known.
  int32 thumbnail_width_;
  /// Thumbnail height, if known.
  int32 thumbnail_height_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Title of the resulting file.
  string title_;
  /// Short description of the result, if known.
  string description_;
  /// URL of the file.
  string document_url_;
  /// MIME type of the file content; only &quot;application/pdf&quot; and &quot;application/zip&quot; are currently allowed.
  string mime_type_;
  /// The URL of the file thumbnail, if it exists.
  string thumbnail_url_;
  /// Width of the thumbnail.
  int32 thumbnail_width_;
  /// Height of the thumbnail.
  int32 thumbnail_height_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Short name of the game.
  string game_short_name_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Location result.
  object_ptr<location> location_;
  /// Amount of time relative to the message sent time until the location can be updated, in seconds.
  int32 live_period_;
  /// Title of the result.
  string title_;
  /// URL of the result thumbnail, if it exists.
  string thumbnail_url_;
  /// Thumbnail width, if known.
  int32 thumbnail_width_;
  /// Thumbnail height, if known.
  int32 thumbnail_height_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Title of the result, if known.
  string title_;
  /// A short description of the result, if known.
  string description_;
  /// URL of the photo thumbnail, if it exists.
  string thumbnail_url_;
  /// The URL of the JPEG photo (photo size must not exceed 5MB).
  string photo_url_;
  /// Width of the photo.
  int32 photo_width_;
  /// Height of the photo.
  int32 photo_height_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// URL of the sticker thumbnail, if it exists.
  string thumbnail_url_;
  /// The URL of the WEBP, TGS, or WEBM sticker (sticker file size must not exceed 5MB).
  string sticker_url_;
  /// Width of the sticker.
  int32 sticker_width_;
  /// Height of the sticker.
  int32 sticker_height_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Venue result.
  object_ptr<venue> venue_;
  /// URL of the result thumbnail, if it exists.
  string thumbnail_url_;
  /// Thumbnail width, if known.
  int32 thumbnail_width_;
  /// Thumbnail height, if known.
  int32 thumbnail_height_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Title of the result.
  string title_;
  /// A short description of the result, if known.
  string description_;
  /// The URL of the video thumbnail (JPEG), if it exists.
  string thumbnail_url_;
  /// URL of the embedded video player or video file.
  string video_url_;
  /// 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_;
  /// Width of the video.
  int32 video_width_;
  /// Height of the video.
  int32 video_height_;
  /// Video duration, in seconds.
  int32 video_duration_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Unique identifier of the query result.
  string id_;
  /// Title of the voice note.
  string title_;
  /// The URL of the voice note file.
  string voice_note_url_;
  /// Duration of the voice note, in seconds.
  int32 voice_note_duration_;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  /// 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_;

  /**
   * 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;

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

class TelegramPaymentPurpose;

/**
 * This class is an abstract base class.
 * Describes an invoice to process.
 */
class InputInvoice: public Object {
 public:
};

/**
 * 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:
  /// Chat identifier of the message.
  int53 chat_id_;
  /// Message identifier. Use messageProperties.can_be_paid to check whether the message can be used in the method.
  int53 message_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Name of the invoice.
  string name_;

  /**
   * 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;

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

/**
 * 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:
  /// Transaction purpose.
  object_ptr<TelegramPaymentPurpose> purpose_;

  /**
   * 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;

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

class InputFile;

class MessageSelfDestructType;

class PollType;

class contact;

class formattedText;

class inputPaidMedia;

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:
};

/**
 * 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:
  /// 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 and MentionName entities are allowed to be specified manually.
  object_ptr<formattedText> text_;
  /// 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_;
  /// True, if a chat message draft must be deleted.
  bool clear_draft_;

  /**
   * 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 and MentionName 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 a 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;

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

/**
 * 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:
  /// Animation file to be sent.
  object_ptr<InputFile> animation_;
  /// Animation thumbnail; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  /// File identifiers of the stickers added to the animation, if applicable.
  array<int32> added_sticker_file_ids_;
  /// Duration of the animation, in seconds.
  int32 duration_;
  /// Width of the animation; may be replaced by the server.
  int32 width_;
  /// Height of the animation; may be replaced by the server.
  int32 height_;
  /// Animation caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  /// 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_;
  /// True, if the animation preview must be covered by a spoiler animation; not supported in secret chats.
  bool has_spoiler_;

  /**
   * 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;

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

/**
 * 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:
  /// Audio file to be sent.
  object_ptr<InputFile> audio_;
  /// Thumbnail of the cover for the album; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> album_cover_thumbnail_;
  /// Duration of the audio, in seconds; may be replaced by the server.
  int32 duration_;
  /// Title of the audio; 0-64 characters; may be replaced by the server.
  string title_;
  /// Performer of the audio; 0-64 characters, may be replaced by the server.
  string performer_;
  /// Audio caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;

  /**
   * 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;

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

/**
 * 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:
  /// Document to be sent.
  object_ptr<InputFile> document_;
  /// Document thumbnail; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  /// 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_;
  /// Document caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;
  /// The content of the paid media.
  array<object_ptr<inputPaidMedia>> paid_media_;
  /// Message caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  /// 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_;
  /// Bot-provided data for the paid media; bots only.
  string payload_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;
  /// 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_;
  /// File identifiers of the stickers added to the photo, if applicable.
  array<int32> added_sticker_file_ids_;
  /// Photo width.
  int32 width_;
  /// Photo height.
  int32 height_;
  /// Photo caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  /// 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_;
  /// Photo self-destruct type; pass null if none; private chats only.
  object_ptr<MessageSelfDestructType> self_destruct_type_;
  /// True, if the photo preview must be covered by a spoiler animation; not supported in secret chats.
  bool has_spoiler_;

  /**
   * 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] 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_, 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 = -810129442;

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

/**
 * 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:
  /// Sticker to be sent.
  object_ptr<InputFile> sticker_;
  /// Sticker thumbnail; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  /// Sticker width.
  int32 width_;
  /// Sticker height.
  int32 height_;
  /// Emoji used to choose the sticker.
  string emoji_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;
  /// Video thumbnail; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  /// File identifiers of the stickers added to the video, if applicable.
  array<int32> added_sticker_file_ids_;
  /// Duration of the video, in seconds.
  int32 duration_;
  /// Video width.
  int32 width_;
  /// Video height.
  int32 height_;
  /// True, if the video is expected to be streamed.
  bool supports_streaming_;
  /// Video caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  /// 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_;
  /// Video self-destruct type; pass null if none; private chats only.
  object_ptr<MessageSelfDestructType> self_destruct_type_;
  /// True, if the video preview must be covered by a spoiler animation; not supported in secret chats.
  bool has_spoiler_;

  /**
   * 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] 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_, 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 = 615537686;

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

/**
 * 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:
  /// 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_;
  /// Video thumbnail; may be null if empty; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  /// Duration of the video, in seconds; 0-60.
  int32 duration_;
  /// Video width and height; must be positive and not greater than 640.
  int32 length_;
  /// Video note self-destruct type; may be null if none; pass null if none; private chats only.
  object_ptr<MessageSelfDestructType> self_destruct_type_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;
  /// Duration of the voice note, in seconds.
  int32 duration_;
  /// Waveform representation of the voice note in 5-bit format.
  bytes waveform_;
  /// 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_;
  /// Voice note self-destruct type; may be null if none; pass null if none; private chats only.
  object_ptr<MessageSelfDestructType> self_destruct_type_;

  /**
   * 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;

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

/**
 * 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:
  /// Location to be sent.
  object_ptr<location> location_;
  /// 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_;
  /// For live locations, a direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
  int32 heading_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Venue to send.
  object_ptr<venue> venue_;

  /**
   * 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;

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

/**
 * 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:
  /// Contact to send.
  object_ptr<contact> contact_;

  /**
   * 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;

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

/**
 * 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:
  /// Emoji on which the dice throw animation is based.
  string emoji_;
  /// True, if the chat message draft must be deleted.
  bool clear_draft_;

  /**
   * 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;

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

/**
 * 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:
  /// User identifier of the bot that owns the game.
  int53 bot_user_id_;
  /// Short name of the game.
  string game_short_name_;

  /**
   * 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;

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

/**
 * 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:
  /// Invoice.
  object_ptr<invoice> invoice_;
  /// Product title; 1-32 characters.
  string title_;
  /// Product description; 0-255 characters.
  string description_;
  /// Product photo URL; optional.
  string photo_url_;
  /// Product photo size.
  int32 photo_size_;
  /// Product photo width.
  int32 photo_width_;
  /// Product photo height.
  int32 photo_height_;
  /// The invoice payload.
  bytes payload_;
  /// Payment provider token; may be empty for payments in Telegram Stars.
  string provider_token_;
  /// JSON-encoded data about the invoice, which will be shared with the payment provider.
  string provider_data_;
  /// 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_;
  /// The content of paid media attached to the invoice; pass null if none.
  object_ptr<inputPaidMedia> paid_media_;
  /// 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_;

  /**
   * 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;

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

/**
 * A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot.
 */
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:
  /// 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_;
  /// List of poll answer options, 2-10 strings 1-100 characters each. Only custom emoji entities are allowed to be added and only by Premium users.
  array<object_ptr<formattedText>> options_;
  /// True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels.
  bool is_anonymous_;
  /// Type of the poll.
  object_ptr<PollType> type_;
  /// Amount of time the poll will be active after creation, in seconds; for bots only.
  int32 open_period_;
  /// Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.
  int32 close_date_;
  /// True, if the poll needs to be sent already closed; for bots only.
  bool is_closed_;

  /**
   * A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot.
   */
  inputMessagePoll();

  /**
   * A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot.
   *
   * \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, 2-10 strings 1-100 characters each. Only custom emoji entities are allowed to be added and only by Premium users.
   * \param[in] is_anonymous_ True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels.
   * \param[in] type_ Type of the poll.
   * \param[in] open_period_ Amount of time the poll will be active after creation, in seconds; for bots only.
   * \param[in] close_date_ Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.
   * \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<formattedText>> &&options_, bool is_anonymous_, object_ptr<PollType> &&type_, int32 open_period_, int32 close_date_, bool is_closed_);

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

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

/**
 * A message with a forwarded story. Stories can't be sent 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:
  /// Identifier of the chat that posted the story.
  int53 story_sender_chat_id_;
  /// Story identifier.
  int32 story_id_;

  /**
   * A message with a forwarded story. Stories can't be sent 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 sent to secret chats. A story can be forwarded only if story.can_be_forwarded.
   *
   * \param[in] story_sender_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Story identifier.
   */
  inputMessageStory(int53 story_sender_chat_id_, int32 story_id_);

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

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

/**
 * 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:
  /// Identifier for the chat this forwarded message came from.
  int53 from_chat_id_;
  /// Identifier of the message to forward. A message can be forwarded only if messageProperties.can_be_forwarded.
  int53 message_id_;
  /// True, if a game message is being shared from a launched game; applies only to game messages.
  bool in_game_share_;
  /// 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_;

  /**
   * 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_ True, if a game message is being shared from a launched game; applies only to game messages.
   * \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_, object_ptr<messageCopyOptions> &&copy_options_);

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

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

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:
};

/**
 * 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:
  /// 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_;
  /// Quote from the message to be replied; pass null if none. Must always be null for replies in secret chats.
  object_ptr<inputTextQuote> quote_;

  /**
   * 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.
   */
  inputMessageReplyToMessage(int53 message_id_, object_ptr<inputTextQuote> &&quote_);

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

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

/**
 * 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:
  /// The identifier of the chat to which the message to be replied belongs.
  int53 chat_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.
  int53 message_id_;
  /// Quote from the message to be replied; pass null if none.
  object_ptr<inputTextQuote> quote_;

  /**
   * 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.
   */
  inputMessageReplyToExternalMessage(int53 chat_id_, int53 message_id_, object_ptr<inputTextQuote> &&quote_);

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

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

/**
 * 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:
  /// The identifier of the sender of the story. Currently, stories can be replied only in the sender's chat and channel stories can't be replied.
  int53 story_sender_chat_id_;
  /// The identifier of the story.
  int32 story_id_;

  /**
   * Describes a story to be replied.
   */
  inputMessageReplyToStory();

  /**
   * Describes a story to be replied.
   *
   * \param[in] story_sender_chat_id_ The identifier of the sender of the story. Currently, stories can be replied only in the sender's chat and channel stories can't be replied.
   * \param[in] story_id_ The identifier of the story.
   */
  inputMessageReplyToStory(int53 story_sender_chat_id_, int32 story_id_);

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

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

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:
  /// Type of the media.
  object_ptr<InputPaidMediaType> type_;
  /// Photo or video to be sent.
  object_ptr<InputFile> media_;
  /// Media thumbnail; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  /// File identifiers of the stickers added to the media, if applicable.
  array<int32> added_sticker_file_ids_;
  /// Media width.
  int32 width_;
  /// Media height.
  int32 height_;

  /**
   * 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;

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

/**
 * This class is an abstract base class.
 * Describes type of paid media to sent.
 */
class InputPaidMediaType: public Object {
 public:
};

/**
 * 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:

  /**
   * 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();

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

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

/**
 * 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:
  /// Duration of the video, in seconds.
  int32 duration_;
  /// True, if the video is expected to be streamed.
  bool supports_streaming_;

  /**
   * The media is a video.
   */
  inputPaidMediaTypeVideo();

  /**
   * The media is a video.
   *
   * \param[in] duration_ Duration of the video, in seconds.
   * \param[in] supports_streaming_ True, if the video is expected to be streamed.
   */
  inputPaidMediaTypeVideo(int32 duration_, bool supports_streaming_);

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

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

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:
};

/**
 * 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:
  /// Personal details of the user.
  object_ptr<personalDetails> personal_details_;

  /**
   * 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;

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

/**
 * 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:
  /// The passport to be saved.
  object_ptr<inputIdentityDocument> passport_;

  /**
   * 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;

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

/**
 * 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:
  /// The driver license to be saved.
  object_ptr<inputIdentityDocument> driver_license_;

  /**
   * 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;

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

/**
 * 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:
  /// The identity card to be saved.
  object_ptr<inputIdentityDocument> identity_card_;

  /**
   * 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;

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

/**
 * 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:
  /// The internal passport to be saved.
  object_ptr<inputIdentityDocument> internal_passport_;

  /**
   * 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;

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

/**
 * 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:
  /// The address to be saved.
  object_ptr<address> address_;

  /**
   * 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;

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

/**
 * 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:
  /// The utility bill to be saved.
  object_ptr<inputPersonalDocument> utility_bill_;

  /**
   * 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;

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

/**
 * 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:
  /// The bank statement to be saved.
  object_ptr<inputPersonalDocument> bank_statement_;

  /**
   * 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;

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

/**
 * 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:
  /// The rental agreement to be saved.
  object_ptr<inputPersonalDocument> rental_agreement_;

  /**
   * 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;

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

/**
 * 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:
  /// The passport registration page to be saved.
  object_ptr<inputPersonalDocument> passport_registration_;

  /**
   * 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;

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

/**
 * 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:
  /// The temporary registration document to be saved.
  object_ptr<inputPersonalDocument> temporary_registration_;

  /**
   * 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;

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

/**
 * 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:
  /// The phone number to be saved.
  string phone_number_;

  /**
   * 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;

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

/**
 * 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:
  /// The email address to be saved.
  string email_address_;

  /**
   * 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;

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

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:
  /// Type of Telegram Passport element that has the error.
  object_ptr<PassportElementType> type_;
  /// Error message.
  string message_;
  /// Error source.
  object_ptr<InputPassportElementErrorSource> source_;

  /**
   * 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;

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

/**
 * 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:
};

/**
 * 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:
  /// Current hash of the entire element.
  bytes element_hash_;

  /**
   * 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;

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

/**
 * 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:
  /// Field name.
  string field_name_;
  /// Current data hash.
  bytes data_hash_;

  /**
   * 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;

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

/**
 * 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:
  /// Current hash of the file containing the front side.
  bytes file_hash_;

  /**
   * 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;

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

/**
 * 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:
  /// Current hash of the file containing the reverse side.
  bytes file_hash_;

  /**
   * 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;

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

/**
 * 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:
  /// Current hash of the file containing the selfie.
  bytes file_hash_;

  /**
   * 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;

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

/**
 * 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:
  /// Current hash of the file containing the translation.
  bytes file_hash_;

  /**
   * 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;

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

/**
 * 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:
  /// Current hashes of all files with the translation.
  array<bytes> file_hashes_;

  /**
   * 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;

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

/**
 * 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:
  /// Current hash of the file which has the error.
  bytes file_hash_;

  /**
   * 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;

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

/**
 * 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:
  /// Current hashes of all attached files.
  array<bytes> file_hashes_;

  /**
   * 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;

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

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:
  /// List of files containing the pages of the document.
  array<object_ptr<InputFile>> files_;
  /// List of files containing a certified English translation of the document.
  array<object_ptr<InputFile>> translation_;

  /**
   * 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;

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

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:
  /// 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_;
  /// Format of the sticker.
  object_ptr<StickerFormat> format_;
  /// String with 1-20 emoji corresponding to the sticker.
  string emojis_;
  /// Position where the mask is placed; pass null if not specified.
  object_ptr<maskPosition> mask_position_;
  /// List of up to 20 keywords with total length up to 64 characters, which can be used to find the sticker.
  array<string> keywords_;

  /**
   * 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;

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

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:
  /// Position of the area.
  object_ptr<storyAreaPosition> position_;
  /// Type of the area.
  object_ptr<InputStoryAreaType> type_;

  /**
   * 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;

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

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:
};

/**
 * 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:
  /// The location.
  object_ptr<location> location_;
  /// Address of the location; pass null if unknown.
  object_ptr<locationAddress> address_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifier of the inline query, used to found the venue.
  int64 query_id_;
  /// Identifier of the inline query result.
  string result_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Provider of the venue.
  string venue_provider_;
  /// Identifier of the venue in the provider database.
  string venue_id_;

  /**
   * 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;

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

/**
 * 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:
  /// Type of the reaction.
  object_ptr<ReactionType> reaction_type_;
  /// True, if reaction has a dark background.
  bool is_dark_;
  /// True, if reaction corner is flipped.
  bool is_flipped_;

  /**
   * 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;

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

/**
 * 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:
  /// Identifier of the chat with the message. Currently, the chat must be a supergroup or a channel chat.
  int53 chat_id_;
  /// Identifier of the message. Use messageProperties.can_be_shared_in_story to check whether the message is suitable.
  int53 message_id_;

  /**
   * 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;

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

/**
 * 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:
  /// HTTP or tg:// URL to be opened when the area is clicked.
  string url_;

  /**
   * 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;

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

/**
 * 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:
  /// Temperature, in degree Celsius.
  double temperature_;
  /// Emoji representing the weather.
  string emoji_;
  /// A color of the area background in the ARGB format.
  int32 background_color_;

  /**
   * 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;

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

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:
  /// 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, and up to 3 inputStoryAreaTypeWeather areas.
  array<object_ptr<inputStoryArea>> areas_;

  /**
   * 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, and up to 3 inputStoryAreaTypeWeather areas.
   */
  explicit inputStoryAreas(array<object_ptr<inputStoryArea>> &&areas_);

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

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

class InputFile;

/**
 * This class is an abstract base class.
 * The content of a story to send.
 */
class InputStoryContent: public Object {
 public:
};

/**
 * 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:
  /// Photo to send. The photo must be at most 10 MB in size. The photo size must be 1080x1920.
  object_ptr<InputFile> photo_;
  /// File identifiers of the stickers added to the photo, if applicable.
  array<int32> added_sticker_file_ids_;

  /**
   * 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;

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

/**
 * 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:
  /// 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_;
  /// File identifiers of the stickers added to the video, if applicable.
  array<int32> added_sticker_file_ids_;
  /// Precise duration of the video, in seconds; 0-60.
  double duration_;
  /// Timestamp of the frame, which will be used as video thumbnail.
  double cover_frame_timestamp_;
  /// True, if the video has no sound.
  bool is_animation_;

  /**
   * 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;

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

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:
  /// Text of the quote; 0-getOption(&quot;message_reply_quote_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed to be kept and must be kept in the quote.
  object_ptr<formattedText> text_;
  /// Quote position in the original message in UTF-16 code units.
  int32 position_;

  /**
   * 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, and CustomEmoji 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;

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

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:
  /// Thumbnail file to send. Sending thumbnails by file_id is currently not supported.
  object_ptr<InputFile> thumbnail_;
  /// Thumbnail width, usually shouldn't exceed 320. Use 0 if unknown.
  int32 width_;
  /// Thumbnail height, usually shouldn't exceed 320. Use 0 if unknown.
  int32 height_;

  /**
   * 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;

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

class ProxyType;

class TargetChat;

class WebAppOpenMode;

class chatAdministratorRights;

class formattedText;

/**
 * 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:
};

/**
 * The link is a link to the Devices section of the application. Use getActiveSessions to get the list of active sessions and show them to the user.
 */
class internalLinkTypeActiveSessions 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:

  /**
   * The link is a link to the Devices section of the application. Use getActiveSessions to get the list of active sessions and show them to the user.
   */
  internalLinkTypeActiveSessions();

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

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

/**
 * 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:
  /// Target chat to be opened.
  object_ptr<TargetChat> target_chat_;
  /// Username of the bot.
  string bot_username_;
  /// URL to be passed to openWebApp.
  string url_;

  /**
   * 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;

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

/**
 * 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:
  /// The authentication code.
  string code_;

  /**
   * 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;

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

/**
 * 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:
  /// Name of the background.
  string background_name_;

  /**
   * 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;

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

/**
 * 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:
  /// Username of the bot.
  string bot_username_;
  /// Expected administrator rights for the bot.
  object_ptr<chatAdministratorRights> administrator_rights_;

  /**
   * 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;

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

/**
 * 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:
  /// Username of the bot.
  string bot_username_;
  /// The parameter to be passed to sendBotStartMessage.
  string start_parameter_;
  /// True, if sendBotStartMessage must be called automatically without showing the START button.
  bool autostart_;

  /**
   * 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;

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

/**
 * 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:
  /// Username of the bot.
  string bot_username_;
  /// The parameter to be passed to sendBotStartMessage.
  string start_parameter_;
  /// Expected administrator rights for the bot; may be null.
  object_ptr<chatAdministratorRights> administrator_rights_;

  /**
   * 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;

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

/**
 * 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:
  /// Name of the link.
  string link_name_;

  /**
   * 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;

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

/**
 * The link is a link to the Telegram Star purchase section of the application.
 */
class internalLinkTypeBuyStars 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:
  /// The number of Telegram Stars that must be owned by the user.
  int53 star_count_;
  /// 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_;

  /**
   * The link is a link to the Telegram Star purchase section of the application.
   */
  internalLinkTypeBuyStars();

  /**
   * 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.
   */
  internalLinkTypeBuyStars(int53 star_count_, string const &purpose_);

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

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

/**
 * The link is a link to the change phone number section of the application.
 */
class internalLinkTypeChangePhoneNumber 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:

  /**
   * The link is a link to the change phone number section of the application.
   */
  internalLinkTypeChangePhoneNumber();

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

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

/**
 * 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:
  /// Username to be passed to searchChatAffiliateProgram.
  string username_;
  /// Referrer to be passed to searchChatAffiliateProgram.
  string referrer_;

  /**
   * 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;

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

/**
 * 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:
  /// URL to be passed to getChatBoostLinkInfo.
  string url_;

  /**
   * 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;

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

/**
 * 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:
  /// Internal representation of the invite link.
  string invite_link_;

  /**
   * 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;

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

/**
 * The link is a link to the folder section of the application settings.
 */
class internalLinkTypeChatFolderSettings 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:

  /**
   * The link is a link to the folder section of the application settings.
   */
  internalLinkTypeChatFolderSettings();

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

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

/**
 * 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:
  /// Internal representation of the invite link.
  string invite_link_;

  /**
   * 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;

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

/**
 * The link is a link to the default message auto-delete timer settings section of the application settings.
 */
class internalLinkTypeDefaultMessageAutoDeleteTimerSettings 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:

  /**
   * The link is a link to the default message auto-delete timer settings section of the application settings.
   */
  internalLinkTypeDefaultMessageAutoDeleteTimerSettings();

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

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

/**
 * The link is a link to the edit profile section of the application settings.
 */
class internalLinkTypeEditProfileSettings 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:

  /**
   * The link is a link to the edit profile section of the application settings.
   */
  internalLinkTypeEditProfileSettings();

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

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

/**
 * 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:
  /// Username of the bot that owns the game.
  string bot_username_;
  /// Short name of the game.
  string game_short_name_;

  /**
   * 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;

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

/**
 * 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:
  /// URL to be passed to getWebPageInstantView.
  string url_;
  /// An URL to open if getWebPageInstantView fails.
  string fallback_url_;

  /**
   * 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;

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

/**
 * 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:
  /// Name of the invoice.
  string invoice_name_;

  /**
   * 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;

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

/**
 * 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:
  /// Language pack identifier.
  string language_pack_id_;

  /**
   * 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;

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

/**
 * The link is a link to the language section of the application settings.
 */
class internalLinkTypeLanguageSettings 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:

  /**
   * The link is a link to the language section of the application settings.
   */
  internalLinkTypeLanguageSettings();

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

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

/**
 * 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:
  /// Username of the bot.
  string bot_username_;
  /// Start parameter to be passed to getMainWebApp.
  string start_parameter_;
  /// The mode to be passed to getMainWebApp.
  object_ptr<WebAppOpenMode> mode_;

  /**
   * 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;

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

/**
 * 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:
  /// URL to be passed to getMessageLinkInfo.
  string url_;

  /**
   * 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;

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

/**
 * 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:
  /// Message draft text.
  object_ptr<formattedText> text_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// User identifier of the service's bot; the corresponding user may be unknown yet.
  int53 bot_user_id_;
  /// Telegram Passport element types requested by the service.
  string scope_;
  /// Service's public key.
  string public_key_;
  /// Unique request identifier provided by the service.
  string nonce_;
  /// 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_;

  /**
   * 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;

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

/**
 * 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:
  /// Hash value from the link.
  string hash_;
  /// Phone number value from the link.
  string phone_number_;

  /**
   * 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;

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

/**
 * 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 internalLinkTypePremiumFeatures 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:
  /// Referrer specified in the link.
  string referrer_;

  /**
   * 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.
   */
  internalLinkTypePremiumFeatures();

  /**
   * 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 internalLinkTypePremiumFeatures(string const &referrer_);

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

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

/**
 * The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGiftCodes payments or in-store purchases.
 */
class internalLinkTypePremiumGift 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:
  /// Referrer specified in the link.
  string referrer_;

  /**
   * The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGiftCodes payments or in-store purchases.
   */
  internalLinkTypePremiumGift();

  /**
   * The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGiftCodes payments or in-store purchases.
   *
   * \param[in] referrer_ Referrer specified in the link.
   */
  explicit internalLinkTypePremiumGift(string const &referrer_);

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

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

/**
 * 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:
  /// The Telegram Premium gift code.
  string code_;

  /**
   * 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;

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

/**
 * The link is a link to the privacy and security section of the application settings.
 */
class internalLinkTypePrivacyAndSecuritySettings 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:

  /**
   * The link is a link to the privacy and security section of the application settings.
   */
  internalLinkTypePrivacyAndSecuritySettings();

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

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

/**
 * 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:
  /// Proxy server domain or IP address.
  string server_;
  /// Proxy server port.
  int32 port_;
  /// Type of the proxy.
  object_ptr<ProxyType> type_;

  /**
   * 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] server_ Proxy server domain or IP address.
   * \param[in] port_ Proxy server port.
   * \param[in] type_ Type of the proxy.
   */
  internalLinkTypeProxy(string const &server_, int32 port_, object_ptr<ProxyType> &&type_);

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

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

/**
 * 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:
  /// Username of the chat.
  string chat_username_;
  /// Draft text for message to send in the chat.
  string draft_text_;
  /// True, if chat profile information screen must be opened; otherwise, the chat itself must be opened.
  bool open_profile_;

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * 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;

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

/**
 * 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:

  /**
   * The link is a link to application settings.
   */
  internalLinkTypeSettings();

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

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

/**
 * 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:
  /// Name of the sticker set.
  string sticker_set_name_;
  /// True, if the sticker set is expected to contain custom emoji.
  bool expect_custom_emoji_;

  /**
   * 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;

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

/**
 * The link is a link to a story. Call searchPublicChat with the given sender 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:
  /// Username of the sender of the story.
  string story_sender_username_;
  /// Story identifier.
  int32 story_id_;

  /**
   * The link is a link to a story. Call searchPublicChat with the given sender 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 sender username, then call getStory with the received chat identifier and the given story identifier, then show the story if received.
   *
   * \param[in] story_sender_username_ Username of the sender of the story.
   * \param[in] story_id_ Story identifier.
   */
  internalLinkTypeStory(string const &story_sender_username_, int32 story_id_);

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

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

/**
 * 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:
  /// Name of the theme.
  string theme_name_;

  /**
   * 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;

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

/**
 * The link is a link to the theme section of the application settings.
 */
class internalLinkTypeThemeSettings 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:

  /**
   * The link is a link to the theme section of the application settings.
   */
  internalLinkTypeThemeSettings();

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

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

/**
 * 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:
  /// Link to be passed to getDeepLinkInfo.
  string link_;

  /**
   * 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;

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

/**
 * The link is a link to an unsupported proxy. An alert can be shown to the user.
 */
class internalLinkTypeUnsupportedProxy 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:

  /**
   * The link is a link to an unsupported proxy. An alert can be shown to the user.
   */
  internalLinkTypeUnsupportedProxy();

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

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

/**
 * 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:
  /// Phone number of the user.
  string phone_number_;
  /// Draft text for message to send in the chat.
  string draft_text_;
  /// True, if user's profile information screen must be opened; otherwise, the chat itself must be opened.
  bool open_profile_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The token.
  string token_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinGroupCall 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:
  /// Username of the chat with the video chat.
  string chat_username_;
  /// If non-empty, invite hash to be used to join the video chat without being muted by administrators.
  string invite_hash_;
  /// True, if the video chat is expected to be a live stream in a channel or a broadcast group.
  bool is_live_stream_;

  /**
   * The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinGroupCall 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 joinGroupCall 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot, then 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:
  /// Username of the bot that owns the Web App.
  string bot_username_;
  /// Short name of the Web App.
  string web_app_short_name_;
  /// Start parameter to be passed to getWebAppLinkUrl.
  string start_parameter_;
  /// The mode in which the Web App must be opened.
  object_ptr<WebAppOpenMode> mode_;

  /**
   * The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot, then 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, then 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes the type of chat to which points an invite link.
 */
class InviteLinkChatType: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// ISO 4217 currency code.
  string currency_;
  /// A list of objects used to calculate the total price of the product.
  array<object_ptr<labeledPricePart>> price_parts_;
  /// The number of seconds between consecutive Telegram Star debiting for subscription invoices; 0 if the invoice doesn't create subscription.
  int32 subscription_period_;
  /// The maximum allowed amount of tip in the smallest units of the currency.
  int53 max_tip_amount_;
  /// Suggested amounts of tip in the smallest units of the currency.
  array<int53> suggested_tip_amounts_;
  /// 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_;
  /// 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_;
  /// True, if the payment is a test payment.
  bool is_test_;
  /// True, if the user's name is needed for payment.
  bool need_name_;
  /// True, if the user's phone number is needed for payment.
  bool need_phone_number_;
  /// True, if the user's email address is needed for payment.
  bool need_email_address_;
  /// True, if the user's shipping address is needed for payment.
  bool need_shipping_address_;
  /// True, if the user's phone number will be sent to the provider.
  bool send_phone_number_to_provider_;
  /// True, if the user's email address will be sent to the provider.
  bool send_email_address_to_provider_;
  /// True, if the total price depends on the shipping method.
  bool is_flexible_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Member's key.
  string key_;
  /// Member's value.
  object_ptr<JsonValue> value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class JsonValue;

class jsonObjectMember;

/**
 * This class is an abstract base class.
 * Represents a JSON value.
 */
class JsonValue: public Object {
 public:
};

/**
 * 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:

  /**
   * Represents a null JSON value.
   */
  jsonValueNull();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -92872499;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The value.
  bool value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The value.
  double value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The value.
  string value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The list of array elements.
  array<object_ptr<JsonValue>> values_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The list of object members.
  array<object_ptr<jsonObjectMember>> members_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Text of the button.
  string text_;
  /// Type of the button.
  object_ptr<KeyboardButtonType> type_;

  /**
   * 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] type_ Type of the button.
   */
  keyboardButton(string const &text_, object_ptr<KeyboardButtonType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2069836172;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chatAdministratorRights;

/**
 * This class is an abstract base class.
 * Describes a keyboard button type.
 */
class KeyboardButtonType: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// If true, only regular polls must be allowed to create.
  bool force_regular_;
  /// If true, only polls in quiz mode must be allowed to create.
  bool force_quiz_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique button identifier.
  int32 id_;
  /// True, if the shared users must or must not be bots.
  bool restrict_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.
  bool user_is_bot_;
  /// True, if the shared users must or must not be Telegram Premium users.
  bool restrict_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.
  bool user_is_premium_;
  /// The maximum number of users to share.
  int32 max_quantity_;
  /// Pass true to request name of the users; bots only.
  bool request_name_;
  /// Pass true to request username of the users; bots only.
  bool request_username_;
  /// Pass true to request photo of the users; bots only.
  bool request_photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique button identifier.
  int32 id_;
  /// True, if the chat must be a channel; otherwise, a basic group or a supergroup chat is shared.
  bool chat_is_channel_;
  /// True, if the chat must or must not be a forum supergroup.
  bool restrict_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.
  bool chat_is_forum_;
  /// True, if the chat must or must not have a username.
  bool restrict_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.
  bool chat_has_username_;
  /// True, if the chat must be created by the current user.
  bool chat_is_created_;
  /// Expected user administrator rights in the chat; may be null if they aren't restricted.
  object_ptr<chatAdministratorRights> user_administrator_rights_;
  /// Expected bot administrator rights in the chat; may be null if they aren't restricted.
  object_ptr<chatAdministratorRights> bot_administrator_rights_;
  /// True, if the bot must be a member of the chat; for basic group and supergroup chats only.
  bool bot_is_member_;
  /// Pass true to request title of the chat; bots only.
  bool request_title_;
  /// Pass true to request username of the chat; bots only.
  bool request_username_;
  /// Pass true to request photo of the chat; bots only.
  bool request_photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// An HTTP URL to pass to getWebAppUrl.
  string url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Label for this portion of the product price.
  string label_;
  /// Currency amount in the smallest units of the currency.
  int53 amount_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique language pack identifier.
  string 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.
  string base_language_pack_id_;
  /// Language name.
  string name_;
  /// Name of the language in that language.
  string native_name_;
  /// 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_;
  /// True, if the language pack is official.
  bool is_official_;
  /// True, if the language pack strings are RTL.
  bool is_rtl_;
  /// True, if the language pack is a beta language pack.
  bool is_beta_;
  /// True, if the language pack is installed by the current user.
  bool is_installed_;
  /// Total number of non-deleted strings from the language pack.
  int32 total_string_count_;
  /// Total number of translated strings from the language pack.
  int32 translated_string_count_;
  /// Total number of non-deleted strings from the language pack available locally.
  int32 local_string_count_;
  /// Link to language translation interface; empty for custom local language packs.
  string translation_url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// String key.
  string key_;
  /// String value; pass null if the string needs to be taken from the built-in English language pack.
  object_ptr<LanguagePackStringValue> value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Represents the value of a string in a language pack.
 */
class LanguagePackStringValue: public Object {
 public:
};

/**
 * 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:
  /// String value.
  string value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Value for zero objects.
  string zero_value_;
  /// Value for one object.
  string one_value_;
  /// Value for two objects.
  string two_value_;
  /// Value for few objects.
  string few_value_;
  /// Value for many objects.
  string many_value_;
  /// Default value.
  string other_value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// A list of language pack strings.
  array<object_ptr<languagePackString>> strings_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Original URL of the link.
  string url_;
  /// URL to display.
  string display_url_;
  /// Short name of the site (e.g., Google Docs, App Store).
  string site_name_;
  /// Title of the content.
  string title_;
  /// Description of the content.
  object_ptr<formattedText> description_;
  /// Author of the content.
  string author_;
  /// Type of the link preview.
  object_ptr<LinkPreviewType> type_;
  /// True, if size of media in the preview can be changed.
  bool has_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.
  bool show_large_media_;
  /// True, if media must be shown above link preview description; otherwise, the media must be shown below the description.
  bool show_media_above_description_;
  /// 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_;
  /// 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_;
  /// Version of instant view (currently, can be 1 or 2) for the web page; 0 if none.
  int32 instant_view_version_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class photo;

class video;

/**
 * This class is an abstract base class.
 * Describes a media from a link preview album.
 */
class LinkPreviewAlbumMedia: public Object {
 public:
};

/**
 * 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:
  /// Photo description.
  object_ptr<photo> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Video description.
  object_ptr<video> video_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if link preview must be disabled.
  bool is_disabled_;
  /// URL to use for link preview. If empty, then the first URL found in the message text will be used.
  string url_;
  /// True, if shown media preview must be small; ignored in secret chats or if the URL isn't explicitly specified.
  bool force_small_media_;
  /// True, if shown media preview must be large; ignored in secret chats or if the URL isn't explicitly specified.
  bool force_large_media_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class BackgroundType;

class InviteLinkChatType;

class LinkPreviewAlbumMedia;

class animation;

class audio;

class chatPhoto;

class document;

class photo;

class sticker;

class themeSettings;

class video;

class videoNote;

class voiceNote;

/**
 * This class is an abstract base class.
 * Describes type of link preview.
 */
class LinkPreviewType: public Object {
 public:
};

/**
 * 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:
  /// The list of album media.
  array<object_ptr<LinkPreviewAlbumMedia>> media_;
  /// Album caption.
  string caption_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The animation.
  object_ptr<animation> animation_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Photo for the app.
  object_ptr<photo> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Article's main photo; may be null.
  object_ptr<photo> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The audio description.
  object_ptr<audio> audio_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Document with the background; may be null for filled backgrounds.
  object_ptr<document> document_;
  /// Type of the background; may be null if unknown.
  object_ptr<BackgroundType> background_type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Photo of the chat; may be null.
  object_ptr<chatPhoto> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Type of the chat.
  object_ptr<InviteLinkChatType> type_;
  /// Photo of the chat; may be null.
  object_ptr<chatPhoto> photo_;
  /// True, if the link only creates join request.
  bool creates_join_request_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The document description.
  object_ptr<document> document_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// URL of the external animation player.
  string url_;
  /// Thumbnail of the animation; may be null if unknown.
  object_ptr<photo> thumbnail_;
  /// Duration of the animation, in seconds.
  int32 duration_;
  /// Expected width of the embedded player.
  int32 width_;
  /// Expected height of the embedded player.
  int32 height_;

  /**
   * 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] 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<photo> &&thumbnail_, int32 duration_, int32 width_, int32 height_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1436887547;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// URL of the external audio player.
  string url_;
  /// Thumbnail of the audio; may be null if unknown.
  object_ptr<photo> thumbnail_;
  /// Duration of the audio, in seconds.
  int32 duration_;
  /// Expected width of the embedded player.
  int32 width_;
  /// Expected height of the embedded player.
  int32 height_;

  /**
   * 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] 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<photo> &&thumbnail_, int32 duration_, int32 width_, int32 height_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 571163292;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// URL of the external video player.
  string url_;
  /// Thumbnail of the video; may be null if unknown.
  object_ptr<photo> thumbnail_;
  /// Duration of the video, in seconds.
  int32 duration_;
  /// Expected width of the embedded player.
  int32 width_;
  /// Expected height of the embedded player.
  int32 height_;

  /**
   * 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] 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<photo> &&thumbnail_, int32 duration_, int32 width_, int32 height_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1480606973;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// URL of the audio file.
  string url_;
  /// MIME type of the audio file.
  string mime_type_;
  /// Duration of the audio, in seconds; 0 if unknown.
  int32 duration_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// URL of the video file.
  string url_;
  /// MIME type of the video file.
  string mime_type_;
  /// Expected width of the video preview; 0 if unknown.
  int32 width_;
  /// Expected height of the video preview; 0 if unknown.
  int32 height_;
  /// Duration of the video, in seconds; 0 if unknown.
  int32 duration_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The link is a link to an invoice.
   */
  linkPreviewTypeInvoice();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -729855782;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The photo.
  object_ptr<photo> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The sticker. It can be an arbitrary WEBP image and can have dimensions bigger than 512.
  object_ptr<sticker> sticker_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Up to 4 stickers from the sticker set.
  array<object_ptr<sticker>> stickers_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The identifier of the chat that posted the story.
  int53 story_sender_chat_id_;
  /// Story identifier.
  int32 story_id_;

  /**
   * 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_sender_chat_id_ The identifier of the chat that posted the story.
   * \param[in] story_id_ Story identifier.
   */
  linkPreviewTypeStory(int53 story_sender_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 513574862;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Photo of the chat; may be null.
  object_ptr<chatPhoto> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The list of files with theme description.
  array<object_ptr<document>> documents_;
  /// Settings for the cloud theme; may be null if unknown.
  object_ptr<themeSettings> settings_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The link preview type is unsupported yet.
   */
  linkPreviewTypeUnsupported();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1924738233;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Photo of the user; may be null if none.
  object_ptr<chatPhoto> photo_;
  /// True, if the user is a bot.
  bool is_bot_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The video description.
  object_ptr<video> video_;

  /**
   * The link is a link to a video.
   */
  linkPreviewTypeVideo();

  /**
   * The link is a link to a video.
   *
   * \param[in] video_ The video description.
   */
  explicit linkPreviewTypeVideo(object_ptr<video> &&video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 281672712;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Photo of the chat with the video chat; may be null if none.
  object_ptr<chatPhoto> photo_;
  /// True, if the video chat is expected to be a live stream in a channel or a broadcast group.
  bool is_live_stream_;

  /**
   * 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.
   */
  linkPreviewTypeVideoChat(object_ptr<chatPhoto> &&photo_, bool is_live_stream_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 420015635;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The video note.
  object_ptr<videoNote> video_note_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The voice note.
  object_ptr<voiceNote> voice_note_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Web App photo; may be null if none.
  object_ptr<photo> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Local path to the locally available file part; may be empty.
  string path_;
  /// True, if it is possible to download or generate the file.
  bool can_be_downloaded_;
  /// True, if the file can be deleted.
  bool can_be_deleted_;
  /// True, if the file is currently being downloaded (or a local copy is being generated by some other means).
  bool is_downloading_active_;
  /// True, if the local copy is fully available.
  bool is_downloading_completed_;
  /// Download will be started from this offset. downloaded_prefix_size is calculated from this offset.
  int53 download_offset_;
  /// 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_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of available language packs for this application.
  array<object_ptr<languagePackInfo>> language_packs_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Latitude of the location in degrees; as defined by the sender.
  double latitude_;
  /// Longitude of the location, in degrees; as defined by the sender.
  double longitude_;
  /// The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown.
  double horizontal_accuracy_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// A two-letter ISO 3166-1 alpha-2 country code.
  string country_code_;
  /// State, if applicable; empty if unknown.
  string state_;
  /// City; empty if unknown.
  string city_;
  /// The address; empty if unknown.
  string street_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes a stream to which TDLib internal log is written.
 */
class LogStream: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Path to the file to where the internal TDLib log will be written.
  string path_;
  /// 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_;
  /// Pass true to additionally redirect stderr to the log file. Ignored on Windows.
  bool redirect_stderr_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The log is written nowhere.
   */
  logStreamEmpty();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -499912244;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// List of log tags.
  array<string> tags_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Log verbosity level.
  int32 verbosity_level_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl.
 */
class LoginUrlInfo: public Object {
 public:
};

/**
 * 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:
  /// The URL to open.
  string url_;
  /// True, if there is no need to show an ordinary open URL confirmation.
  bool skip_confirmation_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// An HTTP URL to be opened.
  string url_;
  /// A domain of the URL.
  string domain_;
  /// User identifier of a bot linked with the website.
  int53 bot_user_id_;
  /// True, if the user must be asked for the permission to the bot to send them messages.
  bool request_write_access_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// URL of the Web App to open.
  string url_;
  /// The mode in which the Web App must be opened.
  object_ptr<WebAppOpenMode> mode_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Part of the face, relative to which a mask is placed.
 */
class MaskPoint: public Object {
 public:
};

/**
 * 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:

  /**
   * The mask is placed relatively to the forehead.
   */
  maskPointForehead();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1027512005;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The mask is placed relatively to the eyes.
   */
  maskPointEyes();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1748310861;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The mask is placed relatively to the mouth.
   */
  maskPointMouth();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 411773406;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The mask is placed relatively to the chin.
   */
  maskPointChin();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 534995335;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Part of the face, relative to which the mask is placed.
  object_ptr<MaskPoint> point_;
  /// 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_;
  /// 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_;
  /// Mask scaling coefficient. (For example, 2.0 means a doubled size.)
  double scale_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageContent;

class MessageReplyTo;

class MessageSchedulingState;

class MessageSelfDestructType;

class MessageSender;

class MessageSendingState;

class ReplyMarkup;

class factCheck;

class messageForwardInfo;

class messageImportInfo;

class messageInteractionInfo;

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:
  /// Message identifier; unique for the chat to which the message belongs.
  int53 id_;
  /// Identifier of the sender of the message.
  object_ptr<MessageSender> sender_id_;
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;
  /// The scheduling state of the message; may be null if the message isn't scheduled.
  object_ptr<MessageSchedulingState> scheduling_state_;
  /// True, if the message is outgoing.
  bool is_outgoing_;
  /// True, if the message is pinned.
  bool is_pinned_;
  /// 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_;
  /// True, if content of the message can be saved locally or copied using inputMessageForwarded or forwardMessages with copy options.
  bool can_be_saved_;
  /// 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_;
  /// 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_;
  /// True, if the message is a forum topic message.
  bool is_topic_message_;
  /// True, if the message contains an unread mention for the current user.
  bool contains_unread_mention_;
  /// Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages.
  int32 date_;
  /// Point in time (Unix timestamp) when the message was last edited; 0 for scheduled messages.
  int32 edit_date_;
  /// Information about the initial message sender; may be null if none or unknown.
  object_ptr<messageForwardInfo> forward_info_;
  /// Information about the initial message for messages created with importMessages; may be null if the message isn't imported.
  object_ptr<messageImportInfo> import_info_;
  /// Information about interactions with the message; may be null if none.
  object_ptr<messageInteractionInfo> interaction_info_;
  /// Information about unread reactions added to the message.
  array<object_ptr<unreadReaction>> unread_reactions_;
  /// Information about fact-check added to the message; may be null if none.
  object_ptr<factCheck> fact_check_;
  /// Information about the message or the story this message is replying to; may be null if none.
  object_ptr<MessageReplyTo> reply_to_;
  /// If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs.
  int53 message_thread_id_;
  /// Identifier of the Saved Messages topic for the message; 0 for messages not from Saved Messages.
  int53 saved_messages_topic_id_;
  /// The message's self-destruct type; may be null if none.
  object_ptr<MessageSelfDestructType> self_destruct_type_;
  /// Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn't scheduled yet.
  double self_destruct_in_;
  /// 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_;
  /// If non-zero, the user identifier of the inline bot through which this message was sent.
  int53 via_bot_user_id_;
  /// If non-zero, the user identifier of the business bot that sent this message.
  int53 sender_business_bot_user_id_;
  /// 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_;
  /// For channel posts and anonymous group messages, optional author signature.
  string author_signature_;
  /// 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_;
  /// Unique identifier of the effect added to the message; 0 if none.
  int64 effect_id_;
  /// True, if media content of the message must be hidden with 18+ spoiler.
  bool has_sensitive_content_;
  /// If non-empty, contains a human-readable description of the reason why access to this message must be restricted.
  string restriction_reason_;
  /// Content of the message.
  object_ptr<MessageContent> content_;
  /// Reply markup for the message; may be null if none.
  object_ptr<ReplyMarkup> reply_markup_;

  /**
   * 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 or copied using inputMessageForwarded or forwardMessages with copy options.
   * \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_topic_message_ True, if the message is a forum topic message.
   * \param[in] contains_unread_mention_ True, if the message contains an unread mention for the current user.
   * \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] reply_to_ Information about the message or the story this message is replying to; may be null if none.
   * \param[in] message_thread_id_ If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs.
   * \param[in] saved_messages_topic_id_ Identifier of the Saved Messages topic for the message; 0 for messages not from Saved Messages.
   * \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] 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] 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] has_sensitive_content_ True, if media content of the message must be hidden with 18+ spoiler.
   * \param[in] restriction_reason_ If non-empty, contains a human-readable description of the reason why access to this message must be restricted.
   * \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_topic_message_, bool contains_unread_mention_, 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<MessageReplyTo> &&reply_to_, int53 message_thread_id_, int53 saved_messages_topic_id_, object_ptr<MessageSelfDestructType> &&self_destruct_type_, double self_destruct_in_, double auto_delete_in_, int53 via_bot_user_id_, int53 sender_business_bot_user_id_, int32 sender_boost_count_, string const &author_signature_, int64 media_album_id_, int64 effect_id_, bool has_sensitive_content_, string const &restriction_reason_, object_ptr<MessageContent> &&content_, object_ptr<ReplyMarkup> &&reply_markup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1132260831;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Message auto-delete time, in seconds. If 0, then messages aren't deleted automatically.
  int32 time_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Total number of found messages.
  int32 total_count_;
  /// Information about messages sent.
  array<object_ptr<messageCalendarDay>> days_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Total number of found messages sent on the day.
  int32 total_count_;
  /// First message sent on the day.
  object_ptr<message> message_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class BotWriteAccessAllowReason;

class CallDiscardReason;

class DiceStickers;

class GiveawayPrize;

class MessageSender;

class PaidMedia;

class PassportElementType;

class alternativeVideo;

class animatedEmoji;

class animation;

class audio;

class chatBackground;

class chatPhoto;

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 sticker;

class venue;

class video;

class videoNote;

class voiceNote;

/**
 * This class is an abstract base class.
 * Contains the content of a message.
 */
class MessageContent: public Object {
 public:
};

/**
 * 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:
  /// Text of the message.
  object_ptr<formattedText> text_;
  /// A link preview attached to the message; may be null.
  object_ptr<linkPreview> link_preview_;
  /// Options which were used for generation of the link preview; may be null if default options were used.
  object_ptr<linkPreviewOptions> link_preview_options_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The animation description.
  object_ptr<animation> animation_;
  /// Animation caption.
  object_ptr<formattedText> caption_;
  /// True, if the caption must be shown above the animation; otherwise, the caption must be shown below the animation.
  bool show_caption_above_media_;
  /// True, if the animation preview must be covered by a spoiler animation.
  bool has_spoiler_;
  /// True, if the animation thumbnail must be blurred and the animation must be shown only while tapped.
  bool is_secret_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The audio description.
  object_ptr<audio> audio_;
  /// Audio caption.
  object_ptr<formattedText> caption_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The document description.
  object_ptr<document> document_;
  /// Document caption.
  object_ptr<formattedText> caption_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of Telegram Stars needed to buy access to the media in the message.
  int53 star_count_;
  /// Information about the media.
  array<object_ptr<PaidMedia>> media_;
  /// Media caption.
  object_ptr<formattedText> caption_;
  /// True, if the caption must be shown above the media; otherwise, the caption must be shown below the media.
  bool show_caption_above_media_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The photo.
  object_ptr<photo> photo_;
  /// Photo caption.
  object_ptr<formattedText> caption_;
  /// True, if the caption must be shown above the photo; otherwise, the caption must be shown below the photo.
  bool show_caption_above_media_;
  /// True, if the photo preview must be covered by a spoiler animation.
  bool has_spoiler_;
  /// True, if the photo must be blurred and must be shown only while tapped.
  bool is_secret_;

  /**
   * A photo message.
   */
  messagePhoto();

  /**
   * A photo message.
   *
   * \param[in] photo_ The photo.
   * \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<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 = 1967947295;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The sticker description.
  object_ptr<sticker> sticker_;
  /// True, if premium animation of the sticker must be played.
  bool is_premium_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The video description.
  object_ptr<video> video_;
  /// Alternative qualities of the video.
  array<object_ptr<alternativeVideo>> alternative_videos_;
  /// Video caption.
  object_ptr<formattedText> caption_;
  /// True, if the caption must be shown above the video; otherwise, the caption must be shown below the video.
  bool show_caption_above_media_;
  /// True, if the video preview must be covered by a spoiler animation.
  bool has_spoiler_;
  /// True, if the video thumbnail must be blurred and the video must be shown only while tapped.
  bool is_secret_;

  /**
   * A video message.
   */
  messageVideo();

  /**
   * A video message.
   *
   * \param[in] video_ The video description.
   * \param[in] alternative_videos_ Alternative qualities of the video.
   * \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_, 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 = -1307143860;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The video note description.
  object_ptr<videoNote> video_note_;
  /// True, if at least one of the recipients has viewed the video note.
  bool is_viewed_;
  /// True, if the video note thumbnail must be blurred and the video note must be shown only while tapped.
  bool is_secret_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The voice note description.
  object_ptr<voiceNote> voice_note_;
  /// Voice note caption.
  object_ptr<formattedText> caption_;
  /// True, if at least one of the recipients has listened to the voice note.
  bool is_listened_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A self-destructed photo message.
   */
  messageExpiredPhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1404641801;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A self-destructed video message.
   */
  messageExpiredVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1212209981;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A self-destructed video note message.
   */
  messageExpiredVideoNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 599540711;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A self-destructed voice note message.
   */
  messageExpiredVoiceNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 143684989;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The location description.
  object_ptr<location> location_;
  /// 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_;
  /// 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_;
  /// For live locations, a direction in which the location moves, in degrees; 1-360. If 0 the direction is unknown.
  int32 heading_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The venue description.
  object_ptr<venue> venue_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The contact description.
  object_ptr<contact> contact_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The animated emoji.
  object_ptr<animatedEmoji> animated_emoji_;
  /// The corresponding emoji.
  string emoji_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// 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_;
  /// Emoji on which the dice throw animation is based.
  string emoji_;
  /// The dice value. If the value is 0, the dice don't have final state yet.
  int32 value_;
  /// Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded.
  int32 success_animation_frame_number_;

  /**
   * 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, 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The game description.
  object_ptr<game> game_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The poll description.
  object_ptr<poll> poll_;

  /**
   * A message with a poll.
   */
  messagePoll();

  /**
   * A message with a poll.
   *
   * \param[in] poll_ The poll description.
   */
  explicit messagePoll(object_ptr<poll> &&poll_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -662130099;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the chat that posted the story.
  int53 story_sender_chat_id_;
  /// Story identifier.
  int32 story_id_;
  /// True, if the story was automatically forwarded because of a mention of the user.
  bool via_mention_;

  /**
   * A message with a forwarded story.
   */
  messageStory();

  /**
   * A message with a forwarded story.
   *
   * \param[in] story_sender_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_sender_chat_id_, int32 story_id_, bool via_mention_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 858387156;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Information about the product.
  object_ptr<productInfo> product_info_;
  /// Currency for the product price.
  string currency_;
  /// Product total price in the smallest units of the currency.
  int53 total_amount_;
  /// Unique invoice bot start_parameter to be passed to getInternalLink.
  string start_parameter_;
  /// True, if the invoice is a test invoice.
  bool is_test_;
  /// True, if the shipping address must be specified.
  bool need_shipping_address_;
  /// The identifier of the message with the receipt, after the product has been purchased.
  int53 receipt_message_id_;
  /// Extended media attached to the invoice; may be null if none.
  object_ptr<PaidMedia> paid_media_;
  /// Extended media caption; may be null if none.
  object_ptr<formattedText> paid_media_caption_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if the call was a video call.
  bool is_video_;
  /// Reason why the call was discarded.
  object_ptr<CallDiscardReason> discard_reason_;
  /// Call duration, in seconds.
  int32 duration_;

  /**
   * A message with information about an ended call.
   */
  messageCall();

  /**
   * A message with information about an ended call.
   *
   * \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(bool is_video_, object_ptr<CallDiscardReason> &&discard_reason_, int32 duration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 538893824;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the video chat. The video chat can be received through the method getGroupCall.
  int32 group_call_id_;
  /// Point in time (Unix timestamp) when the group call is expected to be started by an administrator.
  int32 start_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the video chat. The video chat can be received through the method getGroupCall.
  int32 group_call_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Call duration, in seconds.
  int32 duration_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the video chat. The video chat can be received through the method getGroupCall.
  int32 group_call_id_;
  /// Invited user identifiers.
  array<int53> user_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Title of the basic group.
  string title_;
  /// User identifiers of members in the basic group.
  array<int53> member_user_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Title of the supergroup or channel.
  string title_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New chat title.
  string title_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New chat photo.
  object_ptr<chatPhoto> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A deleted chat photo.
   */
  messageChatDeletePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -184374809;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// User identifiers of the new members.
  array<int53> member_user_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// User identifier of the deleted chat member.
  int53 user_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the supergroup to which the basic group was upgraded.
  int53 supergroup_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Title of the newly created supergroup.
  string title_;
  /// The identifier of the original basic group.
  int53 basic_group_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the pinned message, can be an identifier of a deleted message or 0.
  int53 message_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// The new background.
  object_ptr<chatBackground> background_;
  /// True, if the background was set only for self.
  bool only_for_self_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// If non-empty, name of a new theme, set for the chat. Otherwise, chat theme was reset to the default one.
  string theme_name_;

  /**
   * A theme in the chat has been changed.
   */
  messageChatSetTheme();

  /**
   * A theme in the chat has been changed.
   *
   * \param[in] theme_name_ If non-empty, name of a new theme, set for the chat. Otherwise, chat theme was reset to the default one.
   */
  explicit messageChatSetTheme(string const &theme_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1716612088;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New value auto-delete or self-destruct time, in seconds; 0 if disabled.
  int32 message_auto_delete_time_;
  /// If not 0, a user identifier, which default setting was automatically applied.
  int53 from_user_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of times the chat was boosted.
  int32 boost_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Name of the topic.
  string name_;
  /// Icon of the topic.
  object_ptr<forumTopicIcon> icon_;

  /**
   * A forum topic has been created.
   */
  messageForumTopicCreated();

  /**
   * A forum topic has been created.
   *
   * \param[in] name_ Name of the topic.
   * \param[in] icon_ Icon of the topic.
   */
  messageForumTopicCreated(string const &name_, object_ptr<forumTopicIcon> &&icon_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1194440751;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// If non-empty, the new name of the topic.
  string name_;
  /// True, if icon's custom_emoji_id is changed.
  bool edit_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.
  int64 icon_custom_emoji_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if the topic was closed; otherwise, the topic was reopened.
  bool is_closed_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if the topic was hidden; otherwise, the topic was unhidden.
  bool is_hidden_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The suggested chat photo. Use the method setProfilePhoto with inputChatPhotoPrevious to apply the photo.
  object_ptr<chatPhoto> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Message text to be shown in the chat.
  string text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the message with the game, can be an identifier of a deleted message.
  int53 game_message_id_;
  /// Identifier of the game; may be different from the games presented in the message with the game.
  int64 game_id_;
  /// New score.
  int32 score_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the chat, containing the corresponding invoice message.
  int53 invoice_chat_id_;
  /// Identifier of the message with the corresponding invoice; can be 0 or an identifier of a deleted message.
  int53 invoice_message_id_;
  /// Currency for the price of the product.
  string currency_;
  /// Total price for the product, in the smallest units of the currency.
  int53 total_amount_;
  /// Point in time (Unix timestamp) when the subscription will expire; 0 if unknown or the payment isn't recurring.
  int32 subscription_until_date_;
  /// True, if this is a recurring payment.
  bool is_recurring_;
  /// True, if this is the first recurring payment.
  bool is_first_recurring_;
  /// Name of the invoice; may be empty if unknown.
  string invoice_name_;

  /**
   * 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; can 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Currency for price of the product.
  string currency_;
  /// Total price for the product, in the smallest units of the currency.
  int53 total_amount_;
  /// Point in time (Unix timestamp) when the subscription will expire; 0 if unknown or the payment isn't recurring.
  int32 subscription_until_date_;
  /// True, if this is a recurring payment.
  bool is_recurring_;
  /// True, if this is the first recurring payment.
  bool is_first_recurring_;
  /// Invoice payload.
  bytes invoice_payload_;
  /// Identifier of the shipping option chosen by the user; may be empty if not applicable; for bots only.
  string shipping_option_id_;
  /// Information about the order; may be null; for bots only.
  object_ptr<orderInfo> order_info_;
  /// Telegram payment identifier.
  string telegram_payment_charge_id_;
  /// Provider payment identifier.
  string provider_payment_charge_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the previous owner of the Telegram Stars that refunds them.
  object_ptr<MessageSender> owner_id_;
  /// Currency for the price of the product.
  string currency_;
  /// Total price for the product, in the smallest units of the currency.
  int53 total_amount_;
  /// Invoice payload; only for bots.
  bytes invoice_payload_;
  /// Telegram payment identifier.
  string telegram_payment_charge_id_;
  /// Provider payment identifier.
  string provider_payment_charge_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The identifier of a user that gifted Telegram Premium; 0 if the gift was anonymous or is outgoing.
  int53 gifter_user_id_;
  /// The identifier of a user that received Telegram Premium; 0 if the gift is incoming.
  int53 receiver_user_id_;
  /// Message added to the gifted Telegram Premium by the sender.
  object_ptr<formattedText> text_;
  /// Currency for the paid amount.
  string currency_;
  /// The paid amount, in the smallest units of the currency.
  int53 amount_;
  /// Cryptocurrency used to pay for the gift; may be empty if none.
  string cryptocurrency_;
  /// The paid amount, in the smallest units of the cryptocurrency; 0 if none.
  int64 cryptocurrency_amount_;
  /// Number of months the Telegram Premium subscription will be active.
  int32 month_count_;
  /// A sticker to be shown in the message; may be null if unknown.
  object_ptr<sticker> sticker_;

  /**
   * 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 that gifted Telegram Premium; 0 if the gift was anonymous or is outgoing.
   * \param[in] receiver_user_id_ The identifier of a user that 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.
   * \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_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -456073094;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of a chat or a user that created the gift code; may be null if unknown.
  object_ptr<MessageSender> creator_id_;
  /// Message added to the gift.
  object_ptr<formattedText> text_;
  /// True, if the gift code was created for a giveaway.
  bool is_from_giveaway_;
  /// True, if the winner for the corresponding Telegram Premium subscription wasn't chosen.
  bool is_unclaimed_;
  /// Currency for the paid amount; empty if unknown.
  string currency_;
  /// The paid amount, in the smallest units of the currency; 0 if unknown.
  int53 amount_;
  /// Cryptocurrency used to pay for the gift; may be empty if none or unknown.
  string cryptocurrency_;
  /// The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.
  int64 cryptocurrency_amount_;
  /// Number of months the Telegram Premium subscription will be active after code activation.
  int32 month_count_;
  /// A sticker to be shown in the message; may be null if unknown.
  object_ptr<sticker> sticker_;
  /// The gift code.
  string code_;

  /**
   * 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 that 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.
   * \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_, object_ptr<sticker> &&sticker_, string const &code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 701640270;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of Telegram Stars that will be shared by winners of the giveaway; 0 for Telegram Premium giveaways.
  int53 star_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  /// Number of users which will receive Telegram Premium subscription gift codes.
  int32 winner_count_;
  /// Prize of the giveaway.
  object_ptr<GiveawayPrize> prize_;
  /// A sticker to be shown in the message; may be null if unknown.
  object_ptr<sticker> sticker_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the message with the giveaway; can be 0 if the message was deleted.
  int53 giveaway_message_id_;
  /// Number of winners in the giveaway.
  int32 winner_count_;
  /// True, if the giveaway is a Telegram Star giveaway.
  bool is_star_giveaway_;
  /// Number of undistributed prizes; for Telegram Premium giveaways only.
  int32 unclaimed_prize_count_;

  /**
   * 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; can be 0 if the message was deleted.
   * \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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the supergroup or channel chat, which was automatically boosted by the winners of the giveaway.
  int53 boosted_chat_id_;
  /// Identifier of the message with the giveaway in the boosted chat.
  int53 giveaway_message_id_;
  /// Number of other chats that participated in the giveaway.
  int32 additional_chat_count_;
  /// 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_;
  /// True, if only new members of the chats were eligible for the giveaway.
  bool only_new_members_;
  /// True, if the giveaway was canceled and was fully refunded.
  bool was_refunded_;
  /// Prize of the giveaway.
  object_ptr<GiveawayPrize> prize_;
  /// Additional description of the giveaway prize.
  string prize_description_;
  /// Total number of winners in the giveaway.
  int32 winner_count_;
  /// Up to 100 user identifiers of the winners of the giveaway.
  array<int53> winner_user_ids_;
  /// Number of undistributed prizes; for Telegram Premium giveaways only.
  int32 unclaimed_prize_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The identifier of a user that gifted Telegram Stars; 0 if the gift was anonymous or is outgoing.
  int53 gifter_user_id_;
  /// The identifier of a user that received Telegram Stars; 0 if the gift is incoming.
  int53 receiver_user_id_;
  /// Currency for the paid amount.
  string currency_;
  /// The paid amount, in the smallest units of the currency.
  int53 amount_;
  /// Cryptocurrency used to pay for the gift; may be empty if none.
  string cryptocurrency_;
  /// The paid amount, in the smallest units of the cryptocurrency; 0 if none.
  int64 cryptocurrency_amount_;
  /// Number of Telegram Stars that were gifted.
  int53 star_count_;
  /// Identifier of the transaction for Telegram Stars purchase; for receiver only.
  string transaction_id_;
  /// A sticker to be shown in the message; may be null if unknown.
  object_ptr<sticker> sticker_;

  /**
   * 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 that gifted Telegram Stars; 0 if the gift was anonymous or is outgoing.
   * \param[in] receiver_user_id_ The identifier of a user that 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of Telegram Stars that were received.
  int53 star_count_;
  /// Identifier of the transaction for Telegram Stars credit.
  string transaction_id_;
  /// Identifier of the supergroup or channel chat, which was automatically boosted by the winners of the giveaway.
  int53 boosted_chat_id_;
  /// Identifier of the message with the giveaway in the boosted chat; can be 0 if the message was deleted.
  int53 giveaway_message_id_;
  /// True, if the corresponding winner wasn't chosen and the Telegram Stars were received by the owner of the boosted chat.
  bool is_unclaimed_;
  /// A sticker to be shown in the message; may be null if unknown.
  object_ptr<sticker> sticker_;

  /**
   * 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; can be 0 if the message was deleted.
   * \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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * A gift was received or sent by the current user.
 */
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:
  /// The gift.
  object_ptr<gift> gift_;
  /// Message added to the gift.
  object_ptr<formattedText> text_;
  /// Number of Telegram Stars that can be claimed by the receiver instead of the gift; 0 if the gift can't be sold by the receiver.
  int53 sell_star_count_;
  /// 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_;
  /// True, if the gift is displayed on the user's profile page; only for the receiver of the gift.
  bool is_saved_;
  /// True, if the gift was converted to Telegram Stars; only for the receiver of the gift.
  bool was_converted_;

  /**
   * A gift was received or sent by the current user.
   */
  messageGift();

  /**
   * A gift was received or sent by the current user.
   *
   * \param[in] gift_ The gift.
   * \param[in] text_ Message added to the gift.
   * \param[in] sell_star_count_ Number of Telegram Stars that can be claimed by the receiver instead of the gift; 0 if the gift can't be sold by the receiver.
   * \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 profile page; 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.
   */
  messageGift(object_ptr<gift> &&gift_, object_ptr<formattedText> &&text_, int53 sell_star_count_, bool is_private_, bool is_saved_, bool was_converted_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1741766297;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A contact has registered with Telegram.
   */
  messageContactRegistered();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1502020353;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The shared users.
  array<object_ptr<sharedUser>> users_;
  /// Identifier of the keyboard button with the request.
  int32 button_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The shared chat.
  object_ptr<sharedChat> chat_;
  /// Identifier of the keyboard button with the request.
  int32 button_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The reason why the bot was allowed to write messages.
  object_ptr<BotWriteAccessAllowReason> reason_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text of the keyboardButtonTypeWebApp button, which opened the Web App.
  string button_text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text of the keyboardButtonTypeWebApp button, which opened the Web App.
  string button_text_;
  /// The data.
  string data_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// List of Telegram Passport element types sent.
  array<object_ptr<PassportElementType>> types_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// List of received Telegram Passport elements.
  array<object_ptr<encryptedPassportElement>> elements_;
  /// Encrypted data credentials.
  object_ptr<encryptedCredentials> credentials_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The identifier of a user or chat that triggered the proximity alert.
  object_ptr<MessageSender> traveler_id_;
  /// The identifier of a user or chat that subscribed for the proximity alert.
  object_ptr<MessageSender> watcher_id_;
  /// The distance between the users.
  int32 distance_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_saved and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable.
  bool send_copy_;
  /// True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false.
  bool replace_caption_;
  /// New message caption; pass null to copy message without caption. Ignored if replace_caption is false.
  object_ptr<formattedText> new_caption_;
  /// 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_;

  /**
   * 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_saved 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the effect.
  int64 id_;
  /// Static icon for the effect in WEBP format; may be null if none.
  object_ptr<sticker> static_icon_;
  /// Emoji corresponding to the effect that can be used if static icon isn't available.
  string emoji_;
  /// True, if Telegram Premium subscription is required to use the effect.
  bool is_premium_;
  /// Type of the effect.
  object_ptr<MessageEffectType> type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class sticker;

/**
 * This class is an abstract base class.
 * Describes type of emoji effect.
 */
class MessageEffectType: public Object {
 public:
};

/**
 * 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:
  /// Select animation for the effect in TGS format.
  object_ptr<sticker> select_animation_;
  /// Effect animation for the effect in TGS format.
  object_ptr<sticker> effect_animation_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The premium sticker. The effect can be found at sticker.full_type.premium_animation.
  object_ptr<sticker> sticker_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Contains information about a file with messages exported from another app.
 */
class MessageFileType: public Object {
 public:
};

/**
 * 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:
  /// Name of the other party; may be empty if unrecognized.
  string name_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Title of the group chat; may be empty if unrecognized.
  string title_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Origin of the forwarded message.
  object_ptr<MessageOrigin> origin_;
  /// Point in time (Unix timestamp) when the message was originally sent.
  int32 date_;
  /// 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_;
  /// The type of public service announcement for the forwarded message.
  string public_service_announcement_type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Name of the original sender.
  string sender_name_;
  /// Point in time (Unix timestamp) when the message was originally sent.
  int32 date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Number of times the message was viewed.
  int32 view_count_;
  /// Number of times the message was forwarded.
  int32 forward_count_;
  /// 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_;
  /// The list of reactions or tags added to the message; may be null.
  object_ptr<messageReactions> reactions_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The link.
  string link_;
  /// True, if the link will work for non-members of the chat.
  bool is_public_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// True, if the link is a public link for a message or a forum topic in a chat.
  bool is_public_;
  /// If found, identifier of the chat to which the link points, 0 otherwise.
  int53 chat_id_;
  /// If found, identifier of the message thread in which to open the message, or a forum topic to open if the message is missing.
  int53 message_thread_id_;
  /// If found, the linked message; may be null.
  object_ptr<message> message_;
  /// 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_;
  /// True, if the whole media album to which the message belongs is linked.
  bool for_album_;

  /**
   * 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] message_thread_id_ If found, identifier of the message thread in which to open the message, or a forum topic to open if the message is missing.
   * \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] for_album_ True, if the whole media album to which the message belongs is linked.
   */
  messageLinkInfo(bool is_public_, int53 chat_id_, int53 message_thread_id_, object_ptr<message> &&message_, int32 media_timestamp_, bool for_album_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 731315024;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Contains information about the origin of a message.
 */
class MessageOrigin: public Object {
 public:
};

/**
 * 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:
  /// Identifier of the user that originally sent the message.
  int53 sender_user_id_;

  /**
   * 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 that 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Name of the sender.
  string sender_name_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the chat that originally sent the message.
  int53 sender_chat_id_;
  /// For messages originally sent by an anonymous chat administrator, original message author signature.
  string author_signature_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the channel chat to which the message was originally sent.
  int53 chat_id_;
  /// Message identifier of the original message.
  int53 message_id_;
  /// Original post author signature.
  string author_signature_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 0-based message position in the full list of suitable messages.
  int32 position_;
  /// Message identifier.
  int53 message_id_;
  /// Point in time (Unix timestamp) when the message was sent.
  int32 date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Total number of messages found.
  int32 total_count_;
  /// List of message positions.
  array<object_ptr<messagePosition>> positions_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// 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_;
  /// True, if the message can be deleted for all users using the method deleteMessages with revoke == true.
  bool can_be_deleted_for_all_users_;
  /// True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message.
  bool can_be_edited_;
  /// True, if the message can be forwarded using inputMessageForwarded or forwardMessages.
  bool can_be_forwarded_;
  /// True, if the message can be paid using inputInvoiceMessage.
  bool can_be_paid_;
  /// True, if the message can be pinned or unpinned in the chat using pinChatMessage or unpinChatMessage.
  bool can_be_pinned_;
  /// True, if the message can be replied in the same chat and forum topic using inputMessageReplyToMessage.
  bool can_be_replied_;
  /// True, if the message can be replied in another chat or forum topic using inputMessageReplyToExternalMessage.
  bool can_be_replied_in_another_chat_;
  /// True, if content of the message can be saved locally or copied using inputMessageForwarded or forwardMessages with copy options.
  bool can_be_saved_;
  /// True, if the message can be shared in a story using inputStoryAreaTypeMessage.
  bool can_be_shared_in_story_;
  /// True, if the message can be edited using the method editMessageMedia.
  bool can_edit_media_;
  /// True, if scheduling state of the message can be edited.
  bool can_edit_scheduling_state_;
  /// True, if code for message embedding can be received using getMessageEmbeddingCode.
  bool can_get_embedding_code_;
  /// True, if a link can be generated for the message using getMessageLink.
  bool can_get_link_;
  /// 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_;
  /// True, if information about the message thread is available through getMessageThread and getMessageThreadHistory.
  bool can_get_message_thread_;
  /// True, if read date of the message can be received through getMessageReadDate.
  bool can_get_read_date_;
  /// True, if message statistics are available through getMessageStatistics and message forwards can be received using getMessagePublicForwards.
  bool can_get_statistics_;
  /// True, if chat members already viewed the message can be received through getMessageViewers.
  bool can_get_viewers_;
  /// True, if speech can be recognized for the message through recognizeSpeech.
  bool can_recognize_speech_;
  /// True, if the message can be reported using reportChat.
  bool can_report_chat_;
  /// True, if reactions on the message can be reported through reportMessageReactions.
  bool can_report_reactions_;
  /// True, if the message can be reported using reportSupergroupSpam.
  bool can_report_supergroup_spam_;
  /// True, if fact check for the message can be changed through setMessageFactCheck.
  bool can_set_fact_check_;
  /// True, if message statistics must be available from context menu of the message.
  bool need_show_statistics_;

  /**
   * 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_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_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 and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message.
   * \param[in] can_be_forwarded_ True, if the message can be forwarded using inputMessageForwarded or forwardMessages.
   * \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 or copied using inputMessageForwarded or forwardMessages with copy options.
   * \param[in] can_be_shared_in_story_ True, if the message can be shared in a story using inputStoryAreaTypeMessage.
   * \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_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_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_viewers_ True, if chat members already viewed the message can be received through getMessageViewers.
   * \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] need_show_statistics_ True, if message statistics must be available from context menu of the message.
   */
  messageProperties(bool can_be_copied_to_secret_chat_, 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_edit_media_, bool can_edit_scheduling_state_, bool can_get_embedding_code_, bool can_get_link_, bool can_get_media_timestamp_links_, bool can_get_message_thread_, bool can_get_read_date_, bool can_get_statistics_, bool can_get_viewers_, bool can_recognize_speech_, bool can_report_chat_, bool can_report_reactions_, bool can_report_supergroup_spam_, bool can_set_fact_check_, bool need_show_statistics_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -27014655;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the reaction.
  object_ptr<ReactionType> type_;
  /// Number of times the reaction was added.
  int32 total_count_;
  /// True, if the reaction is chosen by the current user.
  bool is_chosen_;
  /// 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_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of added reactions.
  array<object_ptr<messageReaction>> reactions_;
  /// True, if the reactions are tags and Telegram Premium users can filter messages by them.
  bool are_tags_;
  /// Information about top users that added the paid reaction.
  array<object_ptr<paidReactor>> paid_reactors_;
  /// True, if the list of added reactions is available using getMessageAddedReactions.
  bool can_get_added_reactions_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes read date of a recent outgoing message in a private chat.
 */
class MessageReadDate: public Object {
 public:
};

/**
 * 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:
  /// Point in time (Unix timestamp) when the message was read by the other user.
  int32 read_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The message is unread yet.
   */
  messageReadDateUnread();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 397549868;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Number of times the message was directly or indirectly replied.
  int32 reply_count_;
  /// 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_;
  /// Identifier of the last read incoming reply to the message.
  int53 last_read_inbox_message_id_;
  /// Identifier of the last read outgoing reply to the message.
  int53 last_read_outbox_message_id_;
  /// Identifier of the last reply to the message.
  int53 last_message_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
};

/**
 * 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:
  /// The identifier of the chat to which the message belongs; may be 0 if the replied message is in unknown chat.
  int53 chat_id_;
  /// The identifier of the message; may be 0 if the replied message is in unknown chat.
  int53 message_id_;
  /// Chosen quote from the replied message; may be null if none.
  object_ptr<textQuote> quote_;
  /// 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_;
  /// 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_;
  /// 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, messageContact, messageDice, messageDocument, messageGame, messageGiveaway, messageGiveawayWinners, messageInvoice, messageLocation, messagePaidMedia, messagePhoto, messagePoll, messageSticker, messageStory, messageText (for link preview), messageVenue, messageVideo, messageVideoNote, or messageVoiceNote.
  object_ptr<MessageContent> content_;

  /**
   * 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] 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, messageContact, messageDice, messageDocument, messageGame, messageGiveaway, messageGiveawayWinners, messageInvoice, messageLocation, messagePaidMedia, messagePhoto, messagePoll, messageSticker, messageStory, messageText (for link preview), messageVenue, messageVideo, messageVideoNote, or messageVoiceNote.
   */
  messageReplyToMessage(int53 chat_id_, int53 message_id_, object_ptr<textQuote> &&quote_, 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 = -300918393;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The identifier of the sender of the story.
  int53 story_sender_chat_id_;
  /// The identifier of the story.
  int32 story_id_;

  /**
   * Describes a story replied by a given message.
   */
  messageReplyToStory();

  /**
   * Describes a story replied by a given message.
   *
   * \param[in] story_sender_chat_id_ The identifier of the sender of the story.
   * \param[in] story_id_ The identifier of the story.
   */
  messageReplyToStory(int53 story_sender_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1888266553;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Contains information about the time when a scheduled message will be sent.
 */
class MessageSchedulingState: public Object {
 public:
};

/**
 * 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:
  /// Point in time (Unix timestamp) when the message will be sent. The date must be within 367 days in the future.
  int32 send_date_;

  /**
   * 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.
   */
  explicit messageSchedulingStateSendAtDate(int32 send_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1485570073;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Approximate point in time (Unix timestamp) when the message is expected to be sent.
  int32 send_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes when a message will be self-destructed.
 */
class MessageSelfDestructType: public Object {
 public:
};

/**
 * 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:
  /// The message's self-destruct time, in seconds; must be between 0 and 60 in private chats.
  int32 self_destruct_time_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageSchedulingState;

/**
 * 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:
  /// Pass true to disable notification for the message.
  bool disable_notification_;
  /// Pass true if the message is sent from the background.
  bool from_background_;
  /// Pass true if the content of the message must be protected from forwarding and saving; for bots only.
  bool protect_content_;
  /// Pass true to allow the message to ignore regular broadcast limits for a small fee; for bots only.
  bool allow_paid_broadcast_;
  /// 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_;
  /// Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled.
  object_ptr<MessageSchedulingState> scheduling_state_;
  /// Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage and sendMessageAlbum in private chats.
  int64 effect_id_;
  /// 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_;
  /// Pass true to get a fake message instead of actually sending them.
  bool only_preview_;

  /**
   * Options to be used when a message is sent.
   */
  messageSendOptions();

  /**
   * Options to be used when a message is sent.
   *
   * \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] 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, 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 and sendMessageAlbum in 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(bool disable_notification_, bool from_background_, bool protect_content_, bool allow_paid_broadcast_, 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 = 776354378;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Contains information about the sender of a message.
 */
class MessageSender: public Object {
 public:
};

/**
 * 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:
  /// Identifier of the user that sent the message.
  int53 user_id_;

  /**
   * 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 that sent the message.
   */
  explicit messageSenderUser(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -336109341;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the chat that sent the message.
  int53 chat_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Approximate total number of messages senders found.
  int32 total_count_;
  /// List of message senders.
  array<object_ptr<MessageSender>> senders_;

  /**
   * Represents a list of message senders.
   */
  messageSenders();

  /**
   * Represents a list of message senders.
   *
   * \param[in] total_count_ Approximate total number of messages 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class error;

/**
 * This class is an abstract base class.
 * Contains information about the sending state of the message.
 */
class MessageSendingState: public Object {
 public:
};

/**
 * 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:
  /// Non-persistent message sending identifier, specified by the application.
  int32 sending_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The cause of the message sending failure.
  object_ptr<error> error_;
  /// True, if the message can be re-sent using resendMessages or readdQuickReplyShortcutMessages.
  bool can_retry_;
  /// True, if the message can be re-sent only on behalf of a different sender.
  bool need_another_sender_;
  /// 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_;
  /// 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_;
  /// Time left before the message can be re-sent, in seconds. No update is sent when this field changes.
  double retry_after_;

  /**
   * 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] 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_, double retry_after_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1400770978;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes source of a message.
 */
class MessageSource: public Object {
 public:
};

/**
 * 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:

  /**
   * The message is from a chat history.
   */
  messageSourceChatHistory();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1090386116;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The message is from a message thread history.
 */
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:

  /**
   * The message is from a message thread history.
   */
  messageSourceMessageThreadHistory();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 290427142;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The message is from a forum topic history.
 */
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:

  /**
   * The message is from a forum topic history.
   */
  messageSourceForumTopicHistory();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1518064457;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The message is from a chat event log.
   */
  messageSourceChatEventLog();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1028777540;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The message is from a notification.
   */
  messageSourceNotification();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1046406163;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The message is from some other source.
   */
  messageSourceOther();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 901818114;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class photo;

/**
 * Information about the sponsor of a message.
 */
class messageSponsor final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// URL of the sponsor to be opened when the message is clicked.
  string url_;
  /// Photo of the sponsor; may be null if must not be shown.
  object_ptr<photo> photo_;
  /// Additional optional information about the sponsor to be shown along with the message.
  string info_;

  /**
   * Information about the sponsor of a message.
   */
  messageSponsor();

  /**
   * Information about the sponsor of a message.
   *
   * \param[in] url_ URL of the sponsor to be opened when the message 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 message.
   */
  messageSponsor(string const &url_, object_ptr<photo> &&photo_, string const &info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2009223646;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// A graph containing number of message views and shares.
  object_ptr<StatisticalGraph> message_interaction_graph_;
  /// A graph containing number of message reactions.
  object_ptr<StatisticalGraph> message_reaction_graph_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message thread belongs.
  int53 chat_id_;
  /// Message thread identifier, unique within the chat.
  int53 message_thread_id_;
  /// Information about the message thread; may be null for forum topic threads.
  object_ptr<messageReplyInfo> reply_info_;
  /// Approximate number of unread messages in the message thread.
  int32 unread_message_count_;
  /// 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_;
  /// A draft of a message in the message thread; may be null if none.
  object_ptr<draftMessage> draft_message_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// User identifier of the viewer.
  int53 user_id_;
  /// Approximate point in time (Unix timestamp) when the message was viewed.
  int32 view_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of message viewers.
  array<object_ptr<messageViewer>> viewers_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Approximate total number of messages found.
  int32 total_count_;
  /// List of messages; messages may be null.
  array<object_ptr<message>> messages_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Thumbnail width, usually doesn't exceed 40.
  int32 width_;
  /// Thumbnail height, usually doesn't exceed 40.
  int32 height_;
  /// The thumbnail in JPEG format.
  bytes data_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Point in time (Unix timestamp) from which the statistics are collected.
  int32 since_date_;
  /// Network statistics entries.
  array<object_ptr<NetworkStatisticsEntry>> entries_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class FileType;

class NetworkType;

/**
 * This class is an abstract base class.
 * Contains statistics about network usage.
 */
class NetworkStatisticsEntry: public Object {
 public:
};

/**
 * 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:
  /// Type of the file the data is part of; pass null if the data isn't related to files.
  object_ptr<FileType> file_type_;
  /// Type of the network the data was sent through. Call setNetworkType to maintain the actual network type.
  object_ptr<NetworkType> network_type_;
  /// Total number of bytes sent.
  int53 sent_bytes_;
  /// Total number of bytes received.
  int53 received_bytes_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Type of the network the data was sent through. Call setNetworkType to maintain the actual network type.
  object_ptr<NetworkType> network_type_;
  /// Total number of bytes sent.
  int53 sent_bytes_;
  /// Total number of bytes received.
  int53 received_bytes_;
  /// Total call duration, in seconds.
  double duration_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Represents the type of network.
 */
class NetworkType: public Object {
 public:
};

/**
 * 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:

  /**
   * The network is not available.
   */
  networkTypeNone();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1971691759;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A mobile network.
   */
  networkTypeMobile();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 819228239;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A mobile roaming network.
   */
  networkTypeMobileRoaming();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1435199760;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A Wi-Fi network.
   */
  networkTypeWiFi();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -633872070;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A different network type (e.g., Ethernet network).
   */
  networkTypeOther();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1942128539;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * Contains privacy settings for new 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:
  /// 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_;

  /**
   * Contains privacy settings for new chats with non-contacts.
   */
  newChatPrivacySettings();

  /**
   * Contains privacy settings for new 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.
   */
  explicit newChatPrivacySettings(bool allow_new_chats_from_unknown_users_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1528154694;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique persistent identifier of this notification.
  int32 id_;
  /// Notification date.
  int32 date_;
  /// True, if the notification was explicitly sent without sound.
  bool is_silent_;
  /// Notification type.
  object_ptr<NotificationType> type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique persistent auto-incremented from 1 identifier of the notification group.
  int32 id_;
  /// Type of the group.
  object_ptr<NotificationGroupType> type_;
  /// Identifier of a chat to which all notifications in the group belong.
  int53 chat_id_;
  /// Total number of active notifications in the group.
  int32 total_count_;
  /// The list of active notifications.
  array<object_ptr<notification>> notifications_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes the type of notifications in a notification group.
 */
class NotificationGroupType: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A group containing a notification of type notificationTypeNewSecretChat.
   */
  notificationGroupTypeSecretChat();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1390759476;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A group containing notifications of type notificationTypeNewCall.
   */
  notificationGroupTypeCalls();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1379123538;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes the types of chats to which notification settings are relevant.
 */
class NotificationSettingsScope: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the notification sound.
  int64 id_;
  /// Duration of the sound, in seconds.
  int32 duration_;
  /// Point in time (Unix timestamp) when the sound was created.
  int32 date_;
  /// Title of the notification sound.
  string title_;
  /// Arbitrary data, defined while the sound was uploaded.
  string data_;
  /// File containing the sound.
  object_ptr<file> sound_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// A list of notification sounds.
  array<object_ptr<notificationSound>> notification_sounds_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageSender;

class PushMessageContent;

class message;

/**
 * This class is an abstract base class.
 * Contains detailed information about a notification.
 */
class NotificationType: public Object {
 public:
};

/**
 * 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:
  /// The message.
  object_ptr<message> message_;
  /// True, if message content must be displayed in notifications.
  bool show_preview_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * New secret chat was created.
   */
  notificationTypeNewSecretChat();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1198638768;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Call identifier.
  int32 call_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// Identifier of the sender of the message. Corresponding user or chat may be inaccessible.
  object_ptr<MessageSender> sender_id_;
  /// Name of the sender.
  string sender_name_;
  /// True, if the message is outgoing.
  bool is_outgoing_;
  /// Push message content.
  object_ptr<PushMessageContent> content_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Represents the value of an option.
 */
class OptionValue: public Object {
 public:
};

/**
 * 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:
  /// The value of the option.
  bool value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The value of the option.
  int64 value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The value of the option.
  string value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Name of the user.
  string name_;
  /// Phone number of the user.
  string phone_number_;
  /// Email address of the user.
  string email_address_;
  /// Shipping address for this order; may be null.
  object_ptr<address> shipping_address_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The list of closed vector paths.
  array<object_ptr<closedVectorPath>> paths_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
};

/**
 * 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:
  /// Title.
  object_ptr<RichText> title_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Subtitle.
  object_ptr<RichText> subtitle_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Author.
  object_ptr<RichText> author_;
  /// Point in time (Unix timestamp) when the article was published; 0 if unknown.
  int32 publish_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Header.
  object_ptr<RichText> header_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Subheader.
  object_ptr<RichText> subheader_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Kicker.
  object_ptr<RichText> kicker_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Paragraph text.
  object_ptr<RichText> text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Paragraph text.
  object_ptr<RichText> text_;
  /// Programming language for which the text needs to be formatted.
  string language_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Footer.
  object_ptr<RichText> footer_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * An empty block separating a page.
   */
  pageBlockDivider();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -618614392;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Name of the anchor.
  string name_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The items of the list.
  array<object_ptr<pageBlockListItem>> items_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Quote text.
  object_ptr<RichText> text_;
  /// Quote credit.
  object_ptr<RichText> credit_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Quote text.
  object_ptr<RichText> text_;
  /// Quote credit.
  object_ptr<RichText> credit_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Animation file; may be null.
  object_ptr<animation> animation_;
  /// Animation caption.
  object_ptr<pageBlockCaption> caption_;
  /// True, if the animation must be played automatically.
  bool need_autoplay_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Audio file; may be null.
  object_ptr<audio> audio_;
  /// Audio file caption.
  object_ptr<pageBlockCaption> caption_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Photo file; may be null.
  object_ptr<photo> photo_;
  /// Photo caption.
  object_ptr<pageBlockCaption> caption_;
  /// URL that needs to be opened when the photo is clicked.
  string url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Video file; may be null.
  object_ptr<video> video_;
  /// Video caption.
  object_ptr<pageBlockCaption> caption_;
  /// True, if the video must be played automatically.
  bool need_autoplay_;
  /// True, if the video must be looped.
  bool is_looped_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Voice note; may be null.
  object_ptr<voiceNote> voice_note_;
  /// Voice note caption.
  object_ptr<pageBlockCaption> caption_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Cover.
  object_ptr<PageBlock> cover_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// URL of the embedded page, if available.
  string url_;
  /// HTML-markup of the embedded page.
  string html_;
  /// Poster photo, if available; may be null.
  object_ptr<photo> poster_photo_;
  /// Block width; 0 if unknown.
  int32 width_;
  /// Block height; 0 if unknown.
  int32 height_;
  /// Block caption.
  object_ptr<pageBlockCaption> caption_;
  /// True, if the block must be full width.
  bool is_full_width_;
  /// True, if scrolling needs to be allowed.
  bool allow_scrolling_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// URL of the embedded post.
  string url_;
  /// Post author.
  string author_;
  /// Post author photo; may be null.
  object_ptr<photo> author_photo_;
  /// Point in time (Unix timestamp) when the post was created; 0 if unknown.
  int32 date_;
  /// Post content.
  array<object_ptr<PageBlock>> page_blocks_;
  /// Post caption.
  object_ptr<pageBlockCaption> caption_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Collage item contents.
  array<object_ptr<PageBlock>> page_blocks_;
  /// Block caption.
  object_ptr<pageBlockCaption> caption_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Slideshow item contents.
  array<object_ptr<PageBlock>> page_blocks_;
  /// Block caption.
  object_ptr<pageBlockCaption> caption_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat title.
  string title_;
  /// Chat photo; may be null.
  object_ptr<chatPhotoInfo> photo_;
  /// Identifier of the accent color for chat title and background of chat photo.
  int32 accent_color_id_;
  /// Chat username by which all other information about the chat can be resolved.
  string username_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Table caption.
  object_ptr<RichText> caption_;
  /// Table cells.
  array<array<object_ptr<pageBlockTableCell>>> cells_;
  /// True, if the table is bordered.
  bool is_bordered_;
  /// True, if the table is striped.
  bool is_striped_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Always visible heading for the block.
  object_ptr<RichText> header_;
  /// Block contents.
  array<object_ptr<PageBlock>> page_blocks_;
  /// True, if the block is open by default.
  bool is_open_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Block header.
  object_ptr<RichText> header_;
  /// List of related articles.
  array<object_ptr<pageBlockRelatedArticle>> articles_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Location of the map center.
  object_ptr<location> location_;
  /// Map zoom level.
  int32 zoom_;
  /// Map width.
  int32 width_;
  /// Map height.
  int32 height_;
  /// Block caption.
  object_ptr<pageBlockCaption> caption_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Content of the caption.
  object_ptr<RichText> text_;
  /// Block credit (like HTML tag &lt;cite&gt;).
  object_ptr<RichText> credit_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes a horizontal alignment of a table cell content.
 */
class PageBlockHorizontalAlignment: public Object {
 public:
};

/**
 * 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:

  /**
   * The content must be left-aligned.
   */
  pageBlockHorizontalAlignmentLeft();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 848701417;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The content must be center-aligned.
   */
  pageBlockHorizontalAlignmentCenter();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1009203990;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The content must be right-aligned.
   */
  pageBlockHorizontalAlignmentRight();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1371369214;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Item label.
  string label_;
  /// Item blocks.
  array<object_ptr<PageBlock>> page_blocks_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Related article URL.
  string url_;
  /// Article title; may be empty.
  string title_;
  /// Article description; may be empty.
  string description_;
  /// Article photo; may be null.
  object_ptr<photo> photo_;
  /// Article author; may be empty.
  string author_;
  /// Point in time (Unix timestamp) when the article was published; 0 if unknown.
  int32 publish_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Cell text; may be null. If the text is null, then the cell must be invisible.
  object_ptr<RichText> text_;
  /// True, if it is a header cell.
  bool is_header_;
  /// The number of columns the cell spans.
  int32 colspan_;
  /// The number of rows the cell spans.
  int32 rowspan_;
  /// Horizontal cell content alignment.
  object_ptr<PageBlockHorizontalAlignment> align_;
  /// Vertical cell content alignment.
  object_ptr<PageBlockVerticalAlignment> valign_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes a Vertical alignment of a table cell content.
 */
class PageBlockVerticalAlignment: public Object {
 public:
};

/**
 * 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:

  /**
   * The content must be top-aligned.
   */
  pageBlockVerticalAlignmentTop();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 195500454;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The content must be middle-aligned.
   */
  pageBlockVerticalAlignmentMiddle();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2123096587;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The content must be bottom-aligned.
   */
  pageBlockVerticalAlignmentBottom();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2092531158;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class minithumbnail;

class photo;

class video;

/**
 * This class is an abstract base class.
 * Describes a paid media.
 */
class PaidMedia: public Object {
 public:
};

/**
 * 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:
  /// Media width; 0 if unknown.
  int32 width_;
  /// Media height; 0 if unknown.
  int32 height_;
  /// Media duration, in seconds; 0 if unknown.
  int32 duration_;
  /// Media minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The photo.
  object_ptr<photo> photo_;

  /**
   * The media is a photo.
   */
  paidMediaPhoto();

  /**
   * The media is a photo.
   *
   * \param[in] photo_ The photo.
   */
  explicit paidMediaPhoto(object_ptr<photo> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1165863654;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The video.
  object_ptr<video> video_;

  /**
   * The media is a video.
   */
  paidMediaVideo();

  /**
   * The media is a video.
   *
   * \param[in] video_ The video.
   */
  explicit paidMediaVideo(object_ptr<video> &&video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 464858633;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The media is unsupported.
   */
  paidMediaUnsupported();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 112999974;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageSender;

/**
 * Contains information about a user that 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:
  /// 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_;
  /// Number of Telegram Stars added.
  int32 star_count_;
  /// True, if the reactor is one of the most active reactors; may be false if the reactor is the current user.
  bool is_top_;
  /// True, if the paid reaction was added by the current user.
  bool is_me_;
  /// True, if the reactor is anonymous.
  bool is_anonymous_;

  /**
   * Contains information about a user that added paid reactions.
   */
  paidReactor();

  /**
   * Contains information about a user that 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_, int32 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 = -1657303032;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the authorization form.
  int32 id_;
  /// Telegram Passport elements that must be provided to complete the form.
  array<object_ptr<passportRequiredElement>> required_elements_;
  /// URL for the privacy policy of the service; may be empty.
  string privacy_policy_url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
};

/**
 * 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:
  /// Personal details of the user.
  object_ptr<personalDetails> personal_details_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Passport.
  object_ptr<identityDocument> passport_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Driver license.
  object_ptr<identityDocument> driver_license_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identity card.
  object_ptr<identityDocument> identity_card_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Internal passport.
  object_ptr<identityDocument> internal_passport_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Address.
  object_ptr<address> address_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Utility bill.
  object_ptr<personalDocument> utility_bill_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Bank statement.
  object_ptr<personalDocument> bank_statement_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Rental agreement.
  object_ptr<personalDocument> rental_agreement_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Passport registration pages.
  object_ptr<personalDocument> passport_registration_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Temporary registration.
  object_ptr<personalDocument> temporary_registration_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Phone number.
  string phone_number_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Email address.
  string email_address_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the Telegram Passport element which has the error.
  object_ptr<PassportElementType> type_;
  /// Error message.
  string message_;
  /// Error source.
  object_ptr<PassportElementErrorSource> source_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Contains the description of an error in a Telegram Passport element.
 */
class PassportElementErrorSource: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Field name.
  string field_name_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Index of a file with the error.
  int32 file_index_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Index of a file with the error.
  int32 file_index_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Contains the type of Telegram Passport element.
 */
class PassportElementType: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Telegram Passport elements.
  array<object_ptr<PassportElement>> elements_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Telegram Passport elements.
  array<object_ptr<PassportElement>> elements_;
  /// Errors in the elements that are already available.
  array<object_ptr<passportElementError>> errors_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of Telegram Passport elements any of which is enough to provide.
  array<object_ptr<passportSuitableElement>> suitable_elements_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the element.
  object_ptr<PassportElementType> type_;
  /// True, if a selfie is required with the identity document.
  bool is_selfie_required_;
  /// True, if a certified English translation is required with the document.
  bool is_translation_required_;
  /// True, if personal details must include the user's name in the language of their country of residence.
  bool is_native_name_required_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// True, if a 2-step verification password is set.
  bool has_password_;
  /// Hint for the password; may be empty.
  string password_hint_;
  /// True, if a recovery email is set.
  bool has_recovery_email_address_;
  /// True, if some Telegram Passport elements were saved.
  bool has_passport_data_;
  /// Information about the recovery email address to which the confirmation email was sent; may be null.
  object_ptr<emailAddressAuthenticationCodeInfo> recovery_email_address_code_info_;
  /// Pattern of the email address set up for logging in.
  string login_email_address_pattern_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The payment form identifier.
  int64 id_;
  /// Type of the payment form.
  object_ptr<PaymentFormType> type_;
  /// User identifier of the seller bot.
  int53 seller_bot_user_id_;
  /// Information about the product.
  object_ptr<productInfo> product_info_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
};

/**
 * 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:
  /// Full information about the invoice.
  object_ptr<invoice> invoice_;
  /// User identifier of the payment provider bot.
  int53 payment_provider_user_id_;
  /// Information about the payment provider.
  object_ptr<PaymentProvider> payment_provider_;
  /// The list of additional payment options.
  array<object_ptr<paymentOption>> additional_payment_options_;
  /// Saved server-side order information; may be null.
  object_ptr<orderInfo> saved_order_info_;
  /// The list of saved payment credentials.
  array<object_ptr<savedCredentials>> saved_credentials_;
  /// True, if the user can choose to save credentials.
  bool can_save_credentials_;
  /// True, if the user will be able to save credentials, if sets up a 2-step verification password.
  bool need_password_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of Telegram Stars that will be paid.
  int53 star_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Information about subscription plan.
  object_ptr<starSubscriptionPricing> pricing_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Title for the payment option.
  string title_;
  /// Payment form URL to be opened in a web view.
  string url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Contains information about a payment provider.
 */
class PaymentProvider: public Object {
 public:
};

/**
 * 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:
  /// Public payment token.
  string public_token_;
  /// URL for sending card tokenization requests.
  string tokenize_url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Stripe API publishable key.
  string publishable_key_;
  /// True, if the user country must be provided.
  bool need_country_;
  /// True, if the user ZIP/postal code must be provided.
  bool need_postal_code_;
  /// True, if the cardholder name must be provided.
  bool need_cardholder_name_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Payment form URL.
  string url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Information about the product.
  object_ptr<productInfo> product_info_;
  /// Point in time (Unix timestamp) when the payment was made.
  int32 date_;
  /// User identifier of the seller bot.
  int53 seller_bot_user_id_;
  /// Type of the payment receipt.
  object_ptr<PaymentReceiptType> type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class invoice;

class orderInfo;

class shippingOption;

/**
 * This class is an abstract base class.
 * Describes type of successful payment.
 */
class PaymentReceiptType: public Object {
 public:
};

/**
 * 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:
  /// User identifier of the payment provider bot.
  int53 payment_provider_user_id_;
  /// Information about the invoice.
  object_ptr<invoice> invoice_;
  /// Order information; may be null.
  object_ptr<orderInfo> order_info_;
  /// Chosen shipping option; may be null.
  object_ptr<shippingOption> shipping_option_;
  /// Title of the saved credentials chosen by the buyer.
  string credentials_title_;
  /// The amount of tip chosen by the buyer in the smallest units of the currency.
  int53 tip_amount_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of Telegram Stars that were paid.
  int53 star_count_;
  /// Unique identifier of the transaction that can be used to dispute it.
  string transaction_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if the payment request was successful; otherwise, the verification_url will be non-empty.
  bool success_;
  /// URL for additional payment credentials verification.
  string verification_url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// First name of the user written in English; 1-255 characters.
  string first_name_;
  /// Middle name of the user written in English; 0-255 characters.
  string middle_name_;
  /// Last name of the user written in English; 1-255 characters.
  string last_name_;
  /// Native first name of the user; 1-255 characters.
  string native_first_name_;
  /// Native middle name of the user; 0-255 characters.
  string native_middle_name_;
  /// Native last name of the user; 1-255 characters.
  string native_last_name_;
  /// Birthdate of the user.
  object_ptr<date> birthdate_;
  /// Gender of the user, &quot;male&quot; or &quot;female&quot;.
  string gender_;
  /// A two-letter ISO 3166-1 alpha-2 country code of the user's country.
  string country_code_;
  /// A two-letter ISO 3166-1 alpha-2 country code of the user's residence country.
  string residence_country_code_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of files containing the pages of the document.
  array<object_ptr<datedFile>> files_;
  /// List of files containing a certified English translation of the document.
  array<object_ptr<datedFile>> translation_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true if the authentication code may be sent via a flash call to the specified phone number.
  bool allow_flash_call_;
  /// Pass true if the authentication code may be sent via a missed call to the specified phone number.
  bool allow_missed_call_;
  /// Pass true if the authenticated phone number is used on the current device.
  bool is_current_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.
  bool has_unknown_phone_number_;
  /// 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_;
  /// For official Android and iOS applications only; pass null otherwise. Settings for Firebase Authentication.
  object_ptr<FirebaseAuthenticationSettings> firebase_authentication_settings_;
  /// List of up to 20 authentication tokens, recently received in updateOption(&quot;authentication_token&quot;) in previously logged out sessions.
  array<string> authentication_tokens_;

  /**
   * 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.
   */
  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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Hash value from the link.
  string hash_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Information about the country to which the phone number belongs; may be null.
  object_ptr<countryInfo> country_;
  /// The part of the phone number denoting country calling code or its part.
  string country_calling_code_;
  /// 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_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets.
  bool has_stickers_;
  /// Photo minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  /// Available variants of the photo, in different sizes.
  array<object_ptr<photoSize>> sizes_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Image type (see https://core.telegram.org/constructor/photoSize).
  string type_;
  /// Information about the image file.
  object_ptr<file> photo_;
  /// Image width.
  int32 width_;
  /// Image height.
  int32 height_;
  /// Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image; in bytes.
  array<int32> progressive_sizes_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The point's first coordinate.
  double x_;
  /// The point's second coordinate.
  double y_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageSender;

class PollType;

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:
  /// Unique poll identifier.
  int64 id_;
  /// Poll question; 1-300 characters. Only custom emoji entities are allowed.
  object_ptr<formattedText> question_;
  /// List of poll answer options.
  array<object_ptr<pollOption>> options_;
  /// Total number of voters, participating in the poll.
  int32 total_voter_count_;
  /// Identifiers of recent voters, if the poll is non-anonymous.
  array<object_ptr<MessageSender>> recent_voter_ids_;
  /// True, if the poll is anonymous.
  bool is_anonymous_;
  /// Type of the poll.
  object_ptr<PollType> type_;
  /// Amount of time the poll will be active after creation, in seconds.
  int32 open_period_;
  /// Point in time (Unix timestamp) when the poll will automatically be closed.
  int32 close_date_;
  /// True, if the poll is closed.
  bool is_closed_;

  /**
   * Describes a poll.
   */
  poll();

  /**
   * Describes a poll.
   *
   * \param[in] id_ Unique poll identifier.
   * \param[in] question_ Poll question; 1-300 characters. Only custom emoji entities are allowed.
   * \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.
   * \param[in] is_anonymous_ True, if the poll is anonymous.
   * \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.
   */
  poll(int64 id_, object_ptr<formattedText> &&question_, array<object_ptr<pollOption>> &&options_, int32 total_voter_count_, array<object_ptr<MessageSender>> &&recent_voter_ids_, bool is_anonymous_, object_ptr<PollType> &&type_, int32 open_period_, int32 close_date_, bool is_closed_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1913016502;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Option text; 1-100 characters. Only custom emoji entities are allowed.
  object_ptr<formattedText> text_;
  /// Number of voters for this option, available only for closed or voted polls.
  int32 voter_count_;
  /// The percentage of votes for this option; 0-100.
  int32 vote_percentage_;
  /// True, if the option was chosen by the user.
  bool is_chosen_;
  /// True, if the option is being chosen by a pending setPollAnswer request.
  bool is_being_chosen_;

  /**
   * Describes one answer option of a poll.
   */
  pollOption();

  /**
   * Describes one answer option of a poll.
   *
   * \param[in] text_ Option text; 1-100 characters. Only custom emoji entities are allowed.
   * \param[in] voter_count_ Number of voters for this option, available only for closed or voted polls.
   * \param[in] vote_percentage_ The percentage of votes for this option; 0-100.
   * \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.
   */
  pollOption(object_ptr<formattedText> &&text_, int32 voter_count_, int32 vote_percentage_, bool is_chosen_, bool is_being_chosen_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1676243088;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class formattedText;

/**
 * This class is an abstract base class.
 * Describes the type of poll.
 */
class PollType: public Object {
 public:
};

/**
 * 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:
  /// True, if multiple answer options can be chosen simultaneously.
  bool allow_multiple_answers_;

  /**
   * A regular poll.
   */
  pollTypeRegular();

  /**
   * A regular poll.
   *
   * \param[in] allow_multiple_answers_ True, if multiple answer options can be chosen simultaneously.
   */
  explicit pollTypeRegular(bool allow_multiple_answers_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 641265698;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * A poll in quiz mode, which has exactly one correct answer option and can be answered only once.
 */
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:
  /// 0-based identifier of the correct answer option; -1 for a yet unanswered poll.
  int32 correct_option_id_;
  /// 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; empty for a yet unanswered poll.
  object_ptr<formattedText> explanation_;

  /**
   * A poll in quiz mode, which has exactly one correct answer option and can be answered only once.
   */
  pollTypeQuiz();

  /**
   * A poll in quiz mode, which has exactly one correct answer option and can be answered only once.
   *
   * \param[in] correct_option_id_ 0-based identifier of the correct answer option; -1 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; 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll.
   */
  pollTypeQuiz(int32 correct_option_id_, object_ptr<formattedText> &&explanation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 657013913;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes a feature available to Premium users.
 */
class PremiumFeature: public Object {
 public:
};

/**
 * 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:

  /**
   * Increased limits.
   */
  premiumFeatureIncreasedLimits();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1785455031;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Increased maximum upload file size.
   */
  premiumFeatureIncreasedUploadFileSize();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1825367155;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Improved download speed.
   */
  premiumFeatureImprovedDownloadSpeed();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -267695554;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The ability to convert voice notes to text.
   */
  premiumFeatureVoiceRecognition();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1288216542;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Disabled ads.
   */
  premiumFeatureDisabledAds();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2008587702;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Allowed to use more reactions.
   */
  premiumFeatureUniqueReactions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 766750743;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Allowed to use premium stickers with unique effects.
   */
  premiumFeatureUniqueStickers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2101773312;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A badge in the user's profile.
   */
  premiumFeatureProfileBadge();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 233648322;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Profile photo animation on message and chat screens.
   */
  premiumFeatureAnimatedProfilePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -100741914;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Allowed to set a premium application icons.
   */
  premiumFeatureAppIcons();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1585050761;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Allowed to translate chat messages real-time.
   */
  premiumFeatureRealTimeChatTranslation();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1143471488;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Allowed to use many additional features for stories.
   */
  premiumFeatureUpgradedStories();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1878522597;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The ability to boost chats.
   */
  premiumFeatureChatBoost();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1576574747;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The ability to use tags in Saved Messages.
   */
  premiumFeatureSavedMessagesTags();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1003219334;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The ability to view last seen and read times of other users even 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:

  /**
   * The ability to view last seen and read times of other users even 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The ability to use Business features.
   */
  premiumFeatureBusiness();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1503619324;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The ability to use all available message effects.
   */
  premiumFeatureMessageEffects();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -723300255;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Premium feature.
  object_ptr<PremiumFeature> feature_;
  /// Promotion animation for the feature.
  object_ptr<animation> animation_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The list of available features.
  array<object_ptr<PremiumFeature>> features_;
  /// The list of limits, increased for Premium users.
  array<object_ptr<premiumLimit>> limits_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of a chat or a user that 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_;
  /// Point in time (Unix timestamp) when the code was created.
  int32 creation_date_;
  /// True, if the gift code was created for a giveaway.
  bool is_from_giveaway_;
  /// Identifier of the corresponding giveaway message in the creator_id chat; can be 0 or an identifier of a deleted message.
  int53 giveaway_message_id_;
  /// Number of months the Telegram Premium subscription will be active after code activation.
  int32 month_count_;
  /// Identifier of a user for which the code was created; 0 if none.
  int53 user_id_;
  /// Point in time (Unix timestamp) when the code was activated; 0 if none.
  int32 use_date_;

  /**
   * 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 that 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; can 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.
   * \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_, int53 user_id_, int32 use_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1198544674;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class sticker;

/**
 * Describes an option for creating Telegram Premium gift codes or Telegram Premium giveaway. Use telegramPaymentPurposePremiumGiftCodes or telegramPaymentPurposePremiumGiveaway for out-of-store payments.
 */
class premiumGiftCodePaymentOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// ISO 4217 currency code for Telegram Premium gift code payment.
  string currency_;
  /// The amount to pay, in the smallest units of the currency.
  int53 amount_;
  /// The discount associated with this option, as a percentage.
  int32 discount_percentage_;
  /// Number of users which will be able to activate the gift codes.
  int32 winner_count_;
  /// Number of months the Telegram Premium subscription will be active.
  int32 month_count_;
  /// Identifier of the store product associated with the option; may be empty if none.
  string store_product_id_;
  /// Number of times the store product must be paid.
  int32 store_product_quantity_;
  /// A sticker to be shown along with the gift code; may be null if unknown.
  object_ptr<sticker> sticker_;

  /**
   * Describes an option for creating Telegram Premium gift codes or Telegram Premium giveaway. Use telegramPaymentPurposePremiumGiftCodes or telegramPaymentPurposePremiumGiveaway for out-of-store payments.
   */
  premiumGiftCodePaymentOption();

  /**
   * Describes an option for creating Telegram Premium gift codes or Telegram Premium giveaway. 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] discount_percentage_ The discount associated with this option, as a percentage.
   * \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.
   * \param[in] sticker_ A sticker to be shown along with the gift code; may be null if unknown.
   */
  premiumGiftCodePaymentOption(string const &currency_, int53 amount_, int32 discount_percentage_, int32 winner_count_, int32 month_count_, string const &store_product_id_, int32 store_product_quantity_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -661038611;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class premiumGiftCodePaymentOption;

/**
 * Contains a list of options for creating Telegram Premium gift codes or Telegram Premium giveaway.
 */
class premiumGiftCodePaymentOptions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// The list of options.
  array<object_ptr<premiumGiftCodePaymentOption>> options_;

  /**
   * Contains a list of options for creating Telegram Premium gift codes or Telegram Premium giveaway.
   */
  premiumGiftCodePaymentOptions();

  /**
   * Contains a list of options for creating Telegram Premium gift codes or Telegram Premium giveaway.
   *
   * \param[in] options_ The list of options.
   */
  explicit premiumGiftCodePaymentOptions(array<object_ptr<premiumGiftCodePaymentOption>> &&options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1141866719;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The type of the limit.
  object_ptr<PremiumLimitType> type_;
  /// Default value of the limit.
  int32 default_value_;
  /// Value of the limit for Premium users.
  int32 premium_value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes type of limit, increased for Premium users.
 */
class PremiumLimitType: public Object {
 public:
};

/**
 * 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:

  /**
   * The maximum number of joined supergroups and channels.
   */
  premiumLimitTypeSupergroupCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -247467131;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The maximum number of created public chats.
   */
  premiumLimitTypeCreatedPublicChatCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 446086841;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The maximum number of saved animations.
   */
  premiumLimitTypeSavedAnimationCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -19759735;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The maximum number of favorite stickers.
   */
  premiumLimitTypeFavoriteStickerCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 639754787;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The maximum number of chat folders.
   */
  premiumLimitTypeChatFolderCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 377489774;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The maximum number of pinned Saved Messages topics.
   */
  premiumLimitTypePinnedSavedMessagesTopicCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1544854305;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The maximum length of sent media caption.
   */
  premiumLimitTypeCaptionLength();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 293984314;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The maximum length of the user's bio.
   */
  premiumLimitTypeBioLength();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1146976765;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The maximum number of added shareable chat folders.
   */
  premiumLimitTypeShareableChatFolderCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1612625095;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The maximum number of active stories.
   */
  premiumLimitTypeActiveStoryCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1926486372;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The maximum number of stories sent per week.
 */
class premiumLimitTypeWeeklySentStoryCount 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:

  /**
   * The maximum number of stories sent per week.
   */
  premiumLimitTypeWeeklySentStoryCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 40485707;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The maximum number of stories sent per month.
 */
class premiumLimitTypeMonthlySentStoryCount 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:

  /**
   * The maximum number of stories sent per month.
   */
  premiumLimitTypeMonthlySentStoryCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 819481475;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The maximum length of captions of sent 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:

  /**
   * The maximum length of captions of sent stories.
   */
  premiumLimitTypeStoryCaptionLength();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1093324030;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The maximum number of received similar chats.
   */
  premiumLimitTypeSimilarChatCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1563549935;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// ISO 4217 currency code for Telegram Premium subscription payment.
  string currency_;
  /// The amount to pay, in the smallest units of the currency.
  int53 amount_;
  /// The discount associated with this option, as a percentage.
  int32 discount_percentage_;
  /// 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_;
  /// Identifier of the store product associated with the option.
  string store_product_id_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
};

/**
 * 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:
  /// Type of the exceeded limit.
  object_ptr<PremiumLimitType> limit_type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The used feature.
  object_ptr<PremiumFeature> feature_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The used feature; pass null if none specific feature was used.
  object_ptr<BusinessFeature> feature_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The used feature.
  object_ptr<PremiumStoryFeature> feature_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * A user opened an internal link of the type internalLinkTypePremiumFeatures.
 */
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:
  /// The referrer from the link.
  string referrer_;

  /**
   * A user opened an internal link of the type internalLinkTypePremiumFeatures.
   */
  premiumSourceLink();

  /**
   * A user opened an internal link of the type internalLinkTypePremiumFeatures.
   *
   * \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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;
  /// The list of available options for buying Telegram Premium.
  array<object_ptr<premiumStatePaymentOption>> payment_options_;
  /// The list of available promotion animations for Premium features.
  array<object_ptr<premiumFeaturePromotionAnimation>> animations_;
  /// The list of available promotion animations for Business features.
  array<object_ptr<businessFeaturePromotionAnimation>> business_animations_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Information about the payment option.
  object_ptr<premiumPaymentOption> payment_option_;
  /// True, if this is the currently used Telegram Premium subscription option.
  bool is_current_;
  /// True, if the payment option can be used to upgrade the existing Telegram Premium subscription.
  bool is_upgrade_;
  /// Identifier of the last in-store transaction for the currently used option.
  string last_transaction_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes a story feature available to Premium users.
 */
class PremiumStoryFeature: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The ability to save other's unprotected stories.
   */
  premiumStoryFeatureSaveStories();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1501286467;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the prepaid giveaway.
  int64 id_;
  /// Number of users which will receive giveaway prize.
  int32 winner_count_;
  /// Prize of the giveaway.
  object_ptr<GiveawayPrize> prize_;
  /// The number of boosts received by the chat from the giveaway; for Telegram Star giveaways only.
  int32 boost_count_;
  /// Point in time (Unix timestamp) when the giveaway was paid.
  int32 payment_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the inline query to pass to sendInlineQueryResultMessage.
  int64 inline_query_id_;
  /// Resulted inline message of the query.
  object_ptr<InlineQueryResult> result_;
  /// Types of the chats to which the message can be sent.
  object_ptr<targetChatTypes> chat_types_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier for the message.
  string id_;
  /// Point in time (Unix timestamp) when the message can't be used anymore.
  int32 expiration_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Product title.
  string title_;
  /// Product description.
  object_ptr<formattedText> description_;
  /// Product photo; may be null.
  object_ptr<photo> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Profile accent color identifier.
  int32 id_;
  /// Accent colors expected to be used in light themes.
  object_ptr<profileAccentColors> light_theme_colors_;
  /// Accent colors expected to be used in dark themes.
  object_ptr<profileAccentColors> dark_theme_colors_;
  /// The minimum chat boost level required to use the color in a supergroup chat.
  int32 min_supergroup_chat_boost_level_;
  /// The minimum chat boost level required to use the color in a channel chat.
  int32 min_channel_chat_boost_level_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// 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_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of user profile photos.
  int64 id_;
  /// A small (160x160) user profile photo. The file can be downloaded only before the photo is changed.
  object_ptr<file> small_;
  /// A big (640x640) user profile photo. The file can be downloaded only before the photo is changed.
  object_ptr<file> big_;
  /// User profile photo minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  /// True, if the photo has animated variant.
  bool has_animation_;
  /// True, if the photo is visible only for the current user.
  bool is_personal_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class proxy;

/**
 * Represents a list of proxy servers.
 */
class proxies final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// List of proxy servers.
  array<object_ptr<proxy>> proxies_;

  /**
   * Represents a list of proxy servers.
   */
  proxies();

  /**
   * Represents a list of proxy servers.
   *
   * \param[in] proxies_ List of proxy servers.
   */
  explicit proxies(array<object_ptr<proxy>> &&proxies_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1200447205;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ProxyType;

/**
 * Contains information about 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:
  /// Unique identifier of the proxy.
  int32 id_;
  /// Proxy server domain or IP address.
  string server_;
  /// Proxy server port.
  int32 port_;
  /// Point in time (Unix timestamp) when the proxy was last used; 0 if never.
  int32 last_used_date_;
  /// True, if the proxy is enabled now.
  bool is_enabled_;
  /// Type of the proxy.
  object_ptr<ProxyType> type_;

  /**
   * Contains information about a proxy server.
   */
  proxy();

  /**
   * Contains information about a proxy server.
   *
   * \param[in] id_ Unique identifier of the proxy.
   * \param[in] server_ Proxy server domain or IP address.
   * \param[in] port_ Proxy server port.
   * \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] type_ Type of the proxy.
   */
  proxy(int32 id_, string const &server_, int32 port_, int32 last_used_date_, bool is_enabled_, object_ptr<ProxyType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 196049779;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes the type of proxy server.
 */
class ProxyType: public Object {
 public:
};

/**
 * 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:
  /// Username for logging in; may be empty.
  string username_;
  /// Password for logging in; may be empty.
  string password_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Username for logging in; may be empty.
  string username_;
  /// Password for logging in; may be empty.
  string password_;
  /// Pass true if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method.
  bool http_only_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The proxy's secret in hexadecimal encoding.
  string secret_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes type of public chat.
 */
class PublicChatType: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
};

/**
 * 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:
  /// Information about the message.
  object_ptr<message> message_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Information about the story.
  object_ptr<story> story_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Approximate total number of messages and stories found.
  int32 total_count_;
  /// List of found public forwards and reposts.
  array<object_ptr<PublicForward>> forwards_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
};

/**
 * 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:
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Message content; may be null.
  object_ptr<animation> animation_;
  /// Animation caption.
  string caption_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Message content; may be null.
  object_ptr<audio> audio_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Contact's name.
  string name_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A contact has registered with Telegram.
   */
  pushMessageContentContactRegistered();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -303962720;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Message content; may be null.
  object_ptr<document> document_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Game title, empty for pinned game message.
  string title_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Game title, empty for pinned message.
  string title_;
  /// New score, 0 for pinned message.
  int32 score_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Product price.
  string price_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if the location is live.
  bool is_live_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of Telegram Stars needed to buy access to the media in the message; 0 for pinned message.
  int53 star_count_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Message content; may be null.
  object_ptr<photo> photo_;
  /// Photo caption.
  string caption_;
  /// True, if the photo is secret.
  bool is_secret_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Poll question.
  string question_;
  /// True, if the poll is regular and not in quiz mode.
  bool is_regular_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of months the Telegram Premium subscription will be active after code activation.
  int32 month_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of users which will receive giveaway prizes; 0 for pinned message.
  int32 winner_count_;
  /// Prize of the giveaway; may be null for pinned message.
  object_ptr<GiveawayPrize> prize_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of Telegram Stars that sender paid for the gift.
  int53 star_count_;

  /**
   * 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.
   */
  explicit pushMessageContentGift(int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2069312245;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Message content; may be null.
  object_ptr<sticker> sticker_;
  /// Emoji corresponding to the sticker; may be empty.
  string emoji_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * A message with a story.
   */
  pushMessageContentStory();

  /**
   * A message with a story.
   *
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  explicit pushMessageContentStory(bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1721470519;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Message text.
  string text_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Message content; may be null.
  object_ptr<video> video_;
  /// Video caption.
  string caption_;
  /// True, if the video is secret.
  bool is_secret_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Message content; may be null.
  object_ptr<videoNote> video_note_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Message content; may be null.
  object_ptr<voiceNote> voice_note_;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A newly created basic group.
   */
  pushMessageContentBasicGroupChatCreate();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2114855172;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Name of the added member.
  string member_name_;
  /// True, if the current user was added to the group.
  bool is_current_user_;
  /// True, if the user has returned to the group themselves.
  bool is_returned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A chat photo was edited.
   */
  pushMessageContentChatChangePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1114222051;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New chat title.
  string title_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if the set background is the same as the background of the current user.
  bool is_same_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// If non-empty, name of a new theme, set for the chat. Otherwise, the chat theme was reset to the default one.
  string theme_name_;

  /**
   * A chat theme was edited.
   */
  pushMessageContentChatSetTheme();

  /**
   * A chat theme was edited.
   *
   * \param[in] theme_name_ If non-empty, name of a new theme, set for the chat. Otherwise, the chat theme was reset to the default one.
   */
  explicit pushMessageContentChatSetTheme(string const &theme_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 173882216;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Name of the deleted member.
  string member_name_;
  /// True, if the current user was deleted from the group.
  bool is_current_user_;
  /// True, if the user has left the group themselves.
  bool is_left_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The paid amount.
  string amount_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A profile photo was suggested to the user.
   */
  pushMessageContentSuggestProfilePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2104225963;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of forwarded messages.
  int32 total_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of messages in the album.
  int32 total_count_;
  /// True, if the album has at least one photo.
  bool has_photos_;
  /// True, if the album has at least one video file.
  bool has_videos_;
  /// True, if the album has at least one audio file.
  bool has_audios_;
  /// True, if the album has at least one document.
  bool has_documents_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The globally unique identifier of push notification subscription.
  int64 id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique message identifier among all quick replies.
  int53 id_;
  /// 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_;
  /// True, if the message can be edited.
  bool can_be_edited_;
  /// The identifier of the quick reply message to which the message replies; 0 if none.
  int53 reply_to_message_id_;
  /// If non-zero, the user identifier of the bot through which this message was sent.
  int53 via_bot_user_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.
  int64 media_album_id_;
  /// Content of the message.
  object_ptr<MessageContent> content_;
  /// Inline keyboard reply markup for the message; may be null if none.
  object_ptr<ReplyMarkup> reply_markup_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of quick reply messages; messages may be null.
  array<object_ptr<quickReplyMessage>> messages_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique shortcut identifier.
  int32 id_;
  /// The name of the shortcut that can be used to use the shortcut.
  string name_;
  /// The first shortcut message.
  object_ptr<quickReplyMessage> first_message_;
  /// The total number of messages in the shortcut.
  int32 message_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ReactionNotificationSource;

/**
 * Contains information about notification settings for reactions.
 */
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:
  /// Source of message reactions for which notifications are shown.
  object_ptr<ReactionNotificationSource> message_reaction_source_;
  /// Source of story reactions for which notifications are shown.
  object_ptr<ReactionNotificationSource> story_reaction_source_;
  /// Identifier of the notification sound to be played; 0 if sound is disabled.
  int64 sound_id_;
  /// True, if reaction sender and emoji must be displayed in notifications.
  bool show_preview_;

  /**
   * Contains information about notification settings for reactions.
   */
  reactionNotificationSettings();

  /**
   * Contains information about notification settings for reactions.
   *
   * \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] sound_id_ Identifier of the notification sound to be played; 0 if sound is disabled.
   * \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_, int64 sound_id_, bool show_preview_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 733017684;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes sources of reactions for which notifications will be shown.
 */
class ReactionNotificationSource: public Object {
 public:
};

/**
 * 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:

  /**
   * Notifications for reactions are disabled.
   */
  reactionNotificationSourceNone();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 366374940;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Notifications for reactions are shown for all reactions.
   */
  reactionNotificationSourceAll();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1241689234;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes type of message reaction.
 */
class ReactionType: public Object {
 public:
};

/**
 * 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:
  /// Text representation of the reaction.
  string emoji_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier of the custom emoji.
  int64 custom_emoji_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The paid reaction in a channel chat.
   */
  reactionTypePaid();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 436294381;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The chat folder.
  object_ptr<chatFolder> folder_;
  /// Chat folder description.
  string description_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of recommended chat folders.
  array<object_ptr<recommendedChatFolder>> chat_folders_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Recovery email address.
  string recovery_email_address_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// 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_;
  /// True, if the file is currently being uploaded (or a remote copy is being generated by some other means).
  bool is_uploading_active_;
  /// True, if a remote copy is fully available.
  bool is_uploading_completed_;
  /// Size of the remote available part of the file, in bytes; 0 if unknown.
  int53 uploaded_size_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
};

/**
 * 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 message_id == 0 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:
  /// True, if the keyboard is removed only for the mentioned users or the target user of a reply.
  bool is_personal_;

  /**
   * 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 message_id == 0 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 message_id == 0 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// If non-empty, the placeholder to be shown in the input field when the reply is active; 0-64 characters.
  string input_field_placeholder_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// A list of rows of bot keyboard buttons.
  array<array<object_ptr<keyboardButton>>> rows_;
  /// True, if the keyboard is expected to always be shown when the ordinary keyboard is hidden.
  bool is_persistent_;
  /// True, if the application needs to resize the keyboard vertically.
  bool resize_keyboard_;
  /// True, if the application needs to hide the keyboard after use.
  bool one_time_;
  /// 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_;
  /// If non-empty, the placeholder to be shown in the input field when the keyboard is active; 0-64 characters.
  string input_field_placeholder_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// A list of rows of inline keyboard buttons.
  array<array<object_ptr<inlineKeyboardButton>>> rows_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class reportOption;

/**
 * This class is an abstract base class.
 * Describes result of chat report.
 */
class ReportChatResult: public Object {
 public:
};

/**
 * 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:

  /**
   * The chat was reported successfully.
   */
  reportChatResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1209685373;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Title for the option choice.
  string title_;
  /// List of available options.
  array<object_ptr<reportOption>> options_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Option identifier for the next reportChat request.
  bytes option_id_;
  /// True, if the user can skip text adding.
  bool is_optional_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class reportOption;

/**
 * This class is an abstract base class.
 * Describes result of sponsored message report.
 */
class ReportChatSponsoredMessageResult: public Object {
 public:
};

/**
 * The message was reported successfully.
 */
class reportChatSponsoredMessageResultOk final : public ReportChatSponsoredMessageResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:

  /**
   * The message was reported successfully.
   */
  reportChatSponsoredMessageResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1968140831;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The sponsored message is too old or not found.
 */
class reportChatSponsoredMessageResultFailed final : public ReportChatSponsoredMessageResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:

  /**
   * The sponsored message is too old or not found.
   */
  reportChatSponsoredMessageResultFailed();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2132777926;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The user must choose an option to report the message and repeat request with the chosen option.
 */
class reportChatSponsoredMessageResultOptionRequired final : public ReportChatSponsoredMessageResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Title for the option choice.
  string title_;
  /// List of available options.
  array<object_ptr<reportOption>> options_;

  /**
   * The user must choose an option to report the message and repeat request with the chosen option.
   */
  reportChatSponsoredMessageResultOptionRequired();

  /**
   * 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.
   */
  reportChatSponsoredMessageResultOptionRequired(string const &title_, array<object_ptr<reportOption>> &&options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1172751995;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * Sponsored messages were hidden for the user in all chats.
 */
class reportChatSponsoredMessageResultAdsHidden final : public ReportChatSponsoredMessageResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:

  /**
   * Sponsored messages were hidden for the user in all chats.
   */
  reportChatSponsoredMessageResultAdsHidden();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -387260898;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The user asked to hide sponsored messages, but Telegram Premium is required for this.
 */
class reportChatSponsoredMessageResultPremiumRequired final : public ReportChatSponsoredMessageResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:

  /**
   * The user asked to hide sponsored messages, but Telegram Premium is required for this.
   */
  reportChatSponsoredMessageResultPremiumRequired();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1997287120;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier of the option.
  bytes id_;
  /// Text of the option.
  string text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes the reason why a chat is reported.
 */
class ReportReason: public Object {
 public:
};

/**
 * 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:

  /**
   * The chat contains spam messages.
   */
  reportReasonSpam();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1207032897;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The chat promotes violence.
   */
  reportReasonViolence();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2038679353;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The chat contains pornographic messages.
   */
  reportReasonPornography();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1306467575;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The chat has child abuse related content.
   */
  reportReasonChildAbuse();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 761086718;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The chat contains copyrighted content.
   */
  reportReasonCopyright();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1474441135;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The chat represents a fake account.
   */
  reportReasonFake();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 352862176;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The chat has illegal drugs related content.
   */
  reportReasonIllegalDrugs();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -61599200;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The chat contains messages with personal details.
   */
  reportReasonPersonalDetails();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1588882414;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A custom reason provided by the user.
   */
  reportReasonCustom();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1380459917;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class reportOption;

/**
 * This class is an abstract base class.
 * Describes result of story report.
 */
class ReportStoryResult: public Object {
 public:
};

/**
 * 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:

  /**
   * The story was reported successfully.
   */
  reportStoryResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1405328461;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Title for the option choice.
  string title_;
  /// List of available options.
  array<object_ptr<reportOption>> options_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Option identifier for the next reportStory request.
  bytes option_id_;
  /// True, if the user can skip text adding.
  bool is_optional_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes the reason why a code needs to be re-sent.
 */
class ResendCodeReason: public Object {
 public:
};

/**
 * 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:

  /**
   * The user requested to resend the code.
   */
  resendCodeReasonUserRequest();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -441923456;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Cause of the verification failure, for example, PLAY_SERVICES_NOT_AVAILABLE, APNS_RECEIVE_TIMEOUT, or APNS_INIT_FAILED.
  string error_message_;

  /**
   * 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, PLAY_SERVICES_NOT_AVAILABLE, APNS_RECEIVE_TIMEOUT, or APNS_INIT_FAILED.
   */
  explicit resendCodeReasonVerificationFailed(string const &error_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 529870273;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Represents result of 2-step verification password reset.
 */
class ResetPasswordResult: public Object {
 public:
};

/**
 * 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:

  /**
   * The password was reset.
   */
  resetPasswordResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1397267463;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Point in time (Unix timestamp) after which the password can be reset immediately using resetPassword.
  int32 pending_reset_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Point in time (Unix timestamp) when the password reset can be retried.
  int32 retry_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes state of a revenue withdrawal.
 */
class RevenueWithdrawalState: public Object {
 public:
};

/**
 * 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:

  /**
   * Withdrawal is pending.
   */
  revenueWithdrawalStatePending();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1563512741;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Point in time (Unix timestamp) when the withdrawal was completed.
  int32 date_;
  /// The URL where the withdrawal transaction can be viewed.
  string url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Withdrawal failed.
   */
  revenueWithdrawalStateFailed();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -12504951;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class RichText;

class document;

/**
 * This class is an abstract base class.
 * Describes a formatted text object.
 */
class RichText: public Object {
 public:
};

/**
 * 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:
  /// Text.
  string text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  object_ptr<RichText> text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  object_ptr<RichText> text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  object_ptr<RichText> text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  object_ptr<RichText> text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  object_ptr<RichText> text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  object_ptr<RichText> text_;
  /// URL.
  string url_;
  /// True, if the URL has cached instant view server-side.
  bool is_cached_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  object_ptr<RichText> text_;
  /// Email address.
  string email_address_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  object_ptr<RichText> text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  object_ptr<RichText> text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  object_ptr<RichText> text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  object_ptr<RichText> text_;
  /// Phone number.
  string phone_number_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The image represented as a document. The image can be in GIF, JPEG or PNG format.
  object_ptr<document> document_;
  /// Width of a bounding box in which the image must be shown; 0 if unknown.
  int32 width_;
  /// Height of a bounding box in which the image must be shown; 0 if unknown.
  int32 height_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The text.
  object_ptr<RichText> text_;
  /// The name of a richTextAnchor object, which is the first element of the target richTexts object.
  string anchor_name_;
  /// An HTTP URL, opening the reference.
  string url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Anchor name.
  string name_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The link text.
  object_ptr<RichText> text_;
  /// The anchor name. If the name is empty, the link must bring back to top.
  string anchor_name_;
  /// An HTTP URL, opening the anchor.
  string url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Texts.
  array<object_ptr<RichText>> texts_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The URL.
  string url_;
  /// Stream key.
  string stream_key_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier of the saved credentials.
  string id_;
  /// Title of the saved credentials.
  string title_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The tag.
  object_ptr<ReactionType> tag_;
  /// Label of the tag; 0-12 characters. Always empty if the tag is returned for a Saved Messages topic.
  string label_;
  /// Number of times the tag was used; may be 0 if the tag has non-empty label.
  int32 count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of tags.
  array<object_ptr<savedMessagesTag>> tags_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique topic identifier.
  int53 id_;
  /// Type of the topic.
  object_ptr<SavedMessagesTopicType> type_;
  /// True, if the topic is pinned.
  bool is_pinned_;
  /// 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_;
  /// Last message in the topic; may be null if none or unknown.
  object_ptr<message> last_message_;
  /// A draft of a message in the topic; may be null if none.
  object_ptr<draftMessage> draft_message_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes type of Saved Messages topic.
 */
class SavedMessagesTopicType: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the chat.
  int53 chat_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if photo autosave is enabled.
  bool autosave_photos_;
  /// True, if video autosave is enabled.
  bool autosave_videos_;
  /// The maximum size of a video file to be autosaved, in bytes; 512 KB - 4000 MB.
  int53 max_video_file_size_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Time left before notifications will be unmuted, in seconds.
  int32 mute_for_;
  /// Identifier of the notification sound to be played; 0 if sound is disabled.
  int64 sound_id_;
  /// True, if message content must be displayed in notifications.
  bool show_preview_;
  /// 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_;
  /// True, if story notifications are disabled.
  bool mute_stories_;
  /// Identifier of the notification sound to be played for stories; 0 if sound is disabled.
  int64 story_sound_id_;
  /// True, if the sender of stories must be displayed in notifications.
  bool show_story_sender_;
  /// True, if notifications for incoming pinned messages will be created as for an ordinary unread message.
  bool disable_pinned_message_notifications_;
  /// True, if notifications for messages with mentions will be created as for an ordinary unread message.
  bool disable_mention_notifications_;

  /**
   * 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.
   * \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.
   * \param[in] show_story_sender_ True, if the sender of stories 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_sender_, bool disable_pinned_message_notifications_, bool disable_mention_notifications_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -599105185;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Represents a filter for message search results.
 */
class SearchMessagesFilter: public Object {
 public:
};

/**
 * 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:

  /**
   * Returns all found messages, no filter is applied.
   */
  searchMessagesFilterEmpty();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -869395657;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only animation messages.
   */
  searchMessagesFilterAnimation();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -155713339;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only audio messages.
   */
  searchMessagesFilterAudio();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 867505275;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only document messages.
   */
  searchMessagesFilterDocument();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1526331215;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only photo messages.
   */
  searchMessagesFilterPhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 925932293;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only video messages.
   */
  searchMessagesFilterVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 115538222;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only voice note messages.
   */
  searchMessagesFilterVoiceNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1841439357;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only photo and video messages.
   */
  searchMessagesFilterPhotoAndVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1352130963;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only messages containing URLs.
   */
  searchMessagesFilterUrl();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1828724341;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only messages containing chat photos.
   */
  searchMessagesFilterChatPhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1247751329;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only video note messages.
   */
  searchMessagesFilterVideoNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 564323321;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only voice and video note messages.
   */
  searchMessagesFilterVoiceAndVideoNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 664174819;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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, a message thread 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:

  /**
   * 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, a message thread or by the sending user.
   */
  searchMessagesFilterUnreadMention();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -95769149;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * Returns only messages with unread reactions for the current user. When using this filter the results can't be additionally filtered by a query, a message thread 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:

  /**
   * Returns only messages with unread reactions for the current user. When using this filter the results can't be additionally filtered by a query, a message thread or by the sending user.
   */
  searchMessagesFilterUnreadReaction();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1379651328;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns only pinned messages.
   */
  searchMessagesFilterPinned();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 371805512;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of seconds.
  double seconds_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Secret chat identifier.
  int32 id_;
  /// Identifier of the chat partner.
  int53 user_id_;
  /// State of the secret chat.
  object_ptr<SecretChatState> state_;
  /// True, if the chat was created by the current user; false otherwise.
  bool is_outbound_;
  /// 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_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes the current secret chat state.
 */
class SecretChatState: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The secret chat is ready to use.
   */
  secretChatStateReady();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1611352087;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The secret chat is closed.
   */
  secretChatStateClosed();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1945106707;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * Information about the message sent by answerWebAppQuery.
 */
class sentWebAppMessage final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Identifier of the sent inline message, if known.
  string inline_message_id_;

  /**
   * Information about the message sent by answerWebAppQuery.
   */
  sentWebAppMessage();

  /**
   * Information about the message sent by answerWebAppQuery.
   *
   * \param[in] inline_message_id_ Identifier of the sent inline message, if known.
   */
  explicit sentWebAppMessage(string const &inline_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1243934400;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Session identifier.
  int64 id_;
  /// True, if this session is the current session.
  bool is_current_;
  /// True, if a 2-step verification password is needed to complete authorization of the session.
  bool is_password_pending_;
  /// True, if the session wasn't confirmed from another session.
  bool is_unconfirmed_;
  /// True, if incoming secret chats can be accepted by the session.
  bool can_accept_secret_chats_;
  /// True, if incoming calls can be accepted by the session.
  bool can_accept_calls_;
  /// Session type based on the system and application version, which can be used to display a corresponding icon.
  object_ptr<SessionType> type_;
  /// Telegram API identifier, as provided by the application.
  int32 api_id_;
  /// Name of the application, as provided by the application.
  string application_name_;
  /// The version of the application, as provided by the application.
  string application_version_;
  /// True, if the application is an official application or uses the api_id of an official application.
  bool is_official_application_;
  /// Model of the device the application has been run or is running on, as provided by the application.
  string device_model_;
  /// Operating system the application has been run or is running on, as provided by the application.
  string platform_;
  /// Version of the operating system the application has been run or is running on, as provided by the application.
  string system_version_;
  /// Point in time (Unix timestamp) when the user has logged in.
  int32 log_in_date_;
  /// Point in time (Unix timestamp) when the session was last used.
  int32 last_active_date_;
  /// IP address from which the session was created, in human-readable format.
  string ip_address_;
  /// A human-readable description of the location from which the session was created, based on the IP address.
  string location_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Represents the type of session.
 */
class SessionType: public Object {
 public:
};

/**
 * 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:

  /**
   * The session is running on an Android device.
   */
  sessionTypeAndroid();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2071764840;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on the Brave browser.
   */
  sessionTypeBrave();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1216812563;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on the Chrome browser.
   */
  sessionTypeChrome();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1573464425;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on the Edge browser.
   */
  sessionTypeEdge();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -538916005;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on the Firefox browser.
   */
  sessionTypeFirefox();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2122579364;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on an iPad device.
   */
  sessionTypeIpad();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1294647023;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on an iPhone device.
   */
  sessionTypeIphone();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 97616573;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on a Linux device.
   */
  sessionTypeLinux();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1487422871;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on a Mac device.
   */
  sessionTypeMac();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -612250975;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on the Opera browser.
   */
  sessionTypeOpera();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1463673734;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on the Safari browser.
   */
  sessionTypeSafari();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 710646873;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on an Ubuntu device.
   */
  sessionTypeUbuntu();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1569680069;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on the Vivaldi browser.
   */
  sessionTypeVivaldi();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1120503279;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on a Windows device.
   */
  sessionTypeWindows();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1676512600;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The session is running on an Xbox console.
   */
  sessionTypeXbox();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1856216492;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of sessions.
  array<object_ptr<session>> sessions_;
  /// Number of days of inactivity before sessions will automatically be terminated; 1-366 days.
  int32 inactive_session_ttl_days_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Title of the chat; for bots only.
  string title_;
  /// Username of the chat; for bots only.
  string username_;
  /// Photo of the chat; for bots only; may be null.
  object_ptr<photo> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifier.
  int53 user_id_;
  /// First name of the user; for bots only.
  string first_name_;
  /// Last name of the user; for bots only.
  string last_name_;
  /// Username of the user; for bots only.
  string username_;
  /// Profile photo of the user; for bots only; may be null.
  object_ptr<photo> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Shipping option identifier.
  string id_;
  /// Option title.
  string title_;
  /// A list of objects used to calculate the total shipping costs.
  array<object_ptr<labeledPricePart>> price_parts_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class error;

/**
 * This class is an abstract base class.
 * Describes result of speech recognition in a voice note.
 */
class SpeechRecognitionResult: public Object {
 public:
};

/**
 * 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:
  /// Partially recognized text.
  string partial_text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Recognized text.
  string text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageContent;

class messageSponsor;

/**
 * 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:
  /// Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.
  int53 message_id_;
  /// True, if the message needs to be labeled as &quot;recommended&quot; instead of &quot;sponsored&quot;.
  bool is_recommended_;
  /// True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage.
  bool can_be_reported_;
  /// Content of the message. Currently, can be only of the types messageText, messageAnimation, messagePhoto, or messageVideo. Video messages can be viewed fullscreen.
  object_ptr<MessageContent> content_;
  /// Information about the sponsor of the message.
  object_ptr<messageSponsor> sponsor_;
  /// Title of the sponsored message.
  string title_;
  /// Text for the message action button.
  string button_text_;
  /// Identifier of the accent color for title, button text and message background.
  int32 accent_color_id_;
  /// Identifier of a custom emoji to be shown on the message background; 0 if none.
  int64 background_custom_emoji_id_;
  /// If non-empty, additional information about the sponsored message to be shown along with the message.
  string additional_info_;

  /**
   * 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.
   * \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<messageSponsor> &&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 = -1215476699;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of sponsored messages.
  array<object_ptr<sponsoredMessage>> messages_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * Describes a possibly non-integer amount of Telegram Stars.
 */
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:
  /// The integer amount of Telegram Stars rounded to 0.
  int53 star_count_;
  /// The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999.
  int32 nanostar_count_;

  /**
   * Describes a possibly non-integer amount of Telegram Stars.
   */
  starAmount();

  /**
   * Describes a possibly non-integer amount of Telegram Stars.
   *
   * \param[in] star_count_ The integer amount of Telegram Stars 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class starGiveawayWinnerOption;

/**
 * Describes an option for creating 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:
  /// ISO 4217 currency code for the payment.
  string currency_;
  /// The amount to pay, in the smallest units of the currency.
  int53 amount_;
  /// Number of Telegram Stars that will be distributed among winners.
  int53 star_count_;
  /// Identifier of the store product associated with the option; may be empty if none.
  string store_product_id_;
  /// Number of times the chat will be boosted for one year if the option is chosen.
  int32 yearly_boost_count_;
  /// Allowed options for the number of giveaway winners.
  array<object_ptr<starGiveawayWinnerOption>> winner_options_;
  /// True, if the option must be chosen by default.
  bool is_default_;
  /// True, if the option must be shown only in the full list of payment options.
  bool is_additional_;

  /**
   * Describes an option for creating Telegram Star giveaway. Use telegramPaymentPurposeStarGiveaway for out-of-store payments.
   */
  starGiveawayPaymentOption();

  /**
   * Describes an option for creating 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class starGiveawayPaymentOption;

/**
 * Contains a list of options for creating 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:
  /// The list of options.
  array<object_ptr<starGiveawayPaymentOption>> options_;

  /**
   * Contains a list of options for creating Telegram Star giveaway.
   */
  starGiveawayPaymentOptions();

  /**
   * Contains a list of options for creating 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The number of users that will be chosen as winners.
  int32 winner_count_;
  /// The number of Telegram Stars that will be won by the winners of the giveaway.
  int53 won_star_count_;
  /// True, if the option must be chosen by default.
  bool is_default_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// ISO 4217 currency code for the payment.
  string currency_;
  /// The amount to pay, in the smallest units of the currency.
  int53 amount_;
  /// Number of Telegram Stars that will be purchased.
  int53 star_count_;
  /// Identifier of the store product associated with the option; may be empty if none.
  string store_product_id_;
  /// True, if the option must be shown only in the full list of payment options.
  bool is_additional_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The list of options.
  array<object_ptr<starPaymentOption>> options_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class StatisticalGraph;

class starRevenueStatus;

/**
 * A detailed statistics about Telegram Stars earned by a bot 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:
  /// A graph containing amount of revenue in a given day.
  object_ptr<StatisticalGraph> revenue_by_day_graph_;
  /// Telegram Star revenue status.
  object_ptr<starRevenueStatus> status_;
  /// Current conversion rate of a Telegram Star to USD.
  double usd_rate_;

  /**
   * A detailed statistics about Telegram Stars earned by a bot or a chat.
   */
  starRevenueStatistics();

  /**
   * A detailed statistics about Telegram Stars earned by a bot 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class starAmount;

/**
 * Contains information about Telegram Stars earned by a bot 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:
  /// Total amount of Telegram Stars earned.
  object_ptr<starAmount> total_amount_;
  /// The amount of Telegram Stars that aren't withdrawn yet.
  object_ptr<starAmount> current_amount_;
  /// The amount of Telegram Stars that are available for withdrawal.
  object_ptr<starAmount> available_amount_;
  /// True, if Telegram Stars can be withdrawn now or later.
  bool withdrawal_enabled_;
  /// Time left before the next withdrawal can be started, in seconds; 0 if withdrawal can be started now.
  int32 next_withdrawal_in_;

  /**
   * Contains information about Telegram Stars earned by a bot or a chat.
   */
  starRevenueStatus();

  /**
   * Contains information about Telegram Stars earned by a bot or a chat.
   *
   * \param[in] total_amount_ Total amount of Telegram Stars earned.
   * \param[in] current_amount_ The amount of Telegram Stars that aren't withdrawn yet.
   * \param[in] available_amount_ The amount of Telegram Stars that are 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the subscription.
  string id_;
  /// Identifier of the chat that is subscribed.
  int53 chat_id_;
  /// Point in time (Unix timestamp) when the subscription will expire or expired.
  int32 expiration_date_;
  /// True, if the subscription was canceled.
  bool is_canceled_;
  /// True, if the subscription expires soon and there are no enough Telegram Stars on the user's balance to extend it.
  bool is_expiring_;
  /// The subscription plan.
  object_ptr<starSubscriptionPricing> pricing_;
  /// Type of the subscription.
  object_ptr<StarSubscriptionType> type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The number of seconds between consecutive Telegram Star debiting.
  int32 period_;
  /// The amount of Telegram Stars that must be paid for each period.
  int53 star_count_;

  /**
   * 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 amount of Telegram Stars 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class photo;

/**
 * This class is an abstract base class.
 * Describes type of subscription paid in Telegram Stars.
 */
class StarSubscriptionType: public Object {
 public:
};

/**
 * 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:
  /// True, if the subscription is active and the user can use the method reuseStarSubscription to join the subscribed chat again.
  bool can_reuse_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if the subscription was canceled by the bot and can't be extended.
  bool is_canceled_by_bot_;
  /// Subscription invoice title.
  string title_;
  /// Subscription invoice photo.
  object_ptr<photo> photo_;
  /// The link to the subscription invoice.
  string invoice_link_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The amount of owned Telegram Stars.
  object_ptr<starAmount> star_amount_;
  /// List of subscriptions for Telegram Stars.
  array<object_ptr<starSubscription>> subscriptions_;
  /// The number of Telegram Stars required to buy to extend subscriptions expiring soon.
  int53 required_star_count_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the transaction.
  string id_;
  /// The amount of added owned Telegram Stars; negative for outgoing transactions.
  object_ptr<starAmount> star_amount_;
  /// True, if the transaction is a refund of a previous transaction.
  bool is_refund_;
  /// Point in time (Unix timestamp) when the transaction was completed.
  int32 date_;
  /// Type of the transaction.
  object_ptr<StarTransactionType> type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes direction of a transaction with Telegram Stars.
 */
class StarTransactionDirection: public Object {
 public:
};

/**
 * The transaction is incoming and increases the number of owned Telegram Stars.
 */
class starTransactionDirectionIncoming final : public StarTransactionDirection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:

  /**
   * The transaction is incoming and increases the number of owned Telegram Stars.
   */
  starTransactionDirectionIncoming();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1295335866;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is outgoing and decreases the number of owned Telegram Stars.
 */
class starTransactionDirectionOutgoing final : public StarTransactionDirection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:

  /**
   * The transaction is outgoing and decreases the number of owned Telegram Stars.
   */
  starTransactionDirectionOutgoing();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1854125472;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class PaidMedia;

class RevenueWithdrawalState;

class affiliateInfo;

class gift;

class productInfo;

class sticker;

/**
 * This class is an abstract base class.
 * Describes type of transaction with Telegram Stars.
 */
class StarTransactionType: public Object {
 public:
};

/**
 * The transaction is a deposit of Telegram Stars from the Premium bot; 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:

  /**
   * The transaction is a deposit of Telegram Stars from the Premium bot; for regular users only.
   */
  starTransactionTypePremiumBotDeposit();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -663156466;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a deposit of Telegram Stars from App Store; 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:

  /**
   * The transaction is a deposit of Telegram Stars from App Store; for regular users only.
   */
  starTransactionTypeAppStoreDeposit();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 136853825;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a deposit of Telegram Stars from Google Play; 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:

  /**
   * The transaction is a deposit of Telegram Stars from Google Play; for regular users only.
   */
  starTransactionTypeGooglePlayDeposit();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -323111338;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a deposit of Telegram Stars from Fragment; 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:

  /**
   * The transaction is a deposit of Telegram Stars from Fragment; for regular users and bots only.
   */
  starTransactionTypeFragmentDeposit();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 123887172;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a deposit of Telegram Stars by another user; 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:
  /// Identifier of the user that gifted Telegram Stars; 0 if the user was anonymous.
  int53 user_id_;
  /// The sticker to be shown in the transaction information; may be null if unknown.
  object_ptr<sticker> sticker_;

  /**
   * The transaction is a deposit of Telegram Stars by another user; for regular users only.
   */
  starTransactionTypeUserDeposit();

  /**
   * The transaction is a deposit of Telegram Stars by another user; for regular users only.
   *
   * \param[in] user_id_ Identifier of the user that 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a deposit of Telegram Stars from a giveaway; 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:
  /// Identifier of a supergroup or a channel chat that created the giveaway.
  int53 chat_id_;
  /// Identifier of the message with the giveaway; can be 0 or an identifier of a deleted message.
  int53 giveaway_message_id_;

  /**
   * The transaction is a deposit of Telegram Stars from a giveaway; for regular users only.
   */
  starTransactionTypeGiveawayDeposit();

  /**
   * The transaction is a deposit of Telegram Stars from a giveaway; 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; can 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a withdrawal of earned Telegram Stars to Fragment; for bots 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:
  /// State of the withdrawal; may be null for refunds from Fragment.
  object_ptr<RevenueWithdrawalState> withdrawal_state_;

  /**
   * The transaction is a withdrawal of earned Telegram Stars to Fragment; for bots and channel chats only.
   */
  starTransactionTypeFragmentWithdrawal();

  /**
   * The transaction is a withdrawal of earned Telegram Stars to Fragment; for bots 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a withdrawal of earned Telegram Stars to Telegram Ad platform; 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:

  /**
   * The transaction is a withdrawal of earned Telegram Stars to Telegram Ad platform; for bots and channel chats only.
   */
  starTransactionTypeTelegramAdsWithdrawal();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1517386647;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a payment for Telegram API usage; 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:
  /// The number of billed requests.
  int32 request_count_;

  /**
   * The transaction is a payment for Telegram API usage; for bots only.
   */
  starTransactionTypeTelegramApiUsage();

  /**
   * The transaction is a payment for Telegram API usage; 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a purchase of paid media from a bot or a business account by the current user; 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:
  /// Identifier of the bot or the business account user that sent the paid media.
  int53 user_id_;
  /// The bought media if the transaction wasn't refunded.
  array<object_ptr<PaidMedia>> media_;

  /**
   * The transaction is a purchase of paid media from a bot or a business account by the current user; for regular users only.
   */
  starTransactionTypeBotPaidMediaPurchase();

  /**
   * The transaction is a purchase of paid media from a bot or a business account by the current user; for regular users only.
   *
   * \param[in] user_id_ Identifier of the bot or the business account user that 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a sale of paid media by the bot or a business account managed by the bot; 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:
  /// Identifier of the user that bought the media.
  int53 user_id_;
  /// The bought media.
  array<object_ptr<PaidMedia>> media_;
  /// Bot-provided payload.
  string payload_;
  /// Information about the affiliate which received commission from the transaction; may be null if none.
  object_ptr<affiliateInfo> affiliate_;

  /**
   * The transaction is a sale of paid media by the bot or a business account managed by the bot; for bots only.
   */
  starTransactionTypeBotPaidMediaSale();

  /**
   * The transaction is a sale of paid media by the bot or a business account managed by the bot; for bots only.
   *
   * \param[in] user_id_ Identifier of the user that 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a purchase of paid media from a channel by the current user; 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:
  /// Identifier of the channel chat that sent the paid media.
  int53 chat_id_;
  /// Identifier of the corresponding message with paid media; can be 0 or an identifier of a deleted message.
  int53 message_id_;
  /// The bought media if the transaction wasn't refunded.
  array<object_ptr<PaidMedia>> media_;

  /**
   * The transaction is a purchase of paid media from a channel by the current user; for regular users only.
   */
  starTransactionTypeChannelPaidMediaPurchase();

  /**
   * The transaction is a purchase of paid media from a channel by the current user; 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; can 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a sale of paid media by the channel chat; 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:
  /// Identifier of the user that bought the media.
  int53 user_id_;
  /// Identifier of the corresponding message with paid media; can be 0 or an identifier of a deleted message.
  int53 message_id_;
  /// The bought media.
  array<object_ptr<PaidMedia>> media_;

  /**
   * The transaction is a sale of paid media by the channel chat; for channel chats only.
   */
  starTransactionTypeChannelPaidMediaSale();

  /**
   * The transaction is a sale of paid media by the channel chat; for channel chats only.
   *
   * \param[in] user_id_ Identifier of the user that bought the media.
   * \param[in] message_id_ Identifier of the corresponding message with paid media; can 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a purchase of a product from a bot or a business account by the current user; 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:
  /// Identifier of the bot or the business account user that created the invoice.
  int53 user_id_;
  /// Information about the bought product.
  object_ptr<productInfo> product_info_;

  /**
   * The transaction is a purchase of a product from a bot or a business account by the current user; for regular users only.
   */
  starTransactionTypeBotInvoicePurchase();

  /**
   * The transaction is a purchase of a product from a bot or a business account by the current user; for regular users only.
   *
   * \param[in] user_id_ Identifier of the bot or the business account user that 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a sale of a product by the bot; 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:
  /// Identifier of the user that bought the product.
  int53 user_id_;
  /// Information about the bought product.
  object_ptr<productInfo> product_info_;
  /// Invoice payload.
  bytes invoice_payload_;
  /// Information about the affiliate which received commission from the transaction; may be null if none.
  object_ptr<affiliateInfo> affiliate_;

  /**
   * The transaction is a sale of a product by the bot; for bots only.
   */
  starTransactionTypeBotInvoiceSale();

  /**
   * The transaction is a sale of a product by the bot; for bots only.
   *
   * \param[in] user_id_ Identifier of the user that 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a purchase of a subscription from a bot or a business account by the current user; 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:
  /// Identifier of the bot or the business account user that created the subscription link.
  int53 user_id_;
  /// The number of seconds between consecutive Telegram Star debitings.
  int32 subscription_period_;
  /// Information about the bought subscription.
  object_ptr<productInfo> product_info_;

  /**
   * The transaction is a purchase of a subscription from a bot or a business account by the current user; for regular users only.
   */
  starTransactionTypeBotSubscriptionPurchase();

  /**
   * The transaction is a purchase of a subscription from a bot or a business account by the current user; for regular users only.
   *
   * \param[in] user_id_ Identifier of the bot or the business account user that 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a sale of a subscription by the bot; 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:
  /// Identifier of the user that bought the subscription.
  int53 user_id_;
  /// The number of seconds between consecutive Telegram Star debitings.
  int32 subscription_period_;
  /// Information about the bought subscription.
  object_ptr<productInfo> product_info_;
  /// Invoice payload.
  bytes invoice_payload_;
  /// Information about the affiliate which received commission from the transaction; may be null if none.
  object_ptr<affiliateInfo> affiliate_;

  /**
   * The transaction is a sale of a subscription by the bot; for bots only.
   */
  starTransactionTypeBotSubscriptionSale();

  /**
   * The transaction is a sale of a subscription by the bot; for bots only.
   *
   * \param[in] user_id_ Identifier of the user that 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a purchase of a subscription to a channel chat by the current user; 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:
  /// Identifier of the channel chat that created the subscription.
  int53 chat_id_;
  /// The number of seconds between consecutive Telegram Star debitings.
  int32 subscription_period_;

  /**
   * The transaction is a purchase of a subscription to a channel chat by the current user; for regular users only.
   */
  starTransactionTypeChannelSubscriptionPurchase();

  /**
   * The transaction is a purchase of a subscription to a channel chat by the current user; 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a sale of a subscription by the channel chat; 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:
  /// Identifier of the user that bought the subscription.
  int53 user_id_;
  /// The number of seconds between consecutive Telegram Star debitings.
  int32 subscription_period_;

  /**
   * The transaction is a sale of a subscription by the channel chat; for channel chats only.
   */
  starTransactionTypeChannelSubscriptionSale();

  /**
   * The transaction is a sale of a subscription by the channel chat; for channel chats only.
   *
   * \param[in] user_id_ Identifier of the user that 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a purchase of a gift to another user; 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:
  /// Identifier of the user that received the gift.
  int53 user_id_;
  /// The gift.
  object_ptr<gift> gift_;

  /**
   * The transaction is a purchase of a gift to another user; for regular users and bots only.
   */
  starTransactionTypeGiftPurchase();

  /**
   * The transaction is a purchase of a gift to another user; for regular users and bots only.
   *
   * \param[in] user_id_ Identifier of the user that received the gift.
   * \param[in] gift_ The gift.
   */
  starTransactionTypeGiftPurchase(int53 user_id_, object_ptr<gift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -278979246;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a sale of a gift received from another user or bot; for regular users 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:
  /// Identifier of the user that sent the gift.
  int53 user_id_;
  /// The gift.
  object_ptr<gift> gift_;

  /**
   * The transaction is a sale of a gift received from another user or bot; for regular users only.
   */
  starTransactionTypeGiftSale();

  /**
   * The transaction is a sale of a gift received from another user or bot; for regular users only.
   *
   * \param[in] user_id_ Identifier of the user that 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a sending of a paid reaction to a message in a channel chat by the current user; 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:
  /// Identifier of the channel chat.
  int53 chat_id_;
  /// Identifier of the reacted message; can be 0 or an identifier of a deleted message.
  int53 message_id_;

  /**
   * The transaction is a sending of a paid reaction to a message in a channel chat by the current user; 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; for regular users only.
   *
   * \param[in] chat_id_ Identifier of the channel chat.
   * \param[in] message_id_ Identifier of the reacted message; can 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a receiving of a paid reaction to a message by the channel chat; 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:
  /// Identifier of the user that added the paid reaction.
  int53 user_id_;
  /// Identifier of the reacted message; can be 0 or an identifier of a deleted message.
  int53 message_id_;

  /**
   * The transaction is a receiving of a paid reaction to a message by the channel chat; for channel chats only.
   */
  starTransactionTypeChannelPaidReactionReceive();

  /**
   * The transaction is a receiving of a paid reaction to a message by the channel chat; for channel chats only.
   *
   * \param[in] user_id_ Identifier of the user that added the paid reaction.
   * \param[in] message_id_ Identifier of the reacted message; can 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The transaction is a receiving of a commission from an affiliate program; 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:
  /// Identifier of the chat that created the affiliate program.
  int53 chat_id_;
  /// The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner.
  int32 commission_per_mille_;

  /**
   * The transaction is a receiving of a commission from an affiliate program; for regular users, bots and channel chats only.
   */
  starTransactionTypeAffiliateProgramCommission();

  /**
   * The transaction is a receiving of a commission from an affiliate program; 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The amount of owned Telegram Stars.
  object_ptr<starAmount> star_amount_;
  /// List of transactions with Telegram Stars.
  array<object_ptr<starTransaction>> transactions_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes a statistical graph.
 */
class StatisticalGraph: public Object {
 public:
};

/**
 * 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:
  /// Graph data in JSON format.
  string json_data_;
  /// If non-empty, a token which can be used to receive a zoomed in graph.
  string zoom_token_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The token to use for data loading.
  string token_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The error message.
  string error_message_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The current value.
  double value_;
  /// The value for the previous day.
  double previous_value_;
  /// The growth rate of the value, as a percentage.
  double growth_rate_percentage_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique sticker identifier within the set; 0 if none.
  int64 id_;
  /// Identifier of the sticker set to which the sticker belongs; 0 if none.
  int64 set_id_;
  /// Sticker width; as defined by the sender.
  int32 width_;
  /// Sticker height; as defined by the sender.
  int32 height_;
  /// Emoji corresponding to the sticker.
  string emoji_;
  /// Sticker format.
  object_ptr<StickerFormat> format_;
  /// Sticker's full type.
  object_ptr<StickerFullType> full_type_;
  /// Sticker thumbnail in WEBP or JPEG format; may be null.
  object_ptr<thumbnail> thumbnail_;
  /// File containing the sticker.
  object_ptr<file> sticker_;

  /**
   * 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.
   * \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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes format of a sticker.
 */
class StickerFormat: public Object {
 public:
};

/**
 * 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:

  /**
   * The sticker is an image in WEBP format.
   */
  stickerFormatWebp();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2123043040;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The sticker is an animation in TGS format.
   */
  stickerFormatTgs();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1614588662;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * The sticker is a video in WEBM format.
   */
  stickerFormatWebm();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2070162097;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class file;

class maskPosition;

/**
 * This class is an abstract base class.
 * Contains full information about sticker type.
 */
class StickerFullType: public Object {
 public:
};

/**
 * 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:
  /// Premium animation of the sticker; may be null. If present, only Telegram Premium users can use the sticker.
  object_ptr<file> premium_animation_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Position where the mask is placed; may be null.
  object_ptr<maskPosition> mask_position_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the custom emoji.
  int64 custom_emoji_id_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the sticker set.
  int64 id_;
  /// Title of the sticker set.
  string title_;
  /// Name of the sticker set.
  string name_;
  /// 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_;
  /// Sticker set thumbnail's outline; may be null if unknown.
  object_ptr<outline> thumbnail_outline_;
  /// True, if the sticker set is owned by the current user.
  bool is_owned_;
  /// True, if the sticker set has been installed by the current user.
  bool is_installed_;
  /// True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously.
  bool is_archived_;
  /// True, if the sticker set is official.
  bool is_official_;
  /// Type of the stickers in the set.
  object_ptr<StickerType> sticker_type_;
  /// True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only.
  bool needs_repainting_;
  /// 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_;
  /// True for already viewed trending sticker sets.
  bool is_viewed_;
  /// List of stickers in this set.
  array<object_ptr<sticker>> stickers_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the sticker set.
  int64 id_;
  /// Title of the sticker set.
  string title_;
  /// Name of the sticker set.
  string name_;
  /// 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_;
  /// Sticker set thumbnail's outline; may be null if unknown.
  object_ptr<outline> thumbnail_outline_;
  /// True, if the sticker set is owned by the current user.
  bool is_owned_;
  /// True, if the sticker set has been installed by the current user.
  bool is_installed_;
  /// True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously.
  bool is_archived_;
  /// True, if the sticker set is official.
  bool is_official_;
  /// Type of the stickers in the set.
  object_ptr<StickerType> sticker_type_;
  /// True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only.
  bool needs_repainting_;
  /// 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_;
  /// True for already viewed trending sticker sets.
  bool is_viewed_;
  /// Total number of stickers in the set.
  int32 size_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Approximate total number of sticker sets found.
  int32 total_count_;
  /// List of sticker sets.
  array<object_ptr<stickerSetInfo>> sets_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes type of sticker.
 */
class StickerType: public Object {
 public:
};

/**
 * 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:

  /**
   * The sticker is a regular sticker.
   */
  stickerTypeRegular();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 56345973;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of stickers.
  array<object_ptr<sticker>> stickers_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Total size of files, in bytes.
  int53 size_;
  /// Total number of files.
  int32 count_;
  /// Statistics split by chats.
  array<object_ptr<storageStatisticsByChat>> by_chat_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier; 0 if none.
  int53 chat_id_;
  /// Total size of the files in the chat, in bytes.
  int53 size_;
  /// Total number of files in the chat.
  int32 count_;
  /// Statistics split by file types.
  array<object_ptr<storageStatisticsByFileType>> by_file_type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// File type.
  object_ptr<FileType> file_type_;
  /// Total size of the files, in bytes.
  int53 size_;
  /// Total number of files.
  int32 count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Approximate total size of files, in bytes.
  int53 files_size_;
  /// Approximate number of files.
  int32 file_count_;
  /// Size of the database.
  int53 database_size_;
  /// Size of the language pack database.
  int53 language_pack_database_size_;
  /// Size of the TDLib internal log.
  int53 log_size_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class formattedText;

class giveawayParameters;

/**
 * This class is an abstract base class.
 * Describes a purpose of an in-store payment.
 */
class StorePaymentPurpose: public Object {
 public:
};

/**
 * 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:
  /// Pass true if this is a restore of a Telegram Premium purchase; only for App Store.
  bool is_restore_;
  /// Pass true if this is an upgrade from a monthly subscription to early subscription; only for App Store.
  bool is_upgrade_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The user 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:
  /// 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; 0 if none.
  int53 boosted_chat_id_;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  /// Identifiers of the users which can activate the gift codes.
  array<int53> user_ids_;
  /// Text to show along with the gift codes; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed.
  object_ptr<formattedText> text_;

  /**
   * The user creating Telegram Premium gift codes for other users.
   */
  storePaymentPurposePremiumGiftCodes();

  /**
   * The user 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; 0 if none.
   * \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, and CustomEmoji 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  /// The number of users to receive Telegram Stars.
  int32 winner_count_;
  /// The number of Telegram Stars to be distributed through the giveaway.
  int53 star_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  /// Number of bought Telegram Stars.
  int53 star_count_;

  /**
   * 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.
   */
  storePaymentPurposeStars(string const &currency_, int53 amount_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1803497708;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the user to which Telegram Stars are gifted.
  int53 user_id_;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  /// Number of bought Telegram Stars.
  int53 star_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Approximate total number of stories found.
  int32 total_count_;
  /// The list of stories.
  array<object_ptr<story>> stories_;
  /// Identifiers of the pinned stories; returned only in getChatPostedToChatPageStories with from_story_id == 0.
  array<int32> pinned_story_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique story identifier among stories of the given sender.
  int32 id_;
  /// Identifier of the chat that posted the story.
  int53 sender_chat_id_;
  /// Identifier of the sender of the story; may be null if the story is posted on behalf of the sender_chat_id.
  object_ptr<MessageSender> sender_id_;
  /// Point in time (Unix timestamp) when the story was published.
  int32 date_;
  /// True, if the story is being sent by the current user.
  bool is_being_sent_;
  /// True, if the story is being edited by the current user.
  bool is_being_edited_;
  /// True, if the story was edited.
  bool is_edited_;
  /// True, if the story is saved in the sender's profile and will be available there after expiration.
  bool is_posted_to_chat_page_;
  /// True, if the story is visible only for the current user.
  bool is_visible_only_for_self_;
  /// True, if the story can be deleted.
  bool can_be_deleted_;
  /// True, if the story can be edited.
  bool can_be_edited_;
  /// True, if the story can be forwarded as a message. Otherwise, screenshots and saving of the story content must be also forbidden.
  bool can_be_forwarded_;
  /// True, if the story can be replied in the chat with the story sender.
  bool can_be_replied_;
  /// True, if the story's is_posted_to_chat_page value can be changed.
  bool can_toggle_is_posted_to_chat_page_;
  /// True, if the story statistics are available through getStoryStatistics.
  bool can_get_statistics_;
  /// True, if interactions with the story can be received through getStoryInteractions.
  bool can_get_interactions_;
  /// 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_;
  /// Information about the original story; may be null if the story wasn't reposted.
  object_ptr<storyRepostInfo> repost_info_;
  /// 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_;
  /// Type of the chosen reaction; may be null if none.
  object_ptr<ReactionType> chosen_reaction_type_;
  /// Privacy rules affecting story visibility; may be approximate for non-owned stories.
  object_ptr<StoryPrivacySettings> privacy_settings_;
  /// Content of the story.
  object_ptr<StoryContent> content_;
  /// Clickable areas to be shown on the story content.
  array<object_ptr<storyArea>> areas_;
  /// Caption of the story.
  object_ptr<formattedText> caption_;

  /**
   * Represents a story.
   */
  story();

  /**
   * Represents a story.
   *
   * \param[in] id_ Unique story identifier among stories of the given sender.
   * \param[in] sender_chat_id_ Identifier of the chat that posted the story.
   * \param[in] sender_id_ Identifier of the sender of the story; may be null if the story is posted on behalf of the sender_chat_id.
   * \param[in] date_ Point in time (Unix timestamp) when the story was published.
   * \param[in] is_being_sent_ True, if the story is being sent 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 sender's profile 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_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. Otherwise, screenshots 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 story sender.
   * \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.
   */
  story(int32 id_, int53 sender_chat_id_, object_ptr<MessageSender> &&sender_id_, int32 date_, bool is_being_sent_, bool is_being_edited_, bool is_edited_, bool is_posted_to_chat_page_, bool is_visible_only_for_self_, bool can_be_deleted_, bool can_be_edited_, bool can_be_forwarded_, bool can_be_replied_, 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_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -294015331;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Position of the area.
  object_ptr<storyAreaPosition> position_;
  /// Type of the area.
  object_ptr<StoryAreaType> type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The abscissa of the rectangle's center, as a percentage of the media width.
  double x_percentage_;
  /// The ordinate of the rectangle's center, as a percentage of the media height.
  double y_percentage_;
  /// The width of the rectangle, as a percentage of the media width.
  double width_percentage_;
  /// The height of the rectangle, as a percentage of the media height.
  double height_percentage_;
  /// Clockwise rotation angle of the rectangle, in degrees; 0-360.
  double rotation_angle_;
  /// The radius of the rectangle corner rounding, as a percentage of the media width.
  double corner_radius_percentage_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
};

/**
 * 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:
  /// The location.
  object_ptr<location> location_;
  /// Address of the location; may be null if unknown.
  object_ptr<locationAddress> address_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Information about the venue.
  object_ptr<venue> venue_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Type of the reaction.
  object_ptr<ReactionType> reaction_type_;
  /// Number of times the reaction was added.
  int32 total_count_;
  /// True, if reaction has a dark background.
  bool is_dark_;
  /// True, if reaction corner is flipped.
  bool is_flipped_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the chat with the message.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// HTTP or tg:// URL to be opened when the area is clicked.
  string url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Temperature, in degree Celsius.
  double temperature_;
  /// Emoji representing the weather.
  string emoji_;
  /// A color of the area background in the ARGB format.
  int32 background_color_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class photo;

class storyVideo;

/**
 * This class is an abstract base class.
 * Contains the content of a story.
 */
class StoryContent: public Object {
 public:
};

/**
 * 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:
  /// The photo.
  object_ptr<photo> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The video in MPEG4 format.
  object_ptr<storyVideo> video_;
  /// Alternative version of the video in MPEG4 format, encoded with H.264 codec; may be null.
  object_ptr<storyVideo> alternative_video_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * Contains identifier of a story along with identifier of its sender.
 */
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:
  /// Identifier of the chat that posted the story.
  int53 sender_chat_id_;
  /// Unique story identifier among stories of the given sender.
  int32 story_id_;

  /**
   * Contains identifier of a story along with identifier of its sender.
   */
  storyFullId();

  /**
   * Contains identifier of a story along with identifier of its sender.
   *
   * \param[in] sender_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Unique story identifier among stories of the given sender.
   */
  storyFullId(int53 sender_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1880961525;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique story identifier among stories of the given sender.
  int32 story_id_;
  /// Point in time (Unix timestamp) when the story was published.
  int32 date_;
  /// True, if the story is available only to close friends.
  bool is_for_close_friends_;

  /**
   * Contains basic information about a story.
   */
  storyInfo();

  /**
   * Contains basic information about a story.
   *
   * \param[in] story_id_ Unique story identifier among stories of the given sender.
   * \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.
   */
  storyInfo(int32 story_id_, int32 date_, bool is_for_close_friends_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1986542766;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the user or chat that made the interaction.
  object_ptr<MessageSender> actor_id_;
  /// Approximate point in time (Unix timestamp) when the interaction happened.
  int32 interaction_date_;
  /// Block list to which the actor is added; may be null if none or for chat stories.
  object_ptr<BlockList> block_list_;
  /// Type of the interaction.
  object_ptr<StoryInteractionType> type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number of times the story was viewed.
  int32 view_count_;
  /// Number of times the story was forwarded; 0 if none or unknown.
  int32 forward_count_;
  /// Number of reactions added to the story; 0 if none or unknown.
  int32 reaction_count_;
  /// Identifiers of at most 3 recent viewers of the story.
  array<int53> recent_viewer_user_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
};

/**
 * 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:
  /// Type of the reaction that was chosen by the viewer; may be null if none.
  object_ptr<ReactionType> chosen_reaction_type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The message with story forward.
  object_ptr<message> message_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The reposted story.
  object_ptr<story> story_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Approximate total number of interactions found.
  int32 total_count_;
  /// Approximate total number of found forwards and reposts; always 0 for chat stories.
  int32 total_forward_count_;
  /// Approximate total number of found reactions; always 0 for chat stories.
  int32 total_reaction_count_;
  /// List of story interactions.
  array<object_ptr<storyInteraction>> interactions_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes a list of stories.
 */
class StoryList: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Contains information about the origin of a story that was reposted.
 */
class StoryOrigin: public Object {
 public:
};

/**
 * The original story was a public story with known sender.
 */
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:
  /// Identifier of the chat that posted original story.
  int53 chat_id_;
  /// Story identifier of the original story.
  int32 story_id_;

  /**
   * The original story was a public story with known sender.
   */
  storyOriginPublicStory();

  /**
   * The original story was a public story with known sender.
   *
   * \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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The original story was sent 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:
  /// Name of the story sender.
  string sender_name_;

  /**
   * The original story was sent by an unknown user.
   */
  storyOriginHiddenUser();

  /**
   * The original story was sent by an unknown user.
   *
   * \param[in] sender_name_ Name of the story sender.
   */
  explicit storyOriginHiddenUser(string const &sender_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1512016364;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes privacy settings of a story.
 */
class StoryPrivacySettings: public Object {
 public:
};

/**
 * 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:
  /// Identifiers of the users that can't see the story; always unknown and empty for non-owned stories.
  array<int53> except_user_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// User identifiers of the contacts that can't see the story; always unknown and empty for non-owned stories.
  array<int53> except_user_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifiers of the users; always unknown and empty for non-owned stories.
  array<int53> user_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Origin of the story that was reposted.
  object_ptr<StoryOrigin> origin_;
  /// True, if story content was modified during reposting; otherwise, story wasn't modified.
  bool is_content_modified_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// A graph containing number of story views and shares.
  object_ptr<StatisticalGraph> story_interaction_graph_;
  /// A graph containing number of story reactions.
  object_ptr<StatisticalGraph> story_reaction_graph_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class file;

class minithumbnail;

class thumbnail;

/**
 * Describes a video file sent in 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:
  /// Duration of the video, in seconds.
  double duration_;
  /// Video width.
  int32 width_;
  /// Video height.
  int32 height_;
  /// True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets.
  bool has_stickers_;
  /// True, if the video has no sound.
  bool is_animation_;
  /// Video minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  /// Video thumbnail in JPEG or MPEG4 format; may be null.
  object_ptr<thumbnail> thumbnail_;
  /// Size of file prefix, which is expected to be preloaded, in bytes.
  int32 preload_prefix_size_;
  /// Timestamp of the frame used as video thumbnail.
  double cover_frame_timestamp_;
  /// File containing the video.
  object_ptr<file> video_;

  /**
   * Describes a video file sent in a story.
   */
  storyVideo();

  /**
   * Describes a video file sent in 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes an action suggested to the current user.
 */
class SuggestedAction: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Supergroup identifier.
  int53 supergroup_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Suggests the user to set birthdate.
   */
  suggestedActionSetBirthdate();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -356672766;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// A URL for managing Telegram Premium subscription.
  string manage_premium_subscription_url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ChatMemberStatus;

class usernames;

/**
 * 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:
  /// Supergroup or channel identifier.
  int53 id_;
  /// Usernames of the supergroup or channel; may be null.
  object_ptr<usernames> usernames_;
  /// 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_;
  /// Status of the current user in the supergroup or channel; custom title will always be empty.
  object_ptr<ChatMemberStatus> status_;
  /// 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, getChatsToSendStories, 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_;
  /// Approximate boost level for the chat.
  int32 boost_level_;
  /// True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel.
  bool has_linked_chat_;
  /// True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup.
  bool has_location_;
  /// True, if messages sent to the channel contains name of the sender. This field is only applicable to channels.
  bool sign_messages_;
  /// True, if messages sent to the channel have information about the sender user. This field is only applicable to channels.
  bool show_message_sender_;
  /// True, if users need to join the supergroup before they can send messages. Always true for channels and non-discussion supergroups.
  bool join_to_send_messages_;
  /// True, if all users directly joining the supergroup need to be approved by supergroup administrators. Always false for channels and supergroups without username, location, or a linked chat.
  bool join_by_request_;
  /// True, if the slow mode is enabled in the supergroup.
  bool is_slow_mode_enabled_;
  /// True, if the supergroup is a channel.
  bool is_channel_;
  /// 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_;
  /// True, if the supergroup is a forum with topics.
  bool is_forum_;
  /// True, if the supergroup or channel is verified.
  bool is_verified_;
  /// True, if content of media messages in the supergroup or channel chat must be hidden with 18+ spoiler.
  bool has_sensitive_content_;
  /// If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted.
  string restriction_reason_;
  /// True, if many users reported this supergroup or channel as a scam.
  bool is_scam_;
  /// True, if many users reported this supergroup or channel as a fake account.
  bool is_fake_;
  /// True, if the supergroup or channel has non-expired stories available to the current user.
  bool has_active_stories_;
  /// True, if the supergroup or channel has unread non-expired stories available to the current user.
  bool has_unread_active_stories_;

  /**
   * 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; custom title will always be empty.
   * \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, getChatsToSendStories, 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_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. Always true for channels and non-discussion supergroups.
   * \param[in] join_by_request_ True, if all users directly joining the supergroup need to be approved by supergroup administrators. Always false for channels and supergroups without 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_verified_ True, if the supergroup or channel is verified.
   * \param[in] has_sensitive_content_ True, if content of media messages in the supergroup or channel chat must be hidden with 18+ spoiler.
   * \param[in] restriction_reason_ If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted.
   * \param[in] is_scam_ True, if many users reported this supergroup or channel as a scam.
   * \param[in] is_fake_ True, if many users reported this supergroup or channel as a fake account.
   * \param[in] has_active_stories_ True, if the supergroup or channel has non-expired stories available to the current user.
   * \param[in] has_unread_active_stories_ True, if the supergroup or channel has unread non-expired stories available to the current user.
   */
  supergroup(int53 id_, object_ptr<usernames> &&usernames_, int32 date_, object_ptr<ChatMemberStatus> &&status_, int32 member_count_, int32 boost_level_, 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_verified_, bool has_sensitive_content_, string const &restriction_reason_, bool is_scam_, bool is_fake_, bool has_active_stories_, bool has_unread_active_stories_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 212320974;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class botCommands;

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:
  /// 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_;
  /// Supergroup or channel description.
  string description_;
  /// Number of members in the supergroup or channel; 0 if unknown.
  int32 member_count_;
  /// Number of privileged users in the supergroup or channel; 0 if unknown.
  int32 administrator_count_;
  /// Number of restricted users in the supergroup; 0 if unknown.
  int32 restricted_count_;
  /// Number of users banned from chat; 0 if unknown.
  int32 banned_count_;
  /// 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_;
  /// Delay between consecutive sent messages for non-administrator supergroup members, in seconds.
  int32 slow_mode_delay_;
  /// 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_;
  /// True, if paid reaction can be enabled in the channel chat; for channels only.
  bool can_enable_paid_reaction_;
  /// True, if members of the chat can be retrieved via getSupergroupMembers or searchChatMembers.
  bool can_get_members_;
  /// True, if non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers.
  bool has_hidden_members_;
  /// True, if non-administrators and non-bots can be hidden in responses to getSupergroupMembers and searchChatMembers for non-administrators.
  bool can_hide_members_;
  /// True, if the supergroup sticker set can be changed.
  bool can_set_sticker_set_;
  /// True, if the supergroup location can be changed.
  bool can_set_location_;
  /// True, if the supergroup or channel statistics are available.
  bool can_get_statistics_;
  /// True, if the supergroup or channel revenue statistics are available.
  bool can_get_revenue_statistics_;
  /// True, if the supergroup or channel Telegram Star revenue statistics are available.
  bool can_get_star_revenue_statistics_;
  /// True, if aggressive anti-spam checks can be enabled or disabled in the supergroup.
  bool can_toggle_aggressive_anti_spam_;
  /// 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_;
  /// 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_;
  /// 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_;
  /// True, if paid media can be sent and forwarded to the channel chat; for channels only.
  bool has_paid_media_allowed_;
  /// True, if the supergroup or channel has pinned stories.
  bool has_pinned_stories_;
  /// Number of times the current user boosted the supergroup or channel.
  int32 my_boost_count_;
  /// 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_;
  /// Identifier of the supergroup sticker set that must be shown before user sticker sets; 0 if none.
  int64 sticker_set_id_;
  /// 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_;
  /// Location to which the supergroup is connected; may be null if none.
  object_ptr<chatLocation> location_;
  /// Primary invite link for the chat; may be null. For chat administrators with can_invite_users right only.
  object_ptr<chatInviteLink> invite_link_;
  /// List of commands of bots in the group.
  array<object_ptr<botCommands>> bot_commands_;
  /// Identifier of the basic group from which supergroup was upgraded; 0 if none.
  int53 upgraded_from_basic_group_id_;
  /// Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none.
  int53 upgraded_from_max_message_id_;

  /**
   * 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] 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_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_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] 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] 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] 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_, int32 slow_mode_delay_, double slow_mode_delay_expires_in_, 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_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 my_boost_count_, int32 unrestrict_boost_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_, 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 = 1718501070;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Specifies the kind of chat members to return in getSupergroupMembers.
 */
class SupergroupMembersFilter: public Object {
 public:
};

/**
 * 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:

  /**
   * Returns recently active users in reverse chronological order.
   */
  supergroupMembersFilterRecent();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1178199509;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Query to search for.
  string query_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns the owner and administrators.
   */
  supergroupMembersFilterAdministrators();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2097380265;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Query to search for.
  string query_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Query to search for.
  string query_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Query to search for.
  string query_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Query to search for.
  string query_;
  /// If non-zero, the identifier of the current message thread.
  int53 message_thread_id_;

  /**
   * 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] message_thread_id_ If non-zero, the identifier of the current message thread.
   */
  supergroupMembersFilterMention(string const &query_, int53 message_thread_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 947915036;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * Returns bot members of the supergroup or channel.
   */
  supergroupMembersFilterBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 492138918;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// URL.
  string url_;
  /// Type of the URL.
  object_ptr<TMeUrlType> type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
};

/**
 * 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:
  /// Identifier of the user.
  int53 user_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Information about the chat invite link.
  object_ptr<chatInviteLinkInfo> info_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the sticker set.
  int64 sticker_set_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of URLs.
  array<object_ptr<tMeUrl>> urls_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class InternalLinkType;

class targetChatTypes;

/**
 * This class is an abstract base class.
 * Describes the target chat to be opened.
 */
class TargetChat: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Allowed types for the chat.
  object_ptr<targetChatTypes> types_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// An internal link pointing to the chat.
  object_ptr<InternalLinkType> link_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if private chats with ordinary users are allowed.
  bool allow_user_chats_;
  /// True, if private chats with other bots are allowed.
  bool allow_bot_chats_;
  /// True, if basic group and supergroup chats are allowed.
  bool allow_group_chats_;
  /// True, if channel chats are allowed.
  bool allow_channel_chats_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class formattedText;

class giveawayParameters;

/**
 * This class is an abstract base class.
 * Describes a purpose of a payment toward Telegram.
 */
class TelegramPaymentPurpose: public Object {
 public:
};

/**
 * The user 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:
  /// 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; 0 if none.
  int53 boosted_chat_id_;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  /// Identifiers of the users which can activate the gift codes.
  array<int53> user_ids_;
  /// Number of months the Telegram Premium subscription will be active for the users.
  int32 month_count_;
  /// Text to show along with the gift codes; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed.
  object_ptr<formattedText> text_;

  /**
   * The user creating Telegram Premium gift codes for other users.
   */
  telegramPaymentPurposePremiumGiftCodes();

  /**
   * The user 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; 0 if none.
   * \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, and CustomEmoji 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  /// Number of users which will be able to activate the gift codes.
  int32 winner_count_;
  /// Number of months the Telegram Premium subscription will be active for the users.
  int32 month_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  /// Number of bought Telegram Stars.
  int53 star_count_;

  /**
   * 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.
   */
  telegramPaymentPurposeStars(string const &currency_, int53 amount_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -495718830;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the user to which Telegram Stars are gifted.
  int53 user_id_;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  /// Number of bought Telegram Stars.
  int53 star_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  /// The number of users to receive Telegram Stars.
  int32 winner_count_;
  /// The number of Telegram Stars to be distributed through the giveaway.
  int53 star_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Invite link to use.
  string invite_link_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if a temporary password is available.
  bool has_password_;
  /// Time left before the temporary password expires, in seconds.
  int32 valid_for_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Text of the terms of service.
  object_ptr<formattedText> text_;
  /// The minimum age of a user to be able to accept the terms; 0 if age isn't restricted.
  int32 min_user_age_;
  /// True, if a blocking popup with terms of service must be shown to the user.
  bool show_popup_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Bytes.
  bytes value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Number.
  int32 value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// String.
  string value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Vector of numbers.
  array<int32> value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Vector of objects.
  array<object_ptr<testInt>> value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Vector of strings.
  array<string> value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Vector of objects.
  array<object_ptr<testString>> value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Text.
  string text_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of text entities.
  array<object_ptr<textEntity>> entities_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Offset of the entity, in UTF-16 code units.
  int32 offset_;
  /// Length of the entity, in UTF-16 code units.
  int32 length_;
  /// Type of the entity.
  object_ptr<TextEntityType> type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Represents a part of the text which must be formatted differently.
 */
class TextEntityType: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A bot command, beginning with &quot;/&quot;.
   */
  textEntityTypeBotCommand();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1150997581;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * An HTTP URL.
   */
  textEntityTypeUrl();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1312762756;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * An email address.
   */
  textEntityTypeEmailAddress();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1425545249;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A phone number.
   */
  textEntityTypePhoneNumber();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1160140246;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A bold text.
   */
  textEntityTypeBold();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1128210000;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * An italic text.
   */
  textEntityTypeItalic();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -118253987;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * An underlined text.
   */
  textEntityTypeUnderline();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 792317842;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A strikethrough text.
   */
  textEntityTypeStrikethrough();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 961529082;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A spoiler text.
   */
  textEntityTypeSpoiler();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 544019899;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Programming language of the code; as defined by the sender.
  string language_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// HTTP or tg:// URL to be opened when the link is clicked.
  string url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the mentioned user.
  int53 user_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier of the custom emoji.
  int64 custom_emoji_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes the way the text needs to be parsed for text entities.
 */
class TextParseMode: public Object {
 public:
};

/**
 * 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:
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Text of the quote. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities can be present in the text.
  object_ptr<formattedText> text_;
  /// Approximate quote position in the original message in UTF-16 code units as specified by the message sender.
  int32 position_;
  /// True, if the quote was manually chosen by the message sender.
  bool is_manual_;

  /**
   * 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, and CustomEmoji 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// A color of the background in the RGB format.
  int32 background_color_;
  /// A secondary color for the background in the RGB format.
  int32 secondary_background_color_;
  /// A color of the header background in the RGB format.
  int32 header_background_color_;
  /// A color of the bottom bar background in the RGB format.
  int32 bottom_bar_background_color_;
  /// A color of the section background in the RGB format.
  int32 section_background_color_;
  /// A color of the section separator in the RGB format.
  int32 section_separator_color_;
  /// A color of text in the RGB format.
  int32 text_color_;
  /// An accent color of the text in the RGB format.
  int32 accent_text_color_;
  /// A color of text on the section headers in the RGB format.
  int32 section_header_text_color_;
  /// A color of the subtitle text in the RGB format.
  int32 subtitle_text_color_;
  /// A color of the text for destructive actions in the RGB format.
  int32 destructive_text_color_;
  /// A color of hints in the RGB format.
  int32 hint_color_;
  /// A color of links in the RGB format.
  int32 link_color_;
  /// A color of the buttons in the RGB format.
  int32 button_color_;
  /// A color of text on the buttons in the RGB format.
  int32 button_text_color_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class BackgroundFill;

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:
  /// Theme accent color in ARGB format.
  int32 accent_color_;
  /// The background to be used in chats; may be null.
  object_ptr<background> background_;
  /// The fill to be used as a background for outgoing messages.
  object_ptr<BackgroundFill> outgoing_message_fill_;
  /// If true, the freeform gradient fill needs to be animated on every sent message.
  bool animate_outgoing_message_fill_;
  /// Accent color of outgoing messages in ARGB format.
  int32 outgoing_message_accent_color_;

  /**
   * Describes theme settings.
   */
  themeSettings();

  /**
   * Describes theme settings.
   *
   * \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.
   * \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(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 = -62120942;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Thumbnail format.
  object_ptr<ThumbnailFormat> format_;
  /// Thumbnail width.
  int32 width_;
  /// Thumbnail height.
  int32 height_;
  /// The thumbnail.
  object_ptr<file> file_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes format of a thumbnail.
 */
class ThumbnailFormat: public Object {
 public:
};

/**
 * 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:

  /**
   * The thumbnail is in JPEG format.
   */
  thumbnailFormatJpeg();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -653503352;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique time zone identifier.
  string id_;
  /// Time zone name.
  string name_;
  /// Current UTC time offset for the time zone.
  int32 utc_time_offset_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// A list of time zones.
  array<object_ptr<timeZone>> time_zones_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * A category containing frequently used channels.
   */
  topChatCategoryChannels();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -500825885;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Approximate total number of trending sticker sets.
  int32 total_count_;
  /// List of trending sticker sets.
  array<object_ptr<stickerSetInfo>> sets_;
  /// True, if the list contains sticker sets with premium stickers.
  bool is_premium_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Session identifier.
  int64 id_;
  /// Point in time (Unix timestamp) when the user has logged in.
  int32 log_in_date_;
  /// Model of the device that was used for the session creation, as provided by the application.
  string device_model_;
  /// A human-readable description of the location from which the session was created, based on the IP address.
  string location_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the reaction.
  object_ptr<ReactionType> type_;
  /// Identifier of the sender, added the reaction.
  object_ptr<MessageSender> sender_id_;
  /// True, if the reaction was added with a big animation.
  bool is_big_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class AuthorizationState;

class AutosaveSettingsScope;

class BlockList;

class CallbackQueryPayload;

class CanSendStoryResult;

class ChatAction;

class ChatActionBar;

class ChatAvailableReactions;

class ChatList;

class ChatType;

class ConnectionState;

class MessageContent;

class MessageSender;

class NotificationGroupType;

class NotificationSettingsScope;

class OptionValue;

class ReactionType;

class ReplyMarkup;

class StickerType;

class StoryList;

class SuggestedAction;

class UserPrivacySetting;

class UserStatus;

class accentColor;

class address;

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 chatTheme;

class closeBirthdayUser;

class downloadedFileCounts;

class draftMessage;

class emojiStatus;

class error;

class factCheck;

class file;

class fileDownload;

class forumTopicInfo;

class groupCall;

class groupCallParticipant;

class languagePackString;

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 starAmount;

class starRevenueStatus;

class sticker;

class stickerSet;

class story;

class supergroup;

class supergroupFullInfo;

class termsOfService;

class trendingStickerSets;

class unconfirmedSession;

class unreadReaction;

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:
};

/**
 * 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:
  /// New authorization state.
  object_ptr<AuthorizationState> authorization_state_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new message.
  object_ptr<message> message_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The chat identifier of the sent message.
  int53 chat_id_;
  /// A temporary message identifier.
  int53 message_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// The previous temporary message identifier.
  int53 old_message_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The failed to send message.
  object_ptr<message> message_;
  /// The previous temporary message identifier.
  int53 old_message_id_;
  /// The cause of the message sending failure.
  object_ptr<error> error_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// New message content.
  object_ptr<MessageContent> new_content_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// Point in time (Unix timestamp) when the message was edited.
  int32 edit_date_;
  /// New message reply markup; may be null.
  object_ptr<ReplyMarkup> reply_markup_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The message identifier.
  int53 message_id_;
  /// True, if the message is pinned.
  bool is_pinned_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// New information about interactions with the message; may be null.
  object_ptr<messageInteractionInfo> interaction_info_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// The new number of unread mention messages left in the chat.
  int32 unread_mention_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// The new list of unread reactions.
  array<object_ptr<unreadReaction>> unread_reactions_;
  /// The new number of messages with unread reactions left in the chat.
  int32 unread_reaction_count_;

  /**
   * 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 left 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// The new fact-check.
  object_ptr<factCheck> fact_check_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the chat with the live location message.
  int53 chat_id_;
  /// Identifier of the message with live location.
  int53 message_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the chat with the message.
  int53 chat_id_;
  /// Identifier of the sent message.
  int53 message_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The chat.
  object_ptr<chat> chat_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new chat title.
  string title_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new chat photo; may be null.
  object_ptr<chatPhotoInfo> photo_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new chat accent color identifier.
  int32 accent_color_id_;
  /// 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_;
  /// The new chat profile accent color identifier; -1 if none.
  int32 profile_accent_color_id_;
  /// The new identifier of a custom emoji to be shown on the profile background; 0 if none.
  int64 profile_background_custom_emoji_id_;

  /**
   * 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] 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_, 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 = -1212614407;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new chat permissions.
  object_ptr<chatPermissions> permissions_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;
  /// The new chat positions in the chat lists.
  array<object_ptr<chatPosition>> positions_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New chat position. If new order is 0, then the chat needs to be removed from the list.
  object_ptr<chatPosition> position_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The chat list to which the chat was added.
  object_ptr<ChatList> chat_list_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The chat list from which the chat was removed.
  object_ptr<ChatList> chat_list_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the last read incoming message.
  int53 last_read_inbox_message_id_;
  /// The number of unread messages left in the chat.
  int32 unread_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of last read outgoing message.
  int53 last_read_outbox_message_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new value of the action bar; may be null.
  object_ptr<ChatActionBar> action_bar_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new value of the business bot manage bar; may be null.
  object_ptr<businessBotManageBar> business_bot_manage_bar_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new reactions, available in the chat.
  object_ptr<ChatAvailableReactions> available_reactions_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new draft message; may be null if none.
  object_ptr<draftMessage> draft_message_;
  /// The new chat positions in the chat lists.
  array<object_ptr<chatPosition>> positions_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new chat emoji status; may be null.
  object_ptr<emojiStatus> emoji_status_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of message_sender_id; may be null if the user can't change message sender.
  object_ptr<MessageSender> message_sender_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of message_auto_delete_time.
  int32 message_auto_delete_time_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new notification settings.
  object_ptr<chatNotificationSettings> notification_settings_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new data about pending join requests; may be null.
  object_ptr<chatJoinRequestsInfo> pending_join_requests_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user.
 */
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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat.
  int53 reply_markup_message_id_;

  /**
   * The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user.
   */
  updateChatReplyMarkup();

  /**
   * The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] reply_markup_message_id_ Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat.
   */
  updateChatReplyMarkup(int53 chat_id_, int53 reply_markup_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1309386144;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new chat background; may be null if background was reset to default.
  object_ptr<chatBackground> background_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new name of the chat theme; may be empty if theme was reset to default.
  string theme_name_;

  /**
   * The chat theme was changed.
   */
  updateChatTheme();

  /**
   * The chat theme was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] theme_name_ The new name of the chat theme; may be empty if theme was reset to default.
   */
  updateChatTheme(int53 chat_id_, string const &theme_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 838063205;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The number of unread mention messages left in the chat.
  int32 unread_mention_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The number of messages with unread reactions left in the chat.
  int32 unread_reaction_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of video_chat.
  object_ptr<videoChat> video_chat_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new default_disable_notification value.
  bool default_disable_notification_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of has_protected_content.
  bool has_protected_content_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of is_translatable.
  bool is_translatable_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of is_marked_as_unread.
  bool is_marked_as_unread_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of view_as_topics.
  bool view_as_topics_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Block list to which the chat is added; may be null if none.
  object_ptr<BlockList> block_list_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of has_scheduled_messages.
  bool has_scheduled_messages_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new list of chat folders.
  array<object_ptr<chatFolderInfo>> chat_folders_;
  /// Position of the main chat list among chat folders, 0-based.
  int32 main_chat_list_position_;
  /// True, if folder tags are enabled.
  bool are_tags_enabled_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// New number of online members in the chat, or 0 if unknown.
  int32 online_member_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New data about the topic.
  object_ptr<savedMessagesTopic> topic_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Approximate total number of Saved Messages topics.
  int32 topic_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New data about the shortcut.
  object_ptr<quickReplyShortcut> shortcut_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The identifier of the deleted shortcut.
  int32 shortcut_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new list of identifiers of quick reply shortcuts.
  array<int32> shortcut_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The identifier of the shortcut.
  int32 shortcut_id_;
  /// The new list of quick reply messages for the shortcut in order from the first to the last sent.
  array<object_ptr<quickReplyMessage>> messages_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New information about the topic.
  object_ptr<forumTopicInfo> info_;

  /**
   * 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] chat_id_ Chat identifier.
   * \param[in] info_ New information about the topic.
   */
  updateForumTopicInfo(int53 chat_id_, object_ptr<forumTopicInfo> &&info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1802448073;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Types of chats for which notification settings were updated.
  object_ptr<NotificationSettingsScope> scope_;
  /// The new notification settings.
  object_ptr<scopeNotificationSettings> notification_settings_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new notification settings.
  object_ptr<reactionNotificationSettings> notification_settings_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique notification group identifier.
  int32 notification_group_id_;
  /// Changed notification.
  object_ptr<notification> notification_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique notification group identifier.
  int32 notification_group_id_;
  /// New type of the notification group.
  object_ptr<NotificationGroupType> type_;
  /// Identifier of a chat to which all notifications in the group belong.
  int53 chat_id_;
  /// Chat identifier, which notification settings must be applied to the added notifications.
  int53 notification_settings_chat_id_;
  /// Identifier of the notification sound to be played; 0 if sound is disabled.
  int64 notification_sound_id_;
  /// Total number of unread notifications in the group, can be bigger than number of active notifications.
  int32 total_count_;
  /// List of added group notifications, sorted by notification identifier.
  array<object_ptr<notification>> added_notifications_;
  /// Identifiers of removed group notifications, sorted by notification identifier.
  array<int32> removed_notification_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Lists of active notification groups.
  array<object_ptr<notificationGroup>> groups_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if there are some delayed notification updates, which will be sent soon.
  bool have_delayed_notifications_;
  /// True, if there can be some yet unreceived notifications, which are being fetched from the server.
  bool have_unreceived_notifications_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifiers of the deleted messages.
  array<int53> message_ids_;
  /// True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible).
  bool is_permanent_;
  /// True, if the messages are deleted only from the cache and can possibly be retrieved again in the future.
  bool from_cache_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// If not 0, the message thread identifier in which the action was performed.
  int53 message_thread_id_;
  /// Identifier of a message sender performing the action.
  object_ptr<MessageSender> sender_id_;
  /// The action.
  object_ptr<ChatAction> action_;

  /**
   * 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] message_thread_id_ If not 0, the message thread identifier in which the action was performed.
   * \param[in] sender_id_ Identifier of a message sender performing the action.
   * \param[in] action_ The action.
   */
  updateChatAction(int53 chat_id_, int53 message_thread_id_, object_ptr<MessageSender> &&sender_id_, object_ptr<ChatAction> &&action_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1698703832;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// User identifier.
  int53 user_id_;
  /// New status of the user.
  object_ptr<UserStatus> status_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New data about the user.
  object_ptr<user> user_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New data about the group.
  object_ptr<basicGroup> basic_group_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New data about the supergroup.
  object_ptr<supergroup> supergroup_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New data about the secret chat.
  object_ptr<secretChat> secret_chat_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// User identifier.
  int53 user_id_;
  /// New full information about the user.
  object_ptr<userFullInfo> user_full_info_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of a basic group.
  int53 basic_group_id_;
  /// New full information about the group.
  object_ptr<basicGroupFullInfo> basic_group_full_info_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  /// New full information about the supergroup.
  object_ptr<supergroupFullInfo> supergroup_full_info_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// Notification content.
  object_ptr<MessageContent> content_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New data about the file.
  object_ptr<file> file_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier for the generation process.
  int64 generation_id_;
  /// The original path specified by the application in inputFileGenerated.
  string original_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.
  string destination_path_;
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier for the generation process.
  int64 generation_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Total size of files in the file download list, in bytes.
  int53 total_size_;
  /// Total number of files in the file download list.
  int32 total_count_;
  /// Total downloaded size of files in the file download list, in bytes.
  int53 downloaded_size_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The added file download.
  object_ptr<fileDownload> file_download_;
  /// New number of being downloaded and recently downloaded files found.
  object_ptr<downloadedFileCounts> counts_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// File identifier.
  int32 file_id_;
  /// Point in time (Unix timestamp) when the file downloading was completed; 0 if the file downloading isn't completed.
  int32 complete_date_;
  /// True, if downloading of the file is paused.
  bool is_paused_;
  /// New number of being downloaded and recently downloaded files found.
  object_ptr<downloadedFileCounts> counts_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// File identifier.
  int32 file_id_;
  /// New number of being downloaded and recently downloaded files found.
  object_ptr<downloadedFileCounts> counts_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier for the verification process.
  int53 verification_id_;
  /// 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_;
  /// Cloud project number to pass to the Play Integrity API on Android.
  int64 cloud_project_number_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New data about a call.
  object_ptr<call> call_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New data about a group call.
  object_ptr<groupCall> group_call_;

  /**
   * Information about a group call was updated.
   */
  updateGroupCall();

  /**
   * Information about a group call was updated.
   *
   * \param[in] group_call_ New data about a group call.
   */
  explicit updateGroupCall(object_ptr<groupCall> &&group_call_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 808603136;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of group call.
  int32 group_call_id_;
  /// New data about a participant.
  object_ptr<groupCallParticipant> participant_;

  /**
   * 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 group call.
   * \param[in] participant_ New data about a 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The call identifier.
  int32 call_id_;
  /// The data.
  bytes data_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The privacy setting.
  object_ptr<UserPrivacySetting> setting_;
  /// New privacy rules.
  object_ptr<userPrivacySettingRules> rules_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The chat list with changed number of unread messages.
  object_ptr<ChatList> chat_list_;
  /// Total number of unread messages.
  int32 unread_count_;
  /// Total number of unread messages in unmuted chats.
  int32 unread_unmuted_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The chat list with changed number of unread messages.
  object_ptr<ChatList> chat_list_;
  /// Approximate total number of chats in the chat list.
  int32 total_count_;
  /// Total number of unread chats.
  int32 unread_count_;
  /// Total number of unread unmuted chats.
  int32 unread_unmuted_count_;
  /// Total number of chats marked as unread.
  int32 marked_as_unread_count_;
  /// Total number of unmuted chats marked as unread.
  int32 marked_as_unread_unmuted_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new information about the story.
  object_ptr<story> story_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the chat that posted the story.
  int53 story_sender_chat_id_;
  /// Story identifier.
  int32 story_id_;

  /**
   * A story became inaccessible.
   */
  updateStoryDeleted();

  /**
   * A story became inaccessible.
   *
   * \param[in] story_sender_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Story identifier.
   */
  updateStoryDeleted(int53 story_sender_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1879567261;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * A story has been successfully sent.
 */
class updateStorySendSucceeded 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:
  /// The sent story.
  object_ptr<story> story_;
  /// The previous temporary story identifier.
  int32 old_story_id_;

  /**
   * A story has been successfully sent.
   */
  updateStorySendSucceeded();

  /**
   * A story has been successfully sent.
   *
   * \param[in] story_ The sent story.
   * \param[in] old_story_id_ The previous temporary story identifier.
   */
  updateStorySendSucceeded(object_ptr<story> &&story_, int32 old_story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1188651433;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * A story failed to send. If the story sending is canceled, then updateStoryDeleted will be received instead of this update.
 */
class updateStorySendFailed 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:
  /// The failed to send story.
  object_ptr<story> story_;
  /// The cause of the story sending failure.
  object_ptr<error> error_;
  /// Type of the error; may be null if unknown.
  object_ptr<CanSendStoryResult> error_type_;

  /**
   * A story failed to send. If the story sending is canceled, then updateStoryDeleted will be received instead of this update.
   */
  updateStorySendFailed();

  /**
   * A story failed to send. If the story sending is canceled, then updateStoryDeleted will be received instead of this update.
   *
   * \param[in] story_ The failed to send story.
   * \param[in] error_ The cause of the story sending failure.
   * \param[in] error_type_ Type of the error; may be null if unknown.
   */
  updateStorySendFailed(object_ptr<story> &&story_, object_ptr<error> &&error_, object_ptr<CanSendStoryResult> &&error_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -532221543;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new list of active stories.
  object_ptr<chatActiveStories> active_stories_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The story list.
  object_ptr<StoryList> story_list_;
  /// Approximate total number of chats with active stories in the list.
  int32 chat_count_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Point in time (Unix timestamp) until stealth mode is active; 0 if it is disabled.
  int32 active_until_date_;
  /// Point in time (Unix timestamp) when stealth mode can be enabled again; 0 if there is no active cooldown.
  int32 cooldown_until_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The option name.
  string name_;
  /// The new option value.
  object_ptr<OptionValue> value_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The sticker set.
  object_ptr<stickerSet> sticker_set_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Type of the affected stickers.
  object_ptr<StickerType> sticker_type_;
  /// The new list of installed ordinary sticker sets.
  array<int64> sticker_set_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Type of the affected stickers.
  object_ptr<StickerType> sticker_type_;
  /// The prefix of the list of trending sticker sets with the newest trending sticker sets.
  object_ptr<trendingStickerSets> sticker_sets_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// The new list of file identifiers of recently used stickers.
  array<int32> sticker_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new list of file identifiers of favorite stickers.
  array<int32> sticker_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new list of file identifiers of saved animations.
  array<int32> animation_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new list of identifiers of saved notification sounds.
  array<int64> notification_sound_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if default background for dark theme has changed.
  bool for_dark_theme_;
  /// The new default background; may be null.
  object_ptr<background> background_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The list of available chat themes has changed.
 */
class updateChatThemes 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:
  /// The new list of chat themes.
  array<object_ptr<chatTheme>> chat_themes_;

  /**
   * The list of available chat themes has changed.
   */
  updateChatThemes();

  /**
   * The list of available chat themes has changed.
   *
   * \param[in] chat_themes_ The new list of chat themes.
   */
  explicit updateChatThemes(array<object_ptr<chatTheme>> &&chat_themes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1588098376;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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 app theme.
  array<object_ptr<accentColor>> colors_;
  /// The list of accent color identifiers, which can be set through setAccentColor and setChatAccentColor. The colors must be shown in the specififed order.
  array<int32> available_accent_color_ids_;

  /**
   * 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 app 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 specififed 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Information about supported colors.
  array<object_ptr<profileAccentColor>> colors_;
  /// The list of accent color identifiers, which can be set through setProfileAccentColor and setChatProfileAccentColor. The colors must be shown in the specififed order.
  array<int32> available_accent_color_ids_;

  /**
   * 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 specififed 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Localization target to which the language pack belongs.
  string localization_target_;
  /// Identifier of the updated language pack.
  string language_pack_id_;
  /// List of changed language pack strings; empty if all strings have changed.
  array<object_ptr<languagePackString>> strings_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new connection state.
  object_ptr<ConnectionState> state_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the terms of service.
  string terms_of_service_id_;
  /// The new terms of service.
  object_ptr<termsOfService> terms_of_service_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The unconfirmed session; may be null if none.
  object_ptr<unconfirmedSession> session_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new list of bots. The bots must not be shown on scheduled messages screen.
  array<object_ptr<attachmentMenuBot>> bots_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of Web App launch.
  int64 web_app_launch_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new list of active emoji reactions.
  array<string> emojis_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new list of available message effects from emoji reactions.
  array<int64> reaction_effect_ids_;
  /// The new list of available message effects from Premium stickers.
  array<int64> sticker_effect_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new type of the default reaction.
  object_ptr<ReactionType> reaction_type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of Saved Messages topic which tags were changed; 0 if tags for the whole chat has changed.
  int53 saved_messages_topic_id_;
  /// The new tags.
  object_ptr<savedMessagesTags> tags_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The list of messages with active live locations.
  array<object_ptr<message>> messages_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new amount of owned Telegram Stars.
  object_ptr<starAmount> star_amount_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// New amount of earned revenue.
  object_ptr<chatRevenueAmount> revenue_amount_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * The Telegram Star revenue earned by a bot 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:
  /// Identifier of the owner of the Telegram Stars.
  object_ptr<MessageSender> owner_id_;
  /// New Telegram Star revenue status.
  object_ptr<starRevenueStatus> status_;

  /**
   * The Telegram Star revenue earned by a bot 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 bot 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The maximum allowed duration of media for speech recognition without Telegram Premium subscription, in seconds.
  int32 max_media_duration_;
  /// The total number of allowed speech recognitions per week; 0 if none.
  int32 weekly_count_;
  /// Number of left speech recognition attempts this week.
  int32 left_count_;
  /// Point in time (Unix timestamp) when the weekly number of tries will reset; 0 if unknown.
  int32 next_reset_date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The new list of supported dice emojis.
  array<string> emojis_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// The animated sticker to be played.
  object_ptr<sticker> sticker_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Name of the animation search provider.
  string provider_;
  /// The new list of emojis suggested for searching.
  array<string> emojis_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Added suggested actions.
  array<object_ptr<SuggestedAction>> added_actions_;
  /// Removed suggested actions.
  array<object_ptr<SuggestedAction>> removed_actions_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// True, if upload speed was limited; false, if download speed was limited.
  bool is_upload_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// List of contact users with close birthday.
  array<object_ptr<closeBirthdayUser>> close_birthday_users_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Type of chats for which autosave settings were updated.
  object_ptr<AutosaveSettingsScope> scope_;
  /// The new autosave settings; may be null if the settings are reset to default.
  object_ptr<scopeAutosaveSettings> settings_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New data about the connection.
  object_ptr<businessConnection> connection_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier of the business connection.
  string connection_id_;
  /// The new message.
  object_ptr<businessMessage> message_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier of the business connection.
  string connection_id_;
  /// The edited message.
  object_ptr<businessMessage> message_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier of the business connection.
  string connection_id_;
  /// Identifier of a chat in the business account in which messages were deleted.
  int53 chat_id_;
  /// Unique message identifiers of the deleted messages.
  array<int53> message_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique query identifier.
  int64 id_;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  /// User location; may be null.
  object_ptr<location> user_location_;
  /// The type of the chat from which the query originated; may be null if unknown.
  object_ptr<ChatType> chat_type_;
  /// Text of the query.
  string query_;
  /// Offset of the first entry to return.
  string offset_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  /// User location; may be null.
  object_ptr<location> user_location_;
  /// Text of the query.
  string query_;
  /// Identifier of the chosen result.
  string result_id_;
  /// Identifier of the sent inline message, if known.
  string inline_message_id_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique query identifier.
  int64 id_;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  /// Identifier of the chat where the query was sent.
  int53 chat_id_;
  /// Identifier of the message from which the query originated.
  int53 message_id_;
  /// Identifier that uniquely corresponds to the chat to which the message was sent.
  int64 chat_instance_;
  /// Query payload.
  object_ptr<CallbackQueryPayload> payload_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique query identifier.
  int64 id_;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  /// Identifier of the inline message from which the query originated.
  string inline_message_id_;
  /// An identifier uniquely corresponding to the chat a message was sent to.
  int64 chat_instance_;
  /// Query payload.
  object_ptr<CallbackQueryPayload> payload_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique query identifier.
  int64 id_;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  /// Unique identifier of the business connection.
  string connection_id_;
  /// The message from the business account from which the query originated.
  object_ptr<businessMessage> message_;
  /// An identifier uniquely corresponding to the chat a message was sent to.
  int64 chat_instance_;
  /// Query payload.
  object_ptr<CallbackQueryPayload> payload_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique query identifier.
  int64 id_;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  /// Invoice payload.
  string invoice_payload_;
  /// User shipping address.
  object_ptr<address> shipping_address_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique query identifier.
  int64 id_;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  /// Currency for the product price.
  string currency_;
  /// Total price for the product, in the smallest units of the currency.
  int53 total_amount_;
  /// Invoice payload.
  bytes invoice_payload_;
  /// Identifier of a shipping option chosen by the user; may be empty if not applicable.
  string shipping_option_id_;
  /// Information about the order; may be null.
  object_ptr<orderInfo> order_info_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// A JSON-serialized event.
  string event_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The query identifier.
  int64 id_;
  /// JSON-serialized query data.
  string data_;
  /// Query timeout.
  int32 timeout_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// New data about the poll.
  object_ptr<poll> poll_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique poll identifier.
  int64 poll_id_;
  /// Identifier of the message sender that changed the answer to the poll.
  object_ptr<MessageSender> voter_id_;
  /// 0-based identifiers of answer options, chosen by the user.
  array<int32> option_ids_;

  /**
   * 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_ 0-based identifiers of answer options, chosen by the user.
   */
  updatePollAnswer(int64 poll_id_, object_ptr<MessageSender> &&voter_id_, array<int32> &&option_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1104905219;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the user, changing the rights.
  int53 actor_user_id_;
  /// Point in time (Unix timestamp) when the user rights were changed.
  int32 date_;
  /// If user has joined the chat using an invite link, the invite link; may be null.
  object_ptr<chatInviteLink> invite_link_;
  /// True, if the user has joined the chat after sending a join request and being approved by an administrator.
  bool via_join_request_;
  /// True, if the user has joined the chat using an invite link for a chat folder.
  bool via_chat_folder_invite_link_;
  /// Previous chat member.
  object_ptr<chatMember> old_chat_member_;
  /// New chat member.
  object_ptr<chatMember> new_chat_member_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Join request.
  object_ptr<chatJoinRequest> request_;
  /// Chat identifier of the private chat with the user.
  int53 user_chat_id_;
  /// The invite link, which was used to send join request; may be null.
  object_ptr<chatInviteLink> invite_link_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New information about the boost.
  object_ptr<chatBoost> boost_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// Identifier of the user or chat that changed reactions.
  object_ptr<MessageSender> actor_id_;
  /// Point in time (Unix timestamp) when the reactions were changed.
  int32 date_;
  /// Old list of chosen reactions.
  array<object_ptr<ReactionType>> old_reaction_types_;
  /// New list of chosen reactions.
  array<object_ptr<ReactionType>> new_reaction_types_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// Point in time (Unix timestamp) when the reactions were changed.
  int32 date_;
  /// The list of reactions added to the message.
  array<object_ptr<messageReaction>> reactions_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// User identifier.
  int53 user_id_;
  /// Bot-specified payload for the paid media.
  string payload_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// List of updates.
  array<object_ptr<Update>> updates_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class UserStatus;

class UserType;

class emojiStatus;

class profilePhoto;

class usernames;

/**
 * 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:
  /// User identifier.
  int53 id_;
  /// First name of the user.
  string first_name_;
  /// Last name of the user.
  string last_name_;
  /// Usernames of the user; may be null.
  object_ptr<usernames> usernames_;
  /// Phone number of the user.
  string phone_number_;
  /// Current online status of the user.
  object_ptr<UserStatus> status_;
  /// Profile photo of the user; may be null.
  object_ptr<profilePhoto> profile_photo_;
  /// Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview. For Telegram Premium users only.
  int32 accent_color_id_;
  /// Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. For Telegram Premium users only.
  int64 background_custom_emoji_id_;
  /// Identifier of the accent color for the user's profile; -1 if none. For Telegram Premium users only.
  int32 profile_accent_color_id_;
  /// Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none. For Telegram Premium users only.
  int64 profile_background_custom_emoji_id_;
  /// Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only.
  object_ptr<emojiStatus> emoji_status_;
  /// The user is a contact of the current user.
  bool is_contact_;
  /// The user is a contact of the current user and the current user is a contact of the user.
  bool is_mutual_contact_;
  /// The user is a close friend of the current user; implies that the user is a contact.
  bool is_close_friend_;
  /// True, if the user is verified.
  bool is_verified_;
  /// True, if the user is a Telegram Premium user.
  bool is_premium_;
  /// True, if the user is Telegram support account.
  bool is_support_;
  /// If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
  string restriction_reason_;
  /// True, if many users reported this user as a scam.
  bool is_scam_;
  /// True, if many users reported this user as a fake account.
  bool is_fake_;
  /// True, if the user has non-expired stories available to the current user.
  bool has_active_stories_;
  /// True, if the user has unread non-expired stories available to the current user.
  bool has_unread_active_stories_;
  /// 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_;
  /// 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_;
  /// Type of the user.
  object_ptr<UserType> type_;
  /// IETF language tag of the user's language; only available to bots.
  string language_code_;
  /// True, if the user added the current bot to attachment menu; only available to bots.
  bool added_to_attachment_menu_;

  /**
   * 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. For Telegram Premium users only.
   * \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. For Telegram Premium users only.
   * \param[in] profile_accent_color_id_ Identifier of the accent color for the user's profile; -1 if none. For Telegram Premium users only.
   * \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. For Telegram Premium users only.
   * \param[in] emoji_status_ Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only.
   * \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] is_verified_ True, if the user is verified.
   * \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_reason_ If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
   * \param[in] is_scam_ True, if many users reported this user as a scam.
   * \param[in] is_fake_ True, if many users reported this user as a fake account.
   * \param[in] has_active_stories_ True, if the user has non-expired stories available to the current user.
   * \param[in] has_unread_active_stories_ True, if the user has unread non-expired stories available to the current user.
   * \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] 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_, 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_, bool is_verified_, bool is_premium_, bool is_support_, string const &restriction_reason_, bool is_scam_, bool is_fake_, bool has_active_stories_, bool has_unread_active_stories_, bool restricts_new_chats_, 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 = 408235106;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class BlockList;

class birthdate;

class botInfo;

class businessInfo;

class chatPhoto;

class formattedText;

/**
 * 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:
  /// 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_;
  /// 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_;
  /// 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_;
  /// Block list to which the user is added; may be null if none.
  object_ptr<BlockList> block_list_;
  /// True, if the user can be called.
  bool can_be_called_;
  /// True, if a video call can be created with the user.
  bool supports_video_calls_;
  /// True, if the user can't be called due to their privacy settings.
  bool has_private_calls_;
  /// True, if the user can't be linked in forwarded messages due to their privacy settings.
  bool has_private_forwards_;
  /// True, if voice and video notes can't be sent or forwarded to the user.
  bool has_restricted_voice_and_video_note_messages_;
  /// True, if the user has posted to profile stories.
  bool has_posted_to_profile_stories_;
  /// True, if the user always enabled sponsored messages; known only for the current user.
  bool has_sponsored_messages_enabled_;
  /// 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_;
  /// True, if the user set chat background for both chat users and it wasn't reverted yet.
  bool set_chat_background_;
  /// A short user bio; may be null for bots.
  object_ptr<formattedText> bio_;
  /// Birthdate of the user; may be null if unknown.
  object_ptr<birthdate> birthdate_;
  /// Identifier of the personal chat of the user; 0 if none.
  int53 personal_chat_id_;
  /// Number of gifts saved to profile by the user.
  int32 gift_count_;
  /// 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_;
  /// Information about business settings for Telegram Business accounts; may be null if none.
  object_ptr<businessInfo> business_info_;
  /// For bots, information about the bot; may be null if the user isn't a bot.
  object_ptr<botInfo> bot_info_;

  /**
   * 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] 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 gifts saved to profile by the 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] 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_, object_ptr<formattedText> &&bio_, object_ptr<birthdate> &&birthdate_, int53 personal_chat_id_, int32 gift_count_, int32 group_in_common_count_, object_ptr<businessInfo> &&business_info_, object_ptr<botInfo> &&bot_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2049914619;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class formattedText;

class gift;

/**
 * Represents a gift received by a user.
 */
class userGift final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Identifier of the user that sent the gift; 0 if unknown.
  int53 sender_user_id_;
  /// Message added to the gift.
  object_ptr<formattedText> text_;
  /// True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them.
  bool is_private_;
  /// True, if the gift is displayed on the user's profile page; may be false only for the receiver of the gift.
  bool is_saved_;
  /// Point in time (Unix timestamp) when the gift was sent.
  int32 date_;
  /// The gift.
  object_ptr<gift> gift_;
  /// Identifier of the message with the gift in the chat with the sender of the gift; can be 0 or an identifier of a deleted message; only for the gift receiver.
  int53 message_id_;
  /// Number of Telegram Stars that can be claimed by the receiver instead of the gift; 0 if the gift can't be sold by the current user.
  int53 sell_star_count_;

  /**
   * Represents a gift received by a user.
   */
  userGift();

  /**
   * Represents a gift received by a user.
   *
   * \param[in] sender_user_id_ Identifier of the user that sent the gift; 0 if unknown.
   * \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 are able to see them.
   * \param[in] is_saved_ True, if the gift is displayed on the user's profile page; may be false only for the receiver of the gift.
   * \param[in] date_ Point in time (Unix timestamp) when the gift was sent.
   * \param[in] gift_ The gift.
   * \param[in] message_id_ Identifier of the message with the gift in the chat with the sender of the gift; can be 0 or an identifier of a deleted message; only for the gift receiver.
   * \param[in] sell_star_count_ Number of Telegram Stars that can be claimed by the receiver instead of the gift; 0 if the gift can't be sold by the current user.
   */
  userGift(int53 sender_user_id_, object_ptr<formattedText> &&text_, bool is_private_, bool is_saved_, int32 date_, object_ptr<gift> &&gift_, int53 message_id_, int53 sell_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1229895457;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class userGift;

/**
 * Represents a list of gifts received by a user.
 */
class userGifts final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// The total number of received gifts.
  int32 total_count_;
  /// The list of gifts.
  array<object_ptr<userGift>> gifts_;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;

  /**
   * Represents a list of gifts received by a user.
   */
  userGifts();

  /**
   * Represents a list of gifts received by a user.
   *
   * \param[in] total_count_ The total number of received gifts.
   * \param[in] gifts_ The list of gifts.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  userGifts(int32 total_count_, array<object_ptr<userGift>> &&gifts_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1125548230;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The URL.
  string url_;
  /// Left time for which the link is valid, in seconds; 0 if the link is a public username link.
  int32 expires_in_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes available user privacy settings.
 */
class UserPrivacySetting: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Represents a single rule for managing user privacy settings.
 */
class UserPrivacySettingRule: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The user identifiers, total number of users in all rules must not exceed 1000.
  array<int53> user_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The chat identifiers, total number of chats in all rules must not exceed 20.
  array<int53> chat_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The user identifiers, total number of users in all rules must not exceed 1000.
  array<int53> user_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The chat identifiers, total number of chats in all rules must not exceed 20.
  array<int53> chat_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// A list of rules.
  array<object_ptr<UserPrivacySettingRule>> rules_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes the last time the user was online.
 */
class UserStatus: public Object {
 public:
};

/**
 * 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:

  /**
   * The user's status has never been changed.
   */
  userStatusEmpty();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 164646985;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Point in time (Unix timestamp) when the user's online status will expire.
  int32 expires_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Point in time (Unix timestamp) when the user was last online.
  int32 was_online_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Information message.
  object_ptr<formattedText> message_;
  /// Information author.
  string author_;
  /// Information change date.
  int32 date_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
};

/**
 * 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:

  /**
   * A regular user.
   */
  userTypeRegular();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -598644325;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// True, if the bot can be invited to basic group and supergroup chats.
  bool can_join_groups_;
  /// 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_;
  /// True, if the bot has the main Web App.
  bool has_main_web_app_;
  /// True, if the bot supports inline queries.
  bool is_inline_;
  /// Placeholder for inline queries (displayed on the application input field).
  string inline_query_placeholder_;
  /// True, if the location of the user is expected to be sent with every inline query to this bot.
  bool need_location_;
  /// True, if the bot supports connection to Telegram Business accounts.
  bool can_connect_to_business_;
  /// True, if the bot can be added to attachment or side menu.
  bool can_be_added_to_attachment_menu_;
  /// The number of recently active users of the bot.
  int32 active_user_count_;

  /**
   * 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] 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] 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 Telegram Business accounts.
   * \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 is_inline_, string const &inline_query_placeholder_, 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 = -1952199642;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// 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_;
  /// List of currently disabled usernames; the username can be activated with toggleUsernameIsActive, toggleBotUsernameIsActive, or toggleSupergroupUsernameIsActive.
  array<string> disabled_usernames_;
  /// The active username, which can be changed with setUsername or setSupergroupUsername. Information about other active usernames can be received using getCollectibleItemInfo.
  string editable_username_;

  /**
   * 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_ The active username, which can be changed with setUsername or setSupergroupUsername. Information about other active usernames can be received using getCollectibleItemInfo.
   */
  usernames(array<string> &&active_usernames_, array<string> &&disabled_usernames_, string const &editable_username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 799608565;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Approximate total number of users found.
  int32 total_count_;
  /// A list of user identifiers.
  array<int53> user_ids_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Temporary identifier of the order information.
  string order_info_id_;
  /// Available shipping options.
  array<object_ptr<shippingOption>> shipping_options_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class point;

/**
 * This class is an abstract base class.
 * Represents a vector path command.
 */
class VectorPathCommand: public Object {
 public:
};

/**
 * 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:
  /// The end point of the straight line.
  object_ptr<point> end_point_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// The start control point of the curve.
  object_ptr<point> start_control_point_;
  /// The end control point of the curve.
  object_ptr<point> end_control_point_;
  /// The end point of the curve.
  object_ptr<point> end_point_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Venue location; as defined by the sender.
  object_ptr<location> location_;
  /// Venue name; as defined by the sender.
  string title_;
  /// Venue address; as defined by the sender.
  string address_;
  /// 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_;
  /// Identifier of the venue in the provider database; as defined by the sender.
  string id_;
  /// Type of the venue in the provider database; as defined by the sender.
  string type_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Duration of the video, in seconds; as defined by the sender.
  int32 duration_;
  /// Video width; as defined by the sender.
  int32 width_;
  /// Video height; as defined by the sender.
  int32 height_;
  /// Original name of the file; as defined by the sender.
  string file_name_;
  /// MIME type of the file; as defined by the sender.
  string mime_type_;
  /// True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets.
  bool has_stickers_;
  /// True, if the video is expected to be streamed.
  bool supports_streaming_;
  /// Video minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  /// Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null.
  object_ptr<thumbnail> thumbnail_;
  /// File containing the video.
  object_ptr<file> video_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageSender;

/**
 * Describes a video 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:
  /// 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_;
  /// True, if the video chat has participants.
  bool has_participants_;
  /// Default group call participant identifier to join the video chat; may be null.
  object_ptr<MessageSender> default_participant_id_;

  /**
   * Describes a video chat.
   */
  videoChat();

  /**
   * Describes a video 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Duration of the video, in seconds; as defined by the sender.
  int32 duration_;
  /// A waveform representation of the video note's audio in 5-bit format; may be empty if unknown.
  bytes waveform_;
  /// Video width and height; as defined by the sender.
  int32 length_;
  /// Video minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  /// Video thumbnail in JPEG format; as defined by the sender; may be null.
  object_ptr<thumbnail> thumbnail_;
  /// Result of speech recognition in the video note; may be null.
  object_ptr<SpeechRecognitionResult> speech_recognition_result_;
  /// File containing the video.
  object_ptr<file> video_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Duration of the voice note, in seconds; as defined by the sender.
  int32 duration_;
  /// A waveform representation of the voice note in 5-bit format.
  bytes waveform_;
  /// 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_;
  /// Result of speech recognition in the voice note; may be null.
  object_ptr<SpeechRecognitionResult> speech_recognition_result_;
  /// File containing the voice note.
  object_ptr<file> voice_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Web App short name.
  string short_name_;
  /// Web App title.
  string title_;
  /// Web App description.
  string description_;
  /// Web App photo.
  object_ptr<photo> photo_;
  /// Web App animation; may be null.
  object_ptr<animation> animation_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:
  /// Unique identifier for the Web App launch.
  int64 launch_id_;
  /// A Web App URL to open in a web view.
  string url_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * This class is an abstract base class.
 * Describes mode in which a Web App is opened.
 */
class WebAppOpenMode: public Object {
 public:
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

/**
 * 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:

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Preferred Web App theme; pass null to use the default theme.
  object_ptr<themeParameters> theme_;
  /// Short name of the current application; 0-64 English letters, digits, and underscores.
  string application_name_;
  /// The mode in which the Web App is opened; pass null to open in webAppOpenModeFullSize.
  object_ptr<WebAppOpenMode> mode_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Content of the instant view page.
  array<object_ptr<PageBlock>> page_blocks_;
  /// Number of the instant view views; 0 if unknown.
  int32 view_count_;
  /// Version of the instant view; currently, can be 1 or 2.
  int32 version_;
  /// True, if the instant view must be shown from right to left.
  bool is_rtl_;
  /// True, if the instant view contains the full page. A network request might be needed to get the full instant view.
  bool is_full_;
  /// An internal link to be opened to leave feedback about the instant view.
  object_ptr<InternalLinkType> feedback_link_;

  /**
   * 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;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Call identifier.
  int32 call_id_;
  /// The call protocols supported by the application.
  object_ptr<callProtocol> protocol_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Terms of service identifier.
  string terms_of_service_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot. The bot must be owned and must have the main Web App.
  int53 bot_user_id_;
  /// 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_;
  /// Content of the added preview.
  object_ptr<InputStoryContent> content_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Invite link for the chat folder.
  string invite_link_;
  /// Identifiers of the chats added to the chat folder. The chats are automatically joined if they aren't joined yet.
  array<int53> chat_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the user.
  int53 user_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// The chat list. Use getChatListsToAddChat to get suitable chat lists.
  object_ptr<ChatList> chat_list_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class contact;

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:
  /// The contact to add or edit; phone number may be empty and needs to be specified only if known, vCard is ignored.
  object_ptr<contact> contact_;
  /// 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_;

  /**
   * 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] contact_ The contact to add or edit; phone number may be empty and needs to be specified only if known, vCard is ignored.
   * \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(object_ptr<contact> &&contact_, bool share_phone_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1869640000;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of a language pack to be added.
  string language_pack_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker file to add.
  object_ptr<InputFile> sticker_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the file to download.
  int32 file_id_;
  /// Chat identifier of the message with the file.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Target chat.
  int53 chat_id_;
  /// Identifier of the sender of the message.
  object_ptr<MessageSender> sender_id_;
  /// Information about the message or story to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  /// Pass true to disable notification for the message.
  bool disable_notification_;
  /// The content of the message to be added.
  object_ptr<InputMessageContent> input_message_content_;

  /**
   * 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.
   * \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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The minimum verbosity level needed for the message to be logged; 0-1023.
  int32 verbosity_level_;
  /// Text of a message to log.
  string text_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// Type of the reaction to add. Use addPendingPaidMessageReaction instead to add the paid reaction.
  object_ptr<ReactionType> reaction_type_;
  /// Pass true if the reaction is added with a big animation.
  bool is_big_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The network statistics entry with the data to be added to statistics.
  object_ptr<NetworkStatisticsEntry> entry_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// 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_;
  /// Pass true if the user didn't choose anonymity explicitly, for example, the reaction is set from the message bubble.
  bool use_default_is_anonymous_;
  /// Pass true to make paid reaction of the user on the message anonymous; pass false to make the user's profile visible among top reactors. Ignored if use_default_is_anonymous == true.
  bool is_anonymous_;

  /**
   * 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] use_default_is_anonymous_ Pass true if the user didn't choose anonymity explicitly, for example, the reaction is set from the message bubble.
   * \param[in] is_anonymous_ Pass true to make paid reaction of the user on the message anonymous; pass false to make the user's profile visible among top reactors. Ignored if use_default_is_anonymous == true.
   */
  addPendingPaidMessageReaction(int53 chat_id_, int53 message_id_, int53 star_count_, bool use_default_is_anonymous_, bool is_anonymous_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1716816153;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ProxyType;

class proxy;

/**
 * Adds a proxy server for network requests. Can be called before authorization.
 *
 * Returns object_ptr<Proxy>.
 */
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:
  /// Proxy server domain or IP address.
  string server_;
  /// Proxy server port.
  int32 port_;
  /// Pass true to immediately enable the proxy.
  bool enable_;
  /// Proxy type.
  object_ptr<ProxyType> type_;

  /**
   * Default constructor for a function, which adds a proxy server for network requests. Can be called before authorization.
   *
   * Returns object_ptr<Proxy>.
   */
  addProxy();

  /**
   * Creates a function, which adds a proxy server for network requests. Can be called before authorization.
   *
   * Returns object_ptr<Proxy>.
   *
   * \param[in] server_ Proxy server domain or IP address.
   * \param[in] port_ Proxy server port.
   * \param[in] enable_ Pass true to immediately enable the proxy.
   * \param[in] type_ Proxy type.
   */
  addProxy(string const &server_, int32 port_, bool enable_, object_ptr<ProxyType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 331529432;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<proxy>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Name of the target shortcut.
  string shortcut_name_;
  /// Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none.
  int53 reply_to_message_id_;
  /// Identifier of the inline query.
  int64 query_id_;
  /// Identifier of the inline query result.
  string result_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Name of the target shortcut.
  string shortcut_name_;
  /// Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none.
  int53 reply_to_message_id_;
  /// The content of the message to be added; inputMessagePoll, inputMessageForwarded and inputMessageLocation with live_period aren't supported.
  object_ptr<InputMessageContent> input_message_content_;

  /**
   * 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; inputMessagePoll, 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Name of the target shortcut.
  string shortcut_name_;
  /// Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none.
  int53 reply_to_message_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;
  /// Sticker file to add.
  object_ptr<InputFile> sticker_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to add.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Notification sound file to add.
  object_ptr<InputFile> sound_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker set owner; ignored for regular users.
  int53 user_id_;
  /// 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_;
  /// Sticker to add to the set.
  object_ptr<inputSticker> sticker_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the callback query.
  int64 callback_query_id_;
  /// Text of the answer.
  string text_;
  /// Pass true to show an alert to the user instead of a toast notification.
  bool show_alert_;
  /// URL to be opened.
  string url_;
  /// Time during which the result of the query can be cached, in seconds.
  int32 cache_time_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of a custom query.
  int64 custom_query_id_;
  /// JSON-serialized answer to the query.
  string data_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the inline query.
  int64 inline_query_id_;
  /// Pass true if results may be cached and returned only for the user that sent the query. By default, results may be returned to any user who sends the same query.
  bool is_personal_;
  /// Button to be shown above inline query results; pass null if none.
  object_ptr<inlineQueryResultsButton> button_;
  /// The results of the query.
  array<object_ptr<InputInlineQueryResult>> results_;
  /// Allowed time to cache the results of the query, in seconds.
  int32 cache_time_;
  /// Offset for the next inline query; pass an empty string if there are no more results.
  string next_offset_;

  /**
   * 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 that 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the pre-checkout query.
  int64 pre_checkout_query_id_;
  /// An error message, empty on success.
  string error_message_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the shipping query.
  int64 shipping_query_id_;
  /// Available shipping options.
  array<object_ptr<shippingOption>> shipping_options_;
  /// An error message, empty on success.
  string error_message_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class InputInlineQueryResult;

class sentWebAppMessage;

/**
 * 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<SentWebAppMessage>.
 */
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:
  /// Identifier of the Web App query.
  string web_app_query_id_;
  /// The result of the query.
  object_ptr<InputInlineQueryResult> result_;

  /**
   * 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<SentWebAppMessage>.
   */
  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<SentWebAppMessage>.
   *
   * \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 = -1598776079;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<sentWebAppMessage>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The code to apply.
  string code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class StorePaymentPurpose;

class ok;

/**
 * Informs server about a purchase through App Store. For official applications only.
 *
 * Returns object_ptr<Ok>.
 */
class assignAppStoreTransaction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// App Store receipt.
  bytes receipt_;
  /// Transaction purpose.
  object_ptr<StorePaymentPurpose> purpose_;

  /**
   * Default constructor for a function, which informs server about a purchase through App Store. For official applications only.
   *
   * Returns object_ptr<Ok>.
   */
  assignAppStoreTransaction();

  /**
   * Creates a function, which informs server about a purchase through App Store. For official applications only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] receipt_ App Store receipt.
   * \param[in] purpose_ Transaction purpose.
   */
  assignAppStoreTransaction(bytes const &receipt_, object_ptr<StorePaymentPurpose> &&purpose_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2030892112;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class StorePaymentPurpose;

class ok;

/**
 * Informs server about a purchase through Google Play. For official applications only.
 *
 * Returns object_ptr<Ok>.
 */
class assignGooglePlayTransaction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Application package name.
  string package_name_;
  /// Identifier of the purchased store product.
  string store_product_id_;
  /// Google Play purchase token.
  string purchase_token_;
  /// Transaction purpose.
  object_ptr<StorePaymentPurpose> purpose_;

  /**
   * Default constructor for a function, which informs server about a purchase through Google Play. For official applications only.
   *
   * Returns object_ptr<Ok>.
   */
  assignGooglePlayTransaction();

  /**
   * Creates a function, which informs server about a purchase through Google Play. For official applications only.
   *
   * Returns object_ptr<Ok>.
   *
   * \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.
   * \param[in] purpose_ Transaction purpose.
   */
  assignGooglePlayTransaction(string const &package_name_, string const &store_product_id_, string const &purchase_token_, object_ptr<StorePaymentPurpose> &&purpose_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1992704860;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Member identifier.
  object_ptr<MessageSender> member_id_;
  /// 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_;
  /// Pass true to delete all messages in the chat for the user that is being removed. Always true for supergroups and channels.
  bool revoke_messages_;

  /**
   * 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 that 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of an incoming message in the Replies chat.
  int53 message_id_;
  /// Pass true to delete the message.
  bool delete_message_;
  /// Pass true to delete all messages from the same sender.
  bool delete_all_messages_;
  /// Pass true to report the sender to the Telegram moderators.
  bool report_spam_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Identifiers of boost slots of the current user from which to apply boosts to the chat.
  array<int32> slot_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class StorePaymentPurpose;

class ok;

/**
 * Checks whether an in-store purchase is possible. Must be called before any in-store purchase.
 *
 * 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:
  /// Transaction purpose.
  object_ptr<StorePaymentPurpose> purpose_;

  /**
   * Default constructor for a function, which checks whether an in-store purchase is possible. Must be called before any in-store purchase.
   *
   * 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.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class CanSendMessageToUserResult;

/**
 * Check 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:
  /// Identifier of the other user.
  int53 user_id_;
  /// Pass true to get only locally available information without sending network requests.
  bool only_local_;

  /**
   * Default constructor for a function, which check 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 check 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class CanSendStoryResult;

/**
 * Checks whether the current user can send a story on behalf of a chat; requires can_post_stories right for supergroup and channel chats.
 *
 * Returns object_ptr<CanSendStoryResult>.
 */
class canSendStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Chat identifier. Pass Saved Messages chat identifier when posting a story on behalf of the current user.
  int53 chat_id_;

  /**
   * Default constructor for a function, which checks whether the current user can send a story on behalf of a chat; requires can_post_stories right for supergroup and channel chats.
   *
   * Returns object_ptr<CanSendStoryResult>.
   */
  canSendStory();

  /**
   * Creates a function, which checks whether the current user can send a story on behalf of a chat; requires can_post_stories right for supergroup and channel chats.
   *
   * Returns object_ptr<CanSendStoryResult>.
   *
   * \param[in] chat_id_ Chat identifier. Pass Saved Messages chat identifier when posting a story on behalf of the current user.
   */
  explicit canSendStory(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1226825365;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<CanSendStoryResult>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of a file to stop downloading.
  int32 file_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the file to stop uploading.
  int32 file_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class contact;

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:
  /// The new list of contacts, contact's vCard are ignored and are not imported.
  array<object_ptr<contact>> contacts_;

  /**
   * 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, contact's vCard are ignored and are not imported.
   */
  explicit changeImportedContacts(array<object_ptr<contact>> &&contacts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1968207955;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<importedContacts>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the sticker set.
  int64 set_id_;
  /// The new value of is_installed.
  bool is_installed_;
  /// The new value of is_archived. A sticker set can't be installed and archived simultaneously.
  bool is_archived_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The bot token.
  string token_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Authentication code to check.
  string code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Email address authentication to check.
  object_ptr<EmailAddressAuthentication> code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The 2-step verification password to check.
  string password_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Recovery code to check.
  string recovery_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Invite link to be checked.
  string invite_link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Invite link to be checked.
  string invite_link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;
  /// Username to be checked.
  string username_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the public chats, for which to check the limit.
  object_ptr<PublicChatType> type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Verification code to check.
  string code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Email address authentication to check.
  object_ptr<EmailAddressAuthentication> code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Recovery code to check.
  string recovery_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Check 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:
  /// Authentication code to check.
  string code_;

  /**
   * Default constructor for a function, which check the authentication code and completes the request for which the code was sent if appropriate.
   *
   * Returns object_ptr<Ok>.
   */
  checkPhoneNumberCode();

  /**
   * Creates a function, which check 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class premiumGiftCodeInfo;

/**
 * Return 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:
  /// The code to check.
  string code_;

  /**
   * Default constructor for a function, which return information about a Telegram Premium gift code.
   *
   * Returns object_ptr<PremiumGiftCodeInfo>.
   */
  checkPremiumGiftCode();

  /**
   * Creates a function, which return 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The name of the shortcut; 1-32 characters.
  string name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Verification code to check.
  string code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Name to be checked.
  string name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the bot, providing the Web App.
  int53 bot_user_id_;
  /// Name of the file.
  string file_name_;
  /// URL of the file.
  string url_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// File name or path to the file.
  string file_name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true to keep local message drafts in secret chats.
  bool exclude_secret_chats_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier of the message.
  int53 chat_id_;
  /// Identifier of the clicked message.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier of the sponsored message.
  int53 chat_id_;
  /// Identifier of the sponsored message.
  int53 message_id_;
  /// Pass true if the media was clicked in the sponsored message.
  bool is_media_click_;
  /// Pass true if the user expanded the video from the sponsored message fullscreen before the click.
  bool from_fullscreen_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Secret chat identifier.
  int32 secret_chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of the sender of the story to close.
  int53 story_sender_chat_id_;
  /// The identifier of the story.
  int32 story_id_;

  /**
   * 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_sender_chat_id_ The identifier of the sender of the story to close.
   * \param[in] story_id_ The identifier of the story.
   */
  closeStory(int53 story_sender_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1144852309;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of Web App launch, received from openWebApp.
  int64 web_app_launch_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// A link from a QR code. The link must be scanned by the in-app camera.
  string link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Session identifier.
  int64 session_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chatAffiliateProgram;

/**
 * Connects an affiliate program to the given chat. Returns information about the connected affiliate program.
 *
 * Returns object_ptr<ChatAffiliateProgram>.
 */
class connectChatAffiliateProgram final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Identifier of the chat to which the affiliate program will be connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right.
  int53 chat_id_;
  /// Identifier of the bot, which affiliate program is connected.
  int53 bot_user_id_;

  /**
   * Default constructor for a function, which connects an affiliate program to the given chat. Returns information about the connected affiliate program.
   *
   * Returns object_ptr<ChatAffiliateProgram>.
   */
  connectChatAffiliateProgram();

  /**
   * Creates a function, which connects an affiliate program to the given chat. Returns information about the connected affiliate program.
   *
   * Returns object_ptr<ChatAffiliateProgram>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the affiliate program will be connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right.
   * \param[in] bot_user_id_ Identifier of the bot, which affiliate program is connected.
   */
  connectChatAffiliateProgram(int53 chat_id_, int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1974559684;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatAffiliateProgram>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Basic group identifier.
  int53 basic_group_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Information about the link to create.
  object_ptr<inputBusinessChatLink> link_info_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the user to be called.
  int53 user_id_;
  /// The call protocols supported by the application.
  object_ptr<callProtocol> protocol_;
  /// Pass true to create a video call.
  bool is_video_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new chat folder.
  object_ptr<chatFolder> folder_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder identifier.
  int32 chat_folder_id_;
  /// Name of the link; 0-32 characters.
  string name_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Invite link name; 0-32 characters.
  string name_;
  /// Point in time (Unix timestamp) when the link will expire; pass 0 if never.
  int32 expiration_date_;
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Invite link name; 0-32 characters.
  string name_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class forumTopicIcon;

class forumTopicInfo;

/**
 * Creates a topic in a forum supergroup chat; 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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Name of the topic; 1-128 characters.
  string name_;
  /// 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_;

  /**
   * Default constructor for a function, which creates a topic in a forum supergroup chat; 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; 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] 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_, object_ptr<forumTopicIcon> &&icon_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1040570140;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<forumTopicInfo>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of business connection on behalf of which to send the request.
  string business_connection_id_;
  /// Information about the invoice of the type inputMessageInvoice.
  object_ptr<InputMessageContent> invoice_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;
  /// Title of the new basic group; 1-128 characters.
  string title_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target user.
  int53 user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker set owner; ignored for regular users.
  int53 user_id_;
  /// Sticker set title; 1-64 characters.
  string title_;
  /// 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_;
  /// Type of the stickers in the set.
  object_ptr<StickerType> sticker_type_;
  /// Pass true if stickers in the sticker set must be repainted; for custom emoji sticker sets only.
  bool needs_repainting_;
  /// 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_;
  /// Source of the sticker set; may be empty if unknown.
  string source_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Title of the new chat; 1-128 characters.
  string title_;
  /// Pass true to create a forum supergroup chat.
  bool is_forum_;
  /// Pass true to create a channel chat; ignored if a forum is created.
  bool is_channel_;
  /// Chat description; 0-255 characters.
  string description_;
  /// Chat location if a location-based supergroup is being created; pass null to create an ordinary supergroup chat.
  object_ptr<chatLocation> location_;
  /// 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_;
  /// Pass true to create a supergroup for importing messages using importMessages.
  bool for_import_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifier.
  int53 user_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Secret chat identifier.
  int32 secret_chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Supergroup or channel identifier.
  int53 supergroup_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The 2-step verification password of the current user.
  string password_;
  /// Time during which the temporary password will be valid, in seconds; must be between 60 and 86400.
  int32 valid_for_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class groupCallId;

/**
 * Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; 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:
  /// Identifier of a chat in which the video chat will be created.
  int53 chat_id_;
  /// Group call title; if empty, chat title will be used.
  string title_;
  /// 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_;
  /// Pass true to create an RTMP stream instead of an ordinary video chat.
  bool is_rtmp_stream_;

  /**
   * Default constructor for a function, which creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; 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). Available only for basic groups, supergroups and channels; 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The reason why the account was deleted; optional.
  string reason_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true to delete the messages for all users.
  bool revoke_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Delete 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:
  /// Identifier of the target bot. The bot must be owned and must have the main Web App.
  int53 bot_user_id_;
  /// Language code of the media previews to delete.
  string language_code_;
  /// File identifiers of the media to delete.
  array<int32> file_ids_;

  /**
   * Default constructor for a function, which delete media previews from the list of media previews of a bot.
   *
   * Returns object_ptr<Ok>.
   */
  deleteBotMediaPreviews();

  /**
   * Creates a function, which delete 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The link to delete.
  string link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique user identifier for the bot.
  int53 bot_user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder identifier.
  int32 chat_folder_id_;
  /// Identifiers of the chats to leave. The chats must be pinned or always included in the folder.
  array<int53> leave_chat_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder identifier.
  int32 chat_folder_id_;
  /// Invite link to be deleted.
  string invite_link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Pass true to remove the chat from all chat lists.
  bool remove_from_chat_list_;
  /// Pass true to delete chat history for all users.
  bool revoke_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// The minimum date of the messages to delete.
  int32 min_date_;
  /// The maximum date of the messages to delete.
  int32 max_date_;
  /// Pass true to delete chat messages for all users; private chats only.
  bool revoke_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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 privileges.
 *
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the sender of messages to delete.
  object_ptr<MessageSender> sender_id_;

  /**
   * 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 privileges.
   *
   * 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 privileges.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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. An updateChatReplyMarkup update will be sent if the reply markup is changed.
 *
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The message identifier of the used keyboard.
  int53 message_id_;

  /**
   * 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. An updateChatReplyMarkup update will be sent if the reply markup is changed.
   *
   * 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. An updateChatReplyMarkup update will be sent if the reply markup is changed.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The scope to which the commands are relevant; pass null to delete commands in the default bot command scope.
  object_ptr<BotCommandScope> scope_;
  /// A two-letter ISO 639-1 language code or an empty string.
  string language_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true if the background is deleted for a dark theme.
  bool for_dark_theme_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the file to delete.
  int32 file_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Deletes all messages in a forum topic; 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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Message thread identifier of the forum topic.
  int53 message_thread_id_;

  /**
   * Default constructor for a function, which deletes all messages in a forum topic; 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 in a forum topic; 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] message_thread_id_ Message thread identifier of the forum topic.
   */
  deleteForumTopic(int53 chat_id_, int53 message_thread_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1864916152;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the language pack to delete.
  string language_pack_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;
  /// Pass true to delete messages for all chat members. Always true for supergroups, channels and secret chats.
  bool revoke_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Element type.
  object_ptr<PassportElementType> type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the profile photo to delete.
  int64 profile_photo_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the quick reply shortcut.
  int32 shortcut_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the quick reply shortcut to which the messages belong.
  int32 shortcut_id_;
  /// Unique identifiers of the messages.
  array<int53> message_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Invite link to revoke.
  string invite_link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of Saved Messages topic which messages will be deleted.
  int53 saved_messages_topic_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of Saved Messages topic which messages will be deleted.
  int53 saved_messages_topic_id_;
  /// The minimum date of the messages to delete.
  int32 min_date_;
  /// The maximum date of the messages to delete.
  int32 max_date_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker set name. The sticker set must be owned by the current user.
  string name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Deletes a previously sent 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:
  /// Identifier of the chat that posted the story.
  int53 story_sender_chat_id_;
  /// Identifier of the story to delete.
  int32 story_id_;

  /**
   * Default constructor for a function, which deletes a previously sent story. Can be called only if story.can_be_deleted == true.
   *
   * Returns object_ptr<Ok>.
   */
  deleteStory();

  /**
   * Creates a function, which deletes a previously sent story. Can be called only if story.can_be_deleted == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_sender_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Identifier of the story to delete.
   */
  deleteStory(int53 story_sender_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1623871722;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Call identifier.
  int32 call_id_;
  /// Pass true if the user was disconnected.
  bool is_disconnected_;
  /// The call duration, in seconds.
  int32 duration_;
  /// Pass true if the call was a video call.
  bool is_video_;
  /// Identifier of the connection used during the call.
  int64 connection_id_;

  /**
   * 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] 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_, int32 duration_, bool is_video_, int64 connection_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1784044162;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chatAffiliateProgram;

/**
 * Disconnects an affiliate program from the given chat and immediately deactivates its referral link. Returns updated information about the disconnected affiliate program.
 *
 * Returns object_ptr<ChatAffiliateProgram>.
 */
class disconnectChatAffiliateProgram final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Identifier of the chat for which the affiliate program is connected.
  int53 chat_id_;
  /// The referral link of the affiliate program.
  string url_;

  /**
   * Default constructor for a function, which disconnects an affiliate program from the given chat and immediately deactivates its referral link. Returns updated information about the disconnected affiliate program.
   *
   * Returns object_ptr<ChatAffiliateProgram>.
   */
  disconnectChatAffiliateProgram();

  /**
   * Creates a function, which disconnects an affiliate program from the given chat and immediately deactivates its referral link. Returns updated information about the disconnected affiliate program.
   *
   * Returns object_ptr<ChatAffiliateProgram>.
   *
   * \param[in] chat_id_ Identifier of the chat for which the affiliate program is connected.
   * \param[in] url_ The referral link of the affiliate program.
   */
  disconnectChatAffiliateProgram(int53 chat_id_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1223651927;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatAffiliateProgram>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Website identifier.
  int64 website_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the file to download.
  int32 file_id_;
  /// 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_;
  /// The starting position from which the file needs to be downloaded.
  int53 offset_;
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot. The bot must be owned and must have the main Web App.
  int53 bot_user_id_;
  /// Language code of the media preview to edit.
  string language_code_;
  /// File identifier of the media to replace.
  int32 file_id_;
  /// Content of the new preview.
  object_ptr<InputStoryContent> content_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The link to edit.
  string link_;
  /// New description of the link.
  object_ptr<inputBusinessChatLink> link_info_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New message content caption; pass null to remove caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New location content of the message; pass null to stop sharing the live location.
  object_ptr<location> location_;
  /// 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_;
  /// The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
  int32 heading_;
  /// The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled.
  int32 proximity_alert_radius_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo.
  object_ptr<InputMessageContent> input_message_content_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New text content of the message. Must be of type inputMessageText.
  object_ptr<InputMessageContent> input_message_content_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder identifier.
  int32 chat_folder_id_;
  /// The edited chat folder.
  object_ptr<chatFolder> folder_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder identifier.
  int32 chat_folder_id_;
  /// Invite link to be edited.
  string invite_link_;
  /// New name of the link; 0-32 characters.
  string name_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Invite link to be edited.
  string invite_link_;
  /// Invite link name; 0-32 characters.
  string name_;
  /// Point in time (Unix timestamp) when the link will expire; pass 0 if never.
  int32 expiration_date_;
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Invite link to be edited.
  string invite_link_;
  /// Invite link name; 0-32 characters.
  string name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// New information about the custom local language pack.
  object_ptr<languagePackInfo> info_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Edits title and icon of a topic in a forum supergroup chat; requires can_manage_topics right in the supergroup 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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Message thread identifier of the forum topic.
  int53 message_thread_id_;
  /// New name of the topic; 0-128 characters. If empty, the previous topic name is kept.
  string name_;
  /// Pass true to edit the icon of the topic. Icon of the General topic can't be edited.
  bool edit_icon_custom_emoji_;
  /// 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_;

  /**
   * Default constructor for a function, which edits title and icon of a topic in a forum supergroup chat; requires can_manage_topics right in the supergroup 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; requires can_manage_topics 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] message_thread_id_ Message thread identifier of the forum topic.
   * \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_, int53 message_thread_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 = -1485402016;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Inline message identifier.
  string inline_message_id_;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New message content caption; pass null to remove caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Inline message identifier.
  string inline_message_id_;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New location content of the message; pass null to stop sharing the live location.
  object_ptr<location> location_;
  /// 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_;
  /// The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
  int32 heading_;
  /// The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled.
  int32 proximity_alert_radius_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Inline message identifier.
  string inline_message_id_;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo.
  object_ptr<InputMessageContent> input_message_content_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Inline message identifier.
  string inline_message_id_;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Inline message identifier.
  string inline_message_id_;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New text content of the message. Must be of type inputMessageText.
  object_ptr<InputMessageContent> input_message_content_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
  int53 message_id_;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New message content caption; 0-getOption(&quot;message_caption_length_max&quot;) characters; pass null to remove caption.
  object_ptr<formattedText> caption_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
  int53 message_id_;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New location content of the message; pass null to stop sharing the live location.
  object_ptr<location> location_;
  /// 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_;
  /// The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
  int32 heading_;
  /// The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled.
  int32 proximity_alert_radius_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message. Use messageProperties.can_edit_media to check whether the message can be edited.
  int53 message_id_;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo.
  object_ptr<InputMessageContent> input_message_content_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
  int53 message_id_;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message. Use messageProperties.can_edit_scheduling_state to check whether the message is suitable.
  int53 message_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
  int53 message_id_;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  /// New text content of the message. Must be of type inputMessageText.
  object_ptr<InputMessageContent> input_message_content_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ProxyType;

class proxy;

/**
 * Edits an existing proxy server for network requests. Can be called before authorization.
 *
 * Returns object_ptr<Proxy>.
 */
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:
  /// Proxy identifier.
  int32 proxy_id_;
  /// Proxy server domain or IP address.
  string server_;
  /// Proxy server port.
  int32 port_;
  /// Pass true to immediately enable the proxy.
  bool enable_;
  /// Proxy type.
  object_ptr<ProxyType> type_;

  /**
   * Default constructor for a function, which edits an existing proxy server for network requests. Can be called before authorization.
   *
   * Returns object_ptr<Proxy>.
   */
  editProxy();

  /**
   * Creates a function, which edits an existing proxy server for network requests. Can be called before authorization.
   *
   * Returns object_ptr<Proxy>.
   *
   * \param[in] proxy_id_ Proxy identifier.
   * \param[in] server_ Proxy server domain or IP address.
   * \param[in] port_ Proxy server port.
   * \param[in] enable_ Pass true to immediately enable the proxy.
   * \param[in] type_ Proxy type.
   */
  editProxy(int32 proxy_id_, string const &server_, int32 port_, bool enable_, object_ptr<ProxyType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1605883821;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<proxy>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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. 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:
  /// Unique identifier of the quick reply shortcut with the message.
  int32 shortcut_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// New content of the message. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo.
  object_ptr<InputMessageContent> input_message_content_;

  /**
   * 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. 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. 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: inputMessageText, inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the subscription to change.
  string subscription_id_;
  /// New value of is_canceled.
  bool is_canceled_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat that posted the story.
  int53 story_sender_chat_id_;
  /// Identifier of the story to edit.
  int32 story_id_;
  /// New content of the story; pass null to keep the current content.
  object_ptr<InputStoryContent> content_;
  /// 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_;
  /// New story caption; pass null to keep the current caption.
  object_ptr<formattedText> caption_;

  /**
   * 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_sender_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_sender_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 = 1584013745;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat that posted the story.
  int53 story_sender_chat_id_;
  /// Identifier of the story to edit.
  int32 story_id_;
  /// New timestamp of the frame, which will be used as video thumbnail.
  double cover_frame_timestamp_;

  /**
   * 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_sender_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_sender_chat_id_, int32 story_id_, double cover_frame_timestamp_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1423307701;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifier.
  int53 user_id_;
  /// Telegram payment identifier of the subscription.
  string telegram_payment_charge_id_;
  /// Pass true to cancel the subscription; pass false to allow the user to enable it.
  bool is_canceled_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Proxy identifier.
  int32 proxy_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Ends a group call. Requires groupCall.can_be_managed.
 *
 * 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:
  /// Group call identifier.
  int32 group_call_id_;

  /**
   * Default constructor for a function, which ends a group call. Requires groupCall.can_be_managed.
   *
   * Returns object_ptr<Ok>.
   */
  endGroupCall();

  /**
   * Creates a function, which ends a group call. Requires groupCall.can_be_managed.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Ends recording of an active group call. Requires groupCall.can_be_managed group call flag.
 *
 * 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:
  /// Group call identifier.
  int32 group_call_id_;

  /**
   * Default constructor for a function, which ends recording of an active group call. Requires groupCall.can_be_managed group call flag.
   *
   * Returns object_ptr<Ok>.
   */
  endGroupCallRecording();

  /**
   * Creates a function, which ends recording of an active group call. Requires groupCall.can_be_managed group call flag.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Ends screen sharing in a joined group call.
 *
 * 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:
  /// Group call identifier.
  int32 group_call_id_;

  /**
   * Default constructor for a function, which ends screen sharing in a joined group call.
   *
   * Returns object_ptr<Ok>.
   */
  endGroupCallScreenSharing();

  /**
   * Creates a function, which ends screen sharing in a joined group call.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of the generation process.
  int64 generation_id_;
  /// If passed, the file generation has failed and must be terminated; pass null if the file generation succeeded.
  object_ptr<error> error_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which to forward messages.
  int53 chat_id_;
  /// If not 0, the message thread identifier in which the message will be sent; for forum threads only.
  int53 message_thread_id_;
  /// Identifier of the chat from which to forward messages.
  int53 from_chat_id_;
  /// 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_;
  /// Options to be used to send the messages; pass null to use default options.
  object_ptr<messageSendOptions> options_;
  /// 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_saved and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable.
  bool send_copy_;
  /// Pass true to remove media captions of message copies. Ignored if send_copy is false.
  bool remove_caption_;

  /**
   * 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] message_thread_id_ If not 0, the message thread identifier in which the message will be sent; for forum threads only.
   * \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_saved 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_, int53 message_thread_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 = 966156347;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The 2-step verification password of the current user.
  string password_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the stickers to search for.
  object_ptr<StickerType> sticker_type_;
  /// Search query.
  string query_;
  /// Chat identifier for which to find stickers.
  int53 chat_id_;
  /// Pass true if only main emoji for each found sticker must be included in the result.
  bool return_only_main_emoji_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The emoji.
  string emoji_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the sticker sets to return.
  object_ptr<StickerType> sticker_type_;
  /// Identifier of the sticker set from which to return the result; use 0 to get results from the beginning.
  int64 offset_sticker_set_id_;
  /// The maximum number of sticker sets to return; up to 100.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// File identifier.
  int32 file_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Bot's user identifier.
  int53 bot_user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class AuthorizationState;

/**
 * Returns the current authorization state; this is an offline request. 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:

  /**
   * Default constructor for a function, which returns the current authorization state; this is an offline request. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class gifts;

/**
 * Returns gifts that can be sent to other users.
 *
 * Returns object_ptr<Gifts>.
 */
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:

  /**
   * Default constructor for a function, which returns gifts that can be sent to other users.
   *
   * Returns object_ptr<Gifts>.
   */
  getAvailableGifts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -153786901;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<gifts>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Background name.
  string name_;
  /// Background type; backgroundTypeChatTheme isn't supported.
  object_ptr<BackgroundType> type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The bank card number.
  string bank_card_number_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class basicGroup;

/**
 * Returns information about a basic group by its identifier. This is an offline request 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:
  /// Basic group identifier.
  int53 basic_group_id_;

  /**
   * Default constructor for a function, which returns information about a basic group by its identifier. This is an offline request 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 request 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Basic group identifier.
  int53 basic_group_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Block list from which to return users.
  object_ptr<BlockList> block_list_;
  /// Number of users and chats to skip in the result; must be non-negative.
  int32 offset_;
  /// The maximum number of users and chats to return; up to 100.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// A two-letter ISO 639-1 language code or an empty string.
  string language_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// A two-letter ISO 639-1 language code or an empty string.
  string language_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot. The bot must be owned and must have the main Web App.
  int53 bot_user_id_;
  /// A two-letter ISO 639-1 language code for which to get previews. If empty, then default previews are returned.
  string language_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot. The bot must have the main Web App.
  int53 bot_user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// A two-letter ISO 639-1 language code or an empty string.
  string language_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Name of the link.
  string link_name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the business connection to return.
  string connection_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Source of the request; pass null if the method is called from settings or some non-standard source.
  object_ptr<BusinessFeature> source_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat with the message.
  int53 chat_id_;
  /// Identifier of the message from which the query originated. The message must not be scheduled.
  int53 message_id_;
  /// Query payload.
  object_ptr<CallbackQueryPayload> payload_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat the message belongs to.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// Identifier of the callback query.
  int64 callback_query_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chat;

/**
 * Returns information about a chat by its identifier; this is an offline request 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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * Default constructor for a function, which returns information about a chat by its identifier; this is an offline request 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 request 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chatAffiliateProgram;

/**
 * Returns an affiliate program that were connected to the given chat by identifier of the bot that created the program.
 *
 * Returns object_ptr<ChatAffiliateProgram>.
 */
class getChatAffiliateProgram final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Identifier of the chat for which the affiliate program was connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right.
  int53 chat_id_;
  /// Identifier of the bot that created the program.
  int53 bot_user_id_;

  /**
   * Default constructor for a function, which returns an affiliate program that were connected to the given chat by identifier of the bot that created the program.
   *
   * Returns object_ptr<ChatAffiliateProgram>.
   */
  getChatAffiliateProgram();

  /**
   * Creates a function, which returns an affiliate program that were connected to the given chat by identifier of the bot that created the program.
   *
   * Returns object_ptr<ChatAffiliateProgram>.
   *
   * \param[in] chat_id_ Identifier of the chat for which the affiliate program was connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right.
   * \param[in] bot_user_id_ Identifier of the bot that created the program.
   */
  getChatAffiliateProgram(int53 chat_id_, int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1858642842;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatAffiliateProgram>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chatAffiliatePrograms;

/**
 * Returns affiliate programs that were connected to the given chat.
 *
 * Returns object_ptr<ChatAffiliatePrograms>.
 */
class getChatAffiliatePrograms final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Identifier of the chat for which the affiliate programs were connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right.
  int53 chat_id_;
  /// 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_;
  /// The maximum number of affiliate programs to return.
  int32 limit_;

  /**
   * Default constructor for a function, which returns affiliate programs that were connected to the given chat.
   *
   * Returns object_ptr<ChatAffiliatePrograms>.
   */
  getChatAffiliatePrograms();

  /**
   * Creates a function, which returns affiliate programs that were connected to the given chat.
   *
   * Returns object_ptr<ChatAffiliatePrograms>.
   *
   * \param[in] chat_id_ Identifier of the chat for which the affiliate programs were connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right.
   * \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.
   */
  getChatAffiliatePrograms(int53 chat_id_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -102804911;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatAffiliatePrograms>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class stories;

/**
 * Returns the list of all stories posted by the given chat; requires can_edit_stories 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the story starting from which stories must be returned; use 0 to get results from the last story.
  int32 from_story_id_;
  /// 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_;

  /**
   * Default constructor for a function, which returns the list of all stories posted by the given chat; requires can_edit_stories 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 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chatBoostFeatures;

/**
 * Returns the list of features available for different chat boost levels; this is an offline request.
 *
 * 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:
  /// Pass true to get the list of features for channels; pass false to get the list of features for supergroups.
  bool is_channel_;

  /**
   * Default constructor for a function, which returns the list of features available for different chat boost levels; this is an offline request.
   *
   * Returns object_ptr<ChatBoostFeatures>.
   */
  getChatBoostFeatures();

  /**
   * Creates a function, which returns the list of features available for different chat boost levels; this is an offline request.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chatBoostLevelFeatures;

/**
 * Returns the list of features available on the specific chat boost level; this is an offline request.
 *
 * 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:
  /// Pass true to get the list of features for channels; pass false to get the list of features for supergroups.
  bool is_channel_;
  /// Chat boost level.
  int32 level_;

  /**
   * Default constructor for a function, which returns the list of features available on the specific chat boost level; this is an offline request.
   *
   * 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 request.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The link to boost a chat.
  string url_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Pass true to receive only boosts received from gift codes and giveaways created by the chat.
  bool only_gift_codes_;
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Search query by which to filter events.
  string query_;
  /// Identifier of an event from which to return results. Use 0 to get results from the latest events.
  int64 from_event_id_;
  /// The maximum number of events to return; up to 100.
  int32 limit_;
  /// The types of events to return; pass null to get chat events of all types.
  object_ptr<chatEventLogFilters> filters_;
  /// User identifiers by which to filter events. By default, events relating to all users will be returned.
  array<int53> user_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder identifier.
  int32 chat_folder_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new chat folder.
  object_ptr<chatFolder> folder_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder identifier.
  int32 chat_folder_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder.
  object_ptr<chatFolder> folder_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder identifier.
  int32 chat_folder_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder identifier.
  int32 chat_folder_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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 request 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  /// Specify 0 to get results from exactly the message from_message_id or a negative offset up to 99 to get additionally some newer messages.
  int32 offset_;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, 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_;
  /// Pass true to get only messages that are available without sending network requests.
  bool only_local_;

  /**
   * 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 request 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 request 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 offset up to 99 to get additionally 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, 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Invite link to get.
  string invite_link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Invite link for which to return chat members.
  string invite_link_;
  /// Pass true if the link is a subscription link and only members with expired subscription must be returned.
  bool only_with_expired_subscription_;
  /// A chat member from which to return next chat members; pass null to get results from the beginning.
  object_ptr<chatInviteLinkMember> offset_member_;
  /// The maximum number of chat members to return; up to 100.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// User identifier of a chat administrator. Must be an identifier of the current user for non-owner.
  int53 creator_user_id_;
  /// Pass true if revoked links needs to be returned instead of active or expired.
  bool is_revoked_;
  /// Creation date of an invite link starting after which to return invite links; use 0 to get results from the beginning.
  int32 offset_date_;
  /// Invite link starting after which to return invite links; use empty string to get results from the beginning.
  string offset_invite_link_;
  /// The maximum number of invite links to return; up to 100.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;
  /// A query to search for in the first names, last names and usernames of the users to return.
  string query_;
  /// A chat join request from which to return next requests; pass null to get results from the beginning.
  object_ptr<chatJoinRequest> offset_request_;
  /// The maximum number of requests to join the chat to return.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chatLists;

/**
 * Returns chat lists to which the chat can be added. This is an offline request.
 *
 * 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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * Default constructor for a function, which returns chat lists to which the chat can be added. This is an offline request.
   *
   * Returns object_ptr<ChatLists>.
   */
  getChatListsToAddChat();

  /**
   * Creates a function, which returns chat lists to which the chat can be added. This is an offline request.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Member identifier.
  object_ptr<MessageSender> member_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Point in time (Unix timestamp) relative to which to search for messages.
  int32 date_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat in which to return information about messages.
  int53 chat_id_;
  /// Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, and searchMessagesFilterUnreadReaction are unsupported in this function.
  object_ptr<SearchMessagesFilter> filter_;
  /// The message identifier from which to return information about messages; use 0 to get results from the last message.
  int53 from_message_id_;
  /// If not0, 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_;

  /**
   * 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] filter_ Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, and searchMessagesFilterUnreadReaction 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.
   * \param[in] saved_messages_topic_id_ If not0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages, or for chats other than Saved Messages.
   */
  getChatMessageCalendar(int53 chat_id_, object_ptr<SearchMessagesFilter> &&filter_, int53 from_message_id_, int53 saved_messages_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2119225929;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageCalendar>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class SearchMessagesFilter;

class count;

/**
 * Returns approximate number of messages of the specified type in the chat.
 *
 * 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:
  /// Identifier of the chat in which to count messages.
  int53 chat_id_;
  /// Filter for message content; searchMessagesFilterEmpty is unsupported in this function.
  object_ptr<SearchMessagesFilter> filter_;
  /// If not 0, only messages in the specified Saved Messages topic will be counted; pass 0 to count all messages, or for chats other than Saved Messages.
  int53 saved_messages_topic_id_;
  /// 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_;

  /**
   * Default constructor for a function, which returns approximate number of messages of the specified type in the chat.
   *
   * Returns object_ptr<Count>.
   */
  getChatMessageCount();

  /**
   * Creates a function, which returns approximate number of messages of the specified type in the chat.
   *
   * Returns object_ptr<Count>.
   *
   * \param[in] chat_id_ Identifier of the chat in which to count messages.
   * \param[in] filter_ Filter for message content; searchMessagesFilterEmpty is unsupported in this function.
   * \param[in] saved_messages_topic_id_ If not 0, only messages in the specified Saved Messages topic will be counted; pass 0 to count all messages, or for chats other than Saved Messages.
   * \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<SearchMessagesFilter> &&filter_, int53 saved_messages_topic_id_, bool return_local_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 955746569;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<count>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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. 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:
  /// Identifier of the chat in which to find message position.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterFailedToSend are unsupported in this function.
  object_ptr<SearchMessagesFilter> filter_;
  /// If not 0, only messages in the specified thread will be considered; supergroups only.
  int53 message_thread_id_;
  /// If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all relevant messages, or for chats other than Saved Messages.
  int53 saved_messages_topic_id_;

  /**
   * 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. 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. 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] message_id_ Message identifier.
   * \param[in] filter_ Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterFailedToSend are unsupported in this function.
   * \param[in] message_thread_id_ If not 0, only messages in the specified thread will be considered; supergroups only.
   * \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 relevant messages, or for chats other than Saved Messages.
   */
  getChatMessagePosition(int53 chat_id_, int53 message_id_, object_ptr<SearchMessagesFilter> &&filter_, int53 message_thread_id_, int53 saved_messages_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 136051911;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<count>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// If specified, only chats from the scope will be returned; pass null to return chats from all scopes.
  object_ptr<NotificationSettingsScope> scope_;
  /// Pass true to include in the response chats with only non-default sound.
  bool compare_sound_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat the message belongs to.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Number of transactions to skip.
  int32 offset_;
  /// The maximum number of transactions to be returned; up to 200.
  int32 limit_;

  /**
   * 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_ Number of transactions to skip.
   * \param[in] limit_ The maximum number of transactions to be returned; up to 200.
   */
  getChatRevenueTransactions(int53 chat_id_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1194264341;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatRevenueTransactions>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// The 2-step verification password of the current user.
  string password_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target chat; must be an identifier of a channel chat.
  int53 chat_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target chat; must be an identifier of a channel chat.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat in which to return information about message positions.
  int53 chat_id_;
  /// Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, and searchMessagesFilterUnreadReaction are unsupported in this function.
  object_ptr<SearchMessagesFilter> filter_;
  /// The message identifier from which to return information about message positions.
  int53 from_message_id_;
  /// 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_;
  /// 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_;

  /**
   * 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, and searchMessagesFilterUnreadReaction 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of the sender of the story.
  int53 story_sender_chat_id_;
  /// Story identifier.
  int32 story_id_;
  /// 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_;
  /// 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_;
  /// 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_;
  /// The maximum number of story interactions to return.
  int32 limit_;

  /**
   * 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_sender_chat_id_ The identifier of the sender 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_sender_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 = -974359690;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storyInteractions>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The chat list in which to return chats; pass null to get chats from the main chat list.
  object_ptr<ChatList> chat_list_;
  /// The maximum number of chats to be returned.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder identifier.
  int32 chat_folder_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chats;

/**
 * Returns supergroup and channel chats in which the current user has the right to post stories. The chats must be rechecked with canSendStory before actually trying to post a story there.
 *
 * Returns object_ptr<Chats>.
 */
class getChatsToSendStories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:

  /**
   * 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 canSendStory before actually trying to post a story there.
   *
   * Returns object_ptr<Chats>.
   */
  getChatsToSendStories();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 586802084;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The scope to which the commands are relevant; pass null to get commands in the default bot command scope.
  object_ptr<BotCommandScope> scope_;
  /// A two-letter ISO 639-1 language code or an empty string.
  string language_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// A two-letter ISO 3166-1 alpha-2 country code as received from getCountries.
  string country_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the public chats to return.
  object_ptr<PublicChatType> type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The location.
  object_ptr<location> location_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifiers of custom emoji stickers. At most 200 custom emoji stickers can be received simultaneously.
  array<int64> custom_emoji_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The link.
  string link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class emojiStatuses;

/**
 * Returns default emoji statuses for chats.
 *
 * Returns object_ptr<EmojiStatuses>.
 */
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:

  /**
   * Default constructor for a function, which returns default emoji statuses for chats.
   *
   * Returns object_ptr<EmojiStatuses>.
   */
  getDefaultChatEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1481996570;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatuses>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class emojiStatuses;

/**
 * Returns default emoji statuses for self status.
 *
 * Returns object_ptr<EmojiStatuses>.
 */
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:

  /**
   * Default constructor for a function, which returns default emoji statuses for self status.
   *
   * Returns object_ptr<EmojiStatuses>.
   */
  getDefaultEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 618946243;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatuses>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class emojiStatuses;

/**
 * Returns the list of emoji statuses, which can't be used as chat emoji status, even they are from a sticker set with is_allowed_as_chat_emoji_status == true.
 *
 * Returns object_ptr<EmojiStatuses>.
 */
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:

  /**
   * Default constructor for a function, which returns the list of emoji statuses, which can't be used as chat emoji status, even they are from a sticker set with is_allowed_as_chat_emoji_status == true.
   *
   * Returns object_ptr<EmojiStatuses>.
   */
  getDisallowedChatEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -770421344;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatuses>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of emoji categories to return; pass null to get default emoji categories.
  object_ptr<EmojiCategoryType> type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Text representation of the reaction.
  string emoji_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Language code for which the emoji replacements will be suggested.
  string language_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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.
 *
 * 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:
  /// The HTTP link.
  string link_;
  /// Pass true if the current user allowed the bot, returned in getExternalLinkInfo, to send them messages.
  bool allow_write_access_;

  /**
   * 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.
   *
   * 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.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] link_ The HTTP link.
   * \param[in] allow_write_access_ Pass true if the current user allowed the bot, 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The link.
  string link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class file;

/**
 * Returns information about a file; this is an offline request.
 *
 * 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:
  /// Identifier of the file to get.
  int32 file_id_;

  /**
   * Default constructor for a function, which returns information about a file; this is an offline request.
   *
   * Returns object_ptr<File>.
   */
  getFile();

  /**
   * Creates a function, which returns information about a file; this is an offline request.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the file.
  int32 file_id_;
  /// Offset from which downloaded prefix size needs to be calculated.
  int53 offset_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The MIME type of the file.
  string mime_type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The name of the file or path to the file.
  string file_name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class forumTopic;

/**
 * Returns information about a forum topic.
 *
 * 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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Message thread identifier of the forum topic.
  int53 message_thread_id_;

  /**
   * Default constructor for a function, which returns information about a forum topic.
   *
   * Returns object_ptr<ForumTopic>.
   */
  getForumTopic();

  /**
   * Creates a function, which returns information about a forum topic.
   *
   * Returns object_ptr<ForumTopic>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] message_thread_id_ Message thread identifier of the forum topic.
   */
  getForumTopic(int53 chat_id_, int53 message_thread_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -442761663;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<forumTopic>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class messageLink;

/**
 * Returns an HTTPS link to a topic in a forum chat. This is an offline request.
 *
 * 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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Message thread identifier of the forum topic.
  int53 message_thread_id_;

  /**
   * Default constructor for a function, which returns an HTTPS link to a topic in a forum chat. This is an offline request.
   *
   * Returns object_ptr<MessageLink>.
   */
  getForumTopicLink();

  /**
   * Creates a function, which returns an HTTPS link to a topic in a forum chat. This is an offline request.
   *
   * Returns object_ptr<MessageLink>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] message_thread_id_ Message thread identifier of the forum topic.
   */
  getForumTopicLink(int53 chat_id_, int53 message_thread_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -914650933;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageLink>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class forumTopics;

/**
 * Returns found forum topics in a forum chat. 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:
  /// Identifier of the forum chat.
  int53 chat_id_;
  /// Query to search for in the forum topic's name.
  string query_;
  /// 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_;
  /// The message identifier of the last message in the last found topic, or 0 for the first request.
  int53 offset_message_id_;
  /// The message thread identifier of the last found topic, or 0 for the first request.
  int53 offset_message_thread_id_;
  /// 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_;

  /**
   * Default constructor for a function, which returns found forum topics in a forum chat. 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 chat. 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 forum 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_message_thread_id_ The message thread 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_, int53 offset_message_thread_id_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -72647334;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<forumTopics>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The chat that contains the message with the game.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// User identifier.
  int53 user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the channel chat which started the giveaway.
  int53 chat_id_;
  /// Identifier of the giveaway or a giveaway winners message in the chat.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;
  /// The maximum number of bots to be returned; up to 100.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Group call identifier.
  int32 group_call_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class httpUrl;

/**
 * Returns invite link to a video chat in a public chat.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getGroupCallInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Group call identifier.
  int32 group_call_id_;
  /// Pass true if the invite link needs to contain an invite hash, passing which to joinGroupCall would allow the invited user to unmute themselves. Requires groupCall.can_be_managed group call flag.
  bool can_self_unmute_;

  /**
   * Default constructor for a function, which returns invite link to a video chat in a public chat.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getGroupCallInviteLink();

  /**
   * 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 joinGroupCall would allow the invited user to unmute themselves. Requires groupCall.can_be_managed group call flag.
   */
  getGroupCallInviteLink(int32 group_call_id_, bool can_self_unmute_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 719407396;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class GroupCallVideoQuality;

class filePart;

/**
 * Returns a file with a segment of a group call stream in a modified OGG format for audio or MPEG-4 format for video.
 *
 * Returns object_ptr<FilePart>.
 */
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:
  /// Group call identifier.
  int32 group_call_id_;
  /// Point in time when the stream segment begins; Unix timestamp in milliseconds.
  int53 time_offset_;
  /// Segment duration scale; 0-1. Segment's duration is 1000/(2**scale) milliseconds.
  int32 scale_;
  /// Identifier of an audio/video channel to get as received from tgcalls.
  int32 channel_id_;
  /// Video quality as received from tgcalls; pass null to get the worst available quality.
  object_ptr<GroupCallVideoQuality> video_quality_;

  /**
   * Default constructor for a function, which returns a file with a segment of a group call stream in a modified OGG format for audio or MPEG-4 format for video.
   *
   * Returns object_ptr<FilePart>.
   */
  getGroupCallStreamSegment();

  /**
   * Creates a function, which returns a file with a segment of a group call stream in a modified OGG format for audio or MPEG-4 format for video.
   *
   * Returns object_ptr<FilePart>.
   *
   * \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 = -2077959515;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<filePart>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class groupCallStreams;

/**
 * Returns information about available group call streams.
 *
 * 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:
  /// Group call identifier.
  int32 group_call_id_;

  /**
   * Default constructor for a function, which returns information about available group call streams.
   *
   * Returns object_ptr<GroupCallStreams>.
   */
  getGroupCallStreams();

  /**
   * Creates a function, which returns information about available group call streams.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifier.
  int53 user_id_;
  /// Chat identifier starting from which to return chats; use 0 for the first request.
  int53 offset_chat_id_;
  /// The maximum number of chats to be returned; up to 100.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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 CHANNELS_TOO_MUCH error. 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:

  /**
   * 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 CHANNELS_TOO_MUCH error. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Inline message identifier.
  string inline_message_id_;
  /// User identifier.
  int53 user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// Identifier of the chat where the query was sent.
  int53 chat_id_;
  /// Location of the user; pass null if unknown or the bot doesn't need user's location.
  object_ptr<location> user_location_;
  /// Text of the query.
  string query_;
  /// Offset of the first entry to return; use empty string to get the first chunk of results.
  string offset_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true to order returned backgrounds for a dark theme.
  bool for_dark_theme_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the sticker sets to return.
  object_ptr<StickerType> sticker_type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Expected type of the link.
  object_ptr<InternalLinkType> type_;
  /// Pass true to create an HTTPS link (only available for some link types); pass false to create a tg: link.
  bool is_http_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The link.
  string link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The JsonValue object.
  object_ptr<JsonValue> json_value_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The JSON-serialized string.
  string json_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class emojis;

/**
 * Return 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:
  /// Text to search for.
  string text_;
  /// List of possible IETF language tags of the user's input language; may be empty if unknown.
  array<string> input_language_codes_;

  /**
   * Default constructor for a function, which return 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 return 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Language pack identifier.
  string language_pack_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Path to the language pack database in which strings are stored.
  string language_pack_database_path_;
  /// Localization target to which the language pack belongs.
  string localization_target_;
  /// Language pack identifier.
  string language_pack_id_;
  /// Language pack key of the string to be returned.
  string key_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Language pack identifier of the strings to be returned.
  string language_pack_id_;
  /// Language pack keys of the strings to be returned; leave empty to request all available strings.
  array<string> keys_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Message text with formatting.
  object_ptr<formattedText> text_;
  /// Options to be used for generation of the link preview; pass null to use default link preview options.
  object_ptr<linkPreviewOptions> link_preview_options_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class localizationTargetInfo;

/**
 * Returns information about the current localization target. This is an offline request 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:
  /// Pass true to get only locally available information without sending network requests.
  bool only_local_;

  /**
   * Default constructor for a function, which returns information about the current localization target. This is an offline request 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 request 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Logging tag to change verbosity level.
  string tag_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier of the message with the button.
  int53 chat_id_;
  /// Message identifier of the message with the button.
  int53 message_id_;
  /// Button identifier.
  int53 button_id_;
  /// Pass true to allow the bot to send messages to the current user.
  bool allow_write_access_;

  /**
   * 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.
   */
  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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier of the message with the button.
  int53 chat_id_;
  /// Message identifier of the message with the button. The message must not be scheduled.
  int53 message_id_;
  /// Button identifier.
  int53 button_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat in which the Web App is opened; pass 0 if none.
  int53 chat_id_;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// Start parameter from internalLinkTypeMainWebApp.
  string start_parameter_;
  /// Parameters to use to open the Web App.
  object_ptr<webAppOpenParameters> parameters_;

  /**
   * 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.
   * \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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Location of the map center.
  object_ptr<location> location_;
  /// Map zoom level; 13-20.
  int32 zoom_;
  /// Map width in pixels before applying scale; 16-1024.
  int32 width_;
  /// Map height in pixels before applying scale; 16-1024.
  int32 height_;
  /// Map scale; 1-3.
  int32 scale_;
  /// Identifier of a chat in which the thumbnail will be shown. Use 0 if unknown.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The text.
  object_ptr<formattedText> text_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the user or 0 to get the default menu button.
  int53 user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message to get.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_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.
  int53 message_id_;
  /// Type of the reactions to return; pass null to return all added reactions; reactionTypePaid isn't supported.
  object_ptr<ReactionType> reaction_type_;
  /// 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_;
  /// The maximum number of reactions to be returned; must be positive and can't be greater than 100.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// Number of reaction per row, 5-25.
  int32 row_size_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the effect.
  int64 effect_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// Pass true to return an HTML code for embedding of the whole media album.
  bool for_album_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Beginning of the message file; up to 100 first lines.
  string message_file_head_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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 request.
 *
 * 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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// 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_;
  /// Pass true to create a link for the whole media album.
  bool for_album_;
  /// 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_;

  /**
   * 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 request.
   *
   * 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 request.
   *
   * 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] 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_, bool for_album_, bool in_message_thread_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -984158342;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageLink>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The message link.
  string url_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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 request.
 *
 * 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:
  /// Identifier of the chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message to get.
  int53 message_id_;

  /**
   * 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 request.
   *
   * 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 request.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class messageProperties;

/**
 * Returns properties of a message; this is an offline request.
 *
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;

  /**
   * Default constructor for a function, which returns properties of a message; this is an offline request.
   *
   * Returns object_ptr<MessageProperties>.
   */
  getMessageProperties();

  /**
   * Creates a function, which returns properties of a message; this is an offline request.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier of the message.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier, which thread history needs to be returned.
  int53 message_id_;
  /// Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  /// Specify 0 to get results from exactly the message from_message_id or a negative offset up to 99 to get additionally some newer messages.
  int32 offset_;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, 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_;

  /**
   * 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 offset up to 99 to get additionally 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, 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat the messages belong to.
  int53 chat_id_;
  /// Identifiers of the messages to get.
  array<int53> message_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true to get statistics only for the current library launch.
  bool only_current_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The name of the option.
  string name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class users;

/**
 * Returns the list of owned by the current user bots.
 *
 * 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:

  /**
   * Default constructor for a function, which returns the list of owned by the current user bots.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifier of the service's bot.
  int53 bot_user_id_;
  /// Telegram Passport element types requested by the service.
  string scope_;
  /// Service's public key.
  string public_key_;
  /// Unique request identifier provided by the service.
  string nonce_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Authorization form identifier.
  int32 authorization_form_id_;
  /// The 2-step verification password of the current user.
  string password_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Telegram Passport element type.
  object_ptr<PassportElementType> type_;
  /// The 2-step verification password of the current user.
  string password_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The invoice.
  object_ptr<InputInvoice> input_invoice_;
  /// Preferred payment form theme; pass null to use the default theme.
  object_ptr<themeParameters> theme_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier of the messagePaymentSuccessful message.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The phone number prefix.
  string phone_number_prefix_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// A two-letter ISO 639-1 language code for country information localization.
  string language_code_;
  /// The phone number prefix.
  string phone_number_prefix_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class messageSenders;

/**
 * Returns message senders voted for the specified option in a non-anonymous polls. For optimal performance, the number of returned users is chosen by TDLib.
 *
 * Returns object_ptr<MessageSenders>.
 */
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:
  /// Identifier of the chat to which the poll belongs.
  int53 chat_id_;
  /// Identifier of the message containing the poll.
  int53 message_id_;
  /// 0-based identifier of the answer option.
  int32 option_id_;
  /// Number of voters to skip in the result; must be non-negative.
  int32 offset_;
  /// 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_;

  /**
   * Default constructor for a function, which returns message senders voted for the specified option in a non-anonymous polls. For optimal performance, the number of returned users is chosen by TDLib.
   *
   * Returns object_ptr<MessageSenders>.
   */
  getPollVoters();

  /**
   * Creates a function, which returns message senders voted for the specified option in a non-anonymous polls. For optimal performance, the number of returned users is chosen by TDLib.
   *
   * Returns object_ptr<MessageSenders>.
   *
   * \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 = -1000625748;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageSenders>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// A two-letter ISO 3166-1 alpha-2 country code.
  string country_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Source of the request; pass null if the method is called from some non-standard source.
  object_ptr<PremiumSource> source_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class premiumGiftCodePaymentOptions;

/**
 * Returns available options for Telegram Premium gift code or Telegram Premium giveaway creation.
 *
 * Returns object_ptr<PremiumGiftCodePaymentOptions>.
 */
class getPremiumGiftCodePaymentOptions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// 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; 0 if none.
  int53 boosted_chat_id_;

  /**
   * Default constructor for a function, which returns available options for Telegram Premium gift code or Telegram Premium giveaway creation.
   *
   * Returns object_ptr<PremiumGiftCodePaymentOptions>.
   */
  getPremiumGiftCodePaymentOptions();

  /**
   * Creates a function, which returns available options for Telegram Premium gift code or Telegram Premium giveaway creation.
   *
   * Returns object_ptr<PremiumGiftCodePaymentOptions>.
   *
   * \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; 0 if none.
   */
  explicit getPremiumGiftCodePaymentOptions(int53 boosted_chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1991099860;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<premiumGiftCodePaymentOptions>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Number of months the Telegram Premium subscription will be active.
  int32 month_count_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the limit.
  object_ptr<PremiumLimitType> limit_type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The maximum number of stickers to be returned; 0-100.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the bot that created the message.
  int53 bot_user_id_;
  /// Identifier of the prepared message.
  string prepared_message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class proxies;

/**
 * Returns the list of proxies that are currently set up. Can be called before authorization.
 *
 * Returns object_ptr<Proxies>.
 */
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:

  /**
   * Default constructor for a function, which returns the list of proxies that are currently set up. Can be called before authorization.
   *
   * Returns object_ptr<Proxies>.
   */
  getProxies();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -95026381;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<proxies>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class httpUrl;

/**
 * Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getProxyLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Proxy identifier.
  int32 proxy_id_;

  /**
   * Default constructor for a function, which returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getProxyLink();

  /**
   * Creates a function, which returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] proxy_id_ Proxy identifier.
   */
  explicit getProxyLink(int32 proxy_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1054495112;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// JSON-encoded push notification payload.
  string payload_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chats;

/**
 * Returns recently opened chats; this is an offline request. 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:
  /// The maximum number of chats to be returned.
  int32 limit_;

  /**
   * Default constructor for a function, which returns recently opened chats; this is an offline request. 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 request. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Google Play referrer to identify the user.
  string referrer_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The 2-step verification password for the current user.
  string password_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class FileType;

class file;

/**
 * Returns information about a file by its remote identifier; this is an offline request. 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:
  /// Remote identifier of the file to get.
  string remote_file_id_;
  /// File type; pass null if unknown.
  object_ptr<FileType> file_type_;

  /**
   * Default constructor for a function, which returns information about a file by its remote identifier; this is an offline request. 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 request. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class message;

/**
 * Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, the message with a previously set same background, the giveaway message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messageGiveawayCompleted and topic messages without non-bundled replied message respectively. 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:
  /// Identifier of the chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the reply message.
  int53 message_id_;

  /**
   * 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, the game message, the invoice message, the message with a previously set same background, the giveaway message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messageGiveawayCompleted and topic messages without non-bundled replied message respectively. 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, the game message, the invoice message, the message with a previously set same background, the giveaway message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messageGiveawayCompleted and topic messages without non-bundled replied message respectively. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of Saved Messages topic which tags will be returned; pass 0 to get all Saved Messages tags.
  int53 saved_messages_topic_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of Saved Messages topic which messages will be fetched.
  int53 saved_messages_topic_id_;
  /// Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  /// Specify 0 to get results from exactly the message from_message_id or a negative offset up to 99 to get additionally some newer messages.
  int32 offset_;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, 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_;

  /**
   * 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 offset up to 99 to get additionally 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, 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of Saved Messages topic which message will be returned.
  int53 saved_messages_topic_id_;
  /// Point in time (Unix timestamp) relative to which to search for messages.
  int32 date_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class notificationSounds;

/**
 * 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<NotificationSounds>.
 */
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:
  /// Identifier of the notification sound.
  int64 notification_sound_id_;

  /**
   * 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<NotificationSounds>.
   */
  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<NotificationSounds>.
   *
   * \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 = 459569431;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<notificationSounds>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Types of chats for which to return the notification settings information.
  object_ptr<NotificationSettingsScope> scope_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Prefix of hashtags or cashtags to return.
  string tag_prefix_;
  /// The maximum number of items to be returned.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class secretChat;

/**
 * Returns information about a secret chat by its identifier. This is an offline request.
 *
 * 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:
  /// Secret chat identifier.
  int32 secret_chat_id_;

  /**
   * Default constructor for a function, which returns information about a secret chat by its identifier. This is an offline request.
   *
   * Returns object_ptr<SecretChat>.
   */
  getSecretChat();

  /**
   * Creates a function, which returns information about a secret chat by its identifier. This is an offline request.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the user that will receive Telegram Stars; pass 0 to get options for an unspecified user.
  int53 user_id_;

  /**
   * 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 that 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the owner of the Telegram Stars; can be identifier of an owned bot, or identifier of a channel chat with supergroupFullInfo.can_get_star_revenue_statistics == true.
  object_ptr<MessageSender> owner_id_;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;

  /**
   * 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 an owned bot, or identifier of 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true to receive only expiring subscriptions for which there are no enough Telegram Stars to extend.
  bool only_expiring_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageSender;

class StarTransactionDirection;

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:
  /// 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 channel chat with supergroupFullInfo.can_get_star_revenue_statistics == true.
  object_ptr<MessageSender> owner_id_;
  /// If non-empty, only transactions related to the Star Subscription will be returned.
  string subscription_id_;
  /// Direction of the transactions to receive; pass null to get all transactions.
  object_ptr<StarTransactionDirection> direction_;
  /// 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_;
  /// The maximum number of transactions to return.
  int32 limit_;

  /**
   * 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 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<StarTransactionDirection> &&direction_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -258541327;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<starTransactions>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;
  /// The number of Telegram Stars to withdraw. Must be at least getOption(&quot;star_withdrawal_count_min&quot;).
  int53 star_count_;
  /// The 2-step verification password of the current user.
  string password_;

  /**
   * 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 an owned bot, or identifier of an owned channel chat.
   * \param[in] star_count_ The number of Telegram Stars to withdraw. Must be at least getOption(&quot;star_withdrawal_count_min&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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// The token for graph loading.
  string token_;
  /// X-value for zoomed in graph or 0 otherwise.
  int53 x_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker file identifier.
  object_ptr<InputFile> sticker_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class outline;

/**
 * Returns outline of a sticker; this is an offline request. 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:
  /// File identifier of the sticker.
  int32 sticker_file_id_;
  /// Pass true to get the outline scaled for animated emoji.
  bool for_animated_emoji_;
  /// Pass true to get the outline scaled for clicked animated emoji message.
  bool for_clicked_animated_emoji_message_;

  /**
   * Default constructor for a function, which returns outline of a sticker; this is an offline request. 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 request. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the sticker set.
  int64 set_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the sticker set.
  int64 set_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the stickers to return.
  object_ptr<StickerType> sticker_type_;
  /// Search query; a space-separated list of emojis or a keyword prefix. If empty, returns all known installed stickers.
  string query_;
  /// The maximum number of stickers to be returned.
  int32 limit_;
  /// Chat identifier for which to return stickers. Available custom emoji stickers may be different for different chats.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat that posted the story.
  int53 story_sender_chat_id_;
  /// Story identifier.
  int32 story_id_;
  /// Pass true to get only locally available information without sending network requests.
  bool only_local_;

  /**
   * 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_sender_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_sender_chat_id_, int32 story_id_, bool only_local_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1903893624;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<story>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Number of reaction per row, 5-25.
  int32 row_size_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Story identifier.
  int32 story_id_;
  /// Query to search for in names, usernames and titles; may be empty to get all relevant interactions.
  string query_;
  /// Pass true to get only interactions by contacts; pass false to get all relevant interactions.
  bool only_contacts_;
  /// 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_;
  /// 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_;
  /// 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_;
  /// The maximum number of story interactions to return.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of the sender of the story.
  int53 story_sender_chat_id_;
  /// The identifier of the story.
  int32 story_id_;
  /// 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_;
  /// 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_;

  /**
   * 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_sender_chat_id_ The identifier of the sender 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_sender_chat_id_, int32 story_id_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1761074363;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<publicForwards>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Story identifier.
  int32 story_id_;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the file.
  int32 file_id_;
  /// Directory in which the file is expected to be saved.
  string directory_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker set title; 1-64 characters.
  string title_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class supergroup;

/**
 * Returns information about a supergroup or a channel by its identifier. This is an offline request 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:
  /// Supergroup or channel identifier.
  int53 supergroup_id_;

  /**
   * Default constructor for a function, which returns information about a supergroup or a channel by its identifier. This is an offline request 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 request 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Supergroup or channel identifier.
  int53 supergroup_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  /// The type of users to return; pass null to use supergroupMembersFilterRecent.
  object_ptr<SupergroupMembersFilter> filter_;
  /// Number of users to skip.
  int32 offset_;
  /// The maximum number of users to be returned; up to 200.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class user;

/**
 * Returns a user that 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:

  /**
   * Default constructor for a function, which returns a user that 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The text in which to look for entities.
  string text_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Theme parameters to convert to JSON.
  object_ptr<themeParameters> theme_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class emojiStatuses;

/**
 * Returns up to 8 emoji statuses, which must be shown in the emoji status list for chats.
 *
 * Returns object_ptr<EmojiStatuses>.
 */
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:

  /**
   * 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<EmojiStatuses>.
   */
  getThemedChatEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -76325707;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatuses>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class emojiStatuses;

/**
 * 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<EmojiStatuses>.
 */
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:

  /**
   * 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<EmojiStatuses>.
   */
  getThemedEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1791346882;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatuses>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Category of chats to be returned.
  object_ptr<TopChatCategory> category_;
  /// The maximum number of chats to be returned; up to 30.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the sticker sets to return.
  object_ptr<StickerType> sticker_type_;
  /// The offset from which to return the sticker sets; must be non-negative.
  int32 offset_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class user;

/**
 * Returns information about a user by their identifier. This is an offline request 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:
  /// User identifier.
  int53 user_id_;

  /**
   * Default constructor for a function, which returns information about a user by their identifier. This is an offline request 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 request 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Identifier of the user.
  int53 user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifier.
  int53 user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class userGifts;

/**
 * Returns gifts saved to profile by the given user.
 *
 * Returns object_ptr<UserGifts>.
 */
class getUserGifts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Identifier of the user.
  int53 user_id_;
  /// 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_;
  /// 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_;

  /**
   * Default constructor for a function, which returns gifts saved to profile by the given user.
   *
   * Returns object_ptr<UserGifts>.
   */
  getUserGifts();

  /**
   * Creates a function, which returns gifts saved to profile by the given user.
   *
   * Returns object_ptr<UserGifts>.
   *
   * \param[in] user_id_ Identifier of the user.
   * \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.
   */
  getUserGifts(int53 user_id_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1211253636;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<userGifts>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The privacy setting.
  object_ptr<UserPrivacySetting> setting_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifier.
  int53 user_id_;
  /// The number of photos to skip; must be non-negative.
  int32 offset_;
  /// The maximum number of photos to be returned; up to 100.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifier.
  int53 user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class rtmpUrl;

/**
 * Returns RTMP URL for streaming to the 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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * Default constructor for a function, which returns RTMP URL for streaming to the chat; requires can_manage_video_chats administrator right.
   *
   * Returns object_ptr<RtmpUrl>.
   */
  getVideoChatRtmpUrl();

  /**
   * Creates a function, which returns RTMP URL for streaming to the 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat in which the link was clicked; pass 0 if none.
  int53 chat_id_;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// Short name of the Web App.
  string web_app_short_name_;
  /// Start parameter from internalLinkTypeWebApp.
  string start_parameter_;
  /// Pass true if the current user allowed the bot to send them messages.
  bool allow_write_access_;
  /// Parameters to use to open the Web App.
  object_ptr<webAppOpenParameters> parameters_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class outline;

/**
 * Returns a default placeholder for Web Apps of a bot; this is an offline request. 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:
  /// Identifier of the target bot.
  int53 bot_user_id_;

  /**
   * Default constructor for a function, which returns a default placeholder for Web Apps of a bot; this is an offline request. 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 request. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// The URL from a keyboardButtonTypeWebApp button, inlineQueryResultsButtonTypeWebApp button, or an empty string when the bot is opened from the side menu.
  string url_;
  /// Parameters to use to open the Web App.
  object_ptr<webAppOpenParameters> parameters_;

  /**
   * 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.
   * \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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class webPageInstantView;

/**
 * Returns an instant view version of a web page if available. 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:
  /// The web page URL.
  string url_;
  /// Pass true to get full instant view for the web page.
  bool force_full_;

  /**
   * Default constructor for a function, which returns an instant view version of a web page if available. 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. 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] force_full_ Pass true to get full instant view for the web page.
   */
  getWebPageInstantView(string const &url_, bool force_full_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1962649975;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<webPageInstantView>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Suggested action to hide.
  object_ptr<SuggestedAction> action_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class contact;

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:
  /// The list of contacts to import or edit; contacts' vCard are ignored and are not imported.
  array<object_ptr<contact>> contacts_;

  /**
   * 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; contacts' vCard are ignored and are not imported.
   */
  explicit importContacts(array<object_ptr<contact>> &&contacts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -215132767;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<importedContacts>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class InputFile;

class ok;

/**
 * Imports messages exported from another app.
 *
 * 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:
  /// 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_;
  /// File with messages to import. Only inputFileLocal and inputFileGenerated are supported. The file must not be previously uploaded.
  object_ptr<InputFile> message_file_;
  /// 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_;

  /**
   * Default constructor for a function, which imports messages exported from another app.
   *
   * Returns object_ptr<Ok>.
   */
  importMessages();

  /**
   * Creates a function, which imports messages exported from another app.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Invites users to an active group call. Sends a service message of type messageInviteVideoChatParticipants for video chats.
 *
 * Returns object_ptr<Ok>.
 */
class inviteGroupCallParticipants final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Group call identifier.
  int32 group_call_id_;
  /// User identifiers. At most 10 users can be invited simultaneously.
  array<int53> user_ids_;

  /**
   * Default constructor for a function, which invites users to an active group call. Sends a service message of type messageInviteVideoChatParticipants for video chats.
   *
   * Returns object_ptr<Ok>.
   */
  inviteGroupCallParticipants();

  /**
   * Creates a function, which invites users to an active group call. Sends a service message of type messageInviteVideoChatParticipants for video chats.
   *
   * 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.
   */
  inviteGroupCallParticipants(int32 group_call_id_, array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1867097679;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Invite link to use.
  string invite_link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageSender;

class text;

/**
 * Joins an active group call. Returns join response payload for tgcalls.
 *
 * Returns object_ptr<Text>.
 */
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:
  /// Group call identifier.
  int32 group_call_id_;
  /// Identifier of a group call participant, which will be used to join the call; pass null to join as self; video chats only.
  object_ptr<MessageSender> participant_id_;
  /// Caller audio channel synchronization source identifier; received from tgcalls.
  int32 audio_source_id_;
  /// Group call join payload; received from tgcalls.
  string payload_;
  /// Pass true to join the call with muted microphone.
  bool is_muted_;
  /// Pass true if the user's video is enabled.
  bool is_my_video_enabled_;
  /// If non-empty, invite hash to be used to join the group call without being muted by administrators.
  string invite_hash_;

  /**
   * Default constructor for a function, which joins an active group call. Returns join response payload for tgcalls.
   *
   * Returns object_ptr<Text>.
   */
  joinGroupCall();

  /**
   * Creates a function, which joins an active group call. 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; video chats only.
   * \param[in] audio_source_id_ Caller 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.
   * \param[in] invite_hash_ If non-empty, invite hash to be used to join the group call without being muted by administrators.
   */
  joinGroupCall(int32 group_call_id_, object_ptr<MessageSender> &&participant_id_, int32 audio_source_id_, string const &payload_, bool is_muted_, bool is_my_video_enabled_, string const &invite_hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1043773467;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the prepaid giveaway.
  int64 giveaway_id_;
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  /// The number of users to receive giveaway prize.
  int32 winner_count_;
  /// The number of Telegram Stars to be distributed through the giveaway; pass 0 for Telegram Premium giveaways.
  int53 star_count_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Group call identifier.
  int32 group_call_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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_sender_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:
  /// The story list in which to load active stories.
  object_ptr<StoryList> story_list_;

  /**
   * 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_sender_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_sender_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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The chat list in which to load chats; pass null to load chats from the main chat list.
  object_ptr<ChatList> chat_list_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Loads more participants of a group call. 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:
  /// Group call identifier. The group call must be previously received through getGroupCall and must be joined or being joined.
  int32 group_call_id_;
  /// The maximum number of participants to load; up to 100.
  int32 limit_;

  /**
   * Default constructor for a function, which loads more participants of a group call. 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. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the quick reply shortcut.
  int32 shortcut_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the original chat, which similar chats were requested.
  int53 chat_id_;
  /// Identifier of the opened chat.
  int53 opened_chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier of the message.
  int53 chat_id_;
  /// Identifier of the message with the opened content.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of the sender of the opened story.
  int53 story_sender_chat_id_;
  /// The identifier of the story.
  int32 story_id_;

  /**
   * 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_sender_chat_id_ The identifier of the sender of the opened story.
   * \param[in] story_id_ The identifier of the story.
   */
  openStory(int53 story_sender_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -824542083;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class InputMessageReplyTo;

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:
  /// Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats.
  int53 chat_id_;
  /// Identifier of the bot, providing the Web App.
  int53 bot_user_id_;
  /// The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise.
  string url_;
  /// If not 0, the message thread identifier in which the message will be sent.
  int53 message_thread_id_;
  /// 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_;
  /// Parameters to use to open the Web App.
  object_ptr<webAppOpenParameters> parameters_;

  /**
   * 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.
   * \param[in] url_ The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise.
   * \param[in] message_thread_id_ If not 0, the message thread identifier in which the message will be sent.
   * \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_, int53 message_thread_id_, object_ptr<InputMessageReplyTo> &&reply_to_, object_ptr<webAppOpenParameters> &&parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 662795170;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<webAppInfo>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit.
  int53 size_;
  /// 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_;
  /// Limit on the total number of files after deletion. Pass -1 to use the default limit.
  int32 count_;
  /// 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_;
  /// 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_;
  /// 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_;
  /// 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_;
  /// 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_;
  /// Same as in getStorageStatistics. Affects only returned statistics.
  int32 chat_limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class TextParseMode;

class formattedText;

/**
 * Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl and MentionName 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:
  /// The text to parse.
  string text_;
  /// Text parse mode.
  object_ptr<TextParseMode> parse_mode_;

  /**
   * Default constructor for a function, which parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl and MentionName 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 and MentionName 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Identifier of the new pinned message.
  int53 message_id_;
  /// Pass true to disable notification about the pinned message. Notifications are always disabled in channels and private chats.
  bool disable_notification_;
  /// Pass true to pin the message only for self; private chats only.
  bool only_for_self_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Proxy identifier. Use 0 to ping a Telegram server without a proxy.
  int32 proxy_id_;

  /**
   * 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_id_ Proxy identifier. Use 0 to ping a Telegram server without a proxy.
   */
  explicit pingProxy(int32 proxy_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -979681103;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<seconds>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class FileType;

class InputFile;

class file;

/**
 * Preliminary 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:
  /// File to upload.
  object_ptr<InputFile> file_;
  /// File type; pass null if unknown.
  object_ptr<FileType> file_type_;
  /// 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_;

  /**
   * Default constructor for a function, which preliminary 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 preliminary 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat folder identifier.
  int32 chat_folder_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the user that sent the request.
  int53 user_id_;
  /// Pass true to approve the request; pass false to decline it.
  bool approve_;

  /**
   * 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 that 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;
  /// Pass true to approve all requests; pass false to decline them.
  bool approve_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// Pass true if the speech recognition is good.
  bool is_good_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Marks all reactions in a chat or a forum topic 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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * Default constructor for a function, which marks all reactions in a chat or a forum topic as read.
   *
   * Returns object_ptr<Ok>.
   */
  readAllChatReactions();

  /**
   * Creates a function, which marks all reactions in a chat or a forum topic 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Marks all mentions in a forum topic as read.
 *
 * Returns object_ptr<Ok>.
 */
class readAllMessageThreadMentions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Chat identifier.
  int53 chat_id_;
  /// Message thread identifier in which mentions are marked as read.
  int53 message_thread_id_;

  /**
   * Default constructor for a function, which marks all mentions in a forum topic as read.
   *
   * Returns object_ptr<Ok>.
   */
  readAllMessageThreadMentions();

  /**
   * Creates a function, which marks all mentions in a forum topic as read.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_thread_id_ Message thread identifier in which mentions are marked as read.
   */
  readAllMessageThreadMentions(int53 chat_id_, int53 message_thread_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1323136341;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Marks all reactions in a forum topic as read.
 *
 * Returns object_ptr<Ok>.
 */
class readAllMessageThreadReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Chat identifier.
  int53 chat_id_;
  /// Message thread identifier in which reactions are marked as read.
  int53 message_thread_id_;

  /**
   * Default constructor for a function, which marks all reactions in a forum topic as read.
   *
   * Returns object_ptr<Ok>.
   */
  readAllMessageThreadReactions();

  /**
   * Creates a function, which marks all reactions in a forum topic as read.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_thread_id_ Message thread identifier in which reactions are marked as read.
   */
  readAllMessageThreadReactions(int53 chat_id_, int53 message_thread_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -792975554;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ChatList;

class ok;

/**
 * Traverse 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:
  /// Chat list in which to mark all chats as read.
  object_ptr<ChatList> chat_list_;

  /**
   * Default constructor for a function, which traverse all chats in a chat list and marks all messages in the chats as read.
   *
   * Returns object_ptr<Ok>.
   */
  readChatList();

  /**
   * Creates a function, which traverse 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class filePart;

/**
 * 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<FilePart>.
 */
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:
  /// Identifier of the file. The file must be located in the TDLib file cache.
  int32 file_id_;
  /// The offset from which to read the file.
  int53 offset_;
  /// 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_;

  /**
   * 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<FilePart>.
   */
  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<FilePart>.
   *
   * \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 = 906798861;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<filePart>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Name of the target shortcut.
  string shortcut_name_;
  /// Identifiers of the quick reply messages to readd. Message identifiers must be in a strictly increasing order.
  array<int53> message_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message. Use messageProperties.can_recognize_speech to check whether the message is suitable.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Recovery code to check.
  string recovery_code_;
  /// New 2-step verification password of the user; may be empty to remove the password.
  string new_password_;
  /// New password hint; may be empty.
  string new_hint_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Recovery code to check.
  string recovery_code_;
  /// New 2-step verification password of the user; may be empty to remove the password.
  string new_password_;
  /// New password hint; may be empty.
  string new_hint_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the user that did the payment.
  int53 user_id_;
  /// Telegram payment identifier.
  string telegram_payment_charge_id_;

  /**
   * 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 that 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Device token.
  object_ptr<DeviceToken> device_token_;
  /// List of user identifiers of other users currently using the application.
  array<int53> other_user_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The first name of the user; 1-64 characters.
  string first_name_;
  /// The last name of the user; 0-64 characters.
  string last_name_;
  /// Pass true to disable notification about the current user joining Telegram for other users that added them to contact list.
  bool disable_notification_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true to remove only active downloads, including paused.
  bool only_active_;
  /// Pass true to remove only completed downloads.
  bool only_completed_;
  /// Pass true to delete the file from the TDLib file cache.
  bool delete_from_cache_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifiers of users to be deleted.
  array<int53> user_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker file to delete from the list.
  object_ptr<InputFile> sticker_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the downloaded file.
  int32 file_id_;
  /// Pass true to delete the file from the TDLib file cache.
  bool delete_from_cache_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The background identifier.
  int64 background_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// Type of the reaction to remove. The paid reaction can't be removed.
  object_ptr<ReactionType> reaction_type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of notification group to which the notification belongs.
  int32 notification_group_id_;
  /// Identifier of removed notification.
  int32 notification_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Notification group identifier.
  int32 notification_group_id_;
  /// The maximum identifier of removed notifications.
  int32 max_notification_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Proxy identifier.
  int32 proxy_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Hashtag to delete.
  string hashtag_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;
  /// Sticker file to delete.
  object_ptr<InputFile> sticker_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to be removed.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Animation file to be removed.
  object_ptr<InputFile> animation_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the notification sound.
  int64 notification_sound_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Hashtag or cashtag to delete.
  string tag_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker to remove from the set.
  object_ptr<InputFile> sticker_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Category of frequently used chats.
  object_ptr<TopChatCategory> category_;
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new order of active usernames. All currently active usernames must be specified.
  array<string> usernames_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// The new order of active usernames. All currently active usernames must be specified.
  array<string> usernames_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot. The bot must be owned and must have the main Web App.
  int53 bot_user_id_;
  /// Language code of the media previews to reorder.
  string language_code_;
  /// File identifiers of the media in the new order.
  array<int32> file_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifiers of chat folders in the new correct order.
  array<int32> chat_folder_ids_;
  /// Position of the main chat list among chat folders, 0-based. Can be non-zero only for Premium users.
  int32 main_chat_list_position_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the sticker sets to reorder.
  object_ptr<StickerType> sticker_type_;
  /// Identifiers of installed sticker sets in the new correct order.
  array<int64> sticker_set_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new order of quick reply shortcuts.
  array<int32> shortcut_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  /// The new order of active usernames. All currently active usernames must be specified.
  array<string> usernames_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker set owner; ignored for regular users.
  int53 user_id_;
  /// Sticker set name. The sticker set must be owned by the current user.
  string name_;
  /// Sticker to remove from the set.
  object_ptr<InputFile> old_sticker_;
  /// Sticker to add to the set.
  object_ptr<inputSticker> new_sticker_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class rtmpUrl;

/**
 * Replaces the current RTMP URL for streaming to the chat; requires owner privileges.
 *
 * 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:
  /// Chat identifier.
  int53 chat_id_;

  /**
   * Default constructor for a function, which replaces the current RTMP URL for streaming to the chat; requires owner privileges.
   *
   * Returns object_ptr<RtmpUrl>.
   */
  replaceVideoChatRtmpUrl();

  /**
   * Creates a function, which replaces the current RTMP URL for streaming to the chat; requires owner privileges.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Current mobile network code.
  string mobile_network_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Option identifier chosen by the user; leave empty for the initial request.
  bytes option_id_;
  /// Identifiers of reported messages. Use messageProperties.can_report_chat to check whether the message can be reported.
  array<int53> message_ids_;
  /// Additional report details if asked by the server; 0-1024 characters; leave empty for the initial request.
  string text_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Identifier of the photo to report. Only full photos from chatPhoto can be reported.
  int32 file_id_;
  /// The reason for reporting the chat photo.
  object_ptr<ReportReason> reason_;
  /// Additional report details; 0-1024 characters.
  string text_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ReportChatSponsoredMessageResult;

/**
 * Reports a sponsored message to Telegram moderators.
 *
 * Returns object_ptr<ReportChatSponsoredMessageResult>.
 */
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:
  /// Chat identifier of the sponsored message.
  int53 chat_id_;
  /// Identifier of the sponsored message.
  int53 message_id_;
  /// Option identifier chosen by the user; leave empty for the initial request.
  bytes option_id_;

  /**
   * Default constructor for a function, which reports a sponsored message to Telegram moderators.
   *
   * Returns object_ptr<ReportChatSponsoredMessageResult>.
   */
  reportChatSponsoredMessage();

  /**
   * Creates a function, which reports a sponsored message to Telegram moderators.
   *
   * Returns object_ptr<ReportChatSponsoredMessageResult>.
   *
   * \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 = -868330562;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ReportChatSponsoredMessageResult>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message identifier.
  int53 message_id_;
  /// Identifier of the sender, which added the reaction.
  object_ptr<MessageSender> sender_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Current mobile network code.
  string mobile_network_code_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of the sender of the story to report.
  int53 story_sender_chat_id_;
  /// The identifier of the story to report.
  int32 story_id_;
  /// Option identifier chosen by the user; leave empty for the initial request.
  bytes option_id_;
  /// Additional report details; 0-1024 characters; leave empty for the initial request.
  string text_;

  /**
   * 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_sender_chat_id_ The identifier of the sender 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_sender_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 = 2027844368;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ReportStoryResult>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Supergroup identifier.
  int53 supergroup_id_;
  /// Identifier of the erroneously deleted message from chatEventMessageDeleted.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Supergroup identifier.
  int53 supergroup_id_;
  /// Identifiers of messages to report. Use messageProperties.can_report_supergroup_spam to check whether the message can be reported.
  array<int53> message_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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 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:
  /// List of user identifiers of other users currently using the application.
  array<int53> other_user_ids_;

  /**
   * 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 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 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Reason of code resending; pass null if unknown.
  object_ptr<ResendCodeReason> reason_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to send messages.
  int53 chat_id_;
  /// Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order.
  array<int53> message_ids_;
  /// 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_;

  /**
   * 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.
   */
  resendMessages(int53 chat_id_, array<int53> &&message_ids_, object_ptr<inputTextQuote> &&quote_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2010327226;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Reason of code resending; pass null if unknown.
  object_ptr<ResendCodeReason> reason_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the subscription.
  string subscription_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Invite link to be revoked.
  string invite_link_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Revokes invite link for a group call. Requires groupCall.can_be_managed group call flag.
 *
 * 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:
  /// Group call identifier.
  int32 group_call_id_;

  /**
   * Default constructor for a function, which revokes invite link for a group call. Requires groupCall.can_be_managed group call flag.
   *
   * Returns object_ptr<Ok>.
   */
  revokeGroupCallInviteLink();

  /**
   * Creates a function, which revokes invite link for a group call. Requires groupCall.can_be_managed group call flag.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Event type.
  string type_;
  /// Optional chat identifier, associated with the event.
  int53 chat_id_;
  /// The log event data.
  object_ptr<JsonValue> data_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the user.
  int53 user_id_;
  /// The description of the message.
  object_ptr<InputInlineQueryResult> result_;
  /// Types of the chats to which the message can be sent.
  object_ptr<targetChatTypes> chat_types_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class AffiliateProgramSortOrder;

class foundAffiliatePrograms;

/**
 * Searches affiliate programs that can be applied to the given chat.
 *
 * 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:
  /// Identifier of the chat for which affiliate programs are searched for. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right.
  int53 chat_id_;
  /// Sort order for the results.
  object_ptr<AffiliateProgramSortOrder> sort_order_;
  /// 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_;
  /// The maximum number of affiliate programs to return.
  int32 limit_;

  /**
   * Default constructor for a function, which searches affiliate programs that can be applied to the given chat.
   *
   * Returns object_ptr<FoundAffiliatePrograms>.
   */
  searchAffiliatePrograms();

  /**
   * Creates a function, which searches affiliate programs that can be applied to the given chat.
   *
   * Returns object_ptr<FoundAffiliatePrograms>.
   *
   * \param[in] chat_id_ Identifier of the chat for which affiliate programs are searched for. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right.
   * \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(int53 chat_id_, object_ptr<AffiliateProgramSortOrder> &&sort_order_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1635555148;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundAffiliatePrograms>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The name of the background.
  string name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class foundMessages;

/**
 * Searches for 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:
  /// 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_;
  /// 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_;
  /// Pass true to search only for messages with missed/declined calls.
  bool only_missed_;

  /**
   * Default constructor for a function, which searches for 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 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Username of the chat.
  string username_;
  /// The referrer from an internalLinkTypeChatAffiliateProgram link.
  string referrer_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Query to search for.
  string query_;
  /// The maximum number of users to be returned; up to 200.
  int32 limit_;
  /// The type of users to search for; pass null to search among all chat members.
  object_ptr<ChatMembersFilter> filter_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageSender;

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 message_thread_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:
  /// Identifier of the chat in which to search messages.
  int53 chat_id_;
  /// Query to search for.
  string query_;
  /// 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_;
  /// Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  /// Specify 0 to get results from exactly the message from_message_id or a negative offset to get the specified message and some newer messages.
  int32 offset_;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, 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_;
  /// Additional filter for messages to search; pass null to search for all messages.
  object_ptr<SearchMessagesFilter> filter_;
  /// If not 0, only messages in the specified thread will be returned; supergroups only.
  int53 message_thread_id_;
  /// If not 0, only messages in the specified Saved Messages topic will be returned; pass 0 to return all messages, or for chats other than Saved Messages.
  int53 saved_messages_topic_id_;

  /**
   * 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 message_thread_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 message_thread_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] 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 offset 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, 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.
   * \param[in] message_thread_id_ If not 0, only messages in the specified thread will be returned; supergroups only.
   * \param[in] saved_messages_topic_id_ If not 0, only messages in the specified Saved Messages topic will be returned; pass 0 to return all messages, or for chats other than Saved Messages.
   */
  searchChatMessages(int53 chat_id_, string const &query_, object_ptr<MessageSender> &&sender_id_, int53 from_message_id_, int32 offset_, int32 limit_, object_ptr<SearchMessagesFilter> &&filter_, int53 message_thread_id_, int53 saved_messages_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -539052602;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundChatMessages>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// The maximum number of messages to be returned.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chats;

/**
 * Searches for the specified query in the title and username of already known chats; this is an offline request. 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:
  /// Query to search for. If the query is empty, returns up to 50 recently found chats.
  string query_;
  /// The maximum number of chats to be returned.
  int32 limit_;

  /**
   * Default constructor for a function, which searches for the specified query in the title and username of already known chats; this is an offline request. 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 request. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Query to search for.
  string query_;
  /// The maximum number of chats to be returned.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Query to search for; may be empty to return all contacts.
  string query_;
  /// The maximum number of users to be returned.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Text to search for.
  string text_;
  /// List of possible IETF language tags of the user's input language; may be empty if unknown.
  array<string> input_language_codes_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Query to search for; may be empty to return all downloaded files.
  string query_;
  /// Pass true to search only for active downloads, including paused.
  bool only_active_;
  /// Pass true to search only for completed downloads.
  bool only_completed_;
  /// 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_;
  /// The maximum number of files to be returned.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Hashtag prefix to search for.
  string prefix_;
  /// The maximum number of hashtags to be returned.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the sticker sets to search for.
  object_ptr<StickerType> sticker_type_;
  /// Query to search for.
  string query_;
  /// The maximum number of sticker sets to return.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ChatList;

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:
  /// 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_;
  /// Pass true to search only for messages in channels.
  bool only_in_channels_;
  /// Query to search for.
  string query_;
  /// 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_;
  /// 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_;
  /// Additional filter for messages to search; pass null to search for all messages. Filters searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, searchMessagesFilterFailedToSend, and searchMessagesFilterPinned are unsupported in this function.
  object_ptr<SearchMessagesFilter> filter_;
  /// If not 0, the minimum date of the messages to return.
  int32 min_date_;
  /// If not 0, the maximum date of the messages to return.
  int32 max_date_;

  /**
   * 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] only_in_channels_ Pass true to search only for messages in channels.
   * \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, searchMessagesFilterFailedToSend, and searchMessagesFilterPinned are unsupported in this function.
   * \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_, bool only_in_channels_, string const &query_, string const &offset_, int32 limit_, object_ptr<SearchMessagesFilter> &&filter_, int32 min_date_, int32 max_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 838452169;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundMessages>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Query to search for in document file name and message caption.
  string query_;
  /// The maximum number of messages to be returned; up to 100.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Username to be resolved.
  string username_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Query to search for.
  string query_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Hashtag or cashtag to search for.
  string tag_;
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Address of the location.
  object_ptr<locationAddress> address_;
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat that posted the stories to search for; pass 0 to search stories in all chats.
  int53 story_sender_chat_id_;
  /// Hashtag or cashtag to search for.
  string tag_;
  /// 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_;
  /// 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_;

  /**
   * 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_sender_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_sender_chat_id_, string const &tag_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1563792893;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundStories>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Provider of the venue.
  string venue_provider_;
  /// Identifier of the venue in the provider database.
  string venue_id_;
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Text in which to search for the quote.
  object_ptr<formattedText> text_;
  /// Quote to search for.
  object_ptr<formattedText> quote_;
  /// Approximate quote position in UTF-16 code units.
  int32 quote_position_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chats;

/**
 * Searches for the specified query in the title and username of up to 50 recently found chats; this is an offline request.
 *
 * 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:
  /// Query to search for.
  string query_;
  /// The maximum number of chats to be returned.
  int32 limit_;

  /**
   * 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 request.
   *
   * 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 request.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;
  /// Tag to search for; pass null to return all suitable messages.
  object_ptr<ReactionType> tag_;
  /// Query to search for.
  string query_;
  /// Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  /// Specify 0 to get results from exactly the message from_message_id or a negative offset to get the specified message and some newer messages.
  int32 offset_;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, 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_;

  /**
   * 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 offset 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, 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat in which to search. Specify 0 to search in all secret chats.
  int53 chat_id_;
  /// Query to search for. If empty, searchChatMessages must be used instead.
  string query_;
  /// 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_;
  /// 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_;
  /// Additional filter for messages to search; pass null to search for all messages.
  object_ptr<SearchMessagesFilter> filter_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Name of the sticker set.
  string name_;
  /// Pass true to ignore local cache of sticker sets and always send a network request.
  bool ignore_cache_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the sticker sets to return.
  object_ptr<StickerType> sticker_type_;
  /// Query to search for.
  string query_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Type of the stickers to return.
  object_ptr<StickerType> sticker_type_;
  /// Space-separated list of emojis to search for.
  string emojis_;
  /// Query to search for; may be empty to search for emoji only.
  string query_;
  /// List of possible IETF language tags of the user's input language; may be empty if unknown.
  array<string> input_language_codes_;
  /// The offset from which to return the stickers; must be non-negative.
  int32 offset_;
  /// The maximum number of stickers to be returned; 0-100.
  int32 limit_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The strings to search in for the query.
  array<string> strings_;
  /// Query to search for.
  string query_;
  /// The maximum number of objects to return.
  int32 limit_;
  /// Pass true to receive no results for an empty query.
  bool return_none_for_empty_query_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Phone number to search for.
  string phone_number_;
  /// Pass true to get only locally available information without sending network requests.
  bool only_local_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Token to search for.
  string token_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// Short name of the Web App.
  string web_app_short_name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Sells a gift received by the current user for Telegram Stars.
 *
 * 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:
  /// Identifier of the user that sent the gift.
  int53 sender_user_id_;
  /// Identifier of the message with the gift in the chat with the user.
  int53 message_id_;

  /**
   * Default constructor for a function, which sells a gift received by the current user for Telegram Stars.
   *
   * Returns object_ptr<Ok>.
   */
  sellGift();

  /**
   * Creates a function, which sells a gift received by the current user for Telegram Stars.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sender_user_id_ Identifier of the user that sent the gift.
   * \param[in] message_id_ Identifier of the message with the gift in the chat with the user.
   */
  sellGift(int53 sender_user_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1729857716;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application.
  string token_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the bot.
  int53 bot_user_id_;
  /// Identifier of the target chat.
  int53 chat_id_;
  /// A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots\#deep-linking).
  string parameter_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of business connection on behalf of which to send the request.
  string business_connection_id_;
  /// Target chat.
  int53 chat_id_;
  /// Information about the message to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  /// Pass true to disable notification for the message.
  bool disable_notification_;
  /// Pass true if the content of the message must be protected from forwarding and saving.
  bool protect_content_;
  /// Identifier of the effect to apply to the message.
  int64 effect_id_;
  /// Markup for replying to the message; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  /// The content of the message to be sent.
  object_ptr<InputMessageContent> input_message_content_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of business connection on behalf of which to send the request.
  string business_connection_id_;
  /// Target chat.
  int53 chat_id_;
  /// Information about the message to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  /// Pass true to disable notification for the message.
  bool disable_notification_;
  /// Pass true if the content of the message must be protected from forwarding and saving.
  bool protect_content_;
  /// Identifier of the effect to apply to the message.
  int64 effect_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Call identifier.
  int32 call_id_;
  /// Debug information in application-specific format.
  string debug_information_;

  /**
   * 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(int32 call_id_, string const &debug_information_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2019243839;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Call identifier.
  int32 call_id_;
  /// Call log file. Only inputFileLocal and inputFileGenerated are supported.
  object_ptr<InputFile> log_file_;

  /**
   * 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(int32 call_id_, object_ptr<InputFile> &&log_file_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1057638353;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class CallProblem;

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:
  /// Call identifier.
  int32 call_id_;
  /// Call rating; 1-5.
  int32 rating_;
  /// An optional user comment if the rating is less than 5.
  string comment_;
  /// List of the exact types of problems with the call, specified by the user.
  array<object_ptr<CallProblem>> problems_;

  /**
   * 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(int32 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 = -1402719502;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Call identifier.
  int32 call_id_;
  /// The data.
  bytes data_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ChatAction;

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:
  /// Chat identifier.
  int53 chat_id_;
  /// If not 0, the message thread identifier in which the action was performed.
  int53 message_thread_id_;
  /// Unique identifier of business connection on behalf of which to send the request; for bots only.
  string business_connection_id_;
  /// The action description; pass null to cancel the currently active action.
  object_ptr<ChatAction> action_;

  /**
   * 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] message_thread_id_ If not 0, the message thread identifier in which the action was performed.
   * \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_, int53 message_thread_id_, string const &business_connection_id_, object_ptr<ChatAction> &&action_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2010910050;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The method name.
  string method_;
  /// JSON-serialized method parameters.
  string parameters_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Email address.
  string email_address_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class formattedText;

class ok;

/**
 * Sends a gift to another user. 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:
  /// Identifier of the gift to send.
  int64 gift_id_;
  /// Identifier of the user that will receive the gift.
  int53 user_id_;
  /// Text to show along with the gift; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed.
  object_ptr<formattedText> text_;
  /// Pass true to show the current user as sender and gift text only to the gift receiver; otherwise, everyone will be able to see them.
  bool is_private_;

  /**
   * Default constructor for a function, which sends a gift to another user. 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. 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] user_id_ Identifier of the user that 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, and CustomEmoji entities are allowed.
   * \param[in] is_private_ Pass true to show the current user as sender and gift text only to the gift receiver; otherwise, everyone will be able to see them.
   */
  sendGift(int64 gift_id_, int53 user_id_, object_ptr<formattedText> &&text_, bool is_private_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 852064621;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class InputMessageReplyTo;

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:
  /// Target chat.
  int53 chat_id_;
  /// If not 0, the message thread identifier in which the message will be sent.
  int53 message_thread_id_;
  /// Information about the message or story to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  /// Options to be used to send the message; pass null to use default options.
  object_ptr<messageSendOptions> options_;
  /// Identifier of the inline query.
  int64 query_id_;
  /// Identifier of the inline query result.
  string result_id_;
  /// 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_;

  /**
   * 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] message_thread_id_ If not 0, the message thread identifier in which the message will be sent.
   * \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_, int53 message_thread_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 = 1182553208;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class InputMessageContent;

class InputMessageReplyTo;

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:
  /// Target chat.
  int53 chat_id_;
  /// If not 0, the message thread identifier in which the message will be sent.
  int53 message_thread_id_;
  /// Information about the message or story to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  /// Options to be used to send the message; pass null to use default options.
  object_ptr<messageSendOptions> options_;
  /// Markup for replying to the message; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  /// The content of the message to be sent.
  object_ptr<InputMessageContent> input_message_content_;

  /**
   * 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] message_thread_id_ If not 0, the message thread identifier in which the message will be sent.
   * \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_, int53 message_thread_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 = -533921303;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class InputMessageContent;

class InputMessageReplyTo;

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:
  /// Target chat.
  int53 chat_id_;
  /// If not 0, the message thread identifier in which the messages will be sent.
  int53 message_thread_id_;
  /// Information about the message or story to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  /// Options to be used to send the messages; pass null to use default options.
  object_ptr<messageSendOptions> options_;
  /// 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_;

  /**
   * 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] message_thread_id_ If not 0, the message thread identifier in which the messages will be sent.
   * \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_, int53 message_thread_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 = -1985013029;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Authorization form identifier.
  int32 authorization_form_id_;
  /// Types of Telegram Passport elements chosen by user to complete the authorization form.
  array<object_ptr<PassportElementType>> types_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The invoice.
  object_ptr<InputInvoice> input_invoice_;
  /// Payment form identifier returned by getPaymentForm.
  int64 payment_form_id_;
  /// Identifier returned by validateOrderInfo, or an empty string.
  string order_info_id_;
  /// Identifier of a chosen shipping option, if applicable.
  string shipping_option_id_;
  /// The credentials chosen by user for payment; pass null for a payment in Telegram Stars.
  object_ptr<InputCredentials> credentials_;
  /// Chosen by the user amount of tip in the smallest units of the currency.
  int53 tip_amount_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The phone number, in international format.
  string phone_number_;
  /// Settings for the authentication of the user's phone number; pass null to use default settings.
  object_ptr<phoneNumberAuthenticationSettings> settings_;
  /// Type of the request for which the code is sent.
  object_ptr<PhoneNumberCodeType> type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application.
  string token_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class messages;

/**
 * Sends messages from a quick reply shortcut. Requires Telegram Business subscription.
 *
 * 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:
  /// Identifier of the chat to which to send messages. The chat must be a private chat with a regular user.
  int53 chat_id_;
  /// Unique identifier of the quick reply shortcut.
  int32 shortcut_id_;
  /// 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_;

  /**
   * Default constructor for a function, which sends messages from a quick reply shortcut. Requires Telegram Business subscription.
   *
   * Returns object_ptr<Messages>.
   */
  sendQuickReplyShortcutMessages();

  /**
   * Creates a function, which sends messages from a quick reply shortcut. Requires Telegram Business subscription.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class InputStoryContent;

class StoryPrivacySettings;

class formattedText;

class inputStoryAreas;

class story;

class storyFullId;

/**
 * Sends a new story to a chat; requires can_post_stories right for supergroup and channel chats. Returns a temporary story.
 *
 * Returns object_ptr<Story>.
 */
class sendStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// 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_;
  /// Content of the story.
  object_ptr<InputStoryContent> content_;
  /// Clickable rectangle areas to be shown on the story media; pass null if none.
  object_ptr<inputStoryAreas> areas_;
  /// 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_;
  /// The privacy settings for the story; ignored for stories sent to supergroup and channel chats.
  object_ptr<StoryPrivacySettings> privacy_settings_;
  /// 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_;
  /// 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_;
  /// Pass true to keep the story accessible after expiration.
  bool is_posted_to_chat_page_;
  /// Pass true if the content of the story must be protected from forwarding and screenshotting.
  bool protect_content_;

  /**
   * Default constructor for a function, which sends a new story to a chat; requires can_post_stories right for supergroup and channel chats. Returns a temporary story.
   *
   * Returns object_ptr<Story>.
   */
  sendStory();

  /**
   * Creates a function, which sends a new story to a chat; requires can_post_stories 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 sent to supergroup and channel chats.
   * \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.
   */
  sendStory(int53 chat_id_, object_ptr<InputStoryContent> &&content_, object_ptr<inputStoryAreas> &&areas_, object_ptr<formattedText> &&caption_, object_ptr<StoryPrivacySettings> &&privacy_settings_, 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 = -424987902;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<story>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the bot.
  int53 bot_user_id_;
  /// The method name.
  string method_;
  /// JSON-serialized method parameters.
  string parameters_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// Text of the keyboardButtonTypeWebApp button, which opened the Web App.
  string button_text_;
  /// The data.
  string data_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the accent color to use.
  int32 accent_color_id_;
  /// Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
  int64 background_custom_emoji_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// New account TTL.
  object_ptr<accountTtl> ttl_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Number of seconds before the function returns.
  double seconds_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Application 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:
  /// Unique identifier for the verification process as received from updateApplicationVerificationRequired.
  int53 verification_id_;
  /// Play Integrity API token for the Android application, or secret from push notification for the iOS application; pass an empty string to abort verification and receive error VERIFICATION_FAILED for the request.
  string token_;

  /**
   * Default constructor for a function, which application verification has been completed. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  setApplicationVerificationToken();

  /**
   * Creates a function, which application 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.
   * \param[in] token_ Play Integrity API token for the Android application, or secret from push notification for the iOS application; pass an empty string to abort verification and receive error VERIFICATION_FAILED 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// New settings.
  object_ptr<archiveChatListSettings> settings_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The email address of the user.
  string email_address_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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 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:
  /// The phone number of the user, in international format.
  string phone_number_;
  /// Settings for the authentication of the user's phone number; pass null to use default settings.
  object_ptr<phoneNumberAuthenticationSettings> settings_;

  /**
   * 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 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 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// New user auto-download settings.
  object_ptr<autoDownloadSettings> settings_;
  /// Type of the network for which the new settings are relevant.
  object_ptr<NetworkType> type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Autosave settings scope.
  object_ptr<AutosaveSettingsScope> scope_;
  /// New autosave settings for the scope; pass null to set autosave settings to default.
  object_ptr<scopeAutosaveSettings> settings_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new value of the user bio; 0-getOption(&quot;bio_length_max&quot;) characters without line feeds.
  string bio_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new value of the current user's birthdate; pass null to remove the birthdate.
  object_ptr<birthdate> birthdate_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// 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_;
  /// New bot's description on the specified language.
  string description_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// 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_;
  /// New bot's short description on the specified language.
  string short_description_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// 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_;
  /// New bot's name on the specified language; 0-64 characters; must be non-empty if language code is empty.
  string name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// Profile photo to set; pass null to delete the chat photo.
  object_ptr<InputChatPhoto> photo_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The number of pending updates.
  int32 pending_update_count_;
  /// The last error message.
  string error_message_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new settings for the away message of the business; pass null to disable the away message.
  object_ptr<businessAwayMessageSettings> away_message_settings_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Connection settings for the bot.
  object_ptr<businessConnectedBot> bot_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new settings for the greeting message of the business; pass null to disable the greeting message.
  object_ptr<businessGreetingMessageSettings> greeting_message_settings_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new location of the business; pass null to remove the location.
  object_ptr<businessLocation> location_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// Pass true to pin the message, pass false to unpin it.
  bool is_pinned_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new start page of the business; pass null to remove custom start page.
  object_ptr<inputBusinessStartPage> start_page_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_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.
  int32 accent_color_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.
  int64 background_custom_emoji_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat that posted stories.
  int53 chat_id_;
  /// New list for active stories posted by the chat.
  object_ptr<StoryList> story_list_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat with an owned bot for which affiliate program is changed.
  int53 chat_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// The input background to use; pass null to create a new filled or chat theme background.
  object_ptr<InputBackground> background_;
  /// 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_;
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of client_data.
  string client_data_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// New chat description; 0-255 characters.
  string description_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class draftMessage;

class ok;

/**
 * Changes the draft message in a chat.
 *
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// If not 0, the message thread identifier in which the draft was changed.
  int53 message_thread_id_;
  /// 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_;

  /**
   * Default constructor for a function, which changes the draft message in a chat.
   *
   * Returns object_ptr<Ok>.
   */
  setChatDraftMessage();

  /**
   * Creates a function, which changes the draft message in a chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_thread_id_ If not 0, the message thread identifier in which the draft was changed.
   * \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_, int53 message_thread_id_, object_ptr<draftMessage> &&draft_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1683889946;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// New emoji status; pass null to remove emoji status.
  object_ptr<emojiStatus> emoji_status_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// New location for the chat; must be valid and not null.
  object_ptr<chatLocation> location_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Member identifier. Chats can be only banned and unbanned in supergroups and channels.
  object_ptr<MessageSender> member_id_;
  /// The new status of the member in the chat.
  object_ptr<ChatMemberStatus> status_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// New message sender for the chat.
  object_ptr<MessageSender> message_sender_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// New non-administrator members permissions in the chat.
  object_ptr<chatPermissions> permissions_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// New chat photo; pass null to delete the chat photo.
  object_ptr<InputChatPhoto> photo_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Changes the list of pinned stories on a chat page; requires can_edit_stories 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:
  /// Identifier of the chat that posted the stories.
  int53 chat_id_;
  /// 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_;

  /**
   * Default constructor for a function, which changes the list of pinned stories on a chat page; requires can_edit_stories 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 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_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.
  int32 profile_accent_color_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.
  int64 profile_background_custom_emoji_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New slow mode delay for the chat, in seconds; must be one of 0, 10, 30, 60, 300, 900, 3600.
  int32 slow_mode_delay_;

  /**
   * Default constructor for a function, which changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members 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 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, 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Name of the new chat theme; pass an empty string to return the default theme.
  string theme_name_;

  /**
   * 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_name_ Name of the new chat theme; pass an empty string to return the default theme.
   */
  setChatTheme(int53 chat_id_, string const &theme_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1895234925;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// New title of the chat; 1-128 characters.
  string title_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifiers of close friends; the users must be contacts of the current user.
  array<int53> user_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The scope to which the commands are relevant; pass null to change commands in the default bot command scope.
  object_ptr<BotCommandScope> scope_;
  /// 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_;
  /// List of the bot's commands.
  array<object_ptr<botCommand>> commands_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker set name. The sticker set must be owned by the current user.
  string name_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;
  /// Strings of the new language pack.
  array<object_ptr<languagePackString>> strings_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of a previously added custom local language pack in the current localization target.
  string language_pack_id_;
  /// New language pack string.
  object_ptr<languagePackString> new_string_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// New encryption key.
  bytes new_encryption_key_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The input background to use; pass null to create a new filled background.
  object_ptr<InputBackground> background_;
  /// Background type; pass null to use the default type of the remote background; backgroundTypeChatTheme isn't supported.
  object_ptr<BackgroundType> type_;
  /// Pass true if the background is set for a dark theme.
  bool for_dark_theme_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Default administrator rights for adding the bot to channels; pass null to remove default rights.
  object_ptr<chatAdministratorRights> default_channel_administrator_rights_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// New type of the default reaction. The paid reaction can't be set as default.
  object_ptr<ReactionType> reaction_type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// New emoji status; pass null to switch to the default badge.
  object_ptr<emojiStatus> emoji_status_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of the generation process.
  int64 generation_id_;
  /// Expected size of the generated file, in bytes; 0 if unknown.
  int53 expected_size_;
  /// The number of bytes already generated.
  int53 local_prefix_size_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class chatNotificationSettings;

class ok;

/**
 * Changes the notification settings of a forum topic.
 *
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message thread identifier of the forum topic.
  int53 message_thread_id_;
  /// 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_;

  /**
   * Default constructor for a function, which changes the notification settings of a forum topic.
   *
   * Returns object_ptr<Ok>.
   */
  setForumTopicNotificationSettings();

  /**
   * Creates a function, which changes the notification settings of a forum topic.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_thread_id_ Message thread identifier of the forum topic.
   * \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_, int53 message_thread_id_, object_ptr<chatNotificationSettings> &&notification_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 524498023;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The chat to which the message with the game belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// Pass true to edit the game message to include the current scoreboard.
  bool edit_message_;
  /// User identifier.
  int53 user_id_;
  /// The new score.
  int32 score_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Informs TDLib that speaking state of a participant of an active group has changed.
 *
 * Returns object_ptr<Ok>.
 */
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:
  /// Group call identifier.
  int32 group_call_id_;
  /// Group call participant's synchronization audio source identifier, or 0 for the current user.
  int32 audio_source_;
  /// Pass true if the user is speaking.
  bool is_speaking_;

  /**
   * Default constructor for a function, which informs TDLib that speaking state of a participant of an active group has changed.
   *
   * Returns object_ptr<Ok>.
   */
  setGroupCallParticipantIsSpeaking();

  /**
   * Creates a function, which informs TDLib that speaking state of a participant of an active group has changed.
   *
   * Returns object_ptr<Ok>.
   *
   * \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 = 927506917;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageSender;

class ok;

/**
 * Changes volume level of a participant of an active group call. If the current user can manage 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:
  /// Group call identifier.
  int32 group_call_id_;
  /// Participant identifier.
  object_ptr<MessageSender> participant_id_;
  /// New participant's volume level; 1-20000 in hundreds of percents.
  int32 volume_level_;

  /**
   * Default constructor for a function, which changes volume level of a participant of an active group call. If the current user can manage 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. If the current user can manage 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Sets group call title. Requires groupCall.can_be_managed group call flag.
 *
 * Returns object_ptr<Ok>.
 */
class setGroupCallTitle final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Group call identifier.
  int32 group_call_id_;
  /// New group call title; 1-64 characters.
  string title_;

  /**
   * Default constructor for a function, which sets group call title. Requires groupCall.can_be_managed group call flag.
   *
   * Returns object_ptr<Ok>.
   */
  setGroupCallTitle();

  /**
   * Creates a function, which sets group call title. Requires groupCall.can_be_managed group call flag.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] title_ New group call title; 1-64 characters.
   */
  setGroupCallTitle(int32 group_call_id_, string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1228825139;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// New number of days of inactivity before sessions will be automatically terminated; 1-366 days.
  int32 inactive_session_ttl_days_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Inline message identifier.
  string inline_message_id_;
  /// Pass true to edit the game message to include the current scoreboard.
  bool edit_message_;
  /// User identifier.
  int53 user_id_;
  /// The new score.
  int32 score_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// New log stream.
  object_ptr<LogStream> log_stream_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Logging tag to change verbosity level.
  string tag_;
  /// New verbosity level; 1-1024.
  int32 new_verbosity_level_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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. 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:
  /// New login email address.
  string new_login_email_address_;

  /**
   * 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. 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. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the user or 0 to set menu button for all users.
  int53 user_id_;
  /// New menu button.
  object_ptr<botMenuButton> menu_button_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The channel chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// Types of the reaction to set; pass an empty list to remove the reactions.
  array<object_ptr<ReactionType>> reaction_types_;
  /// Pass true if the reactions are added with a big animation.
  bool is_big_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of a message sender to block/unblock.
  object_ptr<MessageSender> sender_id_;
  /// New block list for the message sender; pass null to unblock the message sender.
  object_ptr<BlockList> block_list_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new value of the first name for the current user; 1-64 characters.
  string first_name_;
  /// The new value of the optional last name for the current user; 0-64 characters.
  string last_name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new network type; pass null to set network type to networkTypeOther.
  object_ptr<NetworkType> type_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// New settings.
  object_ptr<newChatPrivacySettings> settings_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The name of the option.
  string name_;
  /// The new value of the option; pass null to reset option value to a default value.
  object_ptr<OptionValue> value_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Input Telegram Passport element.
  object_ptr<InputPassportElement> element_;
  /// The 2-step verification password of the current user.
  string password_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class inputPassportElementError;

class ok;

/**
 * Informs the user that 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:
  /// User identifier.
  int53 user_id_;
  /// The errors.
  array<object_ptr<inputPassportElementError>> errors_;

  /**
   * Default constructor for a function, which informs the user that 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 that 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Previous 2-step verification password of the user.
  string old_password_;
  /// New 2-step verification password of the user; may be empty to remove the password.
  string new_password_;
  /// New password hint; may be empty.
  string new_hint_;
  /// Pass true to change also the recovery email address.
  bool set_recovery_email_address_;
  /// New recovery email address; may be empty.
  string new_recovery_email_address_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the new personal chat; pass 0 to remove the chat. Use getSuitablePersonalChats to get suitable chats.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat list in which to change the order of pinned chats.
  object_ptr<ChatList> chat_list_;
  /// The new list of pinned chats.
  array<int53> chat_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Changes the order of pinned forum topics; requires can_manage_topics 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:
  /// Chat identifier.
  int53 chat_id_;
  /// The new list of pinned forum topics.
  array<int53> message_thread_ids_;

  /**
   * Default constructor for a function, which changes the order of pinned forum topics; requires can_manage_topics right in the supergroup.
   *
   * Returns object_ptr<Ok>.
   */
  setPinnedForumTopics();

  /**
   * Creates a function, which changes the order of pinned forum topics; requires can_manage_topics right in the supergroup.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_thread_ids_ The new list of pinned forum topics.
   */
  setPinnedForumTopics(int53 chat_id_, array<int53> &&message_thread_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -475084011;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifiers of the new pinned Saved Messages topics.
  array<int53> saved_messages_topic_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Changes the user answer to a poll. A poll in quiz mode can be answered only once.
 *
 * 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:
  /// Identifier of the chat to which the poll belongs.
  int53 chat_id_;
  /// Identifier of the message containing the poll.
  int53 message_id_;
  /// 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_;

  /**
   * Default constructor for a function, which changes the user answer to a poll. A poll in quiz mode can be answered only once.
   *
   * Returns object_ptr<Ok>.
   */
  setPollAnswer();

  /**
   * Creates a function, which changes the user answer to a poll. A poll in quiz mode can be answered only once.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the accent color to use for profile; pass -1 if none.
  int32 profile_accent_color_id_;
  /// Identifier of a custom emoji to be shown on the user's profile photo background; 0 if none.
  int64 profile_background_custom_emoji_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Profile photo to set.
  object_ptr<InputChatPhoto> photo_;
  /// Pass true to set a public photo, which will be visible even the main photo is hidden by privacy settings.
  bool is_public_;

  /**
   * 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 a public photo, which will be visible even 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of the quick reply shortcut.
  int32 shortcut_id_;
  /// New name for the shortcut. Use checkQuickReplyShortcutName to check its validness.
  string name_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The new notification settings for reactions.
  object_ptr<reactionNotificationSettings> notification_settings_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// New settings.
  object_ptr<readDatePrivacySettings> settings_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The 2-step verification password of the current user.
  string password_;
  /// New recovery email address.
  string new_recovery_email_address_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The tag which label will be changed.
  object_ptr<ReactionType> tag_;
  /// New label for the tag; 0-12 characters.
  string label_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Types of chats for which to change the notification settings.
  object_ptr<NotificationSettingsScope> scope_;
  /// The new notification settings for the given scope.
  object_ptr<scopeNotificationSettings> notification_settings_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker.
  object_ptr<InputFile> sticker_;
  /// New string with 1-20 emoji corresponding to the sticker.
  string emojis_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker.
  object_ptr<InputFile> sticker_;
  /// List of up to 20 keywords with total length up to 64 characters, which can be used to find the sticker.
  array<string> keywords_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker.
  object_ptr<InputFile> sticker_;
  /// Position where the mask is placed; pass null to remove mask position.
  object_ptr<maskPosition> mask_position_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker.
  object_ptr<InputFile> sticker_;
  /// New position of the sticker in the set, 0-based.
  int32 position_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker set owner; ignored for regular users.
  int53 user_id_;
  /// Sticker set name. The sticker set must be owned by the current user.
  string name_;
  /// Thumbnail to set; pass null to remove the sticker set thumbnail.
  object_ptr<InputFile> thumbnail_;
  /// Format of the thumbnail; pass null if thumbnail is removed.
  object_ptr<StickerFormat> format_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker set name. The sticker set must be owned by the current user.
  string name_;
  /// New sticker set title.
  string title_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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_be_edited == 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:
  /// Identifier of the story.
  int32 story_id_;
  /// The new privacy settigs for the story.
  object_ptr<StoryPrivacySettings> privacy_settings_;

  /**
   * 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_be_edited == 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_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_id_ Identifier of the story.
   * \param[in] privacy_settings_ The new privacy settigs 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ReactionType;

class ok;

/**
 * Changes chosen reaction on a story that has already been sent.
 *
 * 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:
  /// The identifier of the sender of the story.
  int53 story_sender_chat_id_;
  /// The identifier of the story.
  int32 story_id_;
  /// 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_;
  /// Pass true if the reaction needs to be added to recent reactions.
  bool update_recent_reactions_;

  /**
   * Default constructor for a function, which changes chosen reaction on a story that has already been sent.
   *
   * Returns object_ptr<Ok>.
   */
  setStoryReaction();

  /**
   * Creates a function, which changes chosen reaction on a story that has already been sent.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_sender_chat_id_ The identifier of the sender 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_sender_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 = -1400156249;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup.
  int53 supergroup_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.
  int64 custom_emoji_sticker_set_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup.
  int53 supergroup_id_;
  /// New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set.
  int64 sticker_set_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup.
  int53 supergroup_id_;
  /// New value of the unrestrict_boost_count supergroup setting; 0-8. Use 0 to remove the setting.
  int32 unrestrict_boost_count_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true to use Telegram test environment instead of the production environment.
  bool use_test_dc_;
  /// The path to the directory for the persistent database; if empty, the current working directory will be used.
  string database_directory_;
  /// The path to the directory for storing files; if empty, database_directory will be used.
  string files_directory_;
  /// Encryption key for the database. If the encryption key is invalid, then an error with code 401 will be returned.
  bytes database_encryption_key_;
  /// Pass true to keep information about downloaded and uploaded files between application restarts.
  bool use_file_database_;
  /// 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_;
  /// Pass true to keep cache of chats and messages between restarts. Implies use_chat_info_database.
  bool use_message_database_;
  /// Pass true to enable support for secret chats.
  bool use_secret_chats_;
  /// Application identifier for Telegram API access, which can be obtained at https://my.telegram.org.
  int32 api_id_;
  /// Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org.
  string api_hash_;
  /// IETF language tag of the user's operating system language; must be non-empty.
  string system_language_code_;
  /// Model of the device the application is being run on; must be non-empty.
  string device_model_;
  /// Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib.
  string system_version_;
  /// Application version; must be non-empty.
  string application_version_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the user.
  int53 user_id_;
  /// New emoji status; pass null to switch to the default badge.
  object_ptr<emojiStatus> emoji_status_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifier.
  int53 user_id_;
  /// Profile photo to set; pass null to delete the photo; inputChatPhotoPrevious isn't supported in this function.
  object_ptr<InputChatPhoto> photo_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The privacy setting.
  object_ptr<UserPrivacySetting> setting_;
  /// The new privacy rules.
  object_ptr<userPrivacySettingRules> rules_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifier.
  int53 user_id_;
  /// New information message.
  object_ptr<formattedText> message_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Default group call participant identifier to join the video chats.
  object_ptr<MessageSender> default_participant_id_;

  /**
   * 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.
   */
  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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat with the bot.
  int53 chat_id_;
  /// Identifier of the message with the button.
  int53 message_id_;
  /// Identifier of the button.
  int32 button_id_;
  /// Identifier of the shared chat.
  int53 shared_chat_id_;
  /// 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_;

  /**
   * 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] chat_id_ Identifier of the chat with the bot.
   * \param[in] message_id_ Identifier of the message with 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(int53 chat_id_, int53 message_id_, int32 button_id_, int53 shared_chat_id_, bool only_check_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1504507166;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the user with whom to share the phone number. The user must be a mutual contact.
  int53 user_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat with the bot.
  int53 chat_id_;
  /// Identifier of the message with the button.
  int53 message_id_;
  /// Identifier of the button.
  int32 button_id_;
  /// Identifiers of the shared users.
  array<int53> shared_user_ids_;
  /// Pass true to check that the users can be shared by the button instead of actually sharing them.
  bool only_check_;

  /**
   * 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] chat_id_ Identifier of the chat with the bot.
   * \param[in] message_id_ Identifier of the message with 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(int53 chat_id_, int53 message_id_, 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 = -1574608333;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Starts recording of an active group call. Requires groupCall.can_be_managed group call flag.
 *
 * 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:
  /// Group call identifier.
  int32 group_call_id_;
  /// Group call recording title; 0-64 characters.
  string title_;
  /// Pass true to record a video file instead of an audio file.
  bool record_video_;
  /// Pass true to use portrait orientation for video instead of landscape one.
  bool use_portrait_orientation_;

  /**
   * Default constructor for a function, which starts recording of an active group call. Requires groupCall.can_be_managed group call flag.
   *
   * Returns object_ptr<Ok>.
   */
  startGroupCallRecording();

  /**
   * Creates a function, which starts recording of an active group call. Requires groupCall.can_be_managed group call flag.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class text;

/**
 * Starts screen sharing in a joined group call. 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:
  /// Group call identifier.
  int32 group_call_id_;
  /// Screen sharing audio channel synchronization source identifier; received from tgcalls.
  int32 audio_source_id_;
  /// Group call join payload; received from tgcalls.
  string payload_;

  /**
   * Default constructor for a function, which starts screen sharing in a joined group call. Returns join response payload for tgcalls.
   *
   * Returns object_ptr<Text>.
   */
  startGroupCallScreenSharing();

  /**
   * Creates a function, which starts screen sharing in a joined group call. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Starts a scheduled group call.
 *
 * Returns object_ptr<Ok>.
 */
class startScheduledGroupCall final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Group call identifier.
  int32 group_call_id_;

  /**
   * Default constructor for a function, which starts a scheduled group call.
   *
   * Returns object_ptr<Ok>.
   */
  startScheduledGroupCall();

  /**
   * Creates a function, which starts a scheduled group call.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit startScheduledGroupCall(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1519938838;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Unique identifier of business connection on behalf of which the message with the poll was sent.
  string business_connection_id_;
  /// The chat the message belongs to.
  int53 chat_id_;
  /// Identifier of the message containing the poll.
  int53 message_id_;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to which the poll belongs.
  int53 chat_id_;
  /// Identifier of the message containing the poll. Use messageProperties.can_be_edited to check whether the poll can be stopped.
  int53 message_id_;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class InputChatPhoto;

class ok;

/**
 * Suggests a profile photo to another regular user with common 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:
  /// User identifier.
  int53 user_id_;
  /// Profile photo to suggest; inputChatPhotoPrevious isn't supported in this function.
  object_ptr<InputChatPhoto> photo_;

  /**
   * Default constructor for a function, which suggests a profile photo to another regular user with common messages.
   *
   * Returns object_ptr<Ok>.
   */
  suggestUserProfilePhoto();

  /**
   * Creates a function, which suggests a profile photo to another regular user with common 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Language pack identifier.
  string language_pack_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Session identifier.
  int64 session_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Bytes to return.
  bytes x_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// String to return.
  string x_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Vector of numbers to return.
  array<int32> x_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Vector of objects to return.
  array<object_ptr<testInt>> x_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Vector of strings to return.
  array<string> x_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Vector of objects to return.
  array<object_ptr<testString>> x_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ProxyType;

class ok;

/**
 * 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:
  /// Proxy server domain or IP address.
  string server_;
  /// Proxy server port.
  int32 port_;
  /// Proxy type.
  object_ptr<ProxyType> type_;
  /// Identifier of a datacenter with which to test connection.
  int32 dc_id_;
  /// The maximum overall timeout for the request.
  double timeout_;

  /**
   * 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] server_ Proxy server domain or IP address.
   * \param[in] port_ Proxy server port.
   * \param[in] type_ Proxy type.
   * \param[in] dc_id_ Identifier of a datacenter with which to test connection.
   * \param[in] timeout_ The maximum overall timeout for the request.
   */
  testProxy(string const &server_, int32 port_, object_ptr<ProxyType> &&type_, int32 dc_id_, double timeout_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1197366626;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The error to be returned.
  object_ptr<error> error_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Number to square.
  int32 x_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true to pause all downloads; pass false to unpause them.
  bool are_paused_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// User identifier of the bot.
  int53 bot_user_id_;
  /// Pass true if the bot is allowed to change emoji status of the user; pass false otherwise.
  bool can_manage_emoji_status_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Bot's user identifier.
  int53 bot_user_id_;
  /// Pass true to add the bot to attachment menu; pass false to remove the bot from attachment menu.
  bool is_added_;
  /// Pass true if the current user allowed the bot to send them messages. Ignored if is_added is false.
  bool allow_write_access_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Changes active state for a username of a bot. 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. 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:
  /// Identifier of the target bot.
  int53 bot_user_id_;
  /// The username to change.
  string username_;
  /// Pass true to activate the username; pass false to disable it.
  bool is_active_;

  /**
   * Default constructor for a function, which changes active state for a username of a bot. 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. 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'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. 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// Pass true to pause the connected bot in the chat; pass false to resume the bot.
  bool is_paused_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of default_disable_notification.
  bool default_disable_notification_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true to enable folder tags; pass false to disable them.
  bool are_tags_enabled_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Changes the ability of users to save, forward, or copy chat content. Supported only for basic groups, supergroups and channels. Requires owner privileges.
 *
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of has_protected_content.
  bool has_protected_content_;

  /**
   * Default constructor for a function, which changes the ability of users to save, forward, or copy chat content. Supported only for basic groups, supergroups and channels. Requires owner privileges.
   *
   * Returns object_ptr<Ok>.
   */
  toggleChatHasProtectedContent();

  /**
   * Creates a function, which changes the ability of users to save, forward, or copy chat content. Supported only for basic groups, supergroups and channels. Requires owner privileges.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of is_marked_as_unread.
  bool is_marked_as_unread_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat list in which to change the pinned state of the chat.
  object_ptr<ChatList> chat_list_;
  /// Chat identifier.
  int53 chat_id_;
  /// Pass true to pin the chat; pass false to unpin it.
  bool is_pinned_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of is_translatable.
  bool is_translatable_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// New value of view_as_topics.
  bool view_as_topics_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the downloaded file.
  int32 file_id_;
  /// Pass true if the download is paused.
  bool is_paused_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics 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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Message thread identifier of the forum topic.
  int53 message_thread_id_;
  /// Pass true to close the topic; pass false to reopen it.
  bool is_closed_;

  /**
   * Default constructor for a function, which toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics 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 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] message_thread_id_ Message thread identifier of the forum topic.
   * \param[in] is_closed_ Pass true to close the topic; pass false to reopen it.
   */
  toggleForumTopicIsClosed(int53 chat_id_, int53 message_thread_id_, bool is_closed_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -949712141;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Changes the pinned state of a forum topic; requires can_manage_topics 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:
  /// Chat identifier.
  int53 chat_id_;
  /// Message thread identifier of the forum topic.
  int53 message_thread_id_;
  /// Pass true to pin the topic; pass false to unpin it.
  bool is_pinned_;

  /**
   * Default constructor for a function, which changes the pinned state of a forum topic; requires can_manage_topics 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 forum topic; requires can_manage_topics 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] message_thread_id_ Message thread identifier of the forum topic.
   * \param[in] is_pinned_ Pass true to pin the topic; pass false to unpin it.
   */
  toggleForumTopicIsPinned(int53 chat_id_, int53 message_thread_id_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1181543092;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics 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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Pass true to hide and close the General topic; pass false to unhide it.
  bool is_hidden_;

  /**
   * Default constructor for a function, which toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics 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 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Toggles whether a gift is shown on the current user's profile page.
 *
 * 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:
  /// Identifier of the user that sent the gift.
  int53 sender_user_id_;
  /// Identifier of the message with the gift in the chat with the user.
  int53 message_id_;
  /// Pass true to display the gift on the user's profile page; pass false to remove it from the profile page.
  bool is_saved_;

  /**
   * Default constructor for a function, which toggles whether a gift is shown on the current user's profile page.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGiftIsSaved();

  /**
   * Creates a function, which toggles whether a gift is shown on the current user's profile page.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sender_user_id_ Identifier of the user that sent the gift.
   * \param[in] message_id_ Identifier of the message with the gift in the chat with the user.
   * \param[in] is_saved_ Pass true to display the gift on the user's profile page; pass false to remove it from the profile page.
   */
  toggleGiftIsSaved(int53 sender_user_id_, int53 message_id_, bool is_saved_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1849495165;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Toggles whether the current user will receive a notification when the group call starts; scheduled group calls only.
 *
 * Returns object_ptr<Ok>.
 */
class toggleGroupCallEnabledStartNotification final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Group call identifier.
  int32 group_call_id_;
  /// New value of the enabled_start_notification setting.
  bool enabled_start_notification_;

  /**
   * Default constructor for a function, which toggles whether the current user will receive a notification when the group call starts; scheduled group calls only.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGroupCallEnabledStartNotification();

  /**
   * Creates a function, which toggles whether the current user will receive a notification when the group call starts; scheduled group calls 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.
   */
  toggleGroupCallEnabledStartNotification(int32 group_call_id_, bool enabled_start_notification_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 707839826;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Group call identifier.
  int32 group_call_id_;
  /// Pass true if the current user's video is enabled.
  bool is_my_video_enabled_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Group call identifier.
  int32 group_call_id_;
  /// Pass true if the current user's video is paused.
  bool is_my_video_paused_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Toggles whether new participants of a group call can be unmuted only by administrators of the group call. Requires groupCall.can_toggle_mute_new_participants group call flag.
 *
 * Returns object_ptr<Ok>.
 */
class toggleGroupCallMuteNewParticipants final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Group call identifier.
  int32 group_call_id_;
  /// New value of the mute_new_participants setting.
  bool mute_new_participants_;

  /**
   * Default constructor for a function, which toggles whether new participants of a group call can be unmuted only by administrators of the group call. Requires groupCall.can_toggle_mute_new_participants group call flag.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGroupCallMuteNewParticipants();

  /**
   * Creates a function, which toggles whether new participants of a group call can be unmuted only by administrators of the group call. Requires groupCall.can_toggle_mute_new_participants group call flag.
   *
   * 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.
   */
  toggleGroupCallMuteNewParticipants(int32 group_call_id_, bool mute_new_participants_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 284082626;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageSender;

class ok;

/**
 * Toggles whether a group call participant hand is rased.
 *
 * 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:
  /// Group call identifier.
  int32 group_call_id_;
  /// Participant identifier.
  object_ptr<MessageSender> participant_id_;
  /// Pass true if the user's hand needs to be raised. Only self hand can be raised. Requires groupCall.can_be_managed group call flag to lower other's hand.
  bool is_hand_raised_;

  /**
   * Default constructor for a function, which toggles whether a group call participant hand is rased.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGroupCallParticipantIsHandRaised();

  /**
   * Creates a function, which toggles whether a group call participant hand is rased.
   *
   * 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 group call flag 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class MessageSender;

class ok;

/**
 * Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves.
 *
 * 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:
  /// Group call identifier.
  int32 group_call_id_;
  /// Participant identifier.
  object_ptr<MessageSender> participant_id_;
  /// Pass true to mute the user; pass false to unmute them.
  bool is_muted_;

  /**
   * Default constructor for a function, which toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves.
   *
   * 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.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Pauses or unpauses screen sharing in a joined group call.
 *
 * 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:
  /// Group call identifier.
  int32 group_call_id_;
  /// Pass true to pause screen sharing; pass false to unpause it.
  bool is_paused_;

  /**
   * Default constructor for a function, which pauses or unpauses screen sharing in a joined group call.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGroupCallScreenSharingIsPaused();

  /**
   * Creates a function, which pauses or unpauses screen sharing in a joined group call.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Pass true to enable sponsored messages for the current user; false to disable them.
  bool has_sponsored_messages_enabled_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Changes whether the paid message reaction of the user to a message is anonymous. The message must have paid reaction added by the user.
 *
 * Returns object_ptr<Ok>.
 */
class togglePaidMessageReactionIsAnonymous final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// Pass true to make paid reaction of the user on the message anonymous; pass false to make the user's profile visible among top reactors.
  bool is_anonymous_;

  /**
   * Default constructor for a function, which changes whether the paid message reaction of the user to a message is anonymous. The message must have paid reaction added by the user.
   *
   * Returns object_ptr<Ok>.
   */
  togglePaidMessageReactionIsAnonymous();

  /**
   * Creates a function, which changes whether the paid message reaction of the user to a message is anonymous. The message must have paid reaction added by the 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] is_anonymous_ Pass true to make paid reaction of the user on the message anonymous; pass false to make the user's profile visible among top reactors.
   */
  togglePaidMessageReactionIsAnonymous(int53 chat_id_, int53 message_id_, bool is_anonymous_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1753949423;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of Saved Messages topic to pin or unpin.
  int53 saved_messages_topic_id_;
  /// Pass true to pin the topic; pass false to unpin it.
  bool is_pinned_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Session identifier.
  int64 session_id_;
  /// Pass true to allow accepting incoming calls by the session; pass false otherwise.
  bool can_accept_calls_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Session identifier.
  int64 session_id_;
  /// Pass true to allow accepting secret chats by the session; pass false otherwise.
  bool can_accept_secret_chats_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat that posted the story.
  int53 story_sender_chat_id_;
  /// Identifier of the story.
  int32 story_id_;
  /// Pass true to make the story accessible after expiration; pass false to make it private.
  bool is_posted_to_chat_page_;

  /**
   * 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_sender_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_sender_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 = -300987649;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of the channel.
  int53 supergroup_id_;
  /// The new value of can_have_sponsored_messages.
  bool can_have_sponsored_messages_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of the supergroup, which isn't a broadcast group.
  int53 supergroup_id_;
  /// The new value of has_aggressive_anti_spam_enabled.
  bool has_aggressive_anti_spam_enabled_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup.
  int53 supergroup_id_;
  /// New value of has_hidden_members.
  bool has_hidden_members_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of the supergroup.
  int53 supergroup_id_;
  /// The new value of is_all_history_available.
  bool is_all_history_available_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup.
  int53 supergroup_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup.
  int53 supergroup_id_;
  /// New value of is_forum.
  bool is_forum_;

  /**
   * 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.
   */
  toggleSupergroupIsForum(int53 supergroup_id_, bool is_forum_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1771071990;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup that isn't a broadcast group.
  int53 supergroup_id_;
  /// New value of join_by_request.
  bool join_by_request_;

  /**
   * 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.
   * \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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup that isn't a broadcast group.
  int53 supergroup_id_;
  /// New value of join_to_send_messages.
  bool join_to_send_messages_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the channel.
  int53 supergroup_id_;
  /// New value of sign_messages.
  bool sign_messages_;
  /// New value of show_message_sender.
  bool show_message_sender_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  /// The username to change.
  string username_;
  /// Pass true to activate the username; pass false to disable it.
  bool is_active_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The username to change.
  string username_;
  /// Pass true to activate the username; pass false to disable it.
  bool is_active_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Changes the owner of a chat; requires owner privileges in the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats.
 *
 * 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:
  /// Chat identifier.
  int53 chat_id_;
  /// 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_;
  /// The 2-step verification password of the current user.
  string password_;

  /**
   * Default constructor for a function, which changes the owner of a chat; requires owner privileges in the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats.
   *
   * Returns object_ptr<Ok>.
   */
  transferChatOwnership();

  /**
   * Creates a function, which changes the owner of a chat; requires owner privileges in the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats.
   *
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class formattedText;

/**
 * Extracts text or caption of the given message and translates it to the given language. 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:
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  /// Identifier of the message.
  int53 message_id_;
  /// 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;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_;

  /**
   * Default constructor for a function, which extracts text or caption of the given message and translates it to the given language. 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. 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. 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;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;.
   */
  translateMessageText(int53 chat_id_, int53 message_id_, string const &to_language_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1405427410;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<formattedText>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class formattedText;

/**
 * Translates a text to the given language. 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:
  /// Text to translate.
  object_ptr<formattedText> text_;
  /// 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;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_;

  /**
   * Default constructor for a function, which translates a text to the given language. 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. 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;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;.
   */
  translateText(object_ptr<formattedText> &&text_, string const &to_language_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 623011058;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<formattedText>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

class ok;

/**
 * Removes all pinned messages from a forum topic; requires can_pin_messages member right in the supergroup.
 *
 * Returns object_ptr<Ok>.
 */
class unpinAllMessageThreadMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Message thread identifier in which messages will be unpinned.
  int53 message_thread_id_;

  /**
   * Default constructor for a function, which removes all pinned messages from a forum topic; requires can_pin_messages member right in the supergroup.
   *
   * Returns object_ptr<Ok>.
   */
  unpinAllMessageThreadMessages();

  /**
   * Creates a function, which removes all pinned messages from a forum topic; requires can_pin_messages member right in the supergroup.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] message_thread_id_ Message thread identifier in which messages will be unpinned.
   */
  unpinAllMessageThreadMessages(int53 chat_id_, int53 message_thread_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1211719936;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat.
  int53 chat_id_;
  /// Identifier of the removed pinned message.
  int53 message_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifier of the chat to upgrade.
  int53 chat_id_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Sticker file owner; ignored for regular users.
  int53 user_id_;
  /// Sticker format.
  object_ptr<StickerFormat> sticker_format_;
  /// 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_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The invoice.
  object_ptr<InputInvoice> input_invoice_;
  /// The order information, provided by the user; pass null if empty.
  object_ptr<orderInfo> order_info_;
  /// Pass true to save the order information.
  bool allow_save_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Chat identifier.
  int53 chat_id_;
  /// The identifiers of the messages being viewed.
  array<int53> message_ids_;
  /// Source of the message view; pass null to guess the source based on chat open state.
  object_ptr<MessageSource> source_;
  /// Pass true to mark as read the specified messages even the chat is closed.
  bool force_read_;

  /**
   * 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 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The viewed premium feature.
  object_ptr<PremiumFeature> feature_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// Identifiers of viewed trending sticker sets.
  array<int64> sticker_set_ids_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

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:
  /// The identifier of the generation process.
  int64 generation_id_;
  /// The offset from which to write the data to the file.
  int53 offset_;
  /// The data to write.
  bytes data_;

  /**
   * 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>;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;
};

}  // namespace td_api
}  // namespace td
