30 #ifndef GOOGLE_STORAGE_API_OBJECTS_H_ 31 #define GOOGLE_STORAGE_API_OBJECTS_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 38 #include "google/storage_api/object.h" 52 class Objects :
public client::JsonCppData {
66 explicit Objects(
const Json::Value& storage);
73 explicit Objects(Json::Value* storage);
86 return StringPiece(
"google_storage_api::Objects");
95 return Storage().isMember(
"items");
102 MutableStorage()->removeMember(
"items");
109 const client::JsonCppArray<Object > get_items()
const;
118 client::JsonCppArray<Object > mutable_items();
126 return Storage().isMember(
"kind");
133 MutableStorage()->removeMember(
"kind");
141 const Json::Value& v = Storage(
"kind");
142 if (v == Json::Value::null)
return StringPiece(
"");
143 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(
"prefixes");
209 MutableStorage()->removeMember(
"prefixes");
217 const Json::Value& storage = Storage(
"prefixes");
218 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
231 Json::Value* storage = MutableStorage(
"prefixes");
232 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
236 void operator=(
const Objects&);
239 #endif // GOOGLE_STORAGE_API_OBJECTS_H_ void clear_items()
Definition: objects.h:101
const client::JsonCppArray< string > get_prefixes() const
Definition: objects.h:216
bool has_prefixes() const
Definition: objects.h:201
void set_kind(const StringPiece &value)
Definition: objects.h:154
bool has_next_page_token() const
Definition: objects.h:163
bool has_items() const
Definition: objects.h:94
client::JsonCppArray< string > mutable_prefixes()
Definition: objects.h:230
void set_next_page_token(const StringPiece &value)
Definition: objects.h:192
const StringPiece get_next_page_token() const
Definition: objects.h:178
void clear_kind()
Definition: objects.h:132
const StringPiece get_kind() const
Definition: objects.h:140
void clear_next_page_token()
Definition: objects.h:170
void clear_prefixes()
Definition: objects.h:208
bool has_kind() const
Definition: objects.h:125
const StringPiece GetTypeName() const
Definition: objects.h:85