30 #ifndef GOOGLE_GMAIL_API_PROFILE_H_ 31 #define GOOGLE_GMAIL_API_PROFILE_H_ 34 #include "googleapis/base/integral_types.h" 35 #include "googleapis/base/macros.h" 36 #include "googleapis/client/data/jsoncpp_data.h" 37 #include "googleapis/strings/stringpiece.h" 51 class Profile :
public client::JsonCppData {
65 explicit Profile(
const Json::Value& storage);
72 explicit Profile(Json::Value* storage);
85 return StringPiece(
"google_gmail_api::Profile");
94 return Storage().isMember(
"emailAddress");
101 MutableStorage()->removeMember(
"emailAddress");
109 const Json::Value& v = Storage(
"emailAddress");
110 if (v == Json::Value::null)
return StringPiece(
"");
111 return StringPiece(v.asCString());
122 *MutableStorage(
"emailAddress") = value.data();
131 return Storage().isMember(
"historyId");
138 MutableStorage()->removeMember(
"historyId");
146 const Json::Value& storage = Storage(
"historyId");
147 return client::JsonValueToCppValueHelper<uint64 >(storage);
158 client::SetJsonValueFromCppValueHelper<uint64 >(
159 value, MutableStorage(
"historyId"));
168 return Storage().isMember(
"messagesTotal");
175 MutableStorage()->removeMember(
"messagesTotal");
183 const Json::Value& storage = Storage(
"messagesTotal");
184 return client::JsonValueToCppValueHelper<int32 >(storage);
195 client::SetJsonValueFromCppValueHelper<int32 >(
196 value, MutableStorage(
"messagesTotal"));
205 return Storage().isMember(
"threadsTotal");
212 MutableStorage()->removeMember(
"threadsTotal");
220 const Json::Value& storage = Storage(
"threadsTotal");
221 return client::JsonValueToCppValueHelper<int32 >(storage);
232 client::SetJsonValueFromCppValueHelper<int32 >(
233 value, MutableStorage(
"threadsTotal"));
237 void operator=(
const Profile&);
240 #endif // GOOGLE_GMAIL_API_PROFILE_H_ bool has_threads_total() const
Definition: profile.h:204
bool has_email_address() const
Definition: profile.h:93
bool has_history_id() const
Definition: profile.h:130
void set_messages_total(int32 value)
Definition: profile.h:194
const StringPiece get_email_address() const
Definition: profile.h:108
void clear_threads_total()
Definition: profile.h:211
void clear_history_id()
Definition: profile.h:137
Definition: auto_forwarding.h:38
int32 get_messages_total() const
Definition: profile.h:182
void clear_messages_total()
Definition: profile.h:174
uint64 get_history_id() const
Definition: profile.h:145
void set_threads_total(int32 value)
Definition: profile.h:231
int32 get_threads_total() const
Definition: profile.h:219
bool has_messages_total() const
Definition: profile.h:167
void set_email_address(const StringPiece &value)
Definition: profile.h:121
void clear_email_address()
Definition: profile.h:100
void set_history_id(uint64 value)
Definition: profile.h:157
const StringPiece GetTypeName() const
Definition: profile.h:84
Definition: auto_forwarding.cc:40