Kgapi

residence.h
1/*
2 * SPDX-FileCopyrightText: 2021 Daniel Vrátil <dvratil@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 * SPDX-License-Identifier: LGPL-3.0-only
6 * SPDX-License-Identifier: LicenseRef-KDE-Accepted-LGPL
7 */
8
9#pragma once
10
11#include <QSharedDataPointer>
12#include "kgapipeople_export.h"
13
14#include <QString>
15
16#include <optional>
17
18class QJsonObject;
19class QJsonValue;
20
21namespace KGAPI2::People
22{
23class FieldMetadata;
24
25/**
26 * **DEPRECATED**: Please use `person.locations` instead. A person's past or
27 * current residence.
28 *
29 * @see https://developers.google.com/people/api/rest/v1/people#residence
30 * @since 5.23.0
31 **/
32class KGAPIPEOPLE_EXPORT Residence
33{
34public:
35 /** Constructs a new Residence **/
36 explicit Residence();
37 Residence(const Residence &);
38 Residence(Residence &&) noexcept;
39 Residence &operator=(const Residence &);
40 Residence &operator=(Residence &&) noexcept;
41 /** Destructor. **/
43
44 bool operator==(const Residence &) const;
45 bool operator!=(const Residence &) const;
46
47 [[nodiscard]] static Residence fromJSON(const QJsonObject &);
48 [[nodiscard]] QJsonValue toJSON() const;
49
50 /** The address of the residence. **/
51 [[nodiscard]] QString value() const;
52 /** Sets value of the value property. **/
53 void setValue(const QString &value);
54
55 /** Metadata about the residence. **/
56 [[nodiscard]] FieldMetadata metadata() const;
57 /** Sets value of the metadata property. **/
58 void setMetadata(const FieldMetadata &value);
59
60 /** True if the residence is the person's current residence; false if the residence is a past residence. **/
61 [[nodiscard]] bool current() const;
62 /** Sets value of the current property. **/
63 void setCurrent(bool value);
64
65private:
66 class Private;
68}; // Residence
69
70} // namespace KGAPI2::People
Metadata about a field.
DEPRECATED: Please use person.locations instead.
Definition residence.h:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:36:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.