youtube  v3
video_status.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_STATUS_H_
31 #define GOOGLE_YOUTUBE_API_VIDEO_STATUS_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 VideoStatus : public client::JsonCppData {
52  public:
58  static VideoStatus* New();
59 
65  explicit VideoStatus(const Json::Value& storage);
66 
72  explicit VideoStatus(Json::Value* storage);
73 
77  virtual ~VideoStatus();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_youtube_api::VideoStatus");
86  }
87 
93  bool has_embeddable() const {
94  return Storage().isMember("embeddable");
95  }
96 
101  MutableStorage()->removeMember("embeddable");
102  }
103 
104 
108  bool get_embeddable() const {
109  const Json::Value& storage = Storage("embeddable");
110  return client::JsonValueToCppValueHelper<bool >(storage);
111  }
112 
120  void set_embeddable(bool value) {
121  client::SetJsonValueFromCppValueHelper<bool >(
122  value, MutableStorage("embeddable"));
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_license() const {
169  return Storage().isMember("license");
170  }
171 
175  void clear_license() {
176  MutableStorage()->removeMember("license");
177  }
178 
179 
183  const StringPiece get_license() const {
184  const Json::Value& v = Storage("license");
185  if (v == Json::Value::null) return StringPiece("");
186  return StringPiece(v.asCString());
187  }
188 
196  void set_license(const StringPiece& value) {
197  *MutableStorage("license") = value.data();
198  }
199 
205  bool has_made_for_kids() const {
206  return Storage().isMember("madeForKids");
207  }
208 
213  MutableStorage()->removeMember("madeForKids");
214  }
215 
216 
220  bool get_made_for_kids() const {
221  const Json::Value& storage = Storage("madeForKids");
222  return client::JsonValueToCppValueHelper<bool >(storage);
223  }
224 
229  void set_made_for_kids(bool value) {
230  client::SetJsonValueFromCppValueHelper<bool >(
231  value, MutableStorage("madeForKids"));
232  }
233 
239  bool has_privacy_status() const {
240  return Storage().isMember("privacyStatus");
241  }
242 
247  MutableStorage()->removeMember("privacyStatus");
248  }
249 
250 
254  const StringPiece get_privacy_status() const {
255  const Json::Value& v = Storage("privacyStatus");
256  if (v == Json::Value::null) return StringPiece("");
257  return StringPiece(v.asCString());
258  }
259 
267  void set_privacy_status(const StringPiece& value) {
268  *MutableStorage("privacyStatus") = value.data();
269  }
270 
277  return Storage().isMember("publicStatsViewable");
278  }
279 
284  MutableStorage()->removeMember("publicStatsViewable");
285  }
286 
287 
292  const Json::Value& storage = Storage("publicStatsViewable");
293  return client::JsonValueToCppValueHelper<bool >(storage);
294  }
295 
305  void set_public_stats_viewable(bool value) {
306  client::SetJsonValueFromCppValueHelper<bool >(
307  value, MutableStorage("publicStatsViewable"));
308  }
309 
315  bool has_publish_at() const {
316  return Storage().isMember("publishAt");
317  }
318 
323  MutableStorage()->removeMember("publishAt");
324  }
325 
326 
330  client::DateTime get_publish_at() const {
331  const Json::Value& storage = Storage("publishAt");
332  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
333  }
334 
344  void set_publish_at(client::DateTime value) {
345  client::SetJsonValueFromCppValueHelper<client::DateTime >(
346  value, MutableStorage("publishAt"));
347  }
348 
354  bool has_rejection_reason() const {
355  return Storage().isMember("rejectionReason");
356  }
357 
362  MutableStorage()->removeMember("rejectionReason");
363  }
364 
365 
369  const StringPiece get_rejection_reason() const {
370  const Json::Value& v = Storage("rejectionReason");
371  if (v == Json::Value::null) return StringPiece("");
372  return StringPiece(v.asCString());
373  }
374 
384  void set_rejection_reason(const StringPiece& value) {
385  *MutableStorage("rejectionReason") = value.data();
386  }
387 
395  return Storage().isMember("selfDeclaredMadeForKids");
396  }
397 
402  MutableStorage()->removeMember("selfDeclaredMadeForKids");
403  }
404 
405 
410  const Json::Value& storage = Storage("selfDeclaredMadeForKids");
411  return client::JsonValueToCppValueHelper<bool >(storage);
412  }
413 
419  client::SetJsonValueFromCppValueHelper<bool >(
420  value, MutableStorage("selfDeclaredMadeForKids"));
421  }
422 
428  bool has_upload_status() const {
429  return Storage().isMember("uploadStatus");
430  }
431 
436  MutableStorage()->removeMember("uploadStatus");
437  }
438 
439 
443  const StringPiece get_upload_status() const {
444  const Json::Value& v = Storage("uploadStatus");
445  if (v == Json::Value::null) return StringPiece("");
446  return StringPiece(v.asCString());
447  }
448 
456  void set_upload_status(const StringPiece& value) {
457  *MutableStorage("uploadStatus") = value.data();
458  }
459 
460  private:
461  void operator=(const VideoStatus&);
462 }; // VideoStatus
463 } // namespace google_youtube_api
464 #endif // GOOGLE_YOUTUBE_API_VIDEO_STATUS_H_
void clear_privacy_status()
Definition: video_status.h:246
void set_publish_at(client::DateTime value)
Definition: video_status.h:344
void set_failure_reason(const StringPiece &value)
Definition: video_status.h:159
Definition: access_policy.cc:40
void set_upload_status(const StringPiece &value)
Definition: video_status.h:456
bool has_privacy_status() const
Definition: video_status.h:239
void set_made_for_kids(bool value)
Definition: video_status.h:229
void set_rejection_reason(const StringPiece &value)
Definition: video_status.h:384
void clear_license()
Definition: video_status.h:175
void clear_publish_at()
Definition: video_status.h:322
bool has_upload_status() const
Definition: video_status.h:428
bool has_publish_at() const
Definition: video_status.h:315
const StringPiece get_rejection_reason() const
Definition: video_status.h:369
void set_privacy_status(const StringPiece &value)
Definition: video_status.h:267
const StringPiece get_license() const
Definition: video_status.h:183
void set_license(const StringPiece &value)
Definition: video_status.h:196
void clear_public_stats_viewable()
Definition: video_status.h:283
client::DateTime get_publish_at() const
Definition: video_status.h:330
bool has_self_declared_made_for_kids() const
Definition: video_status.h:394
bool has_license() const
Definition: video_status.h:168
const StringPiece get_upload_status() const
Definition: video_status.h:443
void set_public_stats_viewable(bool value)
Definition: video_status.h:305
const StringPiece get_privacy_status() const
Definition: video_status.h:254
void set_self_declared_made_for_kids(bool value)
Definition: video_status.h:418
Definition: access_policy.h:38
bool has_embeddable() const
Definition: video_status.h:93
void set_embeddable(bool value)
Definition: video_status.h:120
bool has_failure_reason() const
Definition: video_status.h:130
bool has_made_for_kids() const
Definition: video_status.h:205
bool get_embeddable() const
Definition: video_status.h:108
void clear_failure_reason()
Definition: video_status.h:137
bool get_self_declared_made_for_kids() const
Definition: video_status.h:409
void clear_self_declared_made_for_kids()
Definition: video_status.h:401
void clear_made_for_kids()
Definition: video_status.h:212
bool has_public_stats_viewable() const
Definition: video_status.h:276
void clear_upload_status()
Definition: video_status.h:435
bool get_public_stats_viewable() const
Definition: video_status.h:291
bool has_rejection_reason() const
Definition: video_status.h:354
void clear_embeddable()
Definition: video_status.h:100
bool get_made_for_kids() const
Definition: video_status.h:220
Definition: video_status.h:51
const StringPiece GetTypeName() const
Definition: video_status.h:84
const StringPiece get_failure_reason() const
Definition: video_status.h:145
void clear_rejection_reason()
Definition: video_status.h:361