File indexing completed on 2024-05-12 05:22:30
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 relationship interest . 0027 * 0028 * @see https://developers.google.com/people/api/rest/v1/people#relationshipinterest 0029 * @since 5.23.0 0030 **/ 0031 class KGAPIPEOPLE_EXPORT RelationshipInterest 0032 { 0033 public: 0034 /** Constructs a new RelationshipInterest **/ 0035 explicit RelationshipInterest(); 0036 RelationshipInterest(const RelationshipInterest &); 0037 RelationshipInterest(RelationshipInterest &&) noexcept; 0038 RelationshipInterest &operator=(const RelationshipInterest &); 0039 RelationshipInterest &operator=(RelationshipInterest &&) noexcept; 0040 /** Destructor. **/ 0041 ~RelationshipInterest(); 0042 0043 bool operator==(const RelationshipInterest &) const; 0044 bool operator!=(const RelationshipInterest &) const; 0045 0046 [[nodiscard]] static RelationshipInterest fromJSON(const QJsonObject &); 0047 [[nodiscard]] QJsonValue toJSON() const; 0048 0049 /** Output only. The value of the relationship interest translated and formatted in the viewer's account locale or the locale specified in the 0050 * Accept-Language HTTP header. **/ 0051 [[nodiscard]] QString formattedValue() const; 0052 0053 /** Metadata about the relationship interest. **/ 0054 [[nodiscard]] FieldMetadata metadata() const; 0055 /** Sets value of the metadata property. **/ 0056 void setMetadata(const FieldMetadata &value); 0057 0058 /** The kind of relationship the person is looking for. The value can be custom or one of these predefined values: * `friend` * `date` * `relationship` * 0059 * `networking` **/ 0060 [[nodiscard]] QString value() const; 0061 /** Sets value of the value property. **/ 0062 void setValue(const QString &value); 0063 0064 private: 0065 class Private; 0066 QSharedDataPointer<Private> d; 0067 }; // RelationshipInterest 0068 0069 } // namespace KGAPI2::People