youtube  v3
caption_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_CAPTION_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_CAPTION_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_youtube_api {
44 using namespace googleapis;
45 
51 class CaptionSnippet : public client::JsonCppData {
52  public:
58  static CaptionSnippet* New();
59 
65  explicit CaptionSnippet(const Json::Value& storage);
66 
72  explicit CaptionSnippet(Json::Value* storage);
73 
77  virtual ~CaptionSnippet();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_youtube_api::CaptionSnippet");
86  }
87 
93  bool has_audio_track_type() const {
94  return Storage().isMember("audioTrackType");
95  }
96 
101  MutableStorage()->removeMember("audioTrackType");
102  }
103 
104 
108  const StringPiece get_audio_track_type() const {
109  const Json::Value& v = Storage("audioTrackType");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
121  void set_audio_track_type(const StringPiece& value) {
122  *MutableStorage("audioTrackType") = value.data();
123  }
124 
130  bool has_failure_reason() const {
131  return Storage().isMember("failureReason");
132  }
133 
138  MutableStorage()->removeMember("failureReason");
139  }
140 
141 
145  const StringPiece get_failure_reason() const {
146  const Json::Value& v = Storage("failureReason");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
159  void set_failure_reason(const StringPiece& value) {
160  *MutableStorage("failureReason") = value.data();
161  }
162 
168  bool has_is_auto_synced() const {
169  return Storage().isMember("isAutoSynced");
170  }
171 
176  MutableStorage()->removeMember("isAutoSynced");
177  }
178 
179 
183  bool get_is_auto_synced() const {
184  const Json::Value& storage = Storage("isAutoSynced");
185  return client::JsonValueToCppValueHelper<bool >(storage);
186  }
187 
201  void set_is_auto_synced(bool value) {
202  client::SetJsonValueFromCppValueHelper<bool >(
203  value, MutableStorage("isAutoSynced"));
204  }
205 
211  bool has_is_cc() const {
212  return Storage().isMember("isCC");
213  }
214 
218  void clear_is_cc() {
219  MutableStorage()->removeMember("isCC");
220  }
221 
222 
226  bool get_is_cc() const {
227  const Json::Value& storage = Storage("isCC");
228  return client::JsonValueToCppValueHelper<bool >(storage);
229  }
230 
239  void set_is_cc(bool value) {
240  client::SetJsonValueFromCppValueHelper<bool >(
241  value, MutableStorage("isCC"));
242  }
243 
249  bool has_is_draft() const {
250  return Storage().isMember("isDraft");
251  }
252 
256  void clear_is_draft() {
257  MutableStorage()->removeMember("isDraft");
258  }
259 
260 
264  bool get_is_draft() const {
265  const Json::Value& storage = Storage("isDraft");
266  return client::JsonValueToCppValueHelper<bool >(storage);
267  }
268 
277  void set_is_draft(bool value) {
278  client::SetJsonValueFromCppValueHelper<bool >(
279  value, MutableStorage("isDraft"));
280  }
281 
287  bool has_is_easy_reader() const {
288  return Storage().isMember("isEasyReader");
289  }
290 
295  MutableStorage()->removeMember("isEasyReader");
296  }
297 
298 
302  bool get_is_easy_reader() const {
303  const Json::Value& storage = Storage("isEasyReader");
304  return client::JsonValueToCppValueHelper<bool >(storage);
305  }
306 
316  void set_is_easy_reader(bool value) {
317  client::SetJsonValueFromCppValueHelper<bool >(
318  value, MutableStorage("isEasyReader"));
319  }
320 
326  bool has_is_large() const {
327  return Storage().isMember("isLarge");
328  }
329 
333  void clear_is_large() {
334  MutableStorage()->removeMember("isLarge");
335  }
336 
337 
341  bool get_is_large() const {
342  const Json::Value& storage = Storage("isLarge");
343  return client::JsonValueToCppValueHelper<bool >(storage);
344  }
345 
354  void set_is_large(bool value) {
355  client::SetJsonValueFromCppValueHelper<bool >(
356  value, MutableStorage("isLarge"));
357  }
358 
364  bool has_language() const {
365  return Storage().isMember("language");
366  }
367 
371  void clear_language() {
372  MutableStorage()->removeMember("language");
373  }
374 
375 
379  const StringPiece get_language() const {
380  const Json::Value& v = Storage("language");
381  if (v == Json::Value::null) return StringPiece("");
382  return StringPiece(v.asCString());
383  }
384 
393  void set_language(const StringPiece& value) {
394  *MutableStorage("language") = value.data();
395  }
396 
402  bool has_last_updated() const {
403  return Storage().isMember("lastUpdated");
404  }
405 
410  MutableStorage()->removeMember("lastUpdated");
411  }
412 
413 
417  client::DateTime get_last_updated() const {
418  const Json::Value& storage = Storage("lastUpdated");
419  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
420  }
421 
430  void set_last_updated(client::DateTime value) {
431  client::SetJsonValueFromCppValueHelper<client::DateTime >(
432  value, MutableStorage("lastUpdated"));
433  }
434 
440  bool has_name() const {
441  return Storage().isMember("name");
442  }
443 
447  void clear_name() {
448  MutableStorage()->removeMember("name");
449  }
450 
451 
455  const StringPiece get_name() const {
456  const Json::Value& v = Storage("name");
457  if (v == Json::Value::null) return StringPiece("");
458  return StringPiece(v.asCString());
459  }
460 
469  void set_name(const StringPiece& value) {
470  *MutableStorage("name") = value.data();
471  }
472 
478  bool has_status() const {
479  return Storage().isMember("status");
480  }
481 
485  void clear_status() {
486  MutableStorage()->removeMember("status");
487  }
488 
489 
493  const StringPiece get_status() const {
494  const Json::Value& v = Storage("status");
495  if (v == Json::Value::null) return StringPiece("");
496  return StringPiece(v.asCString());
497  }
498 
506  void set_status(const StringPiece& value) {
507  *MutableStorage("status") = value.data();
508  }
509 
515  bool has_track_kind() const {
516  return Storage().isMember("trackKind");
517  }
518 
523  MutableStorage()->removeMember("trackKind");
524  }
525 
526 
530  const StringPiece get_track_kind() const {
531  const Json::Value& v = Storage("trackKind");
532  if (v == Json::Value::null) return StringPiece("");
533  return StringPiece(v.asCString());
534  }
535 
543  void set_track_kind(const StringPiece& value) {
544  *MutableStorage("trackKind") = value.data();
545  }
546 
552  bool has_video_id() const {
553  return Storage().isMember("videoId");
554  }
555 
559  void clear_video_id() {
560  MutableStorage()->removeMember("videoId");
561  }
562 
563 
567  const StringPiece get_video_id() const {
568  const Json::Value& v = Storage("videoId");
569  if (v == Json::Value::null) return StringPiece("");
570  return StringPiece(v.asCString());
571  }
572 
581  void set_video_id(const StringPiece& value) {
582  *MutableStorage("videoId") = value.data();
583  }
584 
585  private:
586  void operator=(const CaptionSnippet&);
587 }; // CaptionSnippet
588 } // namespace google_youtube_api
589 #endif // GOOGLE_YOUTUBE_API_CAPTION_SNIPPET_H_
void set_is_cc(bool value)
Definition: caption_snippet.h:239
bool has_failure_reason() const
Definition: caption_snippet.h:130
const StringPiece get_failure_reason() const
Definition: caption_snippet.h:145
Definition: access_policy.cc:40
void set_is_auto_synced(bool value)
Definition: caption_snippet.h:201
bool has_language() const
Definition: caption_snippet.h:364
const StringPiece get_name() const
Definition: caption_snippet.h:455
bool has_name() const
Definition: caption_snippet.h:440
bool has_track_kind() const
Definition: caption_snippet.h:515
void clear_language()
Definition: caption_snippet.h:371
bool has_video_id() const
Definition: caption_snippet.h:552
void set_track_kind(const StringPiece &value)
Definition: caption_snippet.h:543
const StringPiece get_track_kind() const
Definition: caption_snippet.h:530
bool has_audio_track_type() const
Definition: caption_snippet.h:93
bool has_status() const
Definition: caption_snippet.h:478
void clear_last_updated()
Definition: caption_snippet.h:409
bool get_is_draft() const
Definition: caption_snippet.h:264
void set_is_large(bool value)
Definition: caption_snippet.h:354
void clear_track_kind()
Definition: caption_snippet.h:522
bool get_is_large() const
Definition: caption_snippet.h:341
void clear_is_cc()
Definition: caption_snippet.h:218
void set_name(const StringPiece &value)
Definition: caption_snippet.h:469
const StringPiece get_video_id() const
Definition: caption_snippet.h:567
bool get_is_easy_reader() const
Definition: caption_snippet.h:302
bool has_is_large() const
Definition: caption_snippet.h:326
bool get_is_auto_synced() const
Definition: caption_snippet.h:183
void clear_name()
Definition: caption_snippet.h:447
void set_video_id(const StringPiece &value)
Definition: caption_snippet.h:581
void clear_is_large()
Definition: caption_snippet.h:333
void clear_video_id()
Definition: caption_snippet.h:559
bool has_is_draft() const
Definition: caption_snippet.h:249
void set_failure_reason(const StringPiece &value)
Definition: caption_snippet.h:159
void clear_is_easy_reader()
Definition: caption_snippet.h:294
Definition: access_policy.h:38
void clear_failure_reason()
Definition: caption_snippet.h:137
void set_language(const StringPiece &value)
Definition: caption_snippet.h:393
void set_audio_track_type(const StringPiece &value)
Definition: caption_snippet.h:121
const StringPiece get_audio_track_type() const
Definition: caption_snippet.h:108
const StringPiece get_language() const
Definition: caption_snippet.h:379
const StringPiece GetTypeName() const
Definition: caption_snippet.h:84
Definition: caption_snippet.h:51
bool has_is_auto_synced() const
Definition: caption_snippet.h:168
bool get_is_cc() const
Definition: caption_snippet.h:226
void clear_is_draft()
Definition: caption_snippet.h:256
void set_status(const StringPiece &value)
Definition: caption_snippet.h:506
void set_last_updated(client::DateTime value)
Definition: caption_snippet.h:430
client::DateTime get_last_updated() const
Definition: caption_snippet.h:417
bool has_is_easy_reader() const
Definition: caption_snippet.h:287
void set_is_draft(bool value)
Definition: caption_snippet.h:277
bool has_last_updated() const
Definition: caption_snippet.h:402
const StringPiece get_status() const
Definition: caption_snippet.h:493
void clear_is_auto_synced()
Definition: caption_snippet.h:175
void clear_status()
Definition: caption_snippet.h:485
void set_is_easy_reader(bool value)
Definition: caption_snippet.h:316
bool has_is_cc() const
Definition: caption_snippet.h:211
void clear_audio_track_type()
Definition: caption_snippet.h:100