27 nl::json json = nl::json::object();
37 void _fromJson(
const nl::json& json) {
#define OBJECT_SERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field)
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
#define OBJECT_DESERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field, optional)
Represents the content of a contact message to be sent as the result of an inline query....
std::string lastName
Optional. Contact's last name.
std::string firstName
Contact's first name.
InputContactMessageContent(const nl::json &json)
InputContactMessageContent()
nl::json toJson() const override
std::string phoneNumber
Contact's phone number.
void fromJson(const nl::json &json) override
std::string vcard
Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes https://en....
Represents the content of a invoice message to be sent as the result of an inline query....
std::string payload
Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your intern...
bool isFlexible
Optional. Pass True if the final price depends on the shipping method.
bool sendEmailToProvider
Optional. Pass True if the user's email address should be sent to provider.
bool sendPhoneNumberToProvider
Optional. Pass True if the user's phone number should be sent to provider.
InputInvoiceMessageContent()
InputInvoiceMessageContent(const nl::json &json)
bool needName
Optional. Pass True if you require the user's full name to complete the order.
std::string currency
Three-letter ISO 4217 currency code, see more on currencies
bool needPhoneNumber
Optional. Pass True if you require the user's phone number to complete the order.
std::int64_t photoSize
Optional. Photo size in bytes.
bool needShippingAddress
Optional. Pass True if you require the user's shipping address to complete the order.
std::int32_t photoWidth
Optional. Photo width.
std::string providerData
Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment ...
bool needEmail
Optional. Pass True if you require the user's email address to complete the order.
std::string photoUrl
Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image ...
void fromJson(const nl::json &json) override
std::int32_t photoHeight
Optional. Photo height.
nl::json toJson() const override
std::vector< Ptr< LabeledPrice > > prices
Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount,...
std::int32_t maxTipAmount
Optional. The maximum accepted amount for tips in the smallest units of the currency (integer,...
std::string title
Product name, 1-32 characters.
std::string description
Product description, 1-255 characters.
std::string providerToken
Payment provider token, obtained via @BotFather.
std::vector< std::int32_t > suggestedTipAmounts
Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (...
Represents the content of a location message to be sent as the result of an inline query....
float horizontalAccuracy
Optional. The radius of uncertainty for the location, measured in meters; 0-1500.
std::int32_t proximityAlertRadius
Optional. For live locations, a maximum distance for proximity alerts about approaching another chat ...
float latitude
Latitude of the location in degrees.
float longitude
Longitude of the location in degrees.
InputLocationMessageContent(const nl::json &json)
nl::json toJson() const override
std::int32_t heading
Optional. For live locations, a direction in which the user is moving, in degrees....
InputLocationMessageContent()
void fromJson(const nl::json &json) override
Base class of all inline query results This object represents the content of a message to be sent as ...
virtual void fromJson(const nl::json &json)
InputMessageContent()=default
virtual ~InputMessageContent()=default
InputMessageContent(const nl::json &json)
std::string type
Type of this content.
virtual nl::json toJson() const
Represents the content of a text message to be sent as the result of an inline query....
InputTextMessageContent(const nl::json &json)
bool disableWebPagePreview
Optional. Disables link previews for links in the sent message.
std::string messageText
Text of the message to be sent, 1-4096 characters.
std::vector< Ptr< MessageEntity > > entities
Optional. List of special entities that appear in message text, which can be specified instead of par...
nl::json toJson() const override
InputTextMessageContent()
void fromJson(const nl::json &json) override
std::string parseMode
Optional. Mode for parsing entities in the message text. See formatting options for more details.
Represents the content of a venue message to be sent as the result of an inline query....
void fromJson(const nl::json &json) override
float latitude
Latitude of the venue in degrees.
nl::json toJson() const override
std::string googlePlaceId
Optional. Google Places identifier of the venue.
InputVenueMessageContent(const nl::json &json)
std::string address
Address of the venue.
std::string title
Name of the venue.
float longitude
Longitude of the venue in degrees.
std::string foursquareId
Optional. Foursquare identifier of the venue, if known.
std::string foursquareType
Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”,...
std::string googlePlaceType
Optional. Google Places type of the venue. (See supported types.) https://developers....
InputVenueMessageContent()