33 nl::json json = nl::json::object();
46 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.
Represents an issue in one of the data fields that was provided by the user. The error is considered ...
PassportElementErrorDataField()
std::string message
Error message.
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
nl::json toJson() const override
Serializes this object to JSON.
std::string fieldName
Name of the data field which has the error.
PassportElementErrorDataField(const nl::json &json)
std::string dataHash
Base64-encoded data hash.
Represents an issue with a document scan. The error is considered resolved when the file with the doc...
PassportElementErrorFile()
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
PassportElementErrorFile(const nl::json &json)
std::string fileHash
Base64-encoded file hash.
std::string message
Error message.
nl::json toJson() const override
Serializes this object to JSON.
Represents an issue with a list of scans. The error is considered resolved when the list of files con...
PassportElementErrorFiles(const nl::json &json)
std::vector< std::string > fileHashes
List of base64-encoded file hashes.
std::string message
Error message.
PassportElementErrorFiles()
nl::json toJson() const override
Serializes this object to JSON.
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
Represents an issue with the front side of a document. The error is considered resolved when the file...
std::string fileHash
Base64-encoded hash of the file with the front side of the document.
PassportElementErrorFrontSide(const nl::json &json)
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
nl::json toJson() const override
Serializes this object to JSON.
PassportElementErrorFrontSide()
std::string message
Error message.
This object represents an error in the Telegram Passport element which was submitted that should be r...
virtual nl::json toJson() const
Serializes this object to JSON.
std::string type
The section of the user's Telegram Passport which has the issue, one of “passport”,...
virtual void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::string source
Error source.
PassportElementError()=default
PassportElementError(const nl::json &json)
Represents an issue with the reverse side of a document. The error is considered resolved when the fi...
nl::json toJson() const override
Serializes this object to JSON.
PassportElementErrorReverseSide()
std::string message
Error message.
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
std::string fileHash
Base64-encoded hash of the file with the front side of the document.
PassportElementErrorReverseSide(const nl::json &json)
Represents an issue with the selfie with a document. The error is considered resolved when the file w...
std::string message
Error message.
PassportElementErrorSelfie(const nl::json &json)
nl::json toJson() const override
Serializes this object to JSON.
std::string fileHash
Base64-encoded hash of the file with the selfie.
PassportElementErrorSelfie()
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
Represents an issue with one of the files that constitute the translation of a document....
PassportElementErrorTranslationFile()
std::string message
Error message.
std::string fileHash
Base64-encoded file hash.
PassportElementErrorTranslationFile(const nl::json &json)
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
nl::json toJson() const override
Serializes this object to JSON.
Represents an issue with the translated version of a document. The error is considered resolved when ...
std::string message
Error message.
nl::json toJson() const override
Serializes this object to JSON.
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
std::vector< std::string > fileHashes
List of base64-encoded file hashes.
PassportElementErrorTranslationFiles()
PassportElementErrorTranslationFiles(const nl::json &json)
Represents an issue in an unspecified place. The error is considered resolved when new data is added....
PassportElementErrorUnspecified(const nl::json &json)
nl::json toJson() const override
Serializes this object to JSON.
std::string message
Error message.
std::string elementHash
Base64-encoded element hash.
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
PassportElementErrorUnspecified()