12#include "peopleservice.h"
13#include "profilemetadata.h"
22namespace KGAPI2::People
27 explicit Private() =
default;
28 Private(
const Private &) =
default;
29 Private(Private &&) noexcept = delete;
30 Private &operator=(const Private &) = delete;
31 Private &operator=(Private &&) noexcept = delete;
34 bool operator==(const Private &other)
const
36 return etag == other.etag && profileMetadata == other.profileMetadata &&
id == other.id && updateTime == other.updateTime && type == other.type;
39 bool operator!=(
const Private &other)
const
41 return !(*
this == other);
45 ProfileMetadata profileMetadata{};
64 return *d == *other.d;
67bool Source::operator!=(
const Source &other)
const
69 return !(*
this == other);
83 return d->profileMetadata;
113 const auto typeEnumString = obj.
value(QStringLiteral(
"type"));
132 source.d->etag = obj.
value(QStringLiteral(
"etag")).
toString();
133 source.d->updateTime = obj.
value(QStringLiteral(
"id")).
toString();
134 source.d->profileMetadata = ProfileMetadata::fromJSON(obj.
value(QStringLiteral(
"profileMetadata")).toObject());
144 PeopleUtils::addValueToJsonObjectIfValid(obj,
"etag", d->etag);
146 PeopleUtils::addValueToJsonObjectIfValid(obj,
"id", d->id);
150 PeopleUtils::addValueToJsonObjectIfValid(obj,
"type", QStringLiteral(
"SOURCE_TYPE_UNSPECIFIED"));
153 PeopleUtils::addValueToJsonObjectIfValid(obj,
"type", QStringLiteral(
"ACCOUNT"));
156 PeopleUtils::addValueToJsonObjectIfValid(obj,
"type", QStringLiteral(
"PROFILE"));
159 PeopleUtils::addValueToJsonObjectIfValid(obj,
"type", QStringLiteral(
"DOMAIN_PROFILE"));
162 PeopleUtils::addValueToJsonObjectIfValid(obj,
"type", QStringLiteral(
"CONTACT"));
165 PeopleUtils::addValueToJsonObjectIfValid(obj,
"type", QStringLiteral(
"OTHER_CONTACT"));
168 PeopleUtils::addValueToJsonObjectIfValid(obj,
"type", QStringLiteral(
"DOMAIN_CONTACT"));
QString etag() const
Only populated in person.metadata.sources.
Source::Type type() const
The source type.
QString id() const
The unique identifier within the source type generated by the server.
QString updateTime() const
Output only.
ProfileMetadata profileMetadata() const
Output only.
Source()
Constructs a new Source.
@ SOURCE_TYPE_UNSPECIFIED
Unspecified.
@ DOMAIN_CONTACT
Google Workspace domain shared contact.
@ OTHER_CONTACT
Google "Other contact".
@ DOMAIN_PROFILE
Google Workspace domain profile.
void setEtag(const QString &value)
Sets value of the etag property.
void setType(Source::Type value)
Sets value of the type property.
void setId(const QString &value)
Sets value of the id property.
bool isEmpty() const const
QJsonValue value(QLatin1StringView key) const const
QString toString() const const