youtube  v3
video_file_details_video_stream.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_VIDEO_STREAM_H_
31 #define GOOGLE_YOUTUBE_API_VIDEO_FILE_DETAILS_VIDEO_STREAM_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_youtube_api {
44 using namespace googleapis;
45 
51 class VideoFileDetailsVideoStream : public client::JsonCppData {
52  public:
58  static VideoFileDetailsVideoStream* New();
59 
65  explicit VideoFileDetailsVideoStream(const Json::Value& storage);
66 
72  explicit VideoFileDetailsVideoStream(Json::Value* storage);
73 
77  virtual ~VideoFileDetailsVideoStream();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_youtube_api::VideoFileDetailsVideoStream");
86  }
87 
93  bool has_aspect_ratio() const {
94  return Storage().isMember("aspectRatio");
95  }
96 
101  MutableStorage()->removeMember("aspectRatio");
102  }
103 
104 
108  double get_aspect_ratio() const {
109  const Json::Value& storage = Storage("aspectRatio");
110  return client::JsonValueToCppValueHelper<double >(storage);
111  }
112 
121  void set_aspect_ratio(double value) {
122  client::SetJsonValueFromCppValueHelper<double >(
123  value, MutableStorage("aspectRatio"));
124  }
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 
158  void set_bitrate_bps(uint64 value) {
159  client::SetJsonValueFromCppValueHelper<uint64 >(
160  value, MutableStorage("bitrateBps"));
161  }
162 
168  bool has_codec() const {
169  return Storage().isMember("codec");
170  }
171 
175  void clear_codec() {
176  MutableStorage()->removeMember("codec");
177  }
178 
179 
183  const StringPiece get_codec() const {
184  const Json::Value& v = Storage("codec");
185  if (v == Json::Value::null) return StringPiece("");
186  return StringPiece(v.asCString());
187  }
188 
196  void set_codec(const StringPiece& value) {
197  *MutableStorage("codec") = value.data();
198  }
199 
205  bool has_frame_rate_fps() const {
206  return Storage().isMember("frameRateFps");
207  }
208 
213  MutableStorage()->removeMember("frameRateFps");
214  }
215 
216 
220  double get_frame_rate_fps() const {
221  const Json::Value& storage = Storage("frameRateFps");
222  return client::JsonValueToCppValueHelper<double >(storage);
223  }
224 
232  void set_frame_rate_fps(double value) {
233  client::SetJsonValueFromCppValueHelper<double >(
234  value, MutableStorage("frameRateFps"));
235  }
236 
242  bool has_height_pixels() const {
243  return Storage().isMember("heightPixels");
244  }
245 
250  MutableStorage()->removeMember("heightPixels");
251  }
252 
253 
257  uint32 get_height_pixels() const {
258  const Json::Value& storage = Storage("heightPixels");
259  return client::JsonValueToCppValueHelper<uint32 >(storage);
260  }
261 
269  void set_height_pixels(uint32 value) {
270  client::SetJsonValueFromCppValueHelper<uint32 >(
271  value, MutableStorage("heightPixels"));
272  }
273 
279  bool has_rotation() const {
280  return Storage().isMember("rotation");
281  }
282 
286  void clear_rotation() {
287  MutableStorage()->removeMember("rotation");
288  }
289 
290 
294  const StringPiece get_rotation() const {
295  const Json::Value& v = Storage("rotation");
296  if (v == Json::Value::null) return StringPiece("");
297  return StringPiece(v.asCString());
298  }
299 
308  void set_rotation(const StringPiece& value) {
309  *MutableStorage("rotation") = value.data();
310  }
311 
317  bool has_vendor() const {
318  return Storage().isMember("vendor");
319  }
320 
324  void clear_vendor() {
325  MutableStorage()->removeMember("vendor");
326  }
327 
328 
332  const StringPiece get_vendor() const {
333  const Json::Value& v = Storage("vendor");
334  if (v == Json::Value::null) return StringPiece("");
335  return StringPiece(v.asCString());
336  }
337 
346  void set_vendor(const StringPiece& value) {
347  *MutableStorage("vendor") = value.data();
348  }
349 
355  bool has_width_pixels() const {
356  return Storage().isMember("widthPixels");
357  }
358 
363  MutableStorage()->removeMember("widthPixels");
364  }
365 
366 
370  uint32 get_width_pixels() const {
371  const Json::Value& storage = Storage("widthPixels");
372  return client::JsonValueToCppValueHelper<uint32 >(storage);
373  }
374 
383  void set_width_pixels(uint32 value) {
384  client::SetJsonValueFromCppValueHelper<uint32 >(
385  value, MutableStorage("widthPixels"));
386  }
387 
388  private:
389  void operator=(const VideoFileDetailsVideoStream&);
390 }; // VideoFileDetailsVideoStream
391 } // namespace google_youtube_api
392 #endif // GOOGLE_YOUTUBE_API_VIDEO_FILE_DETAILS_VIDEO_STREAM_H_
Definition: video_file_details_video_stream.h:51
void clear_height_pixels()
Definition: video_file_details_video_stream.h:249
Definition: access_policy.cc:40
void set_rotation(const StringPiece &value)
Definition: video_file_details_video_stream.h:308
void clear_frame_rate_fps()
Definition: video_file_details_video_stream.h:212
bool has_codec() const
Definition: video_file_details_video_stream.h:168
bool has_width_pixels() const
Definition: video_file_details_video_stream.h:355
bool has_vendor() const
Definition: video_file_details_video_stream.h:317
bool has_rotation() const
Definition: video_file_details_video_stream.h:279
void set_height_pixels(uint32 value)
Definition: video_file_details_video_stream.h:269
bool has_height_pixels() const
Definition: video_file_details_video_stream.h:242
void clear_codec()
Definition: video_file_details_video_stream.h:175
const StringPiece get_rotation() const
Definition: video_file_details_video_stream.h:294
bool has_bitrate_bps() const
Definition: video_file_details_video_stream.h:131
void set_frame_rate_fps(double value)
Definition: video_file_details_video_stream.h:232
void set_codec(const StringPiece &value)
Definition: video_file_details_video_stream.h:196
bool has_aspect_ratio() const
Definition: video_file_details_video_stream.h:93
void clear_vendor()
Definition: video_file_details_video_stream.h:324
double get_aspect_ratio() const
Definition: video_file_details_video_stream.h:108
const StringPiece GetTypeName() const
Definition: video_file_details_video_stream.h:84
void set_vendor(const StringPiece &value)
Definition: video_file_details_video_stream.h:346
double get_frame_rate_fps() const
Definition: video_file_details_video_stream.h:220
void set_width_pixels(uint32 value)
Definition: video_file_details_video_stream.h:383
void clear_aspect_ratio()
Definition: video_file_details_video_stream.h:100
Definition: access_policy.h:38
uint64 get_bitrate_bps() const
Definition: video_file_details_video_stream.h:146
const StringPiece get_vendor() const
Definition: video_file_details_video_stream.h:332
bool has_frame_rate_fps() const
Definition: video_file_details_video_stream.h:205
void clear_rotation()
Definition: video_file_details_video_stream.h:286
void set_bitrate_bps(uint64 value)
Definition: video_file_details_video_stream.h:158
void clear_bitrate_bps()
Definition: video_file_details_video_stream.h:138
uint32 get_height_pixels() const
Definition: video_file_details_video_stream.h:257
const StringPiece get_codec() const
Definition: video_file_details_video_stream.h:183
uint32 get_width_pixels() const
Definition: video_file_details_video_stream.h:370
void set_aspect_ratio(double value)
Definition: video_file_details_video_stream.h:121
void clear_width_pixels()
Definition: video_file_details_video_stream.h:362