youtube  v3
comment_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_COMMENT_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_COMMENT_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 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_youtube_api {
45 using namespace googleapis;
46 
52 class CommentSnippet : public client::JsonCppData {
53  public:
59  static CommentSnippet* New();
60 
66  explicit CommentSnippet(const Json::Value& storage);
67 
73  explicit CommentSnippet(Json::Value* storage);
74 
78  virtual ~CommentSnippet();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_youtube_api::CommentSnippet");
87  }
88 
94  bool has_author_channel_id() const {
95  return Storage().isMember("authorChannelId");
96  }
97 
102  MutableStorage()->removeMember("authorChannelId");
103  }
104 
105 
110  const client::JsonCppData get_author_channel_id() const {
111  const Json::Value& storage = Storage("authorChannelId");
112  return client::JsonValueToCppValueHelper<client::JsonCppData >(storage);
113  }
114 
123  client::JsonCppData mutable_authorChannelId() {
124  Json::Value* storage = MutableStorage("authorChannelId");
125  return client::JsonValueToMutableCppValueHelper<client::JsonCppData >(storage);
126  }
127 
133  bool has_author_channel_url() const {
134  return Storage().isMember("authorChannelUrl");
135  }
136 
141  MutableStorage()->removeMember("authorChannelUrl");
142  }
143 
144 
148  const StringPiece get_author_channel_url() const {
149  const Json::Value& v = Storage("authorChannelUrl");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
161  void set_author_channel_url(const StringPiece& value) {
162  *MutableStorage("authorChannelUrl") = value.data();
163  }
164 
170  bool has_author_display_name() const {
171  return Storage().isMember("authorDisplayName");
172  }
173 
178  MutableStorage()->removeMember("authorDisplayName");
179  }
180 
181 
185  const StringPiece get_author_display_name() const {
186  const Json::Value& v = Storage("authorDisplayName");
187  if (v == Json::Value::null) return StringPiece("");
188  return StringPiece(v.asCString());
189  }
190 
198  void set_author_display_name(const StringPiece& value) {
199  *MutableStorage("authorDisplayName") = value.data();
200  }
201 
208  return Storage().isMember("authorProfileImageUrl");
209  }
210 
215  MutableStorage()->removeMember("authorProfileImageUrl");
216  }
217 
218 
222  const StringPiece get_author_profile_image_url() const {
223  const Json::Value& v = Storage("authorProfileImageUrl");
224  if (v == Json::Value::null) return StringPiece("");
225  return StringPiece(v.asCString());
226  }
227 
235  void set_author_profile_image_url(const StringPiece& value) {
236  *MutableStorage("authorProfileImageUrl") = value.data();
237  }
238 
244  bool has_can_rate() const {
245  return Storage().isMember("canRate");
246  }
247 
251  void clear_can_rate() {
252  MutableStorage()->removeMember("canRate");
253  }
254 
255 
259  bool get_can_rate() const {
260  const Json::Value& storage = Storage("canRate");
261  return client::JsonValueToCppValueHelper<bool >(storage);
262  }
263 
271  void set_can_rate(bool value) {
272  client::SetJsonValueFromCppValueHelper<bool >(
273  value, MutableStorage("canRate"));
274  }
275 
281  bool has_channel_id() const {
282  return Storage().isMember("channelId");
283  }
284 
289  MutableStorage()->removeMember("channelId");
290  }
291 
292 
296  const StringPiece get_channel_id() const {
297  const Json::Value& v = Storage("channelId");
298  if (v == Json::Value::null) return StringPiece("");
299  return StringPiece(v.asCString());
300  }
301 
311  void set_channel_id(const StringPiece& value) {
312  *MutableStorage("channelId") = value.data();
313  }
314 
320  bool has_like_count() const {
321  return Storage().isMember("likeCount");
322  }
323 
328  MutableStorage()->removeMember("likeCount");
329  }
330 
331 
335  uint32 get_like_count() const {
336  const Json::Value& storage = Storage("likeCount");
337  return client::JsonValueToCppValueHelper<uint32 >(storage);
338  }
339 
347  void set_like_count(uint32 value) {
348  client::SetJsonValueFromCppValueHelper<uint32 >(
349  value, MutableStorage("likeCount"));
350  }
351 
357  bool has_moderation_status() const {
358  return Storage().isMember("moderationStatus");
359  }
360 
365  MutableStorage()->removeMember("moderationStatus");
366  }
367 
368 
372  const StringPiece get_moderation_status() const {
373  const Json::Value& v = Storage("moderationStatus");
374  if (v == Json::Value::null) return StringPiece("");
375  return StringPiece(v.asCString());
376  }
377 
386  void set_moderation_status(const StringPiece& value) {
387  *MutableStorage("moderationStatus") = value.data();
388  }
389 
395  bool has_parent_id() const {
396  return Storage().isMember("parentId");
397  }
398 
403  MutableStorage()->removeMember("parentId");
404  }
405 
406 
410  const StringPiece get_parent_id() const {
411  const Json::Value& v = Storage("parentId");
412  if (v == Json::Value::null) return StringPiece("");
413  return StringPiece(v.asCString());
414  }
415 
423  void set_parent_id(const StringPiece& value) {
424  *MutableStorage("parentId") = value.data();
425  }
426 
432  bool has_published_at() const {
433  return Storage().isMember("publishedAt");
434  }
435 
440  MutableStorage()->removeMember("publishedAt");
441  }
442 
443 
447  client::DateTime get_published_at() const {
448  const Json::Value& storage = Storage("publishedAt");
449  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
450  }
451 
460  void set_published_at(client::DateTime value) {
461  client::SetJsonValueFromCppValueHelper<client::DateTime >(
462  value, MutableStorage("publishedAt"));
463  }
464 
470  bool has_text_display() const {
471  return Storage().isMember("textDisplay");
472  }
473 
478  MutableStorage()->removeMember("textDisplay");
479  }
480 
481 
485  const StringPiece get_text_display() const {
486  const Json::Value& v = Storage("textDisplay");
487  if (v == Json::Value::null) return StringPiece("");
488  return StringPiece(v.asCString());
489  }
490 
501  void set_text_display(const StringPiece& value) {
502  *MutableStorage("textDisplay") = value.data();
503  }
504 
510  bool has_text_original() const {
511  return Storage().isMember("textOriginal");
512  }
513 
518  MutableStorage()->removeMember("textOriginal");
519  }
520 
521 
525  const StringPiece get_text_original() const {
526  const Json::Value& v = Storage("textOriginal");
527  if (v == Json::Value::null) return StringPiece("");
528  return StringPiece(v.asCString());
529  }
530 
540  void set_text_original(const StringPiece& value) {
541  *MutableStorage("textOriginal") = value.data();
542  }
543 
549  bool has_updated_at() const {
550  return Storage().isMember("updatedAt");
551  }
552 
557  MutableStorage()->removeMember("updatedAt");
558  }
559 
560 
564  client::DateTime get_updated_at() const {
565  const Json::Value& storage = Storage("updatedAt");
566  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
567  }
568 
577  void set_updated_at(client::DateTime value) {
578  client::SetJsonValueFromCppValueHelper<client::DateTime >(
579  value, MutableStorage("updatedAt"));
580  }
581 
587  bool has_video_id() const {
588  return Storage().isMember("videoId");
589  }
590 
594  void clear_video_id() {
595  MutableStorage()->removeMember("videoId");
596  }
597 
598 
602  const StringPiece get_video_id() const {
603  const Json::Value& v = Storage("videoId");
604  if (v == Json::Value::null) return StringPiece("");
605  return StringPiece(v.asCString());
606  }
607 
615  void set_video_id(const StringPiece& value) {
616  *MutableStorage("videoId") = value.data();
617  }
618 
624  bool has_viewer_rating() const {
625  return Storage().isMember("viewerRating");
626  }
627 
632  MutableStorage()->removeMember("viewerRating");
633  }
634 
635 
639  const StringPiece get_viewer_rating() const {
640  const Json::Value& v = Storage("viewerRating");
641  if (v == Json::Value::null) return StringPiece("");
642  return StringPiece(v.asCString());
643  }
644 
654  void set_viewer_rating(const StringPiece& value) {
655  *MutableStorage("viewerRating") = value.data();
656  }
657 
658  private:
659  void operator=(const CommentSnippet&);
660 }; // CommentSnippet
661 } // namespace google_youtube_api
662 #endif // GOOGLE_YOUTUBE_API_COMMENT_SNIPPET_H_
void clear_channel_id()
Definition: comment_snippet.h:288
const StringPiece get_text_original() const
Definition: comment_snippet.h:525
bool has_text_display() const
Definition: comment_snippet.h:470
Definition: access_policy.cc:40
void clear_updated_at()
Definition: comment_snippet.h:556
client::DateTime get_updated_at() const
Definition: comment_snippet.h:564
Definition: comment_snippet.h:52
client::DateTime get_published_at() const
Definition: comment_snippet.h:447
bool has_updated_at() const
Definition: comment_snippet.h:549
void set_published_at(client::DateTime value)
Definition: comment_snippet.h:460
bool get_can_rate() const
Definition: comment_snippet.h:259
void set_video_id(const StringPiece &value)
Definition: comment_snippet.h:615
bool has_can_rate() const
Definition: comment_snippet.h:244
const StringPiece get_channel_id() const
Definition: comment_snippet.h:296
const StringPiece get_viewer_rating() const
Definition: comment_snippet.h:639
void clear_author_channel_id()
Definition: comment_snippet.h:101
void clear_published_at()
Definition: comment_snippet.h:439
void clear_text_display()
Definition: comment_snippet.h:477
void set_author_display_name(const StringPiece &value)
Definition: comment_snippet.h:198
void clear_author_display_name()
Definition: comment_snippet.h:177
void set_channel_id(const StringPiece &value)
Definition: comment_snippet.h:311
uint32 get_like_count() const
Definition: comment_snippet.h:335
void clear_can_rate()
Definition: comment_snippet.h:251
bool has_author_display_name() const
Definition: comment_snippet.h:170
void set_updated_at(client::DateTime value)
Definition: comment_snippet.h:577
bool has_author_profile_image_url() const
Definition: comment_snippet.h:207
void clear_text_original()
Definition: comment_snippet.h:517
bool has_published_at() const
Definition: comment_snippet.h:432
bool has_viewer_rating() const
Definition: comment_snippet.h:624
bool has_channel_id() const
Definition: comment_snippet.h:281
bool has_moderation_status() const
Definition: comment_snippet.h:357
void set_like_count(uint32 value)
Definition: comment_snippet.h:347
void clear_author_profile_image_url()
Definition: comment_snippet.h:214
bool has_author_channel_id() const
Definition: comment_snippet.h:94
void set_text_display(const StringPiece &value)
Definition: comment_snippet.h:501
Definition: access_policy.h:38
void clear_viewer_rating()
Definition: comment_snippet.h:631
const StringPiece get_text_display() const
Definition: comment_snippet.h:485
const StringPiece get_moderation_status() const
Definition: comment_snippet.h:372
bool has_text_original() const
Definition: comment_snippet.h:510
bool has_like_count() const
Definition: comment_snippet.h:320
void clear_author_channel_url()
Definition: comment_snippet.h:140
void clear_like_count()
Definition: comment_snippet.h:327
const StringPiece get_parent_id() const
Definition: comment_snippet.h:410
const StringPiece get_author_profile_image_url() const
Definition: comment_snippet.h:222
const StringPiece get_author_display_name() const
Definition: comment_snippet.h:185
void set_author_profile_image_url(const StringPiece &value)
Definition: comment_snippet.h:235
bool has_parent_id() const
Definition: comment_snippet.h:395
const StringPiece get_video_id() const
Definition: comment_snippet.h:602
bool has_author_channel_url() const
Definition: comment_snippet.h:133
const client::JsonCppData get_author_channel_id() const
Definition: comment_snippet.h:110
void clear_moderation_status()
Definition: comment_snippet.h:364
const StringPiece GetTypeName() const
Definition: comment_snippet.h:85
void clear_video_id()
Definition: comment_snippet.h:594
client::JsonCppData mutable_authorChannelId()
Definition: comment_snippet.h:123
bool has_video_id() const
Definition: comment_snippet.h:587
void set_text_original(const StringPiece &value)
Definition: comment_snippet.h:540
void set_moderation_status(const StringPiece &value)
Definition: comment_snippet.h:386
void set_author_channel_url(const StringPiece &value)
Definition: comment_snippet.h:161
void clear_parent_id()
Definition: comment_snippet.h:402
const StringPiece get_author_channel_url() const
Definition: comment_snippet.h:148
void set_parent_id(const StringPiece &value)
Definition: comment_snippet.h:423
void set_viewer_rating(const StringPiece &value)
Definition: comment_snippet.h:654
void set_can_rate(bool value)
Definition: comment_snippet.h:271