File indexing completed on 2024-05-12 05:22:25
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Daniel Vrátil <dvratil@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-only 0005 * SPDX-License-Identifier: LGPL-3.0-only 0006 * SPDX-License-Identifier: LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #pragma once 0010 0011 #include <QSharedDataPointer> 0012 #include "kgapipeople_export.h" 0013 0014 #include <QString> 0015 0016 #include <optional> 0017 0018 class QJsonObject; 0019 class QJsonValue; 0020 0021 namespace KGAPI2::People 0022 { 0023 class FieldMetadata; 0024 0025 /** 0026 * **DEPRECATED**: No data will be returned A person's bragging rights. 0027 * 0028 * @see https://developers.google.com/people/api/rest/v1/people#braggingrights 0029 * @since 5.23.0 0030 **/ 0031 class KGAPIPEOPLE_EXPORT BraggingRights 0032 { 0033 public: 0034 /** Constructs a new BraggingRights **/ 0035 explicit BraggingRights(); 0036 BraggingRights(const BraggingRights &); 0037 BraggingRights(BraggingRights &&) noexcept; 0038 BraggingRights &operator=(const BraggingRights &); 0039 BraggingRights &operator=(BraggingRights &&) noexcept; 0040 /** Destructor. **/ 0041 ~BraggingRights(); 0042 0043 bool operator==(const BraggingRights &) const; 0044 bool operator!=(const BraggingRights &) const; 0045 0046 [[nodiscard]] static BraggingRights fromJSON(const QJsonObject &); 0047 [[nodiscard]] QJsonValue toJSON() const; 0048 0049 /** Metadata about the bragging rights. **/ 0050 [[nodiscard]] FieldMetadata metadata() const; 0051 /** Sets value of the metadata property. **/ 0052 void setMetadata(const FieldMetadata &value); 0053 0054 /** The bragging rights; for example, `climbed mount everest`. **/ 0055 [[nodiscard]] QString value() const; 0056 /** Sets value of the value property. **/ 0057 void setValue(const QString &value); 0058 0059 private: 0060 class Private; 0061 QSharedDataPointer<Private> d; 0062 }; // BraggingRights 0063 0064 } // namespace KGAPI2::People