30 #ifndef GOOGLE_BOOKS_API_ANNOTATIONS_H_ 31 #define GOOGLE_BOOKS_API_ANNOTATIONS_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" 39 #include "google/books_api/annotation.h" 87 return StringPiece(
"google_books_api::Annotations");
96 return Storage().isMember(
"items");
103 MutableStorage()->removeMember(
"items");
110 const client::JsonCppArray<Annotation > get_items()
const;
119 client::JsonCppArray<Annotation > mutable_items();
127 return Storage().isMember(
"kind");
134 MutableStorage()->removeMember(
"kind");
142 const Json::Value& v = Storage(
"kind");
143 if (v == Json::Value::null)
return StringPiece(
"");
144 return StringPiece(v.asCString());
155 *MutableStorage(
"kind") = value.data();
164 return Storage().isMember(
"nextPageToken");
171 MutableStorage()->removeMember(
"nextPageToken");
179 const Json::Value& v = Storage(
"nextPageToken");
180 if (v == Json::Value::null)
return StringPiece(
"");
181 return StringPiece(v.asCString());
193 *MutableStorage(
"nextPageToken") = value.data();
202 return Storage().isMember(
"totalItems");
209 MutableStorage()->removeMember(
"totalItems");
217 const Json::Value& storage = Storage(
"totalItems");
218 return client::JsonValueToCppValueHelper<int32 >(storage);
230 client::SetJsonValueFromCppValueHelper<int32 >(
231 value, MutableStorage(
"totalItems"));
238 #endif // GOOGLE_BOOKS_API_ANNOTATIONS_H_ const StringPiece GetTypeName() const
Definition: annotations.h:86
bool has_items() const
Definition: annotations.h:95
void clear_items()
Definition: annotations.h:102
void clear_next_page_token()
Definition: annotations.h:170
bool has_total_items() const
Definition: annotations.h:201
bool has_kind() const
Definition: annotations.h:126
bool has_next_page_token() const
Definition: annotations.h:163
void clear_total_items()
Definition: annotations.h:208
Definition: annotation.h:42
Definition: annotations.h:53
const StringPiece get_kind() const
Definition: annotations.h:141
void set_total_items(int32 value)
Definition: annotations.h:229
Definition: annotation.cc:44
void set_next_page_token(const StringPiece &value)
Definition: annotations.h:192
const StringPiece get_next_page_token() const
Definition: annotations.h:178
void clear_kind()
Definition: annotations.h:133
void set_kind(const StringPiece &value)
Definition: annotations.h:154
int32 get_total_items() const
Definition: annotations.h:216