30 #ifndef GOOGLE_YOUTUBE_API_SUPER_CHAT_EVENT_SNIPPET_H_ 31 #define GOOGLE_YOUTUBE_API_SUPER_CHAT_EVENT_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" 41 #include "google/youtube_api/nonprofit.h" 42 #include "google/youtube_api/super_sticker_metadata.h" 90 return StringPiece(
"google_youtube_api::SuperChatEventSnippet");
99 return Storage().isMember(
"amountMicros");
106 MutableStorage()->removeMember(
"amountMicros");
114 const Json::Value& storage = Storage(
"amountMicros");
115 return client::JsonValueToCppValueHelper<uint64 >(storage);
127 client::SetJsonValueFromCppValueHelper<uint64 >(
128 value, MutableStorage(
"amountMicros"));
137 return Storage().isMember(
"channelId");
144 MutableStorage()->removeMember(
"channelId");
152 const Json::Value& v = Storage(
"channelId");
153 if (v == Json::Value::null)
return StringPiece(
"");
154 return StringPiece(v.asCString());
165 *MutableStorage(
"channelId") = value.data();
174 return Storage().isMember(
"commentText");
181 MutableStorage()->removeMember(
"commentText");
189 const Json::Value& v = Storage(
"commentText");
190 if (v == Json::Value::null)
return StringPiece(
"");
191 return StringPiece(v.asCString());
202 *MutableStorage(
"commentText") = value.data();
211 return Storage().isMember(
"createdAt");
218 MutableStorage()->removeMember(
"createdAt");
226 const Json::Value& storage = Storage(
"createdAt");
227 return client::JsonValueToCppValueHelper<client::DateTime >(storage);
239 client::SetJsonValueFromCppValueHelper<client::DateTime >(
240 value, MutableStorage(
"createdAt"));
249 return Storage().isMember(
"currency");
256 MutableStorage()->removeMember(
"currency");
264 const Json::Value& v = Storage(
"currency");
265 if (v == Json::Value::null)
return StringPiece(
"");
266 return StringPiece(v.asCString());
277 *MutableStorage(
"currency") = value.data();
286 return Storage().isMember(
"displayString");
293 MutableStorage()->removeMember(
"displayString");
301 const Json::Value& v = Storage(
"displayString");
302 if (v == Json::Value::null)
return StringPiece(
"");
303 return StringPiece(v.asCString());
315 *MutableStorage(
"displayString") = value.data();
324 return Storage().isMember(
"isSuperChatForGood");
331 MutableStorage()->removeMember(
"isSuperChatForGood");
339 const Json::Value& storage = Storage(
"isSuperChatForGood");
340 return client::JsonValueToCppValueHelper<bool >(storage);
351 client::SetJsonValueFromCppValueHelper<bool >(
352 value, MutableStorage(
"isSuperChatForGood"));
361 return Storage().isMember(
"isSuperStickerEvent");
368 MutableStorage()->removeMember(
"isSuperStickerEvent");
376 const Json::Value& storage = Storage(
"isSuperStickerEvent");
377 return client::JsonValueToCppValueHelper<bool >(storage);
388 client::SetJsonValueFromCppValueHelper<bool >(
389 value, MutableStorage(
"isSuperStickerEvent"));
398 return Storage().isMember(
"messageType");
405 MutableStorage()->removeMember(
"messageType");
413 const Json::Value& storage = Storage(
"messageType");
414 return client::JsonValueToCppValueHelper<uint32 >(storage);
426 client::SetJsonValueFromCppValueHelper<uint32 >(
427 value, MutableStorage(
"messageType"));
436 return Storage().isMember(
"nonprofit");
443 MutableStorage()->removeMember(
"nonprofit");
469 return Storage().isMember(
"superStickerMetadata");
476 MutableStorage()->removeMember(
"superStickerMetadata");
503 return Storage().isMember(
"supporterDetails");
510 MutableStorage()->removeMember(
"supporterDetails");
534 #endif // GOOGLE_YOUTUBE_API_SUPER_CHAT_EVENT_SNIPPET_H_ void clear_message_type()
Definition: super_chat_event_snippet.h:404
bool has_super_sticker_metadata() const
Definition: super_chat_event_snippet.h:468
void clear_created_at()
Definition: super_chat_event_snippet.h:217
Definition: access_policy.cc:40
bool get_is_super_sticker_event() const
Definition: super_chat_event_snippet.h:375
void clear_nonprofit()
Definition: super_chat_event_snippet.h:442
Definition: channel_profile_details.h:50
bool has_nonprofit() const
Definition: super_chat_event_snippet.h:435
bool has_display_string() const
Definition: super_chat_event_snippet.h:285
bool has_supporter_details() const
Definition: super_chat_event_snippet.h:502
Definition: nonprofit.h:52
const StringPiece GetTypeName() const
Definition: super_chat_event_snippet.h:89
void clear_supporter_details()
Definition: super_chat_event_snippet.h:509
const StringPiece get_channel_id() const
Definition: super_chat_event_snippet.h:151
void clear_amount_micros()
Definition: super_chat_event_snippet.h:105
void set_channel_id(const StringPiece &value)
Definition: super_chat_event_snippet.h:164
bool get_is_super_chat_for_good() const
Definition: super_chat_event_snippet.h:338
Definition: super_chat_event_snippet.h:56
bool has_message_type() const
Definition: super_chat_event_snippet.h:397
bool has_is_super_sticker_event() const
Definition: super_chat_event_snippet.h:360
void clear_channel_id()
Definition: super_chat_event_snippet.h:143
bool has_currency() const
Definition: super_chat_event_snippet.h:248
void set_amount_micros(uint64 value)
Definition: super_chat_event_snippet.h:126
void set_message_type(uint32 value)
Definition: super_chat_event_snippet.h:425
void clear_comment_text()
Definition: super_chat_event_snippet.h:180
Definition: access_policy.h:38
void set_currency(const StringPiece &value)
Definition: super_chat_event_snippet.h:276
bool has_created_at() const
Definition: super_chat_event_snippet.h:210
const StringPiece get_comment_text() const
Definition: super_chat_event_snippet.h:188
uint64 get_amount_micros() const
Definition: super_chat_event_snippet.h:113
void clear_super_sticker_metadata()
Definition: super_chat_event_snippet.h:475
uint32 get_message_type() const
Definition: super_chat_event_snippet.h:412
void clear_display_string()
Definition: super_chat_event_snippet.h:292
const StringPiece get_display_string() const
Definition: super_chat_event_snippet.h:300
bool has_amount_micros() const
Definition: super_chat_event_snippet.h:98
void set_comment_text(const StringPiece &value)
Definition: super_chat_event_snippet.h:201
void clear_currency()
Definition: super_chat_event_snippet.h:255
bool has_comment_text() const
Definition: super_chat_event_snippet.h:173
void set_created_at(client::DateTime value)
Definition: super_chat_event_snippet.h:238
void clear_is_super_sticker_event()
Definition: super_chat_event_snippet.h:367
const StringPiece get_currency() const
Definition: super_chat_event_snippet.h:263
void set_is_super_sticker_event(bool value)
Definition: super_chat_event_snippet.h:387
bool has_is_super_chat_for_good() const
Definition: super_chat_event_snippet.h:323
bool has_channel_id() const
Definition: super_chat_event_snippet.h:136
client::DateTime get_created_at() const
Definition: super_chat_event_snippet.h:225
void clear_is_super_chat_for_good()
Definition: super_chat_event_snippet.h:330
void set_is_super_chat_for_good(bool value)
Definition: super_chat_event_snippet.h:350
void set_display_string(const StringPiece &value)
Definition: super_chat_event_snippet.h:314