youtube  v3
playlist_item_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_PLAYLIST_ITEM_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_PLAYLIST_ITEM_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/client/util/date_time.h"
38 #include "googleapis/strings/stringpiece.h"
39 
40 #include "google/youtube_api/resource_id.h"
41 #include "google/youtube_api/thumbnail_details.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
47 namespace google_youtube_api {
48 using namespace googleapis;
49 
55 class PlaylistItemSnippet : public client::JsonCppData {
56  public:
62  static PlaylistItemSnippet* New();
63 
69  explicit PlaylistItemSnippet(const Json::Value& storage);
70 
76  explicit PlaylistItemSnippet(Json::Value* storage);
77 
81  virtual ~PlaylistItemSnippet();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_youtube_api::PlaylistItemSnippet");
90  }
91 
97  bool has_channel_id() const {
98  return Storage().isMember("channelId");
99  }
100 
105  MutableStorage()->removeMember("channelId");
106  }
107 
108 
112  const StringPiece get_channel_id() const {
113  const Json::Value& v = Storage("channelId");
114  if (v == Json::Value::null) return StringPiece("");
115  return StringPiece(v.asCString());
116  }
117 
126  void set_channel_id(const StringPiece& value) {
127  *MutableStorage("channelId") = value.data();
128  }
129 
135  bool has_channel_title() const {
136  return Storage().isMember("channelTitle");
137  }
138 
143  MutableStorage()->removeMember("channelTitle");
144  }
145 
146 
150  const StringPiece get_channel_title() const {
151  const Json::Value& v = Storage("channelTitle");
152  if (v == Json::Value::null) return StringPiece("");
153  return StringPiece(v.asCString());
154  }
155 
163  void set_channel_title(const StringPiece& value) {
164  *MutableStorage("channelTitle") = value.data();
165  }
166 
172  bool has_description() const {
173  return Storage().isMember("description");
174  }
175 
180  MutableStorage()->removeMember("description");
181  }
182 
183 
187  const StringPiece get_description() const {
188  const Json::Value& v = Storage("description");
189  if (v == Json::Value::null) return StringPiece("");
190  return StringPiece(v.asCString());
191  }
192 
200  void set_description(const StringPiece& value) {
201  *MutableStorage("description") = value.data();
202  }
203 
209  bool has_playlist_id() const {
210  return Storage().isMember("playlistId");
211  }
212 
217  MutableStorage()->removeMember("playlistId");
218  }
219 
220 
224  const StringPiece get_playlist_id() const {
225  const Json::Value& v = Storage("playlistId");
226  if (v == Json::Value::null) return StringPiece("");
227  return StringPiece(v.asCString());
228  }
229 
238  void set_playlist_id(const StringPiece& value) {
239  *MutableStorage("playlistId") = value.data();
240  }
241 
247  bool has_position() const {
248  return Storage().isMember("position");
249  }
250 
254  void clear_position() {
255  MutableStorage()->removeMember("position");
256  }
257 
258 
262  uint32 get_position() const {
263  const Json::Value& storage = Storage("position");
264  return client::JsonValueToCppValueHelper<uint32 >(storage);
265  }
266 
276  void set_position(uint32 value) {
277  client::SetJsonValueFromCppValueHelper<uint32 >(
278  value, MutableStorage("position"));
279  }
280 
286  bool has_published_at() const {
287  return Storage().isMember("publishedAt");
288  }
289 
294  MutableStorage()->removeMember("publishedAt");
295  }
296 
297 
301  client::DateTime get_published_at() const {
302  const Json::Value& storage = Storage("publishedAt");
303  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
304  }
305 
314  void set_published_at(client::DateTime value) {
315  client::SetJsonValueFromCppValueHelper<client::DateTime >(
316  value, MutableStorage("publishedAt"));
317  }
318 
324  bool has_resource_id() const {
325  return Storage().isMember("resourceId");
326  }
327 
332  MutableStorage()->removeMember("resourceId");
333  }
334 
335 
339  const ResourceId get_resource_id() const;
340 
350  ResourceId mutable_resourceId();
351 
357  bool has_thumbnails() const {
358  return Storage().isMember("thumbnails");
359  }
360 
365  MutableStorage()->removeMember("thumbnails");
366  }
367 
368 
372  const ThumbnailDetails get_thumbnails() const;
373 
384  ThumbnailDetails mutable_thumbnails();
385 
391  bool has_title() const {
392  return Storage().isMember("title");
393  }
394 
398  void clear_title() {
399  MutableStorage()->removeMember("title");
400  }
401 
402 
406  const StringPiece get_title() const {
407  const Json::Value& v = Storage("title");
408  if (v == Json::Value::null) return StringPiece("");
409  return StringPiece(v.asCString());
410  }
411 
419  void set_title(const StringPiece& value) {
420  *MutableStorage("title") = value.data();
421  }
422 
423  private:
424  void operator=(const PlaylistItemSnippet&);
425 }; // PlaylistItemSnippet
426 } // namespace google_youtube_api
427 #endif // GOOGLE_YOUTUBE_API_PLAYLIST_ITEM_SNIPPET_H_
void clear_description()
Definition: playlist_item_snippet.h:179
const StringPiece get_description() const
Definition: playlist_item_snippet.h:187
const StringPiece GetTypeName() const
Definition: playlist_item_snippet.h:88
bool has_position() const
Definition: playlist_item_snippet.h:247
Definition: access_policy.cc:40
void set_playlist_id(const StringPiece &value)
Definition: playlist_item_snippet.h:238
uint32 get_position() const
Definition: playlist_item_snippet.h:262
bool has_description() const
Definition: playlist_item_snippet.h:172
void set_channel_title(const StringPiece &value)
Definition: playlist_item_snippet.h:163
void clear_published_at()
Definition: playlist_item_snippet.h:293
void clear_channel_title()
Definition: playlist_item_snippet.h:142
bool has_channel_id() const
Definition: playlist_item_snippet.h:97
void clear_resource_id()
Definition: playlist_item_snippet.h:331
void set_title(const StringPiece &value)
Definition: playlist_item_snippet.h:419
bool has_playlist_id() const
Definition: playlist_item_snippet.h:209
bool has_title() const
Definition: playlist_item_snippet.h:391
const StringPiece get_title() const
Definition: playlist_item_snippet.h:406
void set_published_at(client::DateTime value)
Definition: playlist_item_snippet.h:314
void set_channel_id(const StringPiece &value)
Definition: playlist_item_snippet.h:126
void clear_playlist_id()
Definition: playlist_item_snippet.h:216
void set_position(uint32 value)
Definition: playlist_item_snippet.h:276
Definition: access_policy.h:38
void clear_thumbnails()
Definition: playlist_item_snippet.h:364
bool has_resource_id() const
Definition: playlist_item_snippet.h:324
void set_description(const StringPiece &value)
Definition: playlist_item_snippet.h:200
bool has_published_at() const
Definition: playlist_item_snippet.h:286
client::DateTime get_published_at() const
Definition: playlist_item_snippet.h:301
void clear_channel_id()
Definition: playlist_item_snippet.h:104
const StringPiece get_playlist_id() const
Definition: playlist_item_snippet.h:224
bool has_channel_title() const
Definition: playlist_item_snippet.h:135
Definition: thumbnail_details.h:51
const StringPiece get_channel_id() const
Definition: playlist_item_snippet.h:112
const StringPiece get_channel_title() const
Definition: playlist_item_snippet.h:150
bool has_thumbnails() const
Definition: playlist_item_snippet.h:357
void clear_title()
Definition: playlist_item_snippet.h:398
Definition: resource_id.h:50
void clear_position()
Definition: playlist_item_snippet.h:254
Definition: playlist_item_snippet.h:55