youtube  v3
channel_content_details.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_CHANNEL_CONTENT_DETAILS_H_
31 #define GOOGLE_YOUTUBE_API_CHANNEL_CONTENT_DETAILS_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_youtube_api {
43 using namespace googleapis;
44 
50 class ChannelContentDetails : public client::JsonCppData {
51  public:
57  class ChannelContentDetailsRelatedPlaylists : public client::JsonCppData {
58  public:
65 
71  explicit ChannelContentDetailsRelatedPlaylists(const Json::Value& storage);
72 
78  explicit ChannelContentDetailsRelatedPlaylists(Json::Value* storage);
79 
84 
91  const StringPiece GetTypeName() const {
92  return StringPiece("google_youtube_api::ChannelContentDetailsRelatedPlaylists");
93  }
94 
100  bool has_favorites() const {
101  return Storage().isMember("favorites");
102  }
103 
108  MutableStorage()->removeMember("favorites");
109  }
110 
111 
115  const StringPiece get_favorites() const {
116  const Json::Value& v = Storage("favorites");
117  if (v == Json::Value::null) return StringPiece("");
118  return StringPiece(v.asCString());
119  }
120 
130  void set_favorites(const StringPiece& value) {
131  *MutableStorage("favorites") = value.data();
132  }
133 
139  bool has_likes() const {
140  return Storage().isMember("likes");
141  }
142 
146  void clear_likes() {
147  MutableStorage()->removeMember("likes");
148  }
149 
150 
154  const StringPiece get_likes() const {
155  const Json::Value& v = Storage("likes");
156  if (v == Json::Value::null) return StringPiece("");
157  return StringPiece(v.asCString());
158  }
159 
169  void set_likes(const StringPiece& value) {
170  *MutableStorage("likes") = value.data();
171  }
172 
178  bool has_uploads() const {
179  return Storage().isMember("uploads");
180  }
181 
185  void clear_uploads() {
186  MutableStorage()->removeMember("uploads");
187  }
188 
189 
193  const StringPiece get_uploads() const {
194  const Json::Value& v = Storage("uploads");
195  if (v == Json::Value::null) return StringPiece("");
196  return StringPiece(v.asCString());
197  }
198 
208  void set_uploads(const StringPiece& value) {
209  *MutableStorage("uploads") = value.data();
210  }
211 
217  bool has_watch_history() const {
218  return Storage().isMember("watchHistory");
219  }
220 
225  MutableStorage()->removeMember("watchHistory");
226  }
227 
228 
232  const StringPiece get_watch_history() const {
233  const Json::Value& v = Storage("watchHistory");
234  if (v == Json::Value::null) return StringPiece("");
235  return StringPiece(v.asCString());
236  }
237 
247  void set_watch_history(const StringPiece& value) {
248  *MutableStorage("watchHistory") = value.data();
249  }
250 
256  bool has_watch_later() const {
257  return Storage().isMember("watchLater");
258  }
259 
264  MutableStorage()->removeMember("watchLater");
265  }
266 
267 
271  const StringPiece get_watch_later() const {
272  const Json::Value& v = Storage("watchLater");
273  if (v == Json::Value::null) return StringPiece("");
274  return StringPiece(v.asCString());
275  }
276 
286  void set_watch_later(const StringPiece& value) {
287  *MutableStorage("watchLater") = value.data();
288  }
289 
290  private:
291  void operator=(const ChannelContentDetailsRelatedPlaylists&);
292  }; // ChannelContentDetailsRelatedPlaylists
298  static ChannelContentDetails* New();
299 
305  explicit ChannelContentDetails(const Json::Value& storage);
306 
312  explicit ChannelContentDetails(Json::Value* storage);
313 
317  virtual ~ChannelContentDetails();
318 
324  const StringPiece GetTypeName() const {
325  return StringPiece("google_youtube_api::ChannelContentDetails");
326  }
327 
333  bool has_related_playlists() const {
334  return Storage().isMember("relatedPlaylists");
335  }
336 
341  MutableStorage()->removeMember("relatedPlaylists");
342  }
343 
344 
350  const Json::Value& storage = Storage("relatedPlaylists");
351  return client::JsonValueToCppValueHelper<ChannelContentDetailsRelatedPlaylists >(storage);
352  }
353 
360  Json::Value* storage = MutableStorage("relatedPlaylists");
361  return client::JsonValueToMutableCppValueHelper<ChannelContentDetailsRelatedPlaylists >(storage);
362  }
363 
364  private:
365  void operator=(const ChannelContentDetails&);
366 }; // ChannelContentDetails
367 } // namespace google_youtube_api
368 #endif // GOOGLE_YOUTUBE_API_CHANNEL_CONTENT_DETAILS_H_
void set_uploads(const StringPiece &value)
Definition: channel_content_details.h:208
bool has_favorites() const
Definition: channel_content_details.h:100
Definition: channel_content_details.h:50
void set_likes(const StringPiece &value)
Definition: channel_content_details.h:169
Definition: access_policy.cc:40
void set_watch_history(const StringPiece &value)
Definition: channel_content_details.h:247
const StringPiece get_watch_later() const
Definition: channel_content_details.h:271
const StringPiece GetTypeName() const
Definition: channel_content_details.h:324
const StringPiece get_watch_history() const
Definition: channel_content_details.h:232
ChannelContentDetailsRelatedPlaylists mutable_relatedPlaylists()
Definition: channel_content_details.h:359
bool has_watch_later() const
Definition: channel_content_details.h:256
bool has_likes() const
Definition: channel_content_details.h:139
bool has_watch_history() const
Definition: channel_content_details.h:217
bool has_uploads() const
Definition: channel_content_details.h:178
bool has_related_playlists() const
Definition: channel_content_details.h:333
const StringPiece get_uploads() const
Definition: channel_content_details.h:193
Definition: access_policy.h:38
const StringPiece get_likes() const
Definition: channel_content_details.h:154
void set_watch_later(const StringPiece &value)
Definition: channel_content_details.h:286
void set_favorites(const StringPiece &value)
Definition: channel_content_details.h:130
const StringPiece GetTypeName() const
Definition: channel_content_details.h:91
void clear_related_playlists()
Definition: channel_content_details.h:340
const StringPiece get_favorites() const
Definition: channel_content_details.h:115
const ChannelContentDetailsRelatedPlaylists get_related_playlists() const
Definition: channel_content_details.h:349