30 #ifndef GOOGLE_YOUTUBE_API_ACTIVITY_SNIPPET_H_ 31 #define GOOGLE_YOUTUBE_API_ACTIVITY_SNIPPET_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" 39 #include "google/youtube_api/thumbnail_details.h" 88 return StringPiece(
"google_youtube_api::ActivitySnippet");
97 return Storage().isMember(
"channelId");
104 MutableStorage()->removeMember(
"channelId");
112 const Json::Value& v = Storage(
"channelId");
113 if (v == Json::Value::null)
return StringPiece(
"");
114 return StringPiece(v.asCString());
126 *MutableStorage(
"channelId") = value.data();
135 return Storage().isMember(
"channelTitle");
142 MutableStorage()->removeMember(
"channelTitle");
150 const Json::Value& v = Storage(
"channelTitle");
151 if (v == Json::Value::null)
return StringPiece(
"");
152 return StringPiece(v.asCString());
163 *MutableStorage(
"channelTitle") = value.data();
172 return Storage().isMember(
"description");
179 MutableStorage()->removeMember(
"description");
187 const Json::Value& v = Storage(
"description");
188 if (v == Json::Value::null)
return StringPiece(
"");
189 return StringPiece(v.asCString());
200 *MutableStorage(
"description") = value.data();
209 return Storage().isMember(
"groupId");
216 MutableStorage()->removeMember(
"groupId");
224 const Json::Value& v = Storage(
"groupId");
225 if (v == Json::Value::null)
return StringPiece(
"");
226 return StringPiece(v.asCString());
242 *MutableStorage(
"groupId") = value.data();
251 return Storage().isMember(
"publishedAt");
258 MutableStorage()->removeMember(
"publishedAt");
266 const Json::Value& storage = Storage(
"publishedAt");
267 return client::JsonValueToCppValueHelper<client::DateTime >(storage);
279 client::SetJsonValueFromCppValueHelper<client::DateTime >(
280 value, MutableStorage(
"publishedAt"));
289 return Storage().isMember(
"thumbnails");
296 MutableStorage()->removeMember(
"thumbnails");
324 return Storage().isMember(
"title");
331 MutableStorage()->removeMember(
"title");
339 const Json::Value& v = Storage(
"title");
340 if (v == Json::Value::null)
return StringPiece(
"");
341 return StringPiece(v.asCString());
352 *MutableStorage(
"title") = value.data();
361 return Storage().isMember(
"type");
368 MutableStorage()->removeMember(
"type");
376 const Json::Value& v = Storage(
"type");
377 if (v == Json::Value::null)
return StringPiece(
"");
378 return StringPiece(v.asCString());
389 *MutableStorage(
"type") = value.data();
396 #endif // GOOGLE_YOUTUBE_API_ACTIVITY_SNIPPET_H_ void clear_thumbnails()
Definition: activity_snippet.h:295
const StringPiece get_description() const
Definition: activity_snippet.h:186
void set_group_id(const StringPiece &value)
Definition: activity_snippet.h:241
void clear_published_at()
Definition: activity_snippet.h:257
const StringPiece GetTypeName() const
Definition: activity_snippet.h:87
Definition: access_policy.cc:40
bool has_channel_id() const
Definition: activity_snippet.h:96
bool has_published_at() const
Definition: activity_snippet.h:250
void clear_channel_id()
Definition: activity_snippet.h:103
void set_published_at(client::DateTime value)
Definition: activity_snippet.h:278
void set_type(const StringPiece &value)
Definition: activity_snippet.h:388
const StringPiece get_title() const
Definition: activity_snippet.h:338
bool has_channel_title() const
Definition: activity_snippet.h:134
void clear_channel_title()
Definition: activity_snippet.h:141
const StringPiece get_channel_title() const
Definition: activity_snippet.h:149
bool has_title() const
Definition: activity_snippet.h:323
void set_title(const StringPiece &value)
Definition: activity_snippet.h:351
void clear_title()
Definition: activity_snippet.h:330
const StringPiece get_type() const
Definition: activity_snippet.h:375
void set_channel_title(const StringPiece &value)
Definition: activity_snippet.h:162
const StringPiece get_group_id() const
Definition: activity_snippet.h:223
const StringPiece get_channel_id() const
Definition: activity_snippet.h:111
Definition: activity_snippet.h:54
client::DateTime get_published_at() const
Definition: activity_snippet.h:265
void set_channel_id(const StringPiece &value)
Definition: activity_snippet.h:125
Definition: access_policy.h:38
bool has_group_id() const
Definition: activity_snippet.h:208
bool has_type() const
Definition: activity_snippet.h:360
void clear_group_id()
Definition: activity_snippet.h:215
bool has_description() const
Definition: activity_snippet.h:171
Definition: thumbnail_details.h:51
void clear_type()
Definition: activity_snippet.h:367
bool has_thumbnails() const
Definition: activity_snippet.h:288
void set_description(const StringPiece &value)
Definition: activity_snippet.h:199
void clear_description()
Definition: activity_snippet.h:178