youtube  v3
live_chat_message_snippet.h
1 // Copyright 2010 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 
15 // This code was generated by google-apis-code-generator 1.5.1
16 // Build date: 2018-10-08 17:45:39 UTC
17 // on: 2020-02-27, 01:46:08 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // YouTube Data API (youtube/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 222
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_YOUTUBE_API_LIVE_CHAT_MESSAGE_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_LIVE_CHAT_MESSAGE_SNIPPET_H_
32 
33 #include <string>
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"
38 
39 #include "google/youtube_api/live_chat_fan_funding_event_details.h"
40 #include "google/youtube_api/live_chat_message_deleted_details.h"
41 #include "google/youtube_api/live_chat_message_retracted_details.h"
42 #include "google/youtube_api/live_chat_poll_closed_details.h"
43 #include "google/youtube_api/live_chat_poll_edited_details.h"
44 #include "google/youtube_api/live_chat_poll_opened_details.h"
45 #include "google/youtube_api/live_chat_poll_voted_details.h"
46 #include "google/youtube_api/live_chat_super_chat_details.h"
47 #include "google/youtube_api/live_chat_super_sticker_details.h"
48 #include "google/youtube_api/live_chat_text_message_details.h"
49 #include "google/youtube_api/live_chat_user_banned_message_details.h"
50 
51 namespace Json {
52 class Value;
53 } // namespace Json
54 
55 namespace google_youtube_api {
56 using namespace googleapis;
57 
63 class LiveChatMessageSnippet : public client::JsonCppData {
64  public:
70  static LiveChatMessageSnippet* New();
71 
77  explicit LiveChatMessageSnippet(const Json::Value& storage);
78 
84  explicit LiveChatMessageSnippet(Json::Value* storage);
85 
89  virtual ~LiveChatMessageSnippet();
90 
96  const StringPiece GetTypeName() const {
97  return StringPiece("google_youtube_api::LiveChatMessageSnippet");
98  }
99 
105  bool has_author_channel_id() const {
106  return Storage().isMember("authorChannelId");
107  }
108 
113  MutableStorage()->removeMember("authorChannelId");
114  }
115 
116 
120  const StringPiece get_author_channel_id() const {
121  const Json::Value& v = Storage("authorChannelId");
122  if (v == Json::Value::null) return StringPiece("");
123  return StringPiece(v.asCString());
124  }
125 
139  void set_author_channel_id(const StringPiece& value) {
140  *MutableStorage("authorChannelId") = value.data();
141  }
142 
148  bool has_display_message() const {
149  return Storage().isMember("displayMessage");
150  }
151 
156  MutableStorage()->removeMember("displayMessage");
157  }
158 
159 
163  const StringPiece get_display_message() const {
164  const Json::Value& v = Storage("displayMessage");
165  if (v == Json::Value::null) return StringPiece("");
166  return StringPiece(v.asCString());
167  }
168 
178  void set_display_message(const StringPiece& value) {
179  *MutableStorage("displayMessage") = value.data();
180  }
181 
189  return Storage().isMember("fanFundingEventDetails");
190  }
191 
196  MutableStorage()->removeMember("fanFundingEventDetails");
197  }
198 
199 
204  const LiveChatFanFundingEventDetails get_fan_funding_event_details() const;
205 
215  LiveChatFanFundingEventDetails mutable_fanFundingEventDetails();
216 
222  bool has_has_display_content() const {
223  return Storage().isMember("hasDisplayContent");
224  }
225 
230  MutableStorage()->removeMember("hasDisplayContent");
231  }
232 
233 
237  bool get_has_display_content() const {
238  const Json::Value& storage = Storage("hasDisplayContent");
239  return client::JsonValueToCppValueHelper<bool >(storage);
240  }
241 
249  void set_has_display_content(bool value) {
250  client::SetJsonValueFromCppValueHelper<bool >(
251  value, MutableStorage("hasDisplayContent"));
252  }
253 
259  bool has_live_chat_id() const {
260  return Storage().isMember("liveChatId");
261  }
262 
267  MutableStorage()->removeMember("liveChatId");
268  }
269 
270 
274  const StringPiece get_live_chat_id() const {
275  const Json::Value& v = Storage("liveChatId");
276  if (v == Json::Value::null) return StringPiece("");
277  return StringPiece(v.asCString());
278  }
279 
284  void set_live_chat_id(const StringPiece& value) {
285  *MutableStorage("liveChatId") = value.data();
286  }
287 
294  return Storage().isMember("messageDeletedDetails");
295  }
296 
301  MutableStorage()->removeMember("messageDeletedDetails");
302  }
303 
304 
309  const LiveChatMessageDeletedDetails get_message_deleted_details() const;
310 
316  LiveChatMessageDeletedDetails mutable_messageDeletedDetails();
317 
325  return Storage().isMember("messageRetractedDetails");
326  }
327 
332  MutableStorage()->removeMember("messageRetractedDetails");
333  }
334 
335 
340  const LiveChatMessageRetractedDetails get_message_retracted_details() const;
341 
347  LiveChatMessageRetractedDetails mutable_messageRetractedDetails();
348 
354  bool has_poll_closed_details() const {
355  return Storage().isMember("pollClosedDetails");
356  }
357 
362  MutableStorage()->removeMember("pollClosedDetails");
363  }
364 
365 
370  const LiveChatPollClosedDetails get_poll_closed_details() const;
371 
377  LiveChatPollClosedDetails mutable_pollClosedDetails();
378 
384  bool has_poll_edited_details() const {
385  return Storage().isMember("pollEditedDetails");
386  }
387 
392  MutableStorage()->removeMember("pollEditedDetails");
393  }
394 
395 
400  const LiveChatPollEditedDetails get_poll_edited_details() const;
401 
407  LiveChatPollEditedDetails mutable_pollEditedDetails();
408 
414  bool has_poll_opened_details() const {
415  return Storage().isMember("pollOpenedDetails");
416  }
417 
422  MutableStorage()->removeMember("pollOpenedDetails");
423  }
424 
425 
430  const LiveChatPollOpenedDetails get_poll_opened_details() const;
431 
437  LiveChatPollOpenedDetails mutable_pollOpenedDetails();
438 
444  bool has_poll_voted_details() const {
445  return Storage().isMember("pollVotedDetails");
446  }
447 
452  MutableStorage()->removeMember("pollVotedDetails");
453  }
454 
455 
460  const LiveChatPollVotedDetails get_poll_voted_details() const;
461 
467  LiveChatPollVotedDetails mutable_pollVotedDetails();
468 
474  bool has_published_at() const {
475  return Storage().isMember("publishedAt");
476  }
477 
482  MutableStorage()->removeMember("publishedAt");
483  }
484 
485 
489  client::DateTime get_published_at() const {
490  const Json::Value& storage = Storage("publishedAt");
491  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
492  }
493 
502  void set_published_at(client::DateTime value) {
503  client::SetJsonValueFromCppValueHelper<client::DateTime >(
504  value, MutableStorage("publishedAt"));
505  }
506 
512  bool has_super_chat_details() const {
513  return Storage().isMember("superChatDetails");
514  }
515 
520  MutableStorage()->removeMember("superChatDetails");
521  }
522 
523 
528  const LiveChatSuperChatDetails get_super_chat_details() const;
529 
539  LiveChatSuperChatDetails mutable_superChatDetails();
540 
547  return Storage().isMember("superStickerDetails");
548  }
549 
554  MutableStorage()->removeMember("superStickerDetails");
555  }
556 
557 
562  const LiveChatSuperStickerDetails get_super_sticker_details() const;
563 
573  LiveChatSuperStickerDetails mutable_superStickerDetails();
574 
581  return Storage().isMember("textMessageDetails");
582  }
583 
588  MutableStorage()->removeMember("textMessageDetails");
589  }
590 
591 
596  const LiveChatTextMessageDetails get_text_message_details() const;
597 
607  LiveChatTextMessageDetails mutable_textMessageDetails();
608 
614  bool has_type() const {
615  return Storage().isMember("type");
616  }
617 
621  void clear_type() {
622  MutableStorage()->removeMember("type");
623  }
624 
625 
629  const StringPiece get_type() const {
630  const Json::Value& v = Storage("type");
631  if (v == Json::Value::null) return StringPiece("");
632  return StringPiece(v.asCString());
633  }
634 
643  void set_type(const StringPiece& value) {
644  *MutableStorage("type") = value.data();
645  }
646 
652  bool has_user_banned_details() const {
653  return Storage().isMember("userBannedDetails");
654  }
655 
660  MutableStorage()->removeMember("userBannedDetails");
661  }
662 
663 
668  const LiveChatUserBannedMessageDetails get_user_banned_details() const;
669 
675  LiveChatUserBannedMessageDetails mutable_userBannedDetails();
676 
677  private:
678  void operator=(const LiveChatMessageSnippet&);
679 }; // LiveChatMessageSnippet
680 } // namespace google_youtube_api
681 #endif // GOOGLE_YOUTUBE_API_LIVE_CHAT_MESSAGE_SNIPPET_H_
Definition: live_chat_message_deleted_details.h:50
void clear_user_banned_details()
Definition: live_chat_message_snippet.h:659
const StringPiece get_display_message() const
Definition: live_chat_message_snippet.h:163
const StringPiece get_live_chat_id() const
Definition: live_chat_message_snippet.h:274
Definition: access_policy.cc:40
Definition: live_chat_poll_opened_details.h:52
bool has_author_channel_id() const
Definition: live_chat_message_snippet.h:105
const StringPiece get_type() const
Definition: live_chat_message_snippet.h:629
Definition: live_chat_poll_closed_details.h:50
void clear_published_at()
Definition: live_chat_message_snippet.h:481
const StringPiece get_author_channel_id() const
Definition: live_chat_message_snippet.h:120
void clear_poll_voted_details()
Definition: live_chat_message_snippet.h:451
Definition: live_chat_poll_voted_details.h:50
bool has_type() const
Definition: live_chat_message_snippet.h:614
bool has_user_banned_details() const
Definition: live_chat_message_snippet.h:652
void set_display_message(const StringPiece &value)
Definition: live_chat_message_snippet.h:178
void clear_display_message()
Definition: live_chat_message_snippet.h:155
void clear_super_chat_details()
Definition: live_chat_message_snippet.h:519
bool has_poll_opened_details() const
Definition: live_chat_message_snippet.h:414
bool get_has_display_content() const
Definition: live_chat_message_snippet.h:237
Definition: live_chat_super_chat_details.h:51
void set_type(const StringPiece &value)
Definition: live_chat_message_snippet.h:643
bool has_poll_edited_details() const
Definition: live_chat_message_snippet.h:384
Definition: live_chat_super_sticker_details.h:53
client::DateTime get_published_at() const
Definition: live_chat_message_snippet.h:489
void clear_poll_edited_details()
Definition: live_chat_message_snippet.h:391
bool has_poll_voted_details() const
Definition: live_chat_message_snippet.h:444
const StringPiece GetTypeName() const
Definition: live_chat_message_snippet.h:96
void set_has_display_content(bool value)
Definition: live_chat_message_snippet.h:249
void clear_poll_closed_details()
Definition: live_chat_message_snippet.h:361
bool has_published_at() const
Definition: live_chat_message_snippet.h:474
bool has_display_message() const
Definition: live_chat_message_snippet.h:148
bool has_fan_funding_event_details() const
Definition: live_chat_message_snippet.h:188
Definition: live_chat_user_banned_message_details.h:53
void clear_message_retracted_details()
Definition: live_chat_message_snippet.h:331
Definition: access_policy.h:38
Definition: live_chat_message_retracted_details.h:50
bool has_poll_closed_details() const
Definition: live_chat_message_snippet.h:354
bool has_has_display_content() const
Definition: live_chat_message_snippet.h:222
bool has_message_deleted_details() const
Definition: live_chat_message_snippet.h:293
Definition: live_chat_message_snippet.h:63
Definition: live_chat_text_message_details.h:50
void set_author_channel_id(const StringPiece &value)
Definition: live_chat_message_snippet.h:139
Definition: live_chat_poll_edited_details.h:52
void clear_author_channel_id()
Definition: live_chat_message_snippet.h:112
bool has_super_sticker_details() const
Definition: live_chat_message_snippet.h:546
void clear_text_message_details()
Definition: live_chat_message_snippet.h:587
void clear_type()
Definition: live_chat_message_snippet.h:621
void clear_poll_opened_details()
Definition: live_chat_message_snippet.h:421
Definition: live_chat_fan_funding_event_details.h:51
void set_published_at(client::DateTime value)
Definition: live_chat_message_snippet.h:502
void clear_has_display_content()
Definition: live_chat_message_snippet.h:229
void clear_live_chat_id()
Definition: live_chat_message_snippet.h:266
bool has_live_chat_id() const
Definition: live_chat_message_snippet.h:259
void set_live_chat_id(const StringPiece &value)
Definition: live_chat_message_snippet.h:284
void clear_super_sticker_details()
Definition: live_chat_message_snippet.h:553
void clear_fan_funding_event_details()
Definition: live_chat_message_snippet.h:195
bool has_text_message_details() const
Definition: live_chat_message_snippet.h:580
void clear_message_deleted_details()
Definition: live_chat_message_snippet.h:300
bool has_message_retracted_details() const
Definition: live_chat_message_snippet.h:324
bool has_super_chat_details() const
Definition: live_chat_message_snippet.h:512