30 #ifndef GOOGLE_STORAGE_API_NOTIFICATION_H_ 31 #define GOOGLE_STORAGE_API_NOTIFICATION_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_storage_api::Notification");
93 return Storage().isMember(
"custom_attributes");
100 MutableStorage()->removeMember(
"custom_attributes");
109 const Json::Value& storage = Storage(
"custom_attributes");
110 return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
123 Json::Value* storage = MutableStorage(
"custom_attributes");
124 return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
133 return Storage().isMember(
"etag");
140 MutableStorage()->removeMember(
"etag");
148 const Json::Value& v = Storage(
"etag");
149 if (v == Json::Value::null)
return StringPiece(
"");
150 return StringPiece(v.asCString());
161 *MutableStorage(
"etag") = value.data();
170 return Storage().isMember(
"event_types");
177 MutableStorage()->removeMember(
"event_types");
185 const Json::Value& storage = Storage(
"event_types");
186 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
199 Json::Value* storage = MutableStorage(
"event_types");
200 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
209 return Storage().isMember(
"id");
216 MutableStorage()->removeMember(
"id");
224 const Json::Value& v = Storage(
"id");
225 if (v == Json::Value::null)
return StringPiece(
"");
226 return StringPiece(v.asCString());
237 *MutableStorage(
"id") = value.data();
246 return Storage().isMember(
"kind");
253 MutableStorage()->removeMember(
"kind");
261 const Json::Value& v = Storage(
"kind");
262 if (v == Json::Value::null)
return StringPiece(
"");
263 return StringPiece(v.asCString());
275 *MutableStorage(
"kind") = value.data();
284 return Storage().isMember(
"object_name_prefix");
291 MutableStorage()->removeMember(
"object_name_prefix");
299 const Json::Value& v = Storage(
"object_name_prefix");
300 if (v == Json::Value::null)
return StringPiece(
"");
301 return StringPiece(v.asCString());
313 *MutableStorage(
"object_name_prefix") = value.data();
322 return Storage().isMember(
"payload_format");
329 MutableStorage()->removeMember(
"payload_format");
337 const Json::Value& v = Storage(
"payload_format");
338 if (v == Json::Value::null)
return StringPiece(
"");
339 return StringPiece(v.asCString());
350 *MutableStorage(
"payload_format") = value.data();
359 return Storage().isMember(
"selfLink");
366 MutableStorage()->removeMember(
"selfLink");
374 const Json::Value& v = Storage(
"selfLink");
375 if (v == Json::Value::null)
return StringPiece(
"");
376 return StringPiece(v.asCString());
387 *MutableStorage(
"selfLink") = value.data();
396 return Storage().isMember(
"topic");
403 MutableStorage()->removeMember(
"topic");
411 const Json::Value& v = Storage(
"topic");
412 if (v == Json::Value::null)
return StringPiece(
"");
413 return StringPiece(v.asCString());
425 *MutableStorage(
"topic") = value.data();
432 #endif // GOOGLE_STORAGE_API_NOTIFICATION_H_ const StringPiece GetTypeName() const
Definition: notification.h:83
const client::JsonCppAssociativeArray< string > get_custom_attributes() const
Definition: notification.h:108
void clear_object_name_prefix()
Definition: notification.h:290
bool has_custom_attributes() const
Definition: notification.h:92
bool has_kind() const
Definition: notification.h:245
void set_self_link(const StringPiece &value)
Definition: notification.h:386
void clear_payload_format()
Definition: notification.h:328
void set_payload_format(const StringPiece &value)
Definition: notification.h:349
void set_etag(const StringPiece &value)
Definition: notification.h:160
void clear_custom_attributes()
Definition: notification.h:99
bool has_id() const
Definition: notification.h:208
const StringPiece get_id() const
Definition: notification.h:223
const client::JsonCppArray< string > get_event_types() const
Definition: notification.h:184
const StringPiece get_kind() const
Definition: notification.h:260
const StringPiece get_object_name_prefix() const
Definition: notification.h:298
void set_id(const StringPiece &value)
Definition: notification.h:236
void set_kind(const StringPiece &value)
Definition: notification.h:274
client::JsonCppArray< string > mutable_event_types()
Definition: notification.h:198
void clear_event_types()
Definition: notification.h:176
const StringPiece get_self_link() const
Definition: notification.h:373
bool has_payload_format() const
Definition: notification.h:321
void clear_topic()
Definition: notification.h:402
Definition: notification.h:50
bool has_event_types() const
Definition: notification.h:169
void set_object_name_prefix(const StringPiece &value)
Definition: notification.h:312
const StringPiece get_payload_format() const
Definition: notification.h:336
bool has_etag() const
Definition: notification.h:132
bool has_object_name_prefix() const
Definition: notification.h:283
void clear_etag()
Definition: notification.h:139
void clear_self_link()
Definition: notification.h:365
const StringPiece get_etag() const
Definition: notification.h:147
client::JsonCppAssociativeArray< string > mutable_custom_attributes()
Definition: notification.h:122
bool has_topic() const
Definition: notification.h:395
const StringPiece get_topic() const
Definition: notification.h:410
bool has_self_link() const
Definition: notification.h:358
void clear_kind()
Definition: notification.h:252
void set_topic(const StringPiece &value)
Definition: notification.h:424
void clear_id()
Definition: notification.h:215