30 #ifndef GOOGLE_GMAIL_API_DRAFT_H_ 31 #define GOOGLE_GMAIL_API_DRAFT_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 38 #include "google/gmail_api/message.h" 52 class Draft :
public client::JsonCppData {
66 explicit Draft(
const Json::Value& storage);
73 explicit Draft(Json::Value* storage);
86 return StringPiece(
"google_gmail_api::Draft");
95 return Storage().isMember(
"id");
102 MutableStorage()->removeMember(
"id");
110 const Json::Value& v = Storage(
"id");
111 if (v == Json::Value::null)
return StringPiece(
"");
112 return StringPiece(v.asCString());
123 *MutableStorage(
"id") = value.data();
132 return Storage().isMember(
"message");
139 MutableStorage()->removeMember(
"message");
146 const Message get_message()
const;
158 void operator=(
const Draft&);
161 #endif // GOOGLE_GMAIL_API_DRAFT_H_ void clear_message()
Definition: draft.h:138
const StringPiece GetTypeName() const
Definition: draft.h:85
void clear_id()
Definition: draft.h:101
bool has_message() const
Definition: draft.h:131
const StringPiece get_id() const
Definition: draft.h:109
bool has_id() const
Definition: draft.h:94
Definition: auto_forwarding.h:38
void set_id(const StringPiece &value)
Definition: draft.h:122
Definition: auto_forwarding.cc:40