youtube  v3
playlist_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_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_PLAYLIST_SNIPPET_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/client/util/date_time.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 #include "google/youtube_api/playlist_localization.h"
40 #include "google/youtube_api/thumbnail_details.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_youtube_api {
47 using namespace googleapis;
48 
54 class PlaylistSnippet : public client::JsonCppData {
55  public:
61  static PlaylistSnippet* New();
62 
68  explicit PlaylistSnippet(const Json::Value& storage);
69 
75  explicit PlaylistSnippet(Json::Value* storage);
76 
80  virtual ~PlaylistSnippet();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_youtube_api::PlaylistSnippet");
89  }
90 
96  bool has_channel_id() const {
97  return Storage().isMember("channelId");
98  }
99 
104  MutableStorage()->removeMember("channelId");
105  }
106 
107 
111  const StringPiece get_channel_id() const {
112  const Json::Value& v = Storage("channelId");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
125  void set_channel_id(const StringPiece& value) {
126  *MutableStorage("channelId") = value.data();
127  }
128 
134  bool has_channel_title() const {
135  return Storage().isMember("channelTitle");
136  }
137 
142  MutableStorage()->removeMember("channelTitle");
143  }
144 
145 
149  const StringPiece get_channel_title() const {
150  const Json::Value& v = Storage("channelTitle");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
162  void set_channel_title(const StringPiece& value) {
163  *MutableStorage("channelTitle") = value.data();
164  }
165 
171  bool has_default_language() const {
172  return Storage().isMember("defaultLanguage");
173  }
174 
179  MutableStorage()->removeMember("defaultLanguage");
180  }
181 
182 
186  const StringPiece get_default_language() const {
187  const Json::Value& v = Storage("defaultLanguage");
188  if (v == Json::Value::null) return StringPiece("");
189  return StringPiece(v.asCString());
190  }
191 
199  void set_default_language(const StringPiece& value) {
200  *MutableStorage("defaultLanguage") = value.data();
201  }
202 
208  bool has_description() const {
209  return Storage().isMember("description");
210  }
211 
216  MutableStorage()->removeMember("description");
217  }
218 
219 
223  const StringPiece get_description() const {
224  const Json::Value& v = Storage("description");
225  if (v == Json::Value::null) return StringPiece("");
226  return StringPiece(v.asCString());
227  }
228 
236  void set_description(const StringPiece& value) {
237  *MutableStorage("description") = value.data();
238  }
239 
245  bool has_localized() const {
246  return Storage().isMember("localized");
247  }
248 
253  MutableStorage()->removeMember("localized");
254  }
255 
256 
260  const PlaylistLocalization get_localized() const;
261 
270  PlaylistLocalization mutable_localized();
271 
277  bool has_published_at() const {
278  return Storage().isMember("publishedAt");
279  }
280 
285  MutableStorage()->removeMember("publishedAt");
286  }
287 
288 
292  client::DateTime get_published_at() const {
293  const Json::Value& storage = Storage("publishedAt");
294  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
295  }
296 
305  void set_published_at(client::DateTime value) {
306  client::SetJsonValueFromCppValueHelper<client::DateTime >(
307  value, MutableStorage("publishedAt"));
308  }
309 
315  bool has_tags() const {
316  return Storage().isMember("tags");
317  }
318 
322  void clear_tags() {
323  MutableStorage()->removeMember("tags");
324  }
325 
326 
330  const client::JsonCppArray<string > get_tags() const {
331  const Json::Value& storage = Storage("tags");
332  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
333  }
334 
342  client::JsonCppArray<string > mutable_tags() {
343  Json::Value* storage = MutableStorage("tags");
344  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
345  }
346 
352  bool has_thumbnails() const {
353  return Storage().isMember("thumbnails");
354  }
355 
360  MutableStorage()->removeMember("thumbnails");
361  }
362 
363 
367  const ThumbnailDetails get_thumbnails() const;
368 
379  ThumbnailDetails mutable_thumbnails();
380 
386  bool has_title() const {
387  return Storage().isMember("title");
388  }
389 
393  void clear_title() {
394  MutableStorage()->removeMember("title");
395  }
396 
397 
401  const StringPiece get_title() const {
402  const Json::Value& v = Storage("title");
403  if (v == Json::Value::null) return StringPiece("");
404  return StringPiece(v.asCString());
405  }
406 
414  void set_title(const StringPiece& value) {
415  *MutableStorage("title") = value.data();
416  }
417 
418  private:
419  void operator=(const PlaylistSnippet&);
420 }; // PlaylistSnippet
421 } // namespace google_youtube_api
422 #endif // GOOGLE_YOUTUBE_API_PLAYLIST_SNIPPET_H_
void clear_channel_title()
Definition: playlist_snippet.h:141
const StringPiece get_channel_title() const
Definition: playlist_snippet.h:149
Definition: access_policy.cc:40
void set_channel_id(const StringPiece &value)
Definition: playlist_snippet.h:125
Definition: playlist_snippet.h:54
void clear_title()
Definition: playlist_snippet.h:393
client::JsonCppArray< string > mutable_tags()
Definition: playlist_snippet.h:342
bool has_channel_id() const
Definition: playlist_snippet.h:96
void clear_localized()
Definition: playlist_snippet.h:252
bool has_default_language() const
Definition: playlist_snippet.h:171
void clear_description()
Definition: playlist_snippet.h:215
void clear_thumbnails()
Definition: playlist_snippet.h:359
void set_default_language(const StringPiece &value)
Definition: playlist_snippet.h:199
const StringPiece GetTypeName() const
Definition: playlist_snippet.h:87
const StringPiece get_title() const
Definition: playlist_snippet.h:401
void set_title(const StringPiece &value)
Definition: playlist_snippet.h:414
const StringPiece get_channel_id() const
Definition: playlist_snippet.h:111
Definition: playlist_localization.h:50
bool has_description() const
Definition: playlist_snippet.h:208
bool has_localized() const
Definition: playlist_snippet.h:245
void set_channel_title(const StringPiece &value)
Definition: playlist_snippet.h:162
void set_published_at(client::DateTime value)
Definition: playlist_snippet.h:305
bool has_title() const
Definition: playlist_snippet.h:386
void clear_default_language()
Definition: playlist_snippet.h:178
const StringPiece get_default_language() const
Definition: playlist_snippet.h:186
void clear_published_at()
Definition: playlist_snippet.h:284
bool has_channel_title() const
Definition: playlist_snippet.h:134
void set_description(const StringPiece &value)
Definition: playlist_snippet.h:236
Definition: access_policy.h:38
void clear_tags()
Definition: playlist_snippet.h:322
client::DateTime get_published_at() const
Definition: playlist_snippet.h:292
const StringPiece get_description() const
Definition: playlist_snippet.h:223
bool has_tags() const
Definition: playlist_snippet.h:315
Definition: thumbnail_details.h:51
bool has_published_at() const
Definition: playlist_snippet.h:277
void clear_channel_id()
Definition: playlist_snippet.h:103
const client::JsonCppArray< string > get_tags() const
Definition: playlist_snippet.h:330
bool has_thumbnails() const
Definition: playlist_snippet.h:352