Kgapi

relationshipstatus.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**: No data will be returned A person's relationship status.
27 *
28 * @see https://developers.google.com/people/api/rest/v1/people#relationshipstatus
29 * @since 5.23.0
30 **/
31class KGAPIPEOPLE_EXPORT RelationshipStatus
32{
33public:
34 /** Constructs a new RelationshipStatus **/
35 explicit RelationshipStatus();
38 RelationshipStatus &operator=(const RelationshipStatus &);
39 RelationshipStatus &operator=(RelationshipStatus &&) noexcept;
40 /** Destructor. **/
42
43 bool operator==(const RelationshipStatus &) const;
44 bool operator!=(const RelationshipStatus &) const;
45
46 [[nodiscard]] static RelationshipStatus fromJSON(const QJsonObject &);
47 [[nodiscard]] QJsonValue toJSON() const;
48
49 /** The relationship status. The value can be custom or one of these predefined values: * `single` * `inARelationship` * `engaged` * `married` *
50 * `itsComplicated` * `openRelationship` * `widowed` * `inDomesticPartnership` * `inCivilUnion` **/
51 [[nodiscard]] QString value() const;
52 /** Sets value of the value property. **/
53 void setValue(const QString &value);
54
55 /** Output only. The value of the relationship status translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.
56 * **/
57 [[nodiscard]] QString formattedValue() const;
58
59 /** Metadata about the relationship status. **/
60 [[nodiscard]] FieldMetadata metadata() const;
61 /** Sets value of the metadata property. **/
62 void setMetadata(const FieldMetadata &value);
63
64private:
65 class Private;
67}; // RelationshipStatus
68
69} // namespace KGAPI2::People
Metadata about a field.
DEPRECATED: No data will be returned A person's relationship status.
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.