Kgapi

groupclientdata.h
1/*
2 * SPDX-FileCopyrightText: 2021 Daniel Vrátil <dvratil@kde.org>
3 * SPDX-FileCopyrightText: 2022 Claudio Cambra <claudio.cambra@kde.org>
4 *
5 * SPDX-License-Identifier: LGPL-2.1-only
6 * SPDX-License-Identifier: LGPL-3.0-only
7 * SPDX-License-Identifier: LicenseRef-KDE-Accepted-LGPL
8 */
9
10#pragma once
11
12#include <QSharedDataPointer>
13#include "kgapipeople_export.h"
14
15#include <QString>
16
17#include <optional>
18
19class QJsonArray;
20class QJsonObject;
21class QJsonValue;
22
23namespace KGAPI2::People
24{
25/**
26 * Arbitrary client data that is populated by clients. Duplicate keys and values
27 * are allowed.
28 *
29 * @see https://developers.google.com/people/api/rest/v1/people#groupclientdata
30 * @since 5.23.0
31 **/
32class KGAPIPEOPLE_EXPORT GroupClientData
33{
34public:
35 /** Constructs a new GroupClientData **/
36 explicit GroupClientData();
39 GroupClientData &operator=(const GroupClientData &);
40 GroupClientData &operator=(GroupClientData &&) noexcept;
41 /** Destructor. **/
43
44 bool operator==(const GroupClientData &) const;
45 bool operator!=(const GroupClientData &) const;
46
47 [[nodiscard]] static GroupClientData fromJSON(const QJsonObject &);
48 [[nodiscard]] static QList<GroupClientData> fromJSONArray(const QJsonArray &data);
49 [[nodiscard]] QJsonValue toJSON() const;
50
51 /** The client specified key of the client data. **/
52 [[nodiscard]] QString key() const;
53 /** Sets value of the key property. **/
54 void setKey(const QString &value);
55
56 /** The client specified value of the client data. **/
57 [[nodiscard]] QString value() const;
58 /** Sets value of the value property. **/
59 void setValue(const QString &value);
60
61private:
62 class Private;
64}; // GroupClientData
65
66} // namespace KGAPI2::People
Arbitrary client data that is populated by clients.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:36:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.