youtube  v3
playlist_item.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_ITEM_H_
31 #define GOOGLE_YOUTUBE_API_PLAYLIST_ITEM_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_item_content_details.h"
39 #include "google/youtube_api/playlist_item_snippet.h"
40 #include "google/youtube_api/playlist_item_status.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_youtube_api {
47 using namespace googleapis;
48 
74 class PlaylistItem : public client::JsonCppData {
75  public:
81  static PlaylistItem* New();
82 
88  explicit PlaylistItem(const Json::Value& storage);
89 
95  explicit PlaylistItem(Json::Value* storage);
96 
100  virtual ~PlaylistItem();
101 
107  const StringPiece GetTypeName() const {
108  return StringPiece("google_youtube_api::PlaylistItem");
109  }
110 
116  bool has_content_details() const {
117  return Storage().isMember("contentDetails");
118  }
119 
124  MutableStorage()->removeMember("contentDetails");
125  }
126 
127 
132  const PlaylistItemContentDetails get_content_details() const;
133 
144  PlaylistItemContentDetails mutable_contentDetails();
145 
151  bool has_etag() const {
152  return Storage().isMember("etag");
153  }
154 
158  void clear_etag() {
159  MutableStorage()->removeMember("etag");
160  }
161 
162 
166  const StringPiece get_etag() const {
167  const Json::Value& v = Storage("etag");
168  if (v == Json::Value::null) return StringPiece("");
169  return StringPiece(v.asCString());
170  }
171 
179  void set_etag(const StringPiece& value) {
180  *MutableStorage("etag") = value.data();
181  }
182 
188  bool has_id() const {
189  return Storage().isMember("id");
190  }
191 
195  void clear_id() {
196  MutableStorage()->removeMember("id");
197  }
198 
199 
203  const StringPiece get_id() const {
204  const Json::Value& v = Storage("id");
205  if (v == Json::Value::null) return StringPiece("");
206  return StringPiece(v.asCString());
207  }
208 
216  void set_id(const StringPiece& value) {
217  *MutableStorage("id") = value.data();
218  }
219 
225  bool has_kind() const {
226  return Storage().isMember("kind");
227  }
228 
232  void clear_kind() {
233  MutableStorage()->removeMember("kind");
234  }
235 
236 
240  const StringPiece get_kind() const {
241  const Json::Value& v = Storage("kind");
242  if (v == Json::Value::null) return StringPiece("");
243  return StringPiece(v.asCString());
244  }
245 
254  void set_kind(const StringPiece& value) {
255  *MutableStorage("kind") = value.data();
256  }
257 
263  bool has_snippet() const {
264  return Storage().isMember("snippet");
265  }
266 
270  void clear_snippet() {
271  MutableStorage()->removeMember("snippet");
272  }
273 
274 
278  const PlaylistItemSnippet get_snippet() const;
279 
288  PlaylistItemSnippet mutable_snippet();
289 
295  bool has_status() const {
296  return Storage().isMember("status");
297  }
298 
302  void clear_status() {
303  MutableStorage()->removeMember("status");
304  }
305 
306 
310  const PlaylistItemStatus get_status() const;
311 
320  PlaylistItemStatus mutable_status();
321 
322  private:
323  void operator=(const PlaylistItem&);
324 }; // PlaylistItem
325 } // namespace google_youtube_api
326 #endif // GOOGLE_YOUTUBE_API_PLAYLIST_ITEM_H_
Definition: access_policy.cc:40
Definition: playlist_item.h:74
bool has_snippet() const
Definition: playlist_item.h:263
void clear_snippet()
Definition: playlist_item.h:270
const StringPiece get_etag() const
Definition: playlist_item.h:166
const StringPiece get_id() const
Definition: playlist_item.h:203
bool has_content_details() const
Definition: playlist_item.h:116
const StringPiece GetTypeName() const
Definition: playlist_item.h:107
Definition: playlist_item_content_details.h:51
void clear_status()
Definition: playlist_item.h:302
const StringPiece get_kind() const
Definition: playlist_item.h:240
void clear_content_details()
Definition: playlist_item.h:123
bool has_status() const
Definition: playlist_item.h:295
void set_id(const StringPiece &value)
Definition: playlist_item.h:216
bool has_etag() const
Definition: playlist_item.h:151
Definition: access_policy.h:38
Definition: playlist_item_status.h:50
bool has_kind() const
Definition: playlist_item.h:225
void clear_id()
Definition: playlist_item.h:195
void set_kind(const StringPiece &value)
Definition: playlist_item.h:254
void clear_kind()
Definition: playlist_item.h:232
void clear_etag()
Definition: playlist_item.h:158
bool has_id() const
Definition: playlist_item.h:188
Definition: playlist_item_snippet.h:55
void set_etag(const StringPiece &value)
Definition: playlist_item.h:179