youtube  v3
comment_thread.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_H_
31 #define GOOGLE_YOUTUBE_API_COMMENT_THREAD_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/youtube_api/comment_thread_replies.h"
39 #include "google/youtube_api/comment_thread_snippet.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
55 class CommentThread : public client::JsonCppData {
56  public:
62  static CommentThread* New();
63 
69  explicit CommentThread(const Json::Value& storage);
70 
76  explicit CommentThread(Json::Value* storage);
77 
81  virtual ~CommentThread();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_youtube_api::CommentThread");
90  }
91 
97  bool has_etag() const {
98  return Storage().isMember("etag");
99  }
100 
104  void clear_etag() {
105  MutableStorage()->removeMember("etag");
106  }
107 
108 
112  const StringPiece get_etag() const {
113  const Json::Value& v = Storage("etag");
114  if (v == Json::Value::null) return StringPiece("");
115  return StringPiece(v.asCString());
116  }
117 
125  void set_etag(const StringPiece& value) {
126  *MutableStorage("etag") = value.data();
127  }
128 
134  bool has_id() const {
135  return Storage().isMember("id");
136  }
137 
141  void clear_id() {
142  MutableStorage()->removeMember("id");
143  }
144 
145 
149  const StringPiece get_id() const {
150  const Json::Value& v = Storage("id");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
162  void set_id(const StringPiece& value) {
163  *MutableStorage("id") = value.data();
164  }
165 
171  bool has_kind() const {
172  return Storage().isMember("kind");
173  }
174 
178  void clear_kind() {
179  MutableStorage()->removeMember("kind");
180  }
181 
182 
186  const StringPiece get_kind() const {
187  const Json::Value& v = Storage("kind");
188  if (v == Json::Value::null) return StringPiece("");
189  return StringPiece(v.asCString());
190  }
191 
200  void set_kind(const StringPiece& value) {
201  *MutableStorage("kind") = value.data();
202  }
203 
209  bool has_replies() const {
210  return Storage().isMember("replies");
211  }
212 
216  void clear_replies() {
217  MutableStorage()->removeMember("replies");
218  }
219 
220 
224  const CommentThreadReplies get_replies() const;
225 
234  CommentThreadReplies mutable_replies();
235 
241  bool has_snippet() const {
242  return Storage().isMember("snippet");
243  }
244 
248  void clear_snippet() {
249  MutableStorage()->removeMember("snippet");
250  }
251 
252 
256  const CommentThreadSnippet get_snippet() const;
257 
266  CommentThreadSnippet mutable_snippet();
267 
268  private:
269  void operator=(const CommentThread&);
270 }; // CommentThread
271 } // namespace google_youtube_api
272 #endif // GOOGLE_YOUTUBE_API_COMMENT_THREAD_H_
Definition: access_policy.cc:40
void clear_etag()
Definition: comment_thread.h:104
const StringPiece get_etag() const
Definition: comment_thread.h:112
bool has_replies() const
Definition: comment_thread.h:209
void clear_replies()
Definition: comment_thread.h:216
void clear_snippet()
Definition: comment_thread.h:248
const StringPiece get_kind() const
Definition: comment_thread.h:186
const StringPiece GetTypeName() const
Definition: comment_thread.h:88
void set_id(const StringPiece &value)
Definition: comment_thread.h:162
void set_etag(const StringPiece &value)
Definition: comment_thread.h:125
Definition: comment_thread_replies.h:51
Definition: access_policy.h:38
void clear_kind()
Definition: comment_thread.h:178
Definition: comment_thread.h:55
const StringPiece get_id() const
Definition: comment_thread.h:149
void clear_id()
Definition: comment_thread.h:141
void set_kind(const StringPiece &value)
Definition: comment_thread.h:200
Definition: comment_thread_snippet.h:53
bool has_snippet() const
Definition: comment_thread.h:241
bool has_kind() const
Definition: comment_thread.h:171
bool has_etag() const
Definition: comment_thread.h:97
bool has_id() const
Definition: comment_thread.h:134