youtube  v3
video_content_details.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_CONTENT_DETAILS_H_
31 #define GOOGLE_YOUTUBE_API_VIDEO_CONTENT_DETAILS_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/access_policy.h"
39 #include "google/youtube_api/content_rating.h"
40 #include "google/youtube_api/video_content_details_region_restriction.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_youtube_api {
47 using namespace googleapis;
48 
54 class VideoContentDetails : public client::JsonCppData {
55  public:
61  static VideoContentDetails* New();
62 
68  explicit VideoContentDetails(const Json::Value& storage);
69 
75  explicit VideoContentDetails(Json::Value* storage);
76 
80  virtual ~VideoContentDetails();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_youtube_api::VideoContentDetails");
89  }
90 
96  bool has_caption() const {
97  return Storage().isMember("caption");
98  }
99 
103  void clear_caption() {
104  MutableStorage()->removeMember("caption");
105  }
106 
107 
111  const StringPiece get_caption() const {
112  const Json::Value& v = Storage("caption");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
124  void set_caption(const StringPiece& value) {
125  *MutableStorage("caption") = value.data();
126  }
127 
133  bool has_content_rating() const {
134  return Storage().isMember("contentRating");
135  }
136 
141  MutableStorage()->removeMember("contentRating");
142  }
143 
144 
148  const ContentRating get_content_rating() const;
149 
158  ContentRating mutable_contentRating();
159 
165  bool has_country_restriction() const {
166  return Storage().isMember("countryRestriction");
167  }
168 
173  MutableStorage()->removeMember("countryRestriction");
174  }
175 
176 
181  const AccessPolicy get_country_restriction() const;
182 
192  AccessPolicy mutable_countryRestriction();
193 
199  bool has_definition() const {
200  return Storage().isMember("definition");
201  }
202 
207  MutableStorage()->removeMember("definition");
208  }
209 
210 
214  const StringPiece get_definition() const {
215  const Json::Value& v = Storage("definition");
216  if (v == Json::Value::null) return StringPiece("");
217  return StringPiece(v.asCString());
218  }
219 
228  void set_definition(const StringPiece& value) {
229  *MutableStorage("definition") = value.data();
230  }
231 
237  bool has_dimension() const {
238  return Storage().isMember("dimension");
239  }
240 
245  MutableStorage()->removeMember("dimension");
246  }
247 
248 
252  const StringPiece get_dimension() const {
253  const Json::Value& v = Storage("dimension");
254  if (v == Json::Value::null) return StringPiece("");
255  return StringPiece(v.asCString());
256  }
257 
266  void set_dimension(const StringPiece& value) {
267  *MutableStorage("dimension") = value.data();
268  }
269 
275  bool has_duration() const {
276  return Storage().isMember("duration");
277  }
278 
282  void clear_duration() {
283  MutableStorage()->removeMember("duration");
284  }
285 
286 
290  const StringPiece get_duration() const {
291  const Json::Value& v = Storage("duration");
292  if (v == Json::Value::null) return StringPiece("");
293  return StringPiece(v.asCString());
294  }
295 
309  void set_duration(const StringPiece& value) {
310  *MutableStorage("duration") = value.data();
311  }
312 
319  return Storage().isMember("hasCustomThumbnail");
320  }
321 
326  MutableStorage()->removeMember("hasCustomThumbnail");
327  }
328 
329 
334  const Json::Value& storage = Storage("hasCustomThumbnail");
335  return client::JsonValueToCppValueHelper<bool >(storage);
336  }
337 
346  void set_has_custom_thumbnail(bool value) {
347  client::SetJsonValueFromCppValueHelper<bool >(
348  value, MutableStorage("hasCustomThumbnail"));
349  }
350 
356  bool has_licensed_content() const {
357  return Storage().isMember("licensedContent");
358  }
359 
364  MutableStorage()->removeMember("licensedContent");
365  }
366 
367 
371  bool get_licensed_content() const {
372  const Json::Value& storage = Storage("licensedContent");
373  return client::JsonValueToCppValueHelper<bool >(storage);
374  }
375 
384  void set_licensed_content(bool value) {
385  client::SetJsonValueFromCppValueHelper<bool >(
386  value, MutableStorage("licensedContent"));
387  }
388 
394  bool has_projection() const {
395  return Storage().isMember("projection");
396  }
397 
402  MutableStorage()->removeMember("projection");
403  }
404 
405 
409  const StringPiece get_projection() const {
410  const Json::Value& v = Storage("projection");
411  if (v == Json::Value::null) return StringPiece("");
412  return StringPiece(v.asCString());
413  }
414 
422  void set_projection(const StringPiece& value) {
423  *MutableStorage("projection") = value.data();
424  }
425 
431  bool has_region_restriction() const {
432  return Storage().isMember("regionRestriction");
433  }
434 
439  MutableStorage()->removeMember("regionRestriction");
440  }
441 
442 
447  const VideoContentDetailsRegionRestriction get_region_restriction() const;
448 
460  VideoContentDetailsRegionRestriction mutable_regionRestriction();
461 
462  private:
463  void operator=(const VideoContentDetails&);
464 }; // VideoContentDetails
465 } // namespace google_youtube_api
466 #endif // GOOGLE_YOUTUBE_API_VIDEO_CONTENT_DETAILS_H_
Definition: video_content_details_region_restriction.h:50
Definition: video_content_details.h:54
Definition: access_policy.cc:40
bool get_licensed_content() const
Definition: video_content_details.h:371
const StringPiece get_caption() const
Definition: video_content_details.h:111
void clear_has_custom_thumbnail()
Definition: video_content_details.h:325
void set_duration(const StringPiece &value)
Definition: video_content_details.h:309
void set_projection(const StringPiece &value)
Definition: video_content_details.h:422
const StringPiece get_dimension() const
Definition: video_content_details.h:252
const StringPiece get_duration() const
Definition: video_content_details.h:290
void clear_duration()
Definition: video_content_details.h:282
bool has_definition() const
Definition: video_content_details.h:199
void clear_licensed_content()
Definition: video_content_details.h:363
void set_definition(const StringPiece &value)
Definition: video_content_details.h:228
Definition: access_policy.h:50
void clear_region_restriction()
Definition: video_content_details.h:438
bool has_dimension() const
Definition: video_content_details.h:237
void clear_content_rating()
Definition: video_content_details.h:140
void set_licensed_content(bool value)
Definition: video_content_details.h:384
void set_caption(const StringPiece &value)
Definition: video_content_details.h:124
bool has_country_restriction() const
Definition: video_content_details.h:165
const StringPiece get_definition() const
Definition: video_content_details.h:214
bool has_licensed_content() const
Definition: video_content_details.h:356
const StringPiece get_projection() const
Definition: video_content_details.h:409
bool has_duration() const
Definition: video_content_details.h:275
bool has_content_rating() const
Definition: video_content_details.h:133
Definition: access_policy.h:38
bool has_region_restriction() const
Definition: video_content_details.h:431
bool has_caption() const
Definition: video_content_details.h:96
void set_has_custom_thumbnail(bool value)
Definition: video_content_details.h:346
void clear_dimension()
Definition: video_content_details.h:244
bool has_projection() const
Definition: video_content_details.h:394
Definition: content_rating.h:51
bool get_has_custom_thumbnail() const
Definition: video_content_details.h:333
void clear_caption()
Definition: video_content_details.h:103
void clear_country_restriction()
Definition: video_content_details.h:172
bool has_has_custom_thumbnail() const
Definition: video_content_details.h:318
const StringPiece GetTypeName() const
Definition: video_content_details.h:87
void clear_definition()
Definition: video_content_details.h:206
void set_dimension(const StringPiece &value)
Definition: video_content_details.h:266
void clear_projection()
Definition: video_content_details.h:401