youtube  v3
live_broadcast.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_BROADCAST_H_
31 #define GOOGLE_YOUTUBE_API_LIVE_BROADCAST_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/live_broadcast_content_details.h"
39 #include "google/youtube_api/live_broadcast_snippet.h"
40 #include "google/youtube_api/live_broadcast_statistics.h"
41 #include "google/youtube_api/live_broadcast_status.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
47 namespace google_youtube_api {
48 using namespace googleapis;
49 
56 class LiveBroadcast : public client::JsonCppData {
57  public:
63  static LiveBroadcast* New();
64 
70  explicit LiveBroadcast(const Json::Value& storage);
71 
77  explicit LiveBroadcast(Json::Value* storage);
78 
82  virtual ~LiveBroadcast();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_youtube_api::LiveBroadcast");
91  }
92 
98  bool has_content_details() const {
99  return Storage().isMember("contentDetails");
100  }
101 
106  MutableStorage()->removeMember("contentDetails");
107  }
108 
109 
114  const LiveBroadcastContentDetails get_content_details() const;
115 
127  LiveBroadcastContentDetails mutable_contentDetails();
128 
134  bool has_etag() const {
135  return Storage().isMember("etag");
136  }
137 
141  void clear_etag() {
142  MutableStorage()->removeMember("etag");
143  }
144 
145 
149  const StringPiece get_etag() const {
150  const Json::Value& v = Storage("etag");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
162  void set_etag(const StringPiece& value) {
163  *MutableStorage("etag") = value.data();
164  }
165 
171  bool has_id() const {
172  return Storage().isMember("id");
173  }
174 
178  void clear_id() {
179  MutableStorage()->removeMember("id");
180  }
181 
182 
186  const StringPiece get_id() const {
187  const Json::Value& v = Storage("id");
188  if (v == Json::Value::null) return StringPiece("");
189  return StringPiece(v.asCString());
190  }
191 
199  void set_id(const StringPiece& value) {
200  *MutableStorage("id") = value.data();
201  }
202 
208  bool has_kind() const {
209  return Storage().isMember("kind");
210  }
211 
215  void clear_kind() {
216  MutableStorage()->removeMember("kind");
217  }
218 
219 
223  const StringPiece get_kind() const {
224  const Json::Value& v = Storage("kind");
225  if (v == Json::Value::null) return StringPiece("");
226  return StringPiece(v.asCString());
227  }
228 
237  void set_kind(const StringPiece& value) {
238  *MutableStorage("kind") = value.data();
239  }
240 
246  bool has_snippet() const {
247  return Storage().isMember("snippet");
248  }
249 
253  void clear_snippet() {
254  MutableStorage()->removeMember("snippet");
255  }
256 
257 
261  const LiveBroadcastSnippet get_snippet() const;
262 
271  LiveBroadcastSnippet mutable_snippet();
272 
278  bool has_statistics() const {
279  return Storage().isMember("statistics");
280  }
281 
286  MutableStorage()->removeMember("statistics");
287  }
288 
289 
293  const LiveBroadcastStatistics get_statistics() const;
294 
306  LiveBroadcastStatistics mutable_statistics();
307 
313  bool has_status() const {
314  return Storage().isMember("status");
315  }
316 
320  void clear_status() {
321  MutableStorage()->removeMember("status");
322  }
323 
324 
328  const LiveBroadcastStatus get_status() const;
329 
337  LiveBroadcastStatus mutable_status();
338 
339  private:
340  void operator=(const LiveBroadcast&);
341 }; // LiveBroadcast
342 } // namespace google_youtube_api
343 #endif // GOOGLE_YOUTUBE_API_LIVE_BROADCAST_H_
Definition: live_broadcast_status.h:50
Definition: access_policy.cc:40
Definition: live_broadcast.h:56
const StringPiece get_etag() const
Definition: live_broadcast.h:149
void set_kind(const StringPiece &value)
Definition: live_broadcast.h:237
void set_etag(const StringPiece &value)
Definition: live_broadcast.h:162
void clear_etag()
Definition: live_broadcast.h:141
void clear_id()
Definition: live_broadcast.h:178
bool has_statistics() const
Definition: live_broadcast.h:278
void clear_kind()
Definition: live_broadcast.h:215
bool has_status() const
Definition: live_broadcast.h:313
void clear_status()
Definition: live_broadcast.h:320
const StringPiece get_kind() const
Definition: live_broadcast.h:223
bool has_id() const
Definition: live_broadcast.h:171
bool has_content_details() const
Definition: live_broadcast.h:98
Definition: access_policy.h:38
Definition: live_broadcast_snippet.h:53
void clear_content_details()
Definition: live_broadcast.h:105
const StringPiece get_id() const
Definition: live_broadcast.h:186
Definition: live_broadcast_content_details.h:53
bool has_kind() const
Definition: live_broadcast.h:208
void set_id(const StringPiece &value)
Definition: live_broadcast.h:199
void clear_snippet()
Definition: live_broadcast.h:253
bool has_etag() const
Definition: live_broadcast.h:134
const StringPiece GetTypeName() const
Definition: live_broadcast.h:89
Definition: live_broadcast_statistics.h:51
bool has_snippet() const
Definition: live_broadcast.h:246
void clear_statistics()
Definition: live_broadcast.h:285