youtube  v3
video_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_VIDEO_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_VIDEO_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/thumbnail_details.h"
40 #include "google/youtube_api/video_localization.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_youtube_api {
47 using namespace googleapis;
48 
55 class VideoSnippet : public client::JsonCppData {
56  public:
62  static VideoSnippet* New();
63 
69  explicit VideoSnippet(const Json::Value& storage);
70 
76  explicit VideoSnippet(Json::Value* storage);
77 
81  virtual ~VideoSnippet();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_youtube_api::VideoSnippet");
90  }
91 
97  bool has_category_id() const {
98  return Storage().isMember("categoryId");
99  }
100 
105  MutableStorage()->removeMember("categoryId");
106  }
107 
108 
112  const StringPiece get_category_id() const {
113  const Json::Value& v = Storage("categoryId");
114  if (v == Json::Value::null) return StringPiece("");
115  return StringPiece(v.asCString());
116  }
117 
125  void set_category_id(const StringPiece& value) {
126  *MutableStorage("categoryId") = value.data();
127  }
128 
134  bool has_channel_id() const {
135  return Storage().isMember("channelId");
136  }
137 
142  MutableStorage()->removeMember("channelId");
143  }
144 
145 
149  const StringPiece get_channel_id() const {
150  const Json::Value& v = Storage("channelId");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
163  void set_channel_id(const StringPiece& value) {
164  *MutableStorage("channelId") = value.data();
165  }
166 
172  bool has_channel_title() const {
173  return Storage().isMember("channelTitle");
174  }
175 
180  MutableStorage()->removeMember("channelTitle");
181  }
182 
183 
187  const StringPiece get_channel_title() const {
188  const Json::Value& v = Storage("channelTitle");
189  if (v == Json::Value::null) return StringPiece("");
190  return StringPiece(v.asCString());
191  }
192 
200  void set_channel_title(const StringPiece& value) {
201  *MutableStorage("channelTitle") = value.data();
202  }
203 
210  return Storage().isMember("defaultAudioLanguage");
211  }
212 
217  MutableStorage()->removeMember("defaultAudioLanguage");
218  }
219 
220 
224  const StringPiece get_default_audio_language() const {
225  const Json::Value& v = Storage("defaultAudioLanguage");
226  if (v == Json::Value::null) return StringPiece("");
227  return StringPiece(v.asCString());
228  }
229 
238  void set_default_audio_language(const StringPiece& value) {
239  *MutableStorage("defaultAudioLanguage") = value.data();
240  }
241 
247  bool has_default_language() const {
248  return Storage().isMember("defaultLanguage");
249  }
250 
255  MutableStorage()->removeMember("defaultLanguage");
256  }
257 
258 
262  const StringPiece get_default_language() const {
263  const Json::Value& v = Storage("defaultLanguage");
264  if (v == Json::Value::null) return StringPiece("");
265  return StringPiece(v.asCString());
266  }
267 
275  void set_default_language(const StringPiece& value) {
276  *MutableStorage("defaultLanguage") = value.data();
277  }
278 
284  bool has_description() const {
285  return Storage().isMember("description");
286  }
287 
292  MutableStorage()->removeMember("description");
293  }
294 
295 
299  const StringPiece get_description() const {
300  const Json::Value& v = Storage("description");
301  if (v == Json::Value::null) return StringPiece("");
302  return StringPiece(v.asCString());
303  }
304 
312  void set_description(const StringPiece& value) {
313  *MutableStorage("description") = value.data();
314  }
315 
322  return Storage().isMember("liveBroadcastContent");
323  }
324 
329  MutableStorage()->removeMember("liveBroadcastContent");
330  }
331 
332 
336  const StringPiece get_live_broadcast_content() const {
337  const Json::Value& v = Storage("liveBroadcastContent");
338  if (v == Json::Value::null) return StringPiece("");
339  return StringPiece(v.asCString());
340  }
341 
350  void set_live_broadcast_content(const StringPiece& value) {
351  *MutableStorage("liveBroadcastContent") = value.data();
352  }
353 
359  bool has_localized() const {
360  return Storage().isMember("localized");
361  }
362 
367  MutableStorage()->removeMember("localized");
368  }
369 
370 
374  const VideoLocalization get_localized() const;
375 
385  VideoLocalization mutable_localized();
386 
392  bool has_published_at() const {
393  return Storage().isMember("publishedAt");
394  }
395 
400  MutableStorage()->removeMember("publishedAt");
401  }
402 
403 
407  client::DateTime get_published_at() const {
408  const Json::Value& storage = Storage("publishedAt");
409  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
410  }
411 
420  void set_published_at(client::DateTime value) {
421  client::SetJsonValueFromCppValueHelper<client::DateTime >(
422  value, MutableStorage("publishedAt"));
423  }
424 
430  bool has_tags() const {
431  return Storage().isMember("tags");
432  }
433 
437  void clear_tags() {
438  MutableStorage()->removeMember("tags");
439  }
440 
441 
445  const client::JsonCppArray<string > get_tags() const {
446  const Json::Value& storage = Storage("tags");
447  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
448  }
449 
457  client::JsonCppArray<string > mutable_tags() {
458  Json::Value* storage = MutableStorage("tags");
459  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
460  }
461 
467  bool has_thumbnails() const {
468  return Storage().isMember("thumbnails");
469  }
470 
475  MutableStorage()->removeMember("thumbnails");
476  }
477 
478 
482  const ThumbnailDetails get_thumbnails() const;
483 
494  ThumbnailDetails mutable_thumbnails();
495 
501  bool has_title() const {
502  return Storage().isMember("title");
503  }
504 
508  void clear_title() {
509  MutableStorage()->removeMember("title");
510  }
511 
512 
516  const StringPiece get_title() const {
517  const Json::Value& v = Storage("title");
518  if (v == Json::Value::null) return StringPiece("");
519  return StringPiece(v.asCString());
520  }
521 
529  void set_title(const StringPiece& value) {
530  *MutableStorage("title") = value.data();
531  }
532 
533  private:
534  void operator=(const VideoSnippet&);
535 }; // VideoSnippet
536 } // namespace google_youtube_api
537 #endif // GOOGLE_YOUTUBE_API_VIDEO_SNIPPET_H_
Definition: access_policy.cc:40
bool has_localized() const
Definition: video_snippet.h:359
bool has_default_language() const
Definition: video_snippet.h:247
bool has_channel_title() const
Definition: video_snippet.h:172
void clear_published_at()
Definition: video_snippet.h:399
bool has_tags() const
Definition: video_snippet.h:430
void clear_default_language()
Definition: video_snippet.h:254
const StringPiece get_channel_id() const
Definition: video_snippet.h:149
const StringPiece get_description() const
Definition: video_snippet.h:299
void set_category_id(const StringPiece &value)
Definition: video_snippet.h:125
bool has_description() const
Definition: video_snippet.h:284
bool has_category_id() const
Definition: video_snippet.h:97
const StringPiece get_channel_title() const
Definition: video_snippet.h:187
void set_live_broadcast_content(const StringPiece &value)
Definition: video_snippet.h:350
Definition: video_snippet.h:55
void set_published_at(client::DateTime value)
Definition: video_snippet.h:420
void clear_default_audio_language()
Definition: video_snippet.h:216
bool has_thumbnails() const
Definition: video_snippet.h:467
void clear_live_broadcast_content()
Definition: video_snippet.h:328
bool has_published_at() const
Definition: video_snippet.h:392
bool has_live_broadcast_content() const
Definition: video_snippet.h:321
bool has_default_audio_language() const
Definition: video_snippet.h:209
bool has_channel_id() const
Definition: video_snippet.h:134
const client::JsonCppArray< string > get_tags() const
Definition: video_snippet.h:445
const StringPiece get_live_broadcast_content() const
Definition: video_snippet.h:336
Definition: access_policy.h:38
void set_title(const StringPiece &value)
Definition: video_snippet.h:529
void set_description(const StringPiece &value)
Definition: video_snippet.h:312
void set_channel_title(const StringPiece &value)
Definition: video_snippet.h:200
const StringPiece get_default_audio_language() const
Definition: video_snippet.h:224
void clear_thumbnails()
Definition: video_snippet.h:474
void clear_localized()
Definition: video_snippet.h:366
const StringPiece GetTypeName() const
Definition: video_snippet.h:88
void clear_category_id()
Definition: video_snippet.h:104
client::JsonCppArray< string > mutable_tags()
Definition: video_snippet.h:457
void clear_channel_title()
Definition: video_snippet.h:179
void clear_title()
Definition: video_snippet.h:508
void clear_description()
Definition: video_snippet.h:291
Definition: thumbnail_details.h:51
const StringPiece get_title() const
Definition: video_snippet.h:516
void set_default_language(const StringPiece &value)
Definition: video_snippet.h:275
const StringPiece get_default_language() const
Definition: video_snippet.h:262
Definition: video_localization.h:50
bool has_title() const
Definition: video_snippet.h:501
void clear_tags()
Definition: video_snippet.h:437
const StringPiece get_category_id() const
Definition: video_snippet.h:112
client::DateTime get_published_at() const
Definition: video_snippet.h:407
void set_channel_id(const StringPiece &value)
Definition: video_snippet.h:163
void clear_channel_id()
Definition: video_snippet.h:141
void set_default_audio_language(const StringPiece &value)
Definition: video_snippet.h:238