30 #ifndef GOOGLE_YOUTUBE_API_SPONSOR_SNIPPET_H_ 31 #define GOOGLE_YOUTUBE_API_SPONSOR_SNIPPET_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/client/util/date_time.h" 38 #include "googleapis/strings/stringpiece.h" 40 #include "google/youtube_api/channel_profile_details.h" 88 return StringPiece(
"google_youtube_api::SponsorSnippet");
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());
125 *MutableStorage(
"channelId") = value.data();
135 return Storage().isMember(
"cumulativeDurationMonths");
142 MutableStorage()->removeMember(
"cumulativeDurationMonths");
150 const Json::Value& storage = Storage(
"cumulativeDurationMonths");
151 return client::JsonValueToCppValueHelper<int32 >(storage);
162 client::SetJsonValueFromCppValueHelper<int32 >(
163 value, MutableStorage(
"cumulativeDurationMonths"));
172 return Storage().isMember(
"sponsorDetails");
179 MutableStorage()->removeMember(
"sponsorDetails");
205 return Storage().isMember(
"sponsorSince");
212 MutableStorage()->removeMember(
"sponsorSince");
220 const Json::Value& storage = Storage(
"sponsorSince");
221 return client::JsonValueToCppValueHelper<client::DateTime >(storage);
233 client::SetJsonValueFromCppValueHelper<client::DateTime >(
234 value, MutableStorage(
"sponsorSince"));
241 #endif // GOOGLE_YOUTUBE_API_SPONSOR_SNIPPET_H_ Definition: access_policy.cc:40
Definition: channel_profile_details.h:50
Definition: access_policy.h:38