youtube  v3
comment_thread_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_THREAD_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_COMMENT_THREAD_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/strings/stringpiece.h"
38 
39 #include "google/youtube_api/comment.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
53 class CommentThreadSnippet : public client::JsonCppData {
54  public:
60  static CommentThreadSnippet* New();
61 
67  explicit CommentThreadSnippet(const Json::Value& storage);
68 
74  explicit CommentThreadSnippet(Json::Value* storage);
75 
79  virtual ~CommentThreadSnippet();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_youtube_api::CommentThreadSnippet");
88  }
89 
95  bool has_can_reply() const {
96  return Storage().isMember("canReply");
97  }
98 
103  MutableStorage()->removeMember("canReply");
104  }
105 
106 
110  bool get_can_reply() const {
111  const Json::Value& storage = Storage("canReply");
112  return client::JsonValueToCppValueHelper<bool >(storage);
113  }
114 
123  void set_can_reply(bool value) {
124  client::SetJsonValueFromCppValueHelper<bool >(
125  value, MutableStorage("canReply"));
126  }
127 
133  bool has_channel_id() const {
134  return Storage().isMember("channelId");
135  }
136 
141  MutableStorage()->removeMember("channelId");
142  }
143 
144 
148  const StringPiece get_channel_id() const {
149  const Json::Value& v = Storage("channelId");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
163  void set_channel_id(const StringPiece& value) {
164  *MutableStorage("channelId") = value.data();
165  }
166 
172  bool has_is_public() const {
173  return Storage().isMember("isPublic");
174  }
175 
180  MutableStorage()->removeMember("isPublic");
181  }
182 
183 
187  bool get_is_public() const {
188  const Json::Value& storage = Storage("isPublic");
189  return client::JsonValueToCppValueHelper<bool >(storage);
190  }
191 
200  void set_is_public(bool value) {
201  client::SetJsonValueFromCppValueHelper<bool >(
202  value, MutableStorage("isPublic"));
203  }
204 
210  bool has_top_level_comment() const {
211  return Storage().isMember("topLevelComment");
212  }
213 
218  MutableStorage()->removeMember("topLevelComment");
219  }
220 
221 
226  const Comment get_top_level_comment() const;
227 
236  Comment mutable_topLevelComment();
237 
243  bool has_total_reply_count() const {
244  return Storage().isMember("totalReplyCount");
245  }
246 
251  MutableStorage()->removeMember("totalReplyCount");
252  }
253 
254 
258  uint32 get_total_reply_count() const {
259  const Json::Value& storage = Storage("totalReplyCount");
260  return client::JsonValueToCppValueHelper<uint32 >(storage);
261  }
262 
270  void set_total_reply_count(uint32 value) {
271  client::SetJsonValueFromCppValueHelper<uint32 >(
272  value, MutableStorage("totalReplyCount"));
273  }
274 
280  bool has_video_id() const {
281  return Storage().isMember("videoId");
282  }
283 
287  void clear_video_id() {
288  MutableStorage()->removeMember("videoId");
289  }
290 
291 
295  const StringPiece get_video_id() const {
296  const Json::Value& v = Storage("videoId");
297  if (v == Json::Value::null) return StringPiece("");
298  return StringPiece(v.asCString());
299  }
300 
309  void set_video_id(const StringPiece& value) {
310  *MutableStorage("videoId") = value.data();
311  }
312 
313  private:
314  void operator=(const CommentThreadSnippet&);
315 }; // CommentThreadSnippet
316 } // namespace google_youtube_api
317 #endif // GOOGLE_YOUTUBE_API_COMMENT_THREAD_SNIPPET_H_
bool has_total_reply_count() const
Definition: comment_thread_snippet.h:243
Definition: access_policy.cc:40
void set_can_reply(bool value)
Definition: comment_thread_snippet.h:123
bool get_is_public() const
Definition: comment_thread_snippet.h:187
bool get_can_reply() const
Definition: comment_thread_snippet.h:110
void set_is_public(bool value)
Definition: comment_thread_snippet.h:200
void clear_top_level_comment()
Definition: comment_thread_snippet.h:217
void clear_is_public()
Definition: comment_thread_snippet.h:179
const StringPiece get_video_id() const
Definition: comment_thread_snippet.h:295
Definition: comment.h:52
bool has_top_level_comment() const
Definition: comment_thread_snippet.h:210
void clear_can_reply()
Definition: comment_thread_snippet.h:102
void set_video_id(const StringPiece &value)
Definition: comment_thread_snippet.h:309
void clear_channel_id()
Definition: comment_thread_snippet.h:140
Definition: access_policy.h:38
const StringPiece get_channel_id() const
Definition: comment_thread_snippet.h:148
bool has_channel_id() const
Definition: comment_thread_snippet.h:133
bool has_can_reply() const
Definition: comment_thread_snippet.h:95
bool has_is_public() const
Definition: comment_thread_snippet.h:172
bool has_video_id() const
Definition: comment_thread_snippet.h:280
void clear_total_reply_count()
Definition: comment_thread_snippet.h:250
const StringPiece GetTypeName() const
Definition: comment_thread_snippet.h:86
void clear_video_id()
Definition: comment_thread_snippet.h:287
Definition: comment_thread_snippet.h:53
uint32 get_total_reply_count() const
Definition: comment_thread_snippet.h:258
void set_total_reply_count(uint32 value)
Definition: comment_thread_snippet.h:270
void set_channel_id(const StringPiece &value)
Definition: comment_thread_snippet.h:163