File indexing completed on 2024-05-05 17:00:21
0001 /* 0002 SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "librocketchatrestapi-qt_export.h" 0010 #include <QDebug> 0011 #include <QJsonDocument> 0012 #include <QString> 0013 #include <QStringList> 0014 namespace RocketChatRestApi 0015 { 0016 struct LIBROCKETCHATRESTAPI_QT_EXPORT CreateUpdateUserInfo { 0017 enum InfoType { 0018 Create = 0, 0019 Update, 0020 }; 0021 0022 QStringList mRoles; 0023 QString mUserId; 0024 QString mEmail; 0025 QString mName; 0026 QString mUserName; 0027 QString mPassword; 0028 QString mStatusText; 0029 QString mBio; 0030 QString mNickName; 0031 InfoType mTypeInfo = Create; 0032 bool mJoinDefaultChannels = false; 0033 bool mRequirePasswordChange = false; 0034 bool mSendWelcomeEmail = false; 0035 bool mSetRandomPassword = false; 0036 bool mVerified = false; 0037 [[nodiscard]] bool isValid() const; 0038 [[nodiscard]] QJsonDocument json() const; 0039 }; 0040 0041 struct LIBROCKETCHATRESTAPI_QT_EXPORT UpdateUserInfo : public CreateUpdateUserInfo { 0042 UpdateUserInfo() 0043 : CreateUpdateUserInfo() 0044 { 0045 mTypeInfo = Update; 0046 } 0047 }; 0048 } 0049 Q_DECLARE_TYPEINFO(RocketChatRestApi::CreateUpdateUserInfo, Q_MOVABLE_TYPE); 0050 LIBROCKETCHATRESTAPI_QT_EXPORT QDebug operator<<(QDebug d, const RocketChatRestApi::CreateUpdateUserInfo &t);