youtube  v3
live_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_LIVE_STREAM_H_
31 #define GOOGLE_YOUTUBE_API_LIVE_STREAM_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/cdn_settings.h"
39 #include "google/youtube_api/live_stream_content_details.h"
40 #include "google/youtube_api/live_stream_snippet.h"
41 #include "google/youtube_api/live_stream_status.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
47 namespace google_youtube_api {
48 using namespace googleapis;
49 
55 class LiveStream : public client::JsonCppData {
56  public:
62  static LiveStream* New();
63 
69  explicit LiveStream(const Json::Value& storage);
70 
76  explicit LiveStream(Json::Value* storage);
77 
81  virtual ~LiveStream();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_youtube_api::LiveStream");
90  }
91 
97  bool has_cdn() const {
98  return Storage().isMember("cdn");
99  }
100 
104  void clear_cdn() {
105  MutableStorage()->removeMember("cdn");
106  }
107 
108 
112  const CdnSettings get_cdn() const;
113 
123  CdnSettings mutable_cdn();
124 
130  bool has_content_details() const {
131  return Storage().isMember("contentDetails");
132  }
133 
138  MutableStorage()->removeMember("contentDetails");
139  }
140 
141 
146  const LiveStreamContentDetails get_content_details() const;
147 
157  LiveStreamContentDetails mutable_contentDetails();
158 
164  bool has_etag() const {
165  return Storage().isMember("etag");
166  }
167 
171  void clear_etag() {
172  MutableStorage()->removeMember("etag");
173  }
174 
175 
179  const StringPiece get_etag() const {
180  const Json::Value& v = Storage("etag");
181  if (v == Json::Value::null) return StringPiece("");
182  return StringPiece(v.asCString());
183  }
184 
192  void set_etag(const StringPiece& value) {
193  *MutableStorage("etag") = value.data();
194  }
195 
201  bool has_id() const {
202  return Storage().isMember("id");
203  }
204 
208  void clear_id() {
209  MutableStorage()->removeMember("id");
210  }
211 
212 
216  const StringPiece get_id() const {
217  const Json::Value& v = Storage("id");
218  if (v == Json::Value::null) return StringPiece("");
219  return StringPiece(v.asCString());
220  }
221 
229  void set_id(const StringPiece& value) {
230  *MutableStorage("id") = value.data();
231  }
232 
238  bool has_kind() const {
239  return Storage().isMember("kind");
240  }
241 
245  void clear_kind() {
246  MutableStorage()->removeMember("kind");
247  }
248 
249 
253  const StringPiece get_kind() const {
254  const Json::Value& v = Storage("kind");
255  if (v == Json::Value::null) return StringPiece("");
256  return StringPiece(v.asCString());
257  }
258 
267  void set_kind(const StringPiece& value) {
268  *MutableStorage("kind") = value.data();
269  }
270 
276  bool has_snippet() const {
277  return Storage().isMember("snippet");
278  }
279 
283  void clear_snippet() {
284  MutableStorage()->removeMember("snippet");
285  }
286 
287 
291  const LiveStreamSnippet get_snippet() const;
292 
301  LiveStreamSnippet mutable_snippet();
302 
308  bool has_status() const {
309  return Storage().isMember("status");
310  }
311 
315  void clear_status() {
316  MutableStorage()->removeMember("status");
317  }
318 
319 
323  const LiveStreamStatus get_status() const;
324 
332  LiveStreamStatus mutable_status();
333 
334  private:
335  void operator=(const LiveStream&);
336 }; // LiveStream
337 } // namespace google_youtube_api
338 #endif // GOOGLE_YOUTUBE_API_LIVE_STREAM_H_
const StringPiece GetTypeName() const
Definition: live_stream.h:88
Definition: access_policy.cc:40
Definition: live_stream_snippet.h:51
Definition: live_stream_content_details.h:50
bool has_id() const
Definition: live_stream.h:201
void clear_kind()
Definition: live_stream.h:245
void clear_content_details()
Definition: live_stream.h:137
void clear_etag()
Definition: live_stream.h:171
void clear_cdn()
Definition: live_stream.h:104
void set_id(const StringPiece &value)
Definition: live_stream.h:229
bool has_snippet() const
Definition: live_stream.h:276
Definition: cdn_settings.h:52
bool has_content_details() const
Definition: live_stream.h:130
void set_kind(const StringPiece &value)
Definition: live_stream.h:267
Definition: live_stream.h:55
bool has_cdn() const
Definition: live_stream.h:97
const StringPiece get_id() const
Definition: live_stream.h:216
Definition: access_policy.h:38
void clear_status()
Definition: live_stream.h:315
bool has_kind() const
Definition: live_stream.h:238
void clear_id()
Definition: live_stream.h:208
bool has_status() const
Definition: live_stream.h:308
void clear_snippet()
Definition: live_stream.h:283
bool has_etag() const
Definition: live_stream.h:164
const StringPiece get_etag() const
Definition: live_stream.h:179
const StringPiece get_kind() const
Definition: live_stream.h:253
void set_etag(const StringPiece &value)
Definition: live_stream.h:192
Definition: live_stream_status.h:52