From aacc4bcb4a487871daae6717f77605aaba444341 Mon Sep 17 00:00:00 2001 From: Marc Deop Date: Sat, 2 Mar 2019 12:26:57 +0100 Subject: style: apply .clang-format to all .cpp and .h files --- lib/identity/definitions/request_email_validation.cpp | 3 +-- lib/identity/definitions/request_email_validation.h | 16 +++++++--------- lib/identity/definitions/request_msisdn_validation.cpp | 3 +-- lib/identity/definitions/request_msisdn_validation.h | 16 +++++++--------- lib/identity/definitions/sid.cpp | 7 ++----- lib/identity/definitions/sid.h | 18 +++++++----------- 6 files changed, 25 insertions(+), 38 deletions(-) (limited to 'lib/identity/definitions') diff --git a/lib/identity/definitions/request_email_validation.cpp b/lib/identity/definitions/request_email_validation.cpp index 47463a8b..a2d0a707 100644 --- a/lib/identity/definitions/request_email_validation.cpp +++ b/lib/identity/definitions/request_email_validation.cpp @@ -16,11 +16,10 @@ void JsonObjectConverter::dumpTo( } void JsonObjectConverter::fillFrom( - const QJsonObject& jo, RequestEmailValidation& result) + const QJsonObject& jo, RequestEmailValidation& result) { fromJson(jo.value("client_secret"_ls), result.clientSecret); fromJson(jo.value("email"_ls), result.email); fromJson(jo.value("send_attempt"_ls), result.sendAttempt); fromJson(jo.value("next_link"_ls), result.nextLink); } - diff --git a/lib/identity/definitions/request_email_validation.h b/lib/identity/definitions/request_email_validation.h index eb7d8ed6..51369039 100644 --- a/lib/identity/definitions/request_email_validation.h +++ b/lib/identity/definitions/request_email_validation.h @@ -8,16 +8,14 @@ #include "converters.h" -namespace QMatrixClient -{ +namespace QMatrixClient { // Data structures - struct RequestEmailValidation - { + struct RequestEmailValidation { /// A unique string generated by the client, and used to identify the /// validation attempt. It must be a string consisting of the characters - /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it - /// must not be empty. + /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and + /// it must not be empty. QString clientSecret; /// The email address to validate. QString email; @@ -33,10 +31,10 @@ namespace QMatrixClient /// server will redirect the user to this URL. QString nextLink; }; - template <> struct JsonObjectConverter - { + template <> struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const RequestEmailValidation& pod); - static void fillFrom(const QJsonObject& jo, RequestEmailValidation& pod); + static void fillFrom(const QJsonObject& jo, + RequestEmailValidation& pod); }; } // namespace QMatrixClient diff --git a/lib/identity/definitions/request_msisdn_validation.cpp b/lib/identity/definitions/request_msisdn_validation.cpp index a123d326..9facbf7e 100644 --- a/lib/identity/definitions/request_msisdn_validation.cpp +++ b/lib/identity/definitions/request_msisdn_validation.cpp @@ -17,7 +17,7 @@ void JsonObjectConverter::dumpTo( } void JsonObjectConverter::fillFrom( - const QJsonObject& jo, RequestMsisdnValidation& result) + const QJsonObject& jo, RequestMsisdnValidation& result) { fromJson(jo.value("client_secret"_ls), result.clientSecret); fromJson(jo.value("country"_ls), result.country); @@ -25,4 +25,3 @@ void JsonObjectConverter::fillFrom( fromJson(jo.value("send_attempt"_ls), result.sendAttempt); fromJson(jo.value("next_link"_ls), result.nextLink); } - diff --git a/lib/identity/definitions/request_msisdn_validation.h b/lib/identity/definitions/request_msisdn_validation.h index b48ed6d5..c4fe479e 100644 --- a/lib/identity/definitions/request_msisdn_validation.h +++ b/lib/identity/definitions/request_msisdn_validation.h @@ -8,16 +8,14 @@ #include "converters.h" -namespace QMatrixClient -{ +namespace QMatrixClient { // Data structures - struct RequestMsisdnValidation - { + struct RequestMsisdnValidation { /// A unique string generated by the client, and used to identify the /// validation attempt. It must be a string consisting of the characters - /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it - /// must not be empty. + /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and + /// it must not be empty. QString clientSecret; /// The two-letter uppercase ISO country code that the number in /// ``phone_number`` should be parsed as if it were dialled from. @@ -36,10 +34,10 @@ namespace QMatrixClient /// server will redirect the user to this URL. QString nextLink; }; - template <> struct JsonObjectConverter - { + template <> struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const RequestMsisdnValidation& pod); - static void fillFrom(const QJsonObject& jo, RequestMsisdnValidation& pod); + static void fillFrom(const QJsonObject& jo, + RequestMsisdnValidation& pod); }; } // namespace QMatrixClient diff --git a/lib/identity/definitions/sid.cpp b/lib/identity/definitions/sid.cpp index 1ba4b3b5..cc6973f2 100644 --- a/lib/identity/definitions/sid.cpp +++ b/lib/identity/definitions/sid.cpp @@ -6,15 +6,12 @@ using namespace QMatrixClient; -void JsonObjectConverter::dumpTo( - QJsonObject& jo, const Sid& pod) +void JsonObjectConverter::dumpTo(QJsonObject& jo, const Sid& pod) { addParam<>(jo, QStringLiteral("sid"), pod.sid); } -void JsonObjectConverter::fillFrom( - const QJsonObject& jo, Sid& result) +void JsonObjectConverter::fillFrom(const QJsonObject& jo, Sid& result) { fromJson(jo.value("sid"_ls), result.sid); } - diff --git a/lib/identity/definitions/sid.h b/lib/identity/definitions/sid.h index ac8c4130..85462b46 100644 --- a/lib/identity/definitions/sid.h +++ b/lib/identity/definitions/sid.h @@ -6,21 +6,17 @@ #include "converters.h" - -namespace QMatrixClient -{ +namespace QMatrixClient { // Data structures - struct Sid - { - /// The session ID. Session IDs are opaque strings generated by the identity - /// server. They must consist entirely of the characters - /// ``[0-9a-zA-Z.=_-]``. Their length must not exceed 255 characters and they - /// must not be empty. + struct Sid { + /// The session ID. Session IDs are opaque strings generated by the + /// identity server. They must consist entirely of the characters + /// ``[0-9a-zA-Z.=_-]``. Their length must not exceed 255 characters and + /// they must not be empty. QString sid; }; - template <> struct JsonObjectConverter - { + template <> struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const Sid& pod); static void fillFrom(const QJsonObject& jo, Sid& pod); }; -- cgit v1.2.3 From 27ca32a1e5a56e09b9cc1d94224d2831004dcf3d Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 7 Jul 2019 19:32:34 +0900 Subject: Namespace: QMatrixClient -> Quotient (with back comp alias) --- lib/identity/definitions/request_email_validation.cpp | 2 +- lib/identity/definitions/request_email_validation.h | 4 ++-- lib/identity/definitions/request_msisdn_validation.cpp | 2 +- lib/identity/definitions/request_msisdn_validation.h | 4 ++-- lib/identity/definitions/sid.cpp | 2 +- lib/identity/definitions/sid.h | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/identity/definitions') diff --git a/lib/identity/definitions/request_email_validation.cpp b/lib/identity/definitions/request_email_validation.cpp index 131b9488..22cb0072 100644 --- a/lib/identity/definitions/request_email_validation.cpp +++ b/lib/identity/definitions/request_email_validation.cpp @@ -4,7 +4,7 @@ #include "request_email_validation.h" -using namespace QMatrixClient; +using namespace Quotient; void JsonObjectConverter::dumpTo( QJsonObject& jo, const RequestEmailValidation& pod) diff --git a/lib/identity/definitions/request_email_validation.h b/lib/identity/definitions/request_email_validation.h index 2496d7f5..99487073 100644 --- a/lib/identity/definitions/request_email_validation.h +++ b/lib/identity/definitions/request_email_validation.h @@ -6,7 +6,7 @@ #include "converters.h" -namespace QMatrixClient +namespace Quotient { // Data structures @@ -39,4 +39,4 @@ struct JsonObjectConverter static void fillFrom(const QJsonObject& jo, RequestEmailValidation& pod); }; -} // namespace QMatrixClient +} // namespace Quotient diff --git a/lib/identity/definitions/request_msisdn_validation.cpp b/lib/identity/definitions/request_msisdn_validation.cpp index 0087d202..6024bf61 100644 --- a/lib/identity/definitions/request_msisdn_validation.cpp +++ b/lib/identity/definitions/request_msisdn_validation.cpp @@ -4,7 +4,7 @@ #include "request_msisdn_validation.h" -using namespace QMatrixClient; +using namespace Quotient; void JsonObjectConverter::dumpTo( QJsonObject& jo, const RequestMsisdnValidation& pod) diff --git a/lib/identity/definitions/request_msisdn_validation.h b/lib/identity/definitions/request_msisdn_validation.h index f8060cfc..ecccf567 100644 --- a/lib/identity/definitions/request_msisdn_validation.h +++ b/lib/identity/definitions/request_msisdn_validation.h @@ -6,7 +6,7 @@ #include "converters.h" -namespace QMatrixClient +namespace Quotient { // Data structures @@ -43,4 +43,4 @@ struct JsonObjectConverter static void fillFrom(const QJsonObject& jo, RequestMsisdnValidation& pod); }; -} // namespace QMatrixClient +} // namespace Quotient diff --git a/lib/identity/definitions/sid.cpp b/lib/identity/definitions/sid.cpp index cc6973f2..99fe9b59 100644 --- a/lib/identity/definitions/sid.cpp +++ b/lib/identity/definitions/sid.cpp @@ -4,7 +4,7 @@ #include "sid.h" -using namespace QMatrixClient; +using namespace Quotient; void JsonObjectConverter::dumpTo(QJsonObject& jo, const Sid& pod) { diff --git a/lib/identity/definitions/sid.h b/lib/identity/definitions/sid.h index 752d62bb..0f7ce58a 100644 --- a/lib/identity/definitions/sid.h +++ b/lib/identity/definitions/sid.h @@ -6,7 +6,7 @@ #include "converters.h" -namespace QMatrixClient +namespace Quotient { // Data structures @@ -27,4 +27,4 @@ struct JsonObjectConverter static void fillFrom(const QJsonObject& jo, Sid& pod); }; -} // namespace QMatrixClient +} // namespace Quotient -- cgit v1.2.3 From 7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 17 Apr 2020 07:42:13 +0200 Subject: Regenerate API files using new GTAD and refreshed templates No functional changes. --- .../definitions/request_email_validation.h | 37 ++++++++++--------- .../definitions/request_msisdn_validation.h | 43 +++++++++++----------- lib/identity/definitions/sid.h | 17 ++++----- 3 files changed, 48 insertions(+), 49 deletions(-) (limited to 'lib/identity/definitions') diff --git a/lib/identity/definitions/request_email_validation.h b/lib/identity/definitions/request_email_validation.h index 99487073..32c6eaaf 100644 --- a/lib/identity/definitions/request_email_validation.h +++ b/lib/identity/definitions/request_email_validation.h @@ -6,35 +6,36 @@ #include "converters.h" -namespace Quotient -{ +namespace Quotient { // Data structures -struct RequestEmailValidation -{ - /// A unique string generated by the client, and used to identify - /// thevalidation attempt. It must be a string consisting of the - /// characters``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters - /// and itmust not be empty. +struct RequestEmailValidation { + /// A unique string generated by the client, and used to identify the + /// validation attempt. It must be a string consisting of the characters + /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it + /// must not be empty. QString clientSecret; + /// The email address to validate. QString email; - /// The server will only send an email if the ``send_attempt``is a number - /// greater than the most recent one which it has seen,scoped to that - /// ``email`` + ``client_secret`` pair. This is toavoid repeatedly sending - /// the same email in the case of requestretries between the POSTing user - /// and the identity server.The client should increment this value if they - /// desire a newemail (e.g. a reminder) to be sent. + + /// The server will only send an email if the ``send_attempt`` + /// is a number greater than the most recent one which it has seen, + /// scoped to that ``email`` + ``client_secret`` pair. This is to + /// avoid repeatedly sending the same email in the case of request + /// retries between the POSTing user and the identity server. + /// The client should increment this value if they desire a new + /// email (e.g. a reminder) to be sent. int sendAttempt; - /// Optional. When the validation is completed, the identityserver will - /// redirect the user to this URL. + + /// Optional. When the validation is completed, the identity + /// server will redirect the user to this URL. QString nextLink; }; template <> -struct JsonObjectConverter -{ +struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const RequestEmailValidation& pod); static void fillFrom(const QJsonObject& jo, RequestEmailValidation& pod); }; diff --git a/lib/identity/definitions/request_msisdn_validation.h b/lib/identity/definitions/request_msisdn_validation.h index ecccf567..90aed7b8 100644 --- a/lib/identity/definitions/request_msisdn_validation.h +++ b/lib/identity/definitions/request_msisdn_validation.h @@ -6,39 +6,40 @@ #include "converters.h" -namespace Quotient -{ +namespace Quotient { // Data structures -struct RequestMsisdnValidation -{ - /// A unique string generated by the client, and used to identify - /// thevalidation attempt. It must be a string consisting of the - /// characters``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters - /// and itmust not be empty. +struct RequestMsisdnValidation { + /// A unique string generated by the client, and used to identify the + /// validation attempt. It must be a string consisting of the characters + /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it + /// must not be empty. QString clientSecret; - /// The two-letter uppercase ISO country code that the number - /// in``phone_number`` should be parsed as if it were dialled from. + + /// The two-letter uppercase ISO country code that the number in + /// ``phone_number`` should be parsed as if it were dialled from. QString country; + /// The phone number to validate. QString phoneNumber; - /// The server will only send an SMS if the ``send_attempt`` is anumber - /// greater than the most recent one which it has seen,scoped to that - /// ``country`` + ``phone_number`` + ``client_secret``triple. This is to - /// avoid repeatedly sending the same SMS inthe case of request retries - /// between the POSTing user and theidentity server. The client should - /// increment this value ifthey desire a new SMS (e.g. a reminder) to be - /// sent. + + /// The server will only send an SMS if the ``send_attempt`` is a + /// number greater than the most recent one which it has seen, + /// scoped to that ``country`` + ``phone_number`` + ``client_secret`` + /// triple. This is to avoid repeatedly sending the same SMS in + /// the case of request retries between the POSTing user and the + /// identity server. The client should increment this value if + /// they desire a new SMS (e.g. a reminder) to be sent. int sendAttempt; - /// Optional. When the validation is completed, the identityserver will - /// redirect the user to this URL. + + /// Optional. When the validation is completed, the identity + /// server will redirect the user to this URL. QString nextLink; }; template <> -struct JsonObjectConverter -{ +struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const RequestMsisdnValidation& pod); static void fillFrom(const QJsonObject& jo, RequestMsisdnValidation& pod); }; diff --git a/lib/identity/definitions/sid.h b/lib/identity/definitions/sid.h index 0f7ce58a..981826f6 100644 --- a/lib/identity/definitions/sid.h +++ b/lib/identity/definitions/sid.h @@ -6,23 +6,20 @@ #include "converters.h" -namespace Quotient -{ +namespace Quotient { // Data structures -struct Sid -{ - /// The session ID. Session IDs are opaque strings generated by the - /// identityserver. They must consist entirely of the - /// characters``[0-9a-zA-Z.=_-]``. Their length must not exceed 255 - /// characters and theymust not be empty. +struct Sid { + /// The session ID. Session IDs are opaque strings generated by the identity + /// server. They must consist entirely of the characters + /// ``[0-9a-zA-Z.=_-]``. Their length must not exceed 255 characters and + /// they must not be empty. QString sid; }; template <> -struct JsonObjectConverter -{ +struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const Sid& pod); static void fillFrom(const QJsonObject& jo, Sid& pod); }; -- cgit v1.2.3 From 32729d9a7519cd2c4cddb0174b8329c6fd4a4a83 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 7 Jun 2020 19:46:40 +0200 Subject: Update generated files according to gtad/* changes --- .../definitions/request_email_validation.cpp | 25 ------------------- .../definitions/request_email_validation.h | 26 +++++++++++++------ .../definitions/request_msisdn_validation.cpp | 27 -------------------- .../definitions/request_msisdn_validation.h | 29 ++++++++++++++++------ lib/identity/definitions/sid.cpp | 17 ------------- lib/identity/definitions/sid.h | 27 -------------------- 6 files changed, 40 insertions(+), 111 deletions(-) delete mode 100644 lib/identity/definitions/request_email_validation.cpp delete mode 100644 lib/identity/definitions/request_msisdn_validation.cpp delete mode 100644 lib/identity/definitions/sid.cpp delete mode 100644 lib/identity/definitions/sid.h (limited to 'lib/identity/definitions') diff --git a/lib/identity/definitions/request_email_validation.cpp b/lib/identity/definitions/request_email_validation.cpp deleted file mode 100644 index 22cb0072..00000000 --- a/lib/identity/definitions/request_email_validation.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/****************************************************************************** - * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN - */ - -#include "request_email_validation.h" - -using namespace Quotient; - -void JsonObjectConverter::dumpTo( - QJsonObject& jo, const RequestEmailValidation& pod) -{ - addParam<>(jo, QStringLiteral("client_secret"), pod.clientSecret); - addParam<>(jo, QStringLiteral("email"), pod.email); - addParam<>(jo, QStringLiteral("send_attempt"), pod.sendAttempt); - addParam(jo, QStringLiteral("next_link"), pod.nextLink); -} - -void JsonObjectConverter::fillFrom( - const QJsonObject& jo, RequestEmailValidation& result) -{ - fromJson(jo.value("client_secret"_ls), result.clientSecret); - fromJson(jo.value("email"_ls), result.email); - fromJson(jo.value("send_attempt"_ls), result.sendAttempt); - fromJson(jo.value("next_link"_ls), result.nextLink); -} diff --git a/lib/identity/definitions/request_email_validation.h b/lib/identity/definitions/request_email_validation.h index 32c6eaaf..079da953 100644 --- a/lib/identity/definitions/request_email_validation.h +++ b/lib/identity/definitions/request_email_validation.h @@ -8,8 +8,6 @@ namespace Quotient { -// Data structures - struct RequestEmailValidation { /// A unique string generated by the client, and used to identify the /// validation attempt. It must be a string consisting of the characters @@ -26,18 +24,32 @@ struct RequestEmailValidation { /// avoid repeatedly sending the same email in the case of request /// retries between the POSTing user and the identity server. /// The client should increment this value if they desire a new - /// email (e.g. a reminder) to be sent. + /// email (e.g. a reminder) to be sent. If they do not, the server + /// should respond with success but not resend the email. int sendAttempt; - /// Optional. When the validation is completed, the identity - /// server will redirect the user to this URL. + /// Optional. When the validation is completed, the identity server will + /// redirect the user to this URL. This option is ignored when submitting + /// 3PID validation information through a POST request. QString nextLink; }; template <> struct JsonObjectConverter { - static void dumpTo(QJsonObject& jo, const RequestEmailValidation& pod); - static void fillFrom(const QJsonObject& jo, RequestEmailValidation& pod); + static void dumpTo(QJsonObject& jo, const RequestEmailValidation& pod) + { + addParam<>(jo, QStringLiteral("client_secret"), pod.clientSecret); + addParam<>(jo, QStringLiteral("email"), pod.email); + addParam<>(jo, QStringLiteral("send_attempt"), pod.sendAttempt); + addParam(jo, QStringLiteral("next_link"), pod.nextLink); + } + static void fillFrom(const QJsonObject& jo, RequestEmailValidation& pod) + { + fromJson(jo.value("client_secret"_ls), pod.clientSecret); + fromJson(jo.value("email"_ls), pod.email); + fromJson(jo.value("send_attempt"_ls), pod.sendAttempt); + fromJson(jo.value("next_link"_ls), pod.nextLink); + } }; } // namespace Quotient diff --git a/lib/identity/definitions/request_msisdn_validation.cpp b/lib/identity/definitions/request_msisdn_validation.cpp deleted file mode 100644 index 6024bf61..00000000 --- a/lib/identity/definitions/request_msisdn_validation.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/****************************************************************************** - * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN - */ - -#include "request_msisdn_validation.h" - -using namespace Quotient; - -void JsonObjectConverter::dumpTo( - QJsonObject& jo, const RequestMsisdnValidation& pod) -{ - addParam<>(jo, QStringLiteral("client_secret"), pod.clientSecret); - addParam<>(jo, QStringLiteral("country"), pod.country); - addParam<>(jo, QStringLiteral("phone_number"), pod.phoneNumber); - addParam<>(jo, QStringLiteral("send_attempt"), pod.sendAttempt); - addParam(jo, QStringLiteral("next_link"), pod.nextLink); -} - -void JsonObjectConverter::fillFrom( - const QJsonObject& jo, RequestMsisdnValidation& result) -{ - fromJson(jo.value("client_secret"_ls), result.clientSecret); - fromJson(jo.value("country"_ls), result.country); - fromJson(jo.value("phone_number"_ls), result.phoneNumber); - fromJson(jo.value("send_attempt"_ls), result.sendAttempt); - fromJson(jo.value("next_link"_ls), result.nextLink); -} diff --git a/lib/identity/definitions/request_msisdn_validation.h b/lib/identity/definitions/request_msisdn_validation.h index 90aed7b8..a29fd0de 100644 --- a/lib/identity/definitions/request_msisdn_validation.h +++ b/lib/identity/definitions/request_msisdn_validation.h @@ -8,8 +8,6 @@ namespace Quotient { -// Data structures - struct RequestMsisdnValidation { /// A unique string generated by the client, and used to identify the /// validation attempt. It must be a string consisting of the characters @@ -17,8 +15,8 @@ struct RequestMsisdnValidation { /// must not be empty. QString clientSecret; - /// The two-letter uppercase ISO country code that the number in - /// ``phone_number`` should be parsed as if it were dialled from. + /// The two-letter uppercase ISO-3166-1 alpha-2 country code that the + /// number in ``phone_number`` should be parsed as if it were dialled from. QString country; /// The phone number to validate. @@ -33,15 +31,30 @@ struct RequestMsisdnValidation { /// they desire a new SMS (e.g. a reminder) to be sent. int sendAttempt; - /// Optional. When the validation is completed, the identity - /// server will redirect the user to this URL. + /// Optional. When the validation is completed, the identity server will + /// redirect the user to this URL. This option is ignored when submitting + /// 3PID validation information through a POST request. QString nextLink; }; template <> struct JsonObjectConverter { - static void dumpTo(QJsonObject& jo, const RequestMsisdnValidation& pod); - static void fillFrom(const QJsonObject& jo, RequestMsisdnValidation& pod); + static void dumpTo(QJsonObject& jo, const RequestMsisdnValidation& pod) + { + addParam<>(jo, QStringLiteral("client_secret"), pod.clientSecret); + addParam<>(jo, QStringLiteral("country"), pod.country); + addParam<>(jo, QStringLiteral("phone_number"), pod.phoneNumber); + addParam<>(jo, QStringLiteral("send_attempt"), pod.sendAttempt); + addParam(jo, QStringLiteral("next_link"), pod.nextLink); + } + static void fillFrom(const QJsonObject& jo, RequestMsisdnValidation& pod) + { + fromJson(jo.value("client_secret"_ls), pod.clientSecret); + fromJson(jo.value("country"_ls), pod.country); + fromJson(jo.value("phone_number"_ls), pod.phoneNumber); + fromJson(jo.value("send_attempt"_ls), pod.sendAttempt); + fromJson(jo.value("next_link"_ls), pod.nextLink); + } }; } // namespace Quotient diff --git a/lib/identity/definitions/sid.cpp b/lib/identity/definitions/sid.cpp deleted file mode 100644 index 99fe9b59..00000000 --- a/lib/identity/definitions/sid.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/****************************************************************************** - * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN - */ - -#include "sid.h" - -using namespace Quotient; - -void JsonObjectConverter::dumpTo(QJsonObject& jo, const Sid& pod) -{ - addParam<>(jo, QStringLiteral("sid"), pod.sid); -} - -void JsonObjectConverter::fillFrom(const QJsonObject& jo, Sid& result) -{ - fromJson(jo.value("sid"_ls), result.sid); -} diff --git a/lib/identity/definitions/sid.h b/lib/identity/definitions/sid.h deleted file mode 100644 index 981826f6..00000000 --- a/lib/identity/definitions/sid.h +++ /dev/null @@ -1,27 +0,0 @@ -/****************************************************************************** - * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN - */ - -#pragma once - -#include "converters.h" - -namespace Quotient { - -// Data structures - -struct Sid { - /// The session ID. Session IDs are opaque strings generated by the identity - /// server. They must consist entirely of the characters - /// ``[0-9a-zA-Z.=_-]``. Their length must not exceed 255 characters and - /// they must not be empty. - QString sid; -}; - -template <> -struct JsonObjectConverter { - static void dumpTo(QJsonObject& jo, const Sid& pod); - static void fillFrom(const QJsonObject& jo, Sid& pod); -}; - -} // namespace Quotient -- cgit v1.2.3