30 #ifndef GOOGLE_BOOKS_API_ANNOTATIONDATA_H_ 31 #define GOOGLE_BOOKS_API_ANNOTATIONDATA_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/client/util/date_time.h" 37 #include "googleapis/strings/stringpiece.h" 85 return StringPiece(
"google_books_api::Annotationdata");
94 return Storage().isMember(
"annotationType");
101 MutableStorage()->removeMember(
"annotationType");
109 const Json::Value& v = Storage(
"annotationType");
110 if (v == Json::Value::null)
return StringPiece(
"");
111 return StringPiece(v.asCString());
122 *MutableStorage(
"annotationType") = value.data();
131 return Storage().isMember(
"data");
138 MutableStorage()->removeMember(
"data");
146 const Json::Value& storage = Storage(
"data");
147 return client::JsonValueToCppValueHelper<client::JsonCppData >(storage);
155 Json::Value* storage = MutableStorage(
"data");
156 return client::JsonValueToMutableCppValueHelper<client::JsonCppData >(storage);
165 return Storage().isMember(
"encoded_data");
172 MutableStorage()->removeMember(
"encoded_data");
180 const Json::Value& v = Storage(
"encoded_data");
181 if (v == Json::Value::null)
return StringPiece(
"");
182 return StringPiece(v.asCString());
193 *MutableStorage(
"encoded_data") = value.data();
202 return Storage().isMember(
"id");
209 MutableStorage()->removeMember(
"id");
217 const Json::Value& v = Storage(
"id");
218 if (v == Json::Value::null)
return StringPiece(
"");
219 return StringPiece(v.asCString());
230 *MutableStorage(
"id") = value.data();
239 return Storage().isMember(
"kind");
246 MutableStorage()->removeMember(
"kind");
254 const Json::Value& v = Storage(
"kind");
255 if (v == Json::Value::null)
return StringPiece(
"");
256 return StringPiece(v.asCString());
267 *MutableStorage(
"kind") = value.data();
276 return Storage().isMember(
"layerId");
283 MutableStorage()->removeMember(
"layerId");
291 const Json::Value& v = Storage(
"layerId");
292 if (v == Json::Value::null)
return StringPiece(
"");
293 return StringPiece(v.asCString());
304 *MutableStorage(
"layerId") = value.data();
313 return Storage().isMember(
"selfLink");
320 MutableStorage()->removeMember(
"selfLink");
328 const Json::Value& v = Storage(
"selfLink");
329 if (v == Json::Value::null)
return StringPiece(
"");
330 return StringPiece(v.asCString());
341 *MutableStorage(
"selfLink") = value.data();
350 return Storage().isMember(
"updated");
357 MutableStorage()->removeMember(
"updated");
365 const Json::Value& storage = Storage(
"updated");
366 return client::JsonValueToCppValueHelper<client::DateTime >(storage);
378 client::SetJsonValueFromCppValueHelper<client::DateTime >(
379 value, MutableStorage(
"updated"));
388 return Storage().isMember(
"volumeId");
395 MutableStorage()->removeMember(
"volumeId");
403 const Json::Value& v = Storage(
"volumeId");
404 if (v == Json::Value::null)
return StringPiece(
"");
405 return StringPiece(v.asCString());
416 *MutableStorage(
"volumeId") = value.data();
423 #endif // GOOGLE_BOOKS_API_ANNOTATIONDATA_H_ void clear_data()
Definition: annotationdata.h:137
bool has_volume_id() const
Definition: annotationdata.h:387
const StringPiece get_kind() const
Definition: annotationdata.h:253
void clear_updated()
Definition: annotationdata.h:356
const client::JsonCppData get_data() const
Definition: annotationdata.h:145
bool has_annotation_type() const
Definition: annotationdata.h:93
void set_layer_id(const StringPiece &value)
Definition: annotationdata.h:303
client::DateTime get_updated() const
Definition: annotationdata.h:364
const StringPiece get_self_link() const
Definition: annotationdata.h:327
Definition: annotationdata.h:51
void set_self_link(const StringPiece &value)
Definition: annotationdata.h:340
const StringPiece get_encoded_data() const
Definition: annotationdata.h:179
const StringPiece get_layer_id() const
Definition: annotationdata.h:290
bool has_updated() const
Definition: annotationdata.h:349
bool has_kind() const
Definition: annotationdata.h:238
client::JsonCppData mutable_data()
Definition: annotationdata.h:154
bool has_encoded_data() const
Definition: annotationdata.h:164
void clear_self_link()
Definition: annotationdata.h:319
void clear_encoded_data()
Definition: annotationdata.h:171
Definition: annotation.h:42
const StringPiece get_volume_id() const
Definition: annotationdata.h:402
void clear_layer_id()
Definition: annotationdata.h:282
const StringPiece GetTypeName() const
Definition: annotationdata.h:84
Definition: annotation.cc:44
void clear_id()
Definition: annotationdata.h:208
void set_kind(const StringPiece &value)
Definition: annotationdata.h:266
void set_annotation_type(const StringPiece &value)
Definition: annotationdata.h:121
void set_updated(client::DateTime value)
Definition: annotationdata.h:377
void clear_annotation_type()
Definition: annotationdata.h:100
bool has_layer_id() const
Definition: annotationdata.h:275
bool has_data() const
Definition: annotationdata.h:130
void set_volume_id(const StringPiece &value)
Definition: annotationdata.h:415
const StringPiece get_annotation_type() const
Definition: annotationdata.h:108
void clear_kind()
Definition: annotationdata.h:245
bool has_self_link() const
Definition: annotationdata.h:312
void clear_volume_id()
Definition: annotationdata.h:394
void set_id(const StringPiece &value)
Definition: annotationdata.h:229
const StringPiece get_id() const
Definition: annotationdata.h:216
void set_encoded_data(const StringPiece &value)
Definition: annotationdata.h:192
bool has_id() const
Definition: annotationdata.h:201