youtube  v3
super_chat_event_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_SUPER_CHAT_EVENT_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_SUPER_CHAT_EVENT_SNIPPET_H_
32 
33 #include <string>
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"
39 
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"
43 
44 namespace Json {
45 class Value;
46 } // namespace Json
47 
48 namespace google_youtube_api {
49 using namespace googleapis;
50 
56 class SuperChatEventSnippet : public client::JsonCppData {
57  public:
63  static SuperChatEventSnippet* New();
64 
70  explicit SuperChatEventSnippet(const Json::Value& storage);
71 
77  explicit SuperChatEventSnippet(Json::Value* storage);
78 
82  virtual ~SuperChatEventSnippet();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_youtube_api::SuperChatEventSnippet");
91  }
92 
98  bool has_amount_micros() const {
99  return Storage().isMember("amountMicros");
100  }
101 
106  MutableStorage()->removeMember("amountMicros");
107  }
108 
109 
113  uint64 get_amount_micros() const {
114  const Json::Value& storage = Storage("amountMicros");
115  return client::JsonValueToCppValueHelper<uint64 >(storage);
116  }
117 
126  void set_amount_micros(uint64 value) {
127  client::SetJsonValueFromCppValueHelper<uint64 >(
128  value, MutableStorage("amountMicros"));
129  }
130 
136  bool has_channel_id() const {
137  return Storage().isMember("channelId");
138  }
139 
144  MutableStorage()->removeMember("channelId");
145  }
146 
147 
151  const StringPiece get_channel_id() const {
152  const Json::Value& v = Storage("channelId");
153  if (v == Json::Value::null) return StringPiece("");
154  return StringPiece(v.asCString());
155  }
156 
164  void set_channel_id(const StringPiece& value) {
165  *MutableStorage("channelId") = value.data();
166  }
167 
173  bool has_comment_text() const {
174  return Storage().isMember("commentText");
175  }
176 
181  MutableStorage()->removeMember("commentText");
182  }
183 
184 
188  const StringPiece get_comment_text() const {
189  const Json::Value& v = Storage("commentText");
190  if (v == Json::Value::null) return StringPiece("");
191  return StringPiece(v.asCString());
192  }
193 
201  void set_comment_text(const StringPiece& value) {
202  *MutableStorage("commentText") = value.data();
203  }
204 
210  bool has_created_at() const {
211  return Storage().isMember("createdAt");
212  }
213 
218  MutableStorage()->removeMember("createdAt");
219  }
220 
221 
225  client::DateTime get_created_at() const {
226  const Json::Value& storage = Storage("createdAt");
227  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
228  }
229 
238  void set_created_at(client::DateTime value) {
239  client::SetJsonValueFromCppValueHelper<client::DateTime >(
240  value, MutableStorage("createdAt"));
241  }
242 
248  bool has_currency() const {
249  return Storage().isMember("currency");
250  }
251 
255  void clear_currency() {
256  MutableStorage()->removeMember("currency");
257  }
258 
259 
263  const StringPiece get_currency() const {
264  const Json::Value& v = Storage("currency");
265  if (v == Json::Value::null) return StringPiece("");
266  return StringPiece(v.asCString());
267  }
268 
276  void set_currency(const StringPiece& value) {
277  *MutableStorage("currency") = value.data();
278  }
279 
285  bool has_display_string() const {
286  return Storage().isMember("displayString");
287  }
288 
293  MutableStorage()->removeMember("displayString");
294  }
295 
296 
300  const StringPiece get_display_string() const {
301  const Json::Value& v = Storage("displayString");
302  if (v == Json::Value::null) return StringPiece("");
303  return StringPiece(v.asCString());
304  }
305 
314  void set_display_string(const StringPiece& value) {
315  *MutableStorage("displayString") = value.data();
316  }
317 
324  return Storage().isMember("isSuperChatForGood");
325  }
326 
331  MutableStorage()->removeMember("isSuperChatForGood");
332  }
333 
334 
339  const Json::Value& storage = Storage("isSuperChatForGood");
340  return client::JsonValueToCppValueHelper<bool >(storage);
341  }
342 
350  void set_is_super_chat_for_good(bool value) {
351  client::SetJsonValueFromCppValueHelper<bool >(
352  value, MutableStorage("isSuperChatForGood"));
353  }
354 
361  return Storage().isMember("isSuperStickerEvent");
362  }
363 
368  MutableStorage()->removeMember("isSuperStickerEvent");
369  }
370 
371 
376  const Json::Value& storage = Storage("isSuperStickerEvent");
377  return client::JsonValueToCppValueHelper<bool >(storage);
378  }
379 
387  void set_is_super_sticker_event(bool value) {
388  client::SetJsonValueFromCppValueHelper<bool >(
389  value, MutableStorage("isSuperStickerEvent"));
390  }
391 
397  bool has_message_type() const {
398  return Storage().isMember("messageType");
399  }
400 
405  MutableStorage()->removeMember("messageType");
406  }
407 
408 
412  uint32 get_message_type() const {
413  const Json::Value& storage = Storage("messageType");
414  return client::JsonValueToCppValueHelper<uint32 >(storage);
415  }
416 
425  void set_message_type(uint32 value) {
426  client::SetJsonValueFromCppValueHelper<uint32 >(
427  value, MutableStorage("messageType"));
428  }
429 
435  bool has_nonprofit() const {
436  return Storage().isMember("nonprofit");
437  }
438 
443  MutableStorage()->removeMember("nonprofit");
444  }
445 
446 
450  const Nonprofit get_nonprofit() const;
451 
461  Nonprofit mutable_nonprofit();
462 
469  return Storage().isMember("superStickerMetadata");
470  }
471 
476  MutableStorage()->removeMember("superStickerMetadata");
477  }
478 
479 
484  const SuperStickerMetadata get_super_sticker_metadata() const;
485 
495  SuperStickerMetadata mutable_superStickerMetadata();
496 
502  bool has_supporter_details() const {
503  return Storage().isMember("supporterDetails");
504  }
505 
510  MutableStorage()->removeMember("supporterDetails");
511  }
512 
513 
518  const ChannelProfileDetails get_supporter_details() const;
519 
528  ChannelProfileDetails mutable_supporterDetails();
529 
530  private:
531  void operator=(const SuperChatEventSnippet&);
532 }; // SuperChatEventSnippet
533 } // namespace google_youtube_api
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
Definition: super_sticker_metadata.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