22 nl::json json = nl::json::object();
32 void _fromJson(
const nl::json& json) {
#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.
The background is a gradient fill. https://core.telegram.org/bots/api#backgroundfillgradient.
BackgroundFillGradient(const nl::json &json)
std::int32_t bottomColor
Bottom color of the gradient in the RGB24 format.
nl::json toJson() const override
void fromJson(const nl::json &json) override
std::int32_t topColor
Top color of the gradient in the RGB24 format.
std::int32_t rotationAngle
Clockwise rotation angle of the background fill in degrees; 0-359.
This object describes the way a background is filled based on the selected colors....
virtual nl::json toJson() const
virtual ~BackgroundFill()=default
std::string type
Type of the background fill, one of "solid", "gradient", "freeform_gradient".
BackgroundFill(const nl::json &json)
virtual void fromJson(const nl::json &json)
The background is filled using the selected solid color. https://core.telegram.org/bots/api#backgroun...
std::int32_t color
The color of the background fill in the RGB24 format.
void fromJson(const nl::json &json) override
BackgroundFillSolid(const nl::json &json)
nl::json toJson() const override