30 #ifndef GOOGLE_YOUTUBE_API_CHANNEL_SECTION_SNIPPET_H_ 31 #define GOOGLE_YOUTUBE_API_CHANNEL_SECTION_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/strings/stringpiece.h" 39 #include "google/youtube_api/channel_section_localization.h" 87 return StringPiece(
"google_youtube_api::ChannelSectionSnippet");
96 return Storage().isMember(
"channelId");
103 MutableStorage()->removeMember(
"channelId");
111 const Json::Value& v = Storage(
"channelId");
112 if (v == Json::Value::null)
return StringPiece(
"");
113 return StringPiece(v.asCString());
125 *MutableStorage(
"channelId") = value.data();
134 return Storage().isMember(
"defaultLanguage");
141 MutableStorage()->removeMember(
"defaultLanguage");
149 const Json::Value& v = Storage(
"defaultLanguage");
150 if (v == Json::Value::null)
return StringPiece(
"");
151 return StringPiece(v.asCString());
162 *MutableStorage(
"defaultLanguage") = value.data();
171 return Storage().isMember(
"localized");
178 MutableStorage()->removeMember(
"localized");
203 return Storage().isMember(
"position");
210 MutableStorage()->removeMember(
"position");
218 const Json::Value& storage = Storage(
"position");
219 return client::JsonValueToCppValueHelper<uint32 >(storage);
230 client::SetJsonValueFromCppValueHelper<uint32 >(
231 value, MutableStorage(
"position"));
240 return Storage().isMember(
"style");
247 MutableStorage()->removeMember(
"style");
255 const Json::Value& v = Storage(
"style");
256 if (v == Json::Value::null)
return StringPiece(
"");
257 return StringPiece(v.asCString());
268 *MutableStorage(
"style") = value.data();
277 return Storage().isMember(
"title");
284 MutableStorage()->removeMember(
"title");
292 const Json::Value& v = Storage(
"title");
293 if (v == Json::Value::null)
return StringPiece(
"");
294 return StringPiece(v.asCString());
305 *MutableStorage(
"title") = value.data();
314 return Storage().isMember(
"type");
321 MutableStorage()->removeMember(
"type");
329 const Json::Value& v = Storage(
"type");
330 if (v == Json::Value::null)
return StringPiece(
"");
331 return StringPiece(v.asCString());
342 *MutableStorage(
"type") = value.data();
349 #endif // GOOGLE_YOUTUBE_API_CHANNEL_SECTION_SNIPPET_H_ Definition: access_policy.cc:40
void clear_style()
Definition: channel_section_snippet.h:246
void clear_channel_id()
Definition: channel_section_snippet.h:102
void set_default_language(const StringPiece &value)
Definition: channel_section_snippet.h:161
Definition: channel_section_snippet.h:53
void set_title(const StringPiece &value)
Definition: channel_section_snippet.h:304
const StringPiece GetTypeName() const
Definition: channel_section_snippet.h:86
void set_style(const StringPiece &value)
Definition: channel_section_snippet.h:267
bool has_style() const
Definition: channel_section_snippet.h:239
const StringPiece get_style() const
Definition: channel_section_snippet.h:254
const StringPiece get_title() const
Definition: channel_section_snippet.h:291
Definition: channel_section_localization.h:50
bool has_position() const
Definition: channel_section_snippet.h:202
const StringPiece get_default_language() const
Definition: channel_section_snippet.h:148
void clear_default_language()
Definition: channel_section_snippet.h:140
Definition: access_policy.h:38
void set_position(uint32 value)
Definition: channel_section_snippet.h:229
const StringPiece get_type() const
Definition: channel_section_snippet.h:328
const StringPiece get_channel_id() const
Definition: channel_section_snippet.h:110
bool has_channel_id() const
Definition: channel_section_snippet.h:95
uint32 get_position() const
Definition: channel_section_snippet.h:217
void clear_position()
Definition: channel_section_snippet.h:209
bool has_default_language() const
Definition: channel_section_snippet.h:133
void clear_localized()
Definition: channel_section_snippet.h:177
void set_type(const StringPiece &value)
Definition: channel_section_snippet.h:341
void clear_type()
Definition: channel_section_snippet.h:320
void clear_title()
Definition: channel_section_snippet.h:283
void set_channel_id(const StringPiece &value)
Definition: channel_section_snippet.h:124
bool has_title() const
Definition: channel_section_snippet.h:276
bool has_localized() const
Definition: channel_section_snippet.h:170
bool has_type() const
Definition: channel_section_snippet.h:313