15 enum class State : std::uint8_t {
28 static std::optional<State>
StringToState(
const std::string& str)
noexcept {
49 nl::json json = nl::json::object();
#define OBJECT_SERIALIZE_FIELD_PTR(json, json_field, field)
#define OBJECT_DESERIALIZE_FIELD_PTR(json, json_field, field, optional)
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
#define OBJECT_DESERIALIZE_FIELD_ENUM(json, enum_name, json_field, field, default_value, optional)
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
#define OBJECT_SERIALIZE_FIELD_ENUM(json, enum_name, json_field, field)
Contains information about a suggested post. https://core.telegram.org/bots/api#suggestedpostinfo.
State state
State of the suggested post. Currently, it can be one of “pending”, “approved”, “declined”.
Ptr< SuggestedPostPrice > price
Optional. Proposed price of the post. If the field is omitted, then the post is unpaid.
static std::optional< State > StringToState(const std::string &str) noexcept
Converts string to an enum State.
nl::json toJson() const
Serializes this object to JSON.
SuggestedPostInfo(const nl::json &json)
State
Enum of possible types of State.
static std::optional< std::string > StateToString(const State type) noexcept
Converts enum State to a string.
void fromJson(const nl::json &json)
Deserializes this object from JSON.
SuggestedPostInfo()=default
std::time_t sendDate
Optional. Proposed send date of the post. If the field is omitted, then the post can be published at ...