youtube  v3
live_broadcast_snippet.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_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_LIVE_BROADCAST_SNIPPET_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 #include "google/youtube_api/thumbnail_details.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
53 class LiveBroadcastSnippet : public client::JsonCppData {
54  public:
60  static LiveBroadcastSnippet* New();
61 
67  explicit LiveBroadcastSnippet(const Json::Value& storage);
68 
74  explicit LiveBroadcastSnippet(Json::Value* storage);
75 
79  virtual ~LiveBroadcastSnippet();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_youtube_api::LiveBroadcastSnippet");
88  }
89 
95  bool has_actual_end_time() const {
96  return Storage().isMember("actualEndTime");
97  }
98 
103  MutableStorage()->removeMember("actualEndTime");
104  }
105 
106 
110  client::DateTime get_actual_end_time() const {
111  const Json::Value& storage = Storage("actualEndTime");
112  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
113  }
114 
124  void set_actual_end_time(client::DateTime value) {
125  client::SetJsonValueFromCppValueHelper<client::DateTime >(
126  value, MutableStorage("actualEndTime"));
127  }
128 
134  bool has_actual_start_time() const {
135  return Storage().isMember("actualStartTime");
136  }
137 
142  MutableStorage()->removeMember("actualStartTime");
143  }
144 
145 
149  client::DateTime get_actual_start_time() const {
150  const Json::Value& storage = Storage("actualStartTime");
151  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
152  }
153 
163  void set_actual_start_time(client::DateTime value) {
164  client::SetJsonValueFromCppValueHelper<client::DateTime >(
165  value, MutableStorage("actualStartTime"));
166  }
167 
173  bool has_broadcast_type() const {
174  return Storage().isMember("broadcastType");
175  }
176 
181  MutableStorage()->removeMember("broadcastType");
182  }
183 
184 
188  const StringPiece get_broadcast_type() const {
189  const Json::Value& v = Storage("broadcastType");
190  if (v == Json::Value::null) return StringPiece("");
191  return StringPiece(v.asCString());
192  }
193 
198  void set_broadcast_type(const StringPiece& value) {
199  *MutableStorage("broadcastType") = value.data();
200  }
201 
207  bool has_channel_id() const {
208  return Storage().isMember("channelId");
209  }
210 
215  MutableStorage()->removeMember("channelId");
216  }
217 
218 
222  const StringPiece get_channel_id() const {
223  const Json::Value& v = Storage("channelId");
224  if (v == Json::Value::null) return StringPiece("");
225  return StringPiece(v.asCString());
226  }
227 
236  void set_channel_id(const StringPiece& value) {
237  *MutableStorage("channelId") = value.data();
238  }
239 
245  bool has_description() const {
246  return Storage().isMember("description");
247  }
248 
253  MutableStorage()->removeMember("description");
254  }
255 
256 
260  const StringPiece get_description() const {
261  const Json::Value& v = Storage("description");
262  if (v == Json::Value::null) return StringPiece("");
263  return StringPiece(v.asCString());
264  }
265 
275  void set_description(const StringPiece& value) {
276  *MutableStorage("description") = value.data();
277  }
278 
285  return Storage().isMember("isDefaultBroadcast");
286  }
287 
292  MutableStorage()->removeMember("isDefaultBroadcast");
293  }
294 
295 
300  const Json::Value& storage = Storage("isDefaultBroadcast");
301  return client::JsonValueToCppValueHelper<bool >(storage);
302  }
303 
308  void set_is_default_broadcast(bool value) {
309  client::SetJsonValueFromCppValueHelper<bool >(
310  value, MutableStorage("isDefaultBroadcast"));
311  }
312 
318  bool has_live_chat_id() const {
319  return Storage().isMember("liveChatId");
320  }
321 
326  MutableStorage()->removeMember("liveChatId");
327  }
328 
329 
333  const StringPiece get_live_chat_id() const {
334  const Json::Value& v = Storage("liveChatId");
335  if (v == Json::Value::null) return StringPiece("");
336  return StringPiece(v.asCString());
337  }
338 
346  void set_live_chat_id(const StringPiece& value) {
347  *MutableStorage("liveChatId") = value.data();
348  }
349 
355  bool has_published_at() const {
356  return Storage().isMember("publishedAt");
357  }
358 
363  MutableStorage()->removeMember("publishedAt");
364  }
365 
366 
370  client::DateTime get_published_at() const {
371  const Json::Value& storage = Storage("publishedAt");
372  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
373  }
374 
384  void set_published_at(client::DateTime value) {
385  client::SetJsonValueFromCppValueHelper<client::DateTime >(
386  value, MutableStorage("publishedAt"));
387  }
388 
394  bool has_scheduled_end_time() const {
395  return Storage().isMember("scheduledEndTime");
396  }
397 
402  MutableStorage()->removeMember("scheduledEndTime");
403  }
404 
405 
409  client::DateTime get_scheduled_end_time() const {
410  const Json::Value& storage = Storage("scheduledEndTime");
411  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
412  }
413 
422  void set_scheduled_end_time(client::DateTime value) {
423  client::SetJsonValueFromCppValueHelper<client::DateTime >(
424  value, MutableStorage("scheduledEndTime"));
425  }
426 
433  return Storage().isMember("scheduledStartTime");
434  }
435 
440  MutableStorage()->removeMember("scheduledStartTime");
441  }
442 
443 
447  client::DateTime get_scheduled_start_time() const {
448  const Json::Value& storage = Storage("scheduledStartTime");
449  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
450  }
451 
460  void set_scheduled_start_time(client::DateTime value) {
461  client::SetJsonValueFromCppValueHelper<client::DateTime >(
462  value, MutableStorage("scheduledStartTime"));
463  }
464 
470  bool has_thumbnails() const {
471  return Storage().isMember("thumbnails");
472  }
473 
478  MutableStorage()->removeMember("thumbnails");
479  }
480 
481 
485  const ThumbnailDetails get_thumbnails() const;
486 
497  ThumbnailDetails mutable_thumbnails();
498 
504  bool has_title() const {
505  return Storage().isMember("title");
506  }
507 
511  void clear_title() {
512  MutableStorage()->removeMember("title");
513  }
514 
515 
519  const StringPiece get_title() const {
520  const Json::Value& v = Storage("title");
521  if (v == Json::Value::null) return StringPiece("");
522  return StringPiece(v.asCString());
523  }
524 
534  void set_title(const StringPiece& value) {
535  *MutableStorage("title") = value.data();
536  }
537 
538  private:
539  void operator=(const LiveBroadcastSnippet&);
540 }; // LiveBroadcastSnippet
541 } // namespace google_youtube_api
542 #endif // GOOGLE_YOUTUBE_API_LIVE_BROADCAST_SNIPPET_H_
client::DateTime get_scheduled_end_time() const
Definition: live_broadcast_snippet.h:409
void clear_scheduled_end_time()
Definition: live_broadcast_snippet.h:401
void set_is_default_broadcast(bool value)
Definition: live_broadcast_snippet.h:308
Definition: access_policy.cc:40
bool has_is_default_broadcast() const
Definition: live_broadcast_snippet.h:284
const StringPiece get_live_chat_id() const
Definition: live_broadcast_snippet.h:333
client::DateTime get_scheduled_start_time() const
Definition: live_broadcast_snippet.h:447
client::DateTime get_actual_end_time() const
Definition: live_broadcast_snippet.h:110
bool has_actual_end_time() const
Definition: live_broadcast_snippet.h:95
void clear_description()
Definition: live_broadcast_snippet.h:252
void clear_published_at()
Definition: live_broadcast_snippet.h:362
void clear_title()
Definition: live_broadcast_snippet.h:511
bool get_is_default_broadcast() const
Definition: live_broadcast_snippet.h:299
void set_live_chat_id(const StringPiece &value)
Definition: live_broadcast_snippet.h:346
void set_channel_id(const StringPiece &value)
Definition: live_broadcast_snippet.h:236
void clear_actual_end_time()
Definition: live_broadcast_snippet.h:102
void clear_scheduled_start_time()
Definition: live_broadcast_snippet.h:439
void clear_channel_id()
Definition: live_broadcast_snippet.h:214
bool has_scheduled_end_time() const
Definition: live_broadcast_snippet.h:394
client::DateTime get_published_at() const
Definition: live_broadcast_snippet.h:370
const StringPiece GetTypeName() const
Definition: live_broadcast_snippet.h:86
const StringPiece get_channel_id() const
Definition: live_broadcast_snippet.h:222
client::DateTime get_actual_start_time() const
Definition: live_broadcast_snippet.h:149
bool has_broadcast_type() const
Definition: live_broadcast_snippet.h:173
void set_scheduled_end_time(client::DateTime value)
Definition: live_broadcast_snippet.h:422
void set_title(const StringPiece &value)
Definition: live_broadcast_snippet.h:534
Definition: access_policy.h:38
const StringPiece get_title() const
Definition: live_broadcast_snippet.h:519
void clear_broadcast_type()
Definition: live_broadcast_snippet.h:180
void set_actual_end_time(client::DateTime value)
Definition: live_broadcast_snippet.h:124
Definition: live_broadcast_snippet.h:53
void clear_is_default_broadcast()
Definition: live_broadcast_snippet.h:291
void set_description(const StringPiece &value)
Definition: live_broadcast_snippet.h:275
void clear_actual_start_time()
Definition: live_broadcast_snippet.h:141
bool has_published_at() const
Definition: live_broadcast_snippet.h:355
void set_actual_start_time(client::DateTime value)
Definition: live_broadcast_snippet.h:163
void clear_thumbnails()
Definition: live_broadcast_snippet.h:477
void clear_live_chat_id()
Definition: live_broadcast_snippet.h:325
const StringPiece get_description() const
Definition: live_broadcast_snippet.h:260
Definition: thumbnail_details.h:51
bool has_live_chat_id() const
Definition: live_broadcast_snippet.h:318
bool has_scheduled_start_time() const
Definition: live_broadcast_snippet.h:432
bool has_title() const
Definition: live_broadcast_snippet.h:504
void set_published_at(client::DateTime value)
Definition: live_broadcast_snippet.h:384
bool has_actual_start_time() const
Definition: live_broadcast_snippet.h:134
bool has_thumbnails() const
Definition: live_broadcast_snippet.h:470
bool has_description() const
Definition: live_broadcast_snippet.h:245
bool has_channel_id() const
Definition: live_broadcast_snippet.h:207
void set_broadcast_type(const StringPiece &value)
Definition: live_broadcast_snippet.h:198
const StringPiece get_broadcast_type() const
Definition: live_broadcast_snippet.h:188
void set_scheduled_start_time(client::DateTime value)
Definition: live_broadcast_snippet.h:460