youtube  v3
playlist.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_PLAYLIST_H_
31 #define GOOGLE_YOUTUBE_API_PLAYLIST_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/playlist_content_details.h"
39 #include "google/youtube_api/playlist_localization.h"
40 #include "google/youtube_api/playlist_player.h"
41 #include "google/youtube_api/playlist_snippet.h"
42 #include "google/youtube_api/playlist_status.h"
43 
44 namespace Json {
45 class Value;
46 } // namespace Json
47 
48 namespace google_youtube_api {
49 using namespace googleapis;
50 
75 class Playlist : public client::JsonCppData {
76  public:
82  static Playlist* New();
83 
89  explicit Playlist(const Json::Value& storage);
90 
96  explicit Playlist(Json::Value* storage);
97 
101  virtual ~Playlist();
102 
108  const StringPiece GetTypeName() const {
109  return StringPiece("google_youtube_api::Playlist");
110  }
111 
117  bool has_content_details() const {
118  return Storage().isMember("contentDetails");
119  }
120 
125  MutableStorage()->removeMember("contentDetails");
126  }
127 
128 
133  const PlaylistContentDetails get_content_details() const;
134 
143  PlaylistContentDetails mutable_contentDetails();
144 
150  bool has_etag() const {
151  return Storage().isMember("etag");
152  }
153 
157  void clear_etag() {
158  MutableStorage()->removeMember("etag");
159  }
160 
161 
165  const StringPiece get_etag() const {
166  const Json::Value& v = Storage("etag");
167  if (v == Json::Value::null) return StringPiece("");
168  return StringPiece(v.asCString());
169  }
170 
178  void set_etag(const StringPiece& value) {
179  *MutableStorage("etag") = value.data();
180  }
181 
187  bool has_id() const {
188  return Storage().isMember("id");
189  }
190 
194  void clear_id() {
195  MutableStorage()->removeMember("id");
196  }
197 
198 
202  const StringPiece get_id() const {
203  const Json::Value& v = Storage("id");
204  if (v == Json::Value::null) return StringPiece("");
205  return StringPiece(v.asCString());
206  }
207 
215  void set_id(const StringPiece& value) {
216  *MutableStorage("id") = value.data();
217  }
218 
224  bool has_kind() const {
225  return Storage().isMember("kind");
226  }
227 
231  void clear_kind() {
232  MutableStorage()->removeMember("kind");
233  }
234 
235 
239  const StringPiece get_kind() const {
240  const Json::Value& v = Storage("kind");
241  if (v == Json::Value::null) return StringPiece("");
242  return StringPiece(v.asCString());
243  }
244 
253  void set_kind(const StringPiece& value) {
254  *MutableStorage("kind") = value.data();
255  }
256 
262  bool has_localizations() const {
263  return Storage().isMember("localizations");
264  }
265 
270  MutableStorage()->removeMember("localizations");
271  }
272 
273 
277  const client::JsonCppAssociativeArray<PlaylistLocalization > get_localizations() const;
278 
287  client::JsonCppAssociativeArray<PlaylistLocalization > mutable_localizations();
288 
294  bool has_player() const {
295  return Storage().isMember("player");
296  }
297 
301  void clear_player() {
302  MutableStorage()->removeMember("player");
303  }
304 
305 
309  const PlaylistPlayer get_player() const;
310 
319  PlaylistPlayer mutable_player();
320 
326  bool has_snippet() const {
327  return Storage().isMember("snippet");
328  }
329 
333  void clear_snippet() {
334  MutableStorage()->removeMember("snippet");
335  }
336 
337 
341  const PlaylistSnippet get_snippet() const;
342 
351  PlaylistSnippet mutable_snippet();
352 
358  bool has_status() const {
359  return Storage().isMember("status");
360  }
361 
365  void clear_status() {
366  MutableStorage()->removeMember("status");
367  }
368 
369 
373  const PlaylistStatus get_status() const;
374 
382  PlaylistStatus mutable_status();
383 
384  private:
385  void operator=(const Playlist&);
386 }; // Playlist
387 } // namespace google_youtube_api
388 #endif // GOOGLE_YOUTUBE_API_PLAYLIST_H_
Definition: access_policy.cc:40
bool has_etag() const
Definition: playlist.h:150
Definition: playlist_snippet.h:54
const StringPiece get_id() const
Definition: playlist.h:202
Definition: playlist_player.h:50
void clear_etag()
Definition: playlist.h:157
void clear_kind()
Definition: playlist.h:231
bool has_player() const
Definition: playlist.h:294
Definition: playlist_content_details.h:50
const StringPiece get_etag() const
Definition: playlist.h:165
void clear_id()
Definition: playlist.h:194
void clear_status()
Definition: playlist.h:365
void set_etag(const StringPiece &value)
Definition: playlist.h:178
bool has_snippet() const
Definition: playlist.h:326
Definition: playlist.h:75
Definition: access_policy.h:38
bool has_localizations() const
Definition: playlist.h:262
void clear_snippet()
Definition: playlist.h:333
void set_kind(const StringPiece &value)
Definition: playlist.h:253
void set_id(const StringPiece &value)
Definition: playlist.h:215
bool has_id() const
Definition: playlist.h:187
const StringPiece GetTypeName() const
Definition: playlist.h:108
bool has_status() const
Definition: playlist.h:358
const StringPiece get_kind() const
Definition: playlist.h:239
Definition: playlist_status.h:50
void clear_content_details()
Definition: playlist.h:124
bool has_content_details() const
Definition: playlist.h:117
bool has_kind() const
Definition: playlist.h:224
void clear_localizations()
Definition: playlist.h:269
void clear_player()
Definition: playlist.h:301