youtube  v3
video_file_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_FILE_DETAILS_H_
31 #define GOOGLE_YOUTUBE_API_VIDEO_FILE_DETAILS_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 #include "google/youtube_api/video_file_details_audio_stream.h"
40 #include "google/youtube_api/video_file_details_video_stream.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_youtube_api {
47 using namespace googleapis;
48 
56 class VideoFileDetails : public client::JsonCppData {
57  public:
63  static VideoFileDetails* New();
64 
70  explicit VideoFileDetails(const Json::Value& storage);
71 
77  explicit VideoFileDetails(Json::Value* storage);
78 
82  virtual ~VideoFileDetails();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_youtube_api::VideoFileDetails");
91  }
92 
98  bool has_audio_streams() const {
99  return Storage().isMember("audioStreams");
100  }
101 
106  MutableStorage()->removeMember("audioStreams");
107  }
108 
109 
113  const client::JsonCppArray<VideoFileDetailsAudioStream > get_audio_streams() const;
114 
124  client::JsonCppArray<VideoFileDetailsAudioStream > mutable_audioStreams();
125 
131  bool has_bitrate_bps() const {
132  return Storage().isMember("bitrateBps");
133  }
134 
139  MutableStorage()->removeMember("bitrateBps");
140  }
141 
142 
146  uint64 get_bitrate_bps() const {
147  const Json::Value& storage = Storage("bitrateBps");
148  return client::JsonValueToCppValueHelper<uint64 >(storage);
149  }
150 
159  void set_bitrate_bps(uint64 value) {
160  client::SetJsonValueFromCppValueHelper<uint64 >(
161  value, MutableStorage("bitrateBps"));
162  }
163 
169  bool has_container() const {
170  return Storage().isMember("container");
171  }
172 
177  MutableStorage()->removeMember("container");
178  }
179 
180 
184  const StringPiece get_container() const {
185  const Json::Value& v = Storage("container");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
197  void set_container(const StringPiece& value) {
198  *MutableStorage("container") = value.data();
199  }
200 
206  bool has_creation_time() const {
207  return Storage().isMember("creationTime");
208  }
209 
214  MutableStorage()->removeMember("creationTime");
215  }
216 
217 
221  const StringPiece get_creation_time() const {
222  const Json::Value& v = Storage("creationTime");
223  if (v == Json::Value::null) return StringPiece("");
224  return StringPiece(v.asCString());
225  }
226 
239  void set_creation_time(const StringPiece& value) {
240  *MutableStorage("creationTime") = value.data();
241  }
242 
248  bool has_duration_ms() const {
249  return Storage().isMember("durationMs");
250  }
251 
256  MutableStorage()->removeMember("durationMs");
257  }
258 
259 
263  uint64 get_duration_ms() const {
264  const Json::Value& storage = Storage("durationMs");
265  return client::JsonValueToCppValueHelper<uint64 >(storage);
266  }
267 
275  void set_duration_ms(uint64 value) {
276  client::SetJsonValueFromCppValueHelper<uint64 >(
277  value, MutableStorage("durationMs"));
278  }
279 
285  bool has_file_name() const {
286  return Storage().isMember("fileName");
287  }
288 
293  MutableStorage()->removeMember("fileName");
294  }
295 
296 
300  const StringPiece get_file_name() const {
301  const Json::Value& v = Storage("fileName");
302  if (v == Json::Value::null) return StringPiece("");
303  return StringPiece(v.asCString());
304  }
305 
314  void set_file_name(const StringPiece& value) {
315  *MutableStorage("fileName") = value.data();
316  }
317 
323  bool has_file_size() const {
324  return Storage().isMember("fileSize");
325  }
326 
331  MutableStorage()->removeMember("fileSize");
332  }
333 
334 
338  uint64 get_file_size() const {
339  const Json::Value& storage = Storage("fileSize");
340  return client::JsonValueToCppValueHelper<uint64 >(storage);
341  }
342 
351  void set_file_size(uint64 value) {
352  client::SetJsonValueFromCppValueHelper<uint64 >(
353  value, MutableStorage("fileSize"));
354  }
355 
361  bool has_file_type() const {
362  return Storage().isMember("fileType");
363  }
364 
369  MutableStorage()->removeMember("fileType");
370  }
371 
372 
376  const StringPiece get_file_type() const {
377  const Json::Value& v = Storage("fileType");
378  if (v == Json::Value::null) return StringPiece("");
379  return StringPiece(v.asCString());
380  }
381 
391  void set_file_type(const StringPiece& value) {
392  *MutableStorage("fileType") = value.data();
393  }
394 
400  bool has_video_streams() const {
401  return Storage().isMember("videoStreams");
402  }
403 
408  MutableStorage()->removeMember("videoStreams");
409  }
410 
411 
415  const client::JsonCppArray<VideoFileDetailsVideoStream > get_video_streams() const;
416 
426  client::JsonCppArray<VideoFileDetailsVideoStream > mutable_videoStreams();
427 
428  private:
429  void operator=(const VideoFileDetails&);
430 }; // VideoFileDetails
431 } // namespace google_youtube_api
432 #endif // GOOGLE_YOUTUBE_API_VIDEO_FILE_DETAILS_H_
bool has_file_name() const
Definition: video_file_details.h:285
bool has_creation_time() const
Definition: video_file_details.h:206
void clear_file_name()
Definition: video_file_details.h:292
Definition: access_policy.cc:40
bool has_duration_ms() const
Definition: video_file_details.h:248
void set_bitrate_bps(uint64 value)
Definition: video_file_details.h:159
void clear_container()
Definition: video_file_details.h:176
uint64 get_file_size() const
Definition: video_file_details.h:338
const StringPiece GetTypeName() const
Definition: video_file_details.h:89
void clear_file_size()
Definition: video_file_details.h:330
uint64 get_duration_ms() const
Definition: video_file_details.h:263
uint64 get_bitrate_bps() const
Definition: video_file_details.h:146
const StringPiece get_creation_time() const
Definition: video_file_details.h:221
void clear_audio_streams()
Definition: video_file_details.h:105
bool has_container() const
Definition: video_file_details.h:169
void set_container(const StringPiece &value)
Definition: video_file_details.h:197
void set_duration_ms(uint64 value)
Definition: video_file_details.h:275
void clear_bitrate_bps()
Definition: video_file_details.h:138
void clear_file_type()
Definition: video_file_details.h:368
void set_file_size(uint64 value)
Definition: video_file_details.h:351
const StringPiece get_file_type() const
Definition: video_file_details.h:376
void set_file_name(const StringPiece &value)
Definition: video_file_details.h:314
const StringPiece get_file_name() const
Definition: video_file_details.h:300
void clear_duration_ms()
Definition: video_file_details.h:255
Definition: access_policy.h:38
bool has_file_size() const
Definition: video_file_details.h:323
Definition: video_file_details.h:56
const StringPiece get_container() const
Definition: video_file_details.h:184
bool has_file_type() const
Definition: video_file_details.h:361
void clear_video_streams()
Definition: video_file_details.h:407
void clear_creation_time()
Definition: video_file_details.h:213
bool has_audio_streams() const
Definition: video_file_details.h:98
void set_creation_time(const StringPiece &value)
Definition: video_file_details.h:239
bool has_bitrate_bps() const
Definition: video_file_details.h:131
void set_file_type(const StringPiece &value)
Definition: video_file_details.h:391
bool has_video_streams() const
Definition: video_file_details.h:400