Kgapi

organization.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 <QDate>
16#include <QString>
17
18#include <optional>
19
20class QJsonObject;
21class QJsonValue;
22class QJsonArray;
23
24namespace KGAPI2::People
25{
26class FieldMetadata;
27
28/**
29 * A person's past or current organization. Overlapping date ranges are permitted.
30 *
31 * @see https://developers.google.com/people/api/rest/v1/people#organization
32 * @since 5.23.0
33 **/
34class KGAPIPEOPLE_EXPORT Organization
35{
36public:
37 /** Constructs a new Organization **/
38 explicit Organization();
40 Organization(Organization &&) noexcept;
41 Organization &operator=(const Organization &);
42 Organization &operator=(Organization &&) noexcept;
43 /** Destructor. **/
45
46 bool operator==(const Organization &) const;
47 bool operator!=(const Organization &) const;
48
49 [[nodiscard]] static Organization fromJSON(const QJsonObject &);
50 [[nodiscard]] static QList<Organization> fromJSONArray(const QJsonArray &data);
51 [[nodiscard]] QJsonValue toJSON() const;
52
53 /** The location of the organization office the person works at. **/
54 [[nodiscard]] QString location() const;
55 /** Sets value of the location property. **/
56 void setLocation(const QString &value);
57
58 /** The person's job title at the organization. **/
59 [[nodiscard]] QString title() const;
60 /** Sets value of the title property. **/
61 void setTitle(const QString &value);
62
63 /** The type of the organization. The type can be custom or one of these predefined values: * `work` * `school` **/
64 [[nodiscard]] QString type() const;
65 /** Sets value of the type property. **/
66 void setType(const QString &value);
67
68 /** Metadata about the organization. **/
69 [[nodiscard]] FieldMetadata metadata() const;
70 /** Sets value of the metadata property. **/
71 void setMetadata(const FieldMetadata &value);
72
73 /** The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym. **/
74 [[nodiscard]] QString symbol() const;
75 /** Sets value of the symbol property. **/
76 void setSymbol(const QString &value);
77
78 /** Output only. The type of the organization translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. **/
79 [[nodiscard]] QString formattedType() const;
80
81 /** The name of the organization. **/
82 [[nodiscard]] QString name() const;
83 /** Sets value of the name property. **/
84 void setName(const QString &value);
85
86 /** True if the organization is the person's current organization; false if the organization is a past organization. **/
87 [[nodiscard]] bool current() const;
88 /** Sets value of the current property. **/
89 void setCurrent(bool value);
90
91 [[nodiscard]] bool hasSetCurrent() const;
92
93 /** The person's cost center at the organization. **/
94 [[nodiscard]] QString costCenter() const;
95 /** Sets value of the costCenter property. **/
96 void setCostCenter(const QString &value);
97
98 /** The person's department at the organization. **/
99 [[nodiscard]] QString department() const;
100 /** Sets value of the department property. **/
101 void setDepartment(const QString &value);
102
103 /** The domain name associated with the organization; for example, `google.com`. **/
104 [[nodiscard]] QString domain() const;
105 /** Sets value of the domain property. **/
106 void setDomain(const QString &value);
107
108 /** The start date when the person joined the organization. **/
109 [[nodiscard]] QDate startDate() const;
110 /** Sets value of the startDate property. **/
111 void setStartDate(const QDate &value);
112
113 /** The person's job description at the organization. **/
114 [[nodiscard]] QString jobDescription() const;
115 /** Sets value of the jobDescription property. **/
116 void setJobDescription(const QString &value);
117
118 /** The end date when the person left the organization. **/
119 [[nodiscard]] QDate endDate() const;
120 /** Sets value of the endDate property. **/
121 void setEndDate(const QDate &value);
122
123 /** The phonetic name of the organization. **/
124 [[nodiscard]] QString phoneticName() const;
125 /** Sets value of the phoneticName property. **/
126 void setPhoneticName(const QString &value);
127
128 /** The person's full-time equivalent millipercent within the organization (100000 = 100%). **/
129 [[nodiscard]] int fullTimeEquivalentMillipercent() const;
130 /** Sets value of the fullTimeEquivalentMillipercent property. **/
131 void setFullTimeEquivalentMillipercent(int value);
132
133 [[nodiscard]] bool hasSetFullTimeEquivalentMillipercent() const;
134
135private:
136 class Private;
138}; // Organization
139
140} // namespace KGAPI2::People
Metadata about a field.
A person's past or current organization.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 3 2024 11:50:41 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.