30 #ifndef GOOGLE_GMAIL_API_AUTO_FORWARDING_H_ 31 #define GOOGLE_GMAIL_API_AUTO_FORWARDING_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 84 return StringPiece(
"google_gmail_api::AutoForwarding");
93 return Storage().isMember(
"disposition");
100 MutableStorage()->removeMember(
"disposition");
108 const Json::Value& v = Storage(
"disposition");
109 if (v == Json::Value::null)
return StringPiece(
"");
110 return StringPiece(v.asCString());
121 *MutableStorage(
"disposition") = value.data();
130 return Storage().isMember(
"emailAddress");
137 MutableStorage()->removeMember(
"emailAddress");
145 const Json::Value& v = Storage(
"emailAddress");
146 if (v == Json::Value::null)
return StringPiece(
"");
147 return StringPiece(v.asCString());
159 *MutableStorage(
"emailAddress") = value.data();
168 return Storage().isMember(
"enabled");
175 MutableStorage()->removeMember(
"enabled");
183 const Json::Value& storage = Storage(
"enabled");
184 return client::JsonValueToCppValueHelper<bool >(storage);
195 client::SetJsonValueFromCppValueHelper<bool >(
196 value, MutableStorage(
"enabled"));
203 #endif // GOOGLE_GMAIL_API_AUTO_FORWARDING_H_ void set_disposition(const StringPiece &value)
Definition: auto_forwarding.h:120
bool has_email_address() const
Definition: auto_forwarding.h:129
void set_email_address(const StringPiece &value)
Definition: auto_forwarding.h:158
Definition: auto_forwarding.h:50
const StringPiece get_email_address() const
Definition: auto_forwarding.h:144
void clear_email_address()
Definition: auto_forwarding.h:136
void set_enabled(bool value)
Definition: auto_forwarding.h:194
const StringPiece GetTypeName() const
Definition: auto_forwarding.h:83
bool has_disposition() const
Definition: auto_forwarding.h:92
bool has_enabled() const
Definition: auto_forwarding.h:167
Definition: auto_forwarding.h:38
void clear_disposition()
Definition: auto_forwarding.h:99
bool get_enabled() const
Definition: auto_forwarding.h:182
const StringPiece get_disposition() const
Definition: auto_forwarding.h:107
void clear_enabled()
Definition: auto_forwarding.h:174
Definition: auto_forwarding.cc:40