Kgapi

domainmembership.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 <optional>
16
17class QJsonObject;
18class QJsonValue;
19class QJsonArray;
20
21namespace KGAPI2::People
22{
23/**
24 * A Google Workspace Domain membership.
25 *
26 * @see https://developers.google.com/people/api/rest/v1/people#domainmembership
27 * @since 5.23.0
28 **/
29class KGAPIPEOPLE_EXPORT DomainMembership
30{
31public:
32 /** Constructs a new DomainMembership **/
33 explicit DomainMembership();
36 DomainMembership &operator=(const DomainMembership &);
37 DomainMembership &operator=(DomainMembership &&) noexcept;
38 /** Destructor. **/
40
41 bool operator==(const DomainMembership &) const;
42 bool operator!=(const DomainMembership &) const;
43
44 [[nodiscard]] static DomainMembership fromJSON(const QJsonObject &);
45 [[nodiscard]] QJsonValue toJSON() const;
46
47 /** True if the person is in the viewer's Google Workspace domain. **/
48 [[nodiscard]] bool inViewerDomain() const;
49 /** Sets value of the inViewerDomain property. **/
50 void setInViewerDomain(bool value);
51
52private:
53 class Private;
55}; // DomainMembership
56
57} // namespace KGAPI2::People
A Google Workspace Domain membership.
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.