30 #ifndef GOOGLE_YOUTUBE_API_VIDEO_SNIPPET_H_ 31 #define GOOGLE_YOUTUBE_API_VIDEO_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" 40 #include "google/youtube_api/video_localization.h" 89 return StringPiece(
"google_youtube_api::VideoSnippet");
98 return Storage().isMember(
"categoryId");
105 MutableStorage()->removeMember(
"categoryId");
113 const Json::Value& v = Storage(
"categoryId");
114 if (v == Json::Value::null)
return StringPiece(
"");
115 return StringPiece(v.asCString());
126 *MutableStorage(
"categoryId") = value.data();
135 return Storage().isMember(
"channelId");
142 MutableStorage()->removeMember(
"channelId");
150 const Json::Value& v = Storage(
"channelId");
151 if (v == Json::Value::null)
return StringPiece(
"");
152 return StringPiece(v.asCString());
164 *MutableStorage(
"channelId") = value.data();
173 return Storage().isMember(
"channelTitle");
180 MutableStorage()->removeMember(
"channelTitle");
188 const Json::Value& v = Storage(
"channelTitle");
189 if (v == Json::Value::null)
return StringPiece(
"");
190 return StringPiece(v.asCString());
201 *MutableStorage(
"channelTitle") = value.data();
210 return Storage().isMember(
"defaultAudioLanguage");
217 MutableStorage()->removeMember(
"defaultAudioLanguage");
225 const Json::Value& v = Storage(
"defaultAudioLanguage");
226 if (v == Json::Value::null)
return StringPiece(
"");
227 return StringPiece(v.asCString());
239 *MutableStorage(
"defaultAudioLanguage") = value.data();
248 return Storage().isMember(
"defaultLanguage");
255 MutableStorage()->removeMember(
"defaultLanguage");
263 const Json::Value& v = Storage(
"defaultLanguage");
264 if (v == Json::Value::null)
return StringPiece(
"");
265 return StringPiece(v.asCString());
276 *MutableStorage(
"defaultLanguage") = value.data();
285 return Storage().isMember(
"description");
292 MutableStorage()->removeMember(
"description");
300 const Json::Value& v = Storage(
"description");
301 if (v == Json::Value::null)
return StringPiece(
"");
302 return StringPiece(v.asCString());
313 *MutableStorage(
"description") = value.data();
322 return Storage().isMember(
"liveBroadcastContent");
329 MutableStorage()->removeMember(
"liveBroadcastContent");
337 const Json::Value& v = Storage(
"liveBroadcastContent");
338 if (v == Json::Value::null)
return StringPiece(
"");
339 return StringPiece(v.asCString());
351 *MutableStorage(
"liveBroadcastContent") = value.data();
360 return Storage().isMember(
"localized");
367 MutableStorage()->removeMember(
"localized");
393 return Storage().isMember(
"publishedAt");
400 MutableStorage()->removeMember(
"publishedAt");
408 const Json::Value& storage = Storage(
"publishedAt");
409 return client::JsonValueToCppValueHelper<client::DateTime >(storage);
421 client::SetJsonValueFromCppValueHelper<client::DateTime >(
422 value, MutableStorage(
"publishedAt"));
431 return Storage().isMember(
"tags");
438 MutableStorage()->removeMember(
"tags");
445 const client::JsonCppArray<string >
get_tags()
const {
446 const Json::Value& storage = Storage(
"tags");
447 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
458 Json::Value* storage = MutableStorage(
"tags");
459 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
468 return Storage().isMember(
"thumbnails");
475 MutableStorage()->removeMember(
"thumbnails");
502 return Storage().isMember(
"title");
509 MutableStorage()->removeMember(
"title");
517 const Json::Value& v = Storage(
"title");
518 if (v == Json::Value::null)
return StringPiece(
"");
519 return StringPiece(v.asCString());
530 *MutableStorage(
"title") = value.data();
537 #endif // GOOGLE_YOUTUBE_API_VIDEO_SNIPPET_H_ Definition: access_policy.cc:40
bool has_localized() const
Definition: video_snippet.h:359
bool has_default_language() const
Definition: video_snippet.h:247
bool has_channel_title() const
Definition: video_snippet.h:172
void clear_published_at()
Definition: video_snippet.h:399
bool has_tags() const
Definition: video_snippet.h:430
void clear_default_language()
Definition: video_snippet.h:254
const StringPiece get_channel_id() const
Definition: video_snippet.h:149
const StringPiece get_description() const
Definition: video_snippet.h:299
void set_category_id(const StringPiece &value)
Definition: video_snippet.h:125
bool has_description() const
Definition: video_snippet.h:284
bool has_category_id() const
Definition: video_snippet.h:97
const StringPiece get_channel_title() const
Definition: video_snippet.h:187
void set_live_broadcast_content(const StringPiece &value)
Definition: video_snippet.h:350
Definition: video_snippet.h:55
void set_published_at(client::DateTime value)
Definition: video_snippet.h:420
void clear_default_audio_language()
Definition: video_snippet.h:216
bool has_thumbnails() const
Definition: video_snippet.h:467
void clear_live_broadcast_content()
Definition: video_snippet.h:328
bool has_published_at() const
Definition: video_snippet.h:392
bool has_live_broadcast_content() const
Definition: video_snippet.h:321
bool has_default_audio_language() const
Definition: video_snippet.h:209
bool has_channel_id() const
Definition: video_snippet.h:134
const client::JsonCppArray< string > get_tags() const
Definition: video_snippet.h:445
const StringPiece get_live_broadcast_content() const
Definition: video_snippet.h:336
Definition: access_policy.h:38
void set_title(const StringPiece &value)
Definition: video_snippet.h:529
void set_description(const StringPiece &value)
Definition: video_snippet.h:312
void set_channel_title(const StringPiece &value)
Definition: video_snippet.h:200
const StringPiece get_default_audio_language() const
Definition: video_snippet.h:224
void clear_thumbnails()
Definition: video_snippet.h:474
void clear_localized()
Definition: video_snippet.h:366
const StringPiece GetTypeName() const
Definition: video_snippet.h:88
void clear_category_id()
Definition: video_snippet.h:104
client::JsonCppArray< string > mutable_tags()
Definition: video_snippet.h:457
void clear_channel_title()
Definition: video_snippet.h:179
void clear_title()
Definition: video_snippet.h:508
void clear_description()
Definition: video_snippet.h:291
Definition: thumbnail_details.h:51
const StringPiece get_title() const
Definition: video_snippet.h:516
void set_default_language(const StringPiece &value)
Definition: video_snippet.h:275
const StringPiece get_default_language() const
Definition: video_snippet.h:262
Definition: video_localization.h:50
bool has_title() const
Definition: video_snippet.h:501
void clear_tags()
Definition: video_snippet.h:437
const StringPiece get_category_id() const
Definition: video_snippet.h:112
client::DateTime get_published_at() const
Definition: video_snippet.h:407
void set_channel_id(const StringPiece &value)
Definition: video_snippet.h:163
void clear_channel_id()
Definition: video_snippet.h:141
void set_default_audio_language(const StringPiece &value)
Definition: video_snippet.h:238