30 #ifndef GOOGLE_YOUTUBE_API_CHANNEL_SETTINGS_H_ 31 #define GOOGLE_YOUTUBE_API_CHANNEL_SETTINGS_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 84 return StringPiece(
"google_youtube_api::ChannelSettings");
93 return Storage().isMember(
"country");
100 MutableStorage()->removeMember(
"country");
108 const Json::Value& v = Storage(
"country");
109 if (v == Json::Value::null)
return StringPiece(
"");
110 return StringPiece(v.asCString());
121 *MutableStorage(
"country") = value.data();
130 return Storage().isMember(
"defaultLanguage");
137 MutableStorage()->removeMember(
"defaultLanguage");
145 const Json::Value& v = Storage(
"defaultLanguage");
146 if (v == Json::Value::null)
return StringPiece(
"");
147 return StringPiece(v.asCString());
155 *MutableStorage(
"defaultLanguage") = value.data();
164 return Storage().isMember(
"defaultTab");
171 MutableStorage()->removeMember(
"defaultTab");
179 const Json::Value& v = Storage(
"defaultTab");
180 if (v == Json::Value::null)
return StringPiece(
"");
181 return StringPiece(v.asCString());
192 *MutableStorage(
"defaultTab") = value.data();
201 return Storage().isMember(
"description");
208 MutableStorage()->removeMember(
"description");
216 const Json::Value& v = Storage(
"description");
217 if (v == Json::Value::null)
return StringPiece(
"");
218 return StringPiece(v.asCString());
229 *MutableStorage(
"description") = value.data();
238 return Storage().isMember(
"featuredChannelsTitle");
245 MutableStorage()->removeMember(
"featuredChannelsTitle");
253 const Json::Value& v = Storage(
"featuredChannelsTitle");
254 if (v == Json::Value::null)
return StringPiece(
"");
255 return StringPiece(v.asCString());
266 *MutableStorage(
"featuredChannelsTitle") = value.data();
275 return Storage().isMember(
"featuredChannelsUrls");
282 MutableStorage()->removeMember(
"featuredChannelsUrls");
291 const Json::Value& storage = Storage(
"featuredChannelsUrls");
292 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
304 Json::Value* storage = MutableStorage(
"featuredChannelsUrls");
305 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
314 return Storage().isMember(
"keywords");
321 MutableStorage()->removeMember(
"keywords");
329 const Json::Value& v = Storage(
"keywords");
330 if (v == Json::Value::null)
return StringPiece(
"");
331 return StringPiece(v.asCString());
342 *MutableStorage(
"keywords") = value.data();
351 return Storage().isMember(
"moderateComments");
358 MutableStorage()->removeMember(
"moderateComments");
366 const Json::Value& storage = Storage(
"moderateComments");
367 return client::JsonValueToCppValueHelper<bool >(storage);
379 client::SetJsonValueFromCppValueHelper<bool >(
380 value, MutableStorage(
"moderateComments"));
389 return Storage().isMember(
"profileColor");
396 MutableStorage()->removeMember(
"profileColor");
404 const Json::Value& v = Storage(
"profileColor");
405 if (v == Json::Value::null)
return StringPiece(
"");
406 return StringPiece(v.asCString());
417 *MutableStorage(
"profileColor") = value.data();
426 return Storage().isMember(
"showBrowseView");
433 MutableStorage()->removeMember(
"showBrowseView");
441 const Json::Value& storage = Storage(
"showBrowseView");
442 return client::JsonValueToCppValueHelper<bool >(storage);
453 client::SetJsonValueFromCppValueHelper<bool >(
454 value, MutableStorage(
"showBrowseView"));
463 return Storage().isMember(
"showRelatedChannels");
470 MutableStorage()->removeMember(
"showRelatedChannels");
478 const Json::Value& storage = Storage(
"showRelatedChannels");
479 return client::JsonValueToCppValueHelper<bool >(storage);
490 client::SetJsonValueFromCppValueHelper<bool >(
491 value, MutableStorage(
"showRelatedChannels"));
500 return Storage().isMember(
"title");
507 MutableStorage()->removeMember(
"title");
515 const Json::Value& v = Storage(
"title");
516 if (v == Json::Value::null)
return StringPiece(
"");
517 return StringPiece(v.asCString());
528 *MutableStorage(
"title") = value.data();
539 return Storage().isMember(
"trackingAnalyticsAccountId");
546 MutableStorage()->removeMember(
"trackingAnalyticsAccountId");
554 const Json::Value& v = Storage(
"trackingAnalyticsAccountId");
555 if (v == Json::Value::null)
return StringPiece(
"");
556 return StringPiece(v.asCString());
568 *MutableStorage(
"trackingAnalyticsAccountId") = value.data();
577 return Storage().isMember(
"unsubscribedTrailer");
584 MutableStorage()->removeMember(
"unsubscribedTrailer");
592 const Json::Value& v = Storage(
"unsubscribedTrailer");
593 if (v == Json::Value::null)
return StringPiece(
"");
594 return StringPiece(v.asCString());
605 *MutableStorage(
"unsubscribedTrailer") = value.data();
612 #endif // GOOGLE_YOUTUBE_API_CHANNEL_SETTINGS_H_ const StringPiece get_keywords() const
Definition: channel_settings.h:328
bool has_featured_channels_title() const
Definition: channel_settings.h:237
void set_keywords(const StringPiece &value)
Definition: channel_settings.h:341
Definition: access_policy.cc:40
const StringPiece get_title() const
Definition: channel_settings.h:514
bool has_featured_channels_urls() const
Definition: channel_settings.h:274
void clear_unsubscribed_trailer()
Definition: channel_settings.h:583
void clear_title()
Definition: channel_settings.h:506
const StringPiece get_description() const
Definition: channel_settings.h:215
void clear_tracking_analytics_account_id()
Definition: channel_settings.h:545
client::JsonCppArray< string > mutable_featuredChannelsUrls()
Definition: channel_settings.h:303
void set_tracking_analytics_account_id(const StringPiece &value)
Definition: channel_settings.h:567
const StringPiece GetTypeName() const
Definition: channel_settings.h:83
void clear_default_tab()
Definition: channel_settings.h:170
bool has_profile_color() const
Definition: channel_settings.h:388
void set_default_tab(const StringPiece &value)
Definition: channel_settings.h:191
bool has_title() const
Definition: channel_settings.h:499
Definition: channel_settings.h:50
bool has_show_related_channels() const
Definition: channel_settings.h:462
void set_country(const StringPiece &value)
Definition: channel_settings.h:120
void clear_profile_color()
Definition: channel_settings.h:395
const StringPiece get_featured_channels_title() const
Definition: channel_settings.h:252
void set_show_browse_view(bool value)
Definition: channel_settings.h:452
void set_moderate_comments(bool value)
Definition: channel_settings.h:378
const StringPiece get_tracking_analytics_account_id() const
Definition: channel_settings.h:553
void clear_default_language()
Definition: channel_settings.h:136
void set_description(const StringPiece &value)
Definition: channel_settings.h:228
bool has_show_browse_view() const
Definition: channel_settings.h:425
bool has_description() const
Definition: channel_settings.h:200
void clear_show_related_channels()
Definition: channel_settings.h:469
void clear_featured_channels_title()
Definition: channel_settings.h:244
void clear_moderate_comments()
Definition: channel_settings.h:357
bool get_moderate_comments() const
Definition: channel_settings.h:365
const StringPiece get_profile_color() const
Definition: channel_settings.h:403
void clear_featured_channels_urls()
Definition: channel_settings.h:281
bool get_show_related_channels() const
Definition: channel_settings.h:477
bool has_default_language() const
Definition: channel_settings.h:129
Definition: access_policy.h:38
void clear_keywords()
Definition: channel_settings.h:320
void set_show_related_channels(bool value)
Definition: channel_settings.h:489
void set_title(const StringPiece &value)
Definition: channel_settings.h:527
bool has_country() const
Definition: channel_settings.h:92
bool has_default_tab() const
Definition: channel_settings.h:163
bool has_tracking_analytics_account_id() const
Definition: channel_settings.h:538
bool has_keywords() const
Definition: channel_settings.h:313
void clear_show_browse_view()
Definition: channel_settings.h:432
void clear_description()
Definition: channel_settings.h:207
void set_unsubscribed_trailer(const StringPiece &value)
Definition: channel_settings.h:604
const client::JsonCppArray< string > get_featured_channels_urls() const
Definition: channel_settings.h:290
void set_featured_channels_title(const StringPiece &value)
Definition: channel_settings.h:265
void set_default_language(const StringPiece &value)
Definition: channel_settings.h:154
bool get_show_browse_view() const
Definition: channel_settings.h:440
const StringPiece get_unsubscribed_trailer() const
Definition: channel_settings.h:591
const StringPiece get_default_language() const
Definition: channel_settings.h:144
const StringPiece get_default_tab() const
Definition: channel_settings.h:178
bool has_unsubscribed_trailer() const
Definition: channel_settings.h:576
void clear_country()
Definition: channel_settings.h:99
const StringPiece get_country() const
Definition: channel_settings.h:107
void set_profile_color(const StringPiece &value)
Definition: channel_settings.h:416
bool has_moderate_comments() const
Definition: channel_settings.h:350