youtube  v3
live_stream_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_STREAM_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_LIVE_STREAM_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_youtube_api {
44 using namespace googleapis;
45 
51 class LiveStreamSnippet : public client::JsonCppData {
52  public:
58  static LiveStreamSnippet* New();
59 
65  explicit LiveStreamSnippet(const Json::Value& storage);
66 
72  explicit LiveStreamSnippet(Json::Value* storage);
73 
77  virtual ~LiveStreamSnippet();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_youtube_api::LiveStreamSnippet");
86  }
87 
93  bool has_channel_id() const {
94  return Storage().isMember("channelId");
95  }
96 
101  MutableStorage()->removeMember("channelId");
102  }
103 
104 
108  const StringPiece get_channel_id() const {
109  const Json::Value& v = Storage("channelId");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
122  void set_channel_id(const StringPiece& value) {
123  *MutableStorage("channelId") = value.data();
124  }
125 
131  bool has_description() const {
132  return Storage().isMember("description");
133  }
134 
139  MutableStorage()->removeMember("description");
140  }
141 
142 
146  const StringPiece get_description() const {
147  const Json::Value& v = Storage("description");
148  if (v == Json::Value::null) return StringPiece("");
149  return StringPiece(v.asCString());
150  }
151 
159  void set_description(const StringPiece& value) {
160  *MutableStorage("description") = value.data();
161  }
162 
168  bool has_is_default_stream() const {
169  return Storage().isMember("isDefaultStream");
170  }
171 
176  MutableStorage()->removeMember("isDefaultStream");
177  }
178 
179 
183  bool get_is_default_stream() const {
184  const Json::Value& storage = Storage("isDefaultStream");
185  return client::JsonValueToCppValueHelper<bool >(storage);
186  }
187 
192  void set_is_default_stream(bool value) {
193  client::SetJsonValueFromCppValueHelper<bool >(
194  value, MutableStorage("isDefaultStream"));
195  }
196 
202  bool has_published_at() const {
203  return Storage().isMember("publishedAt");
204  }
205 
210  MutableStorage()->removeMember("publishedAt");
211  }
212 
213 
217  client::DateTime get_published_at() const {
218  const Json::Value& storage = Storage("publishedAt");
219  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
220  }
221 
230  void set_published_at(client::DateTime value) {
231  client::SetJsonValueFromCppValueHelper<client::DateTime >(
232  value, MutableStorage("publishedAt"));
233  }
234 
240  bool has_title() const {
241  return Storage().isMember("title");
242  }
243 
247  void clear_title() {
248  MutableStorage()->removeMember("title");
249  }
250 
251 
255  const StringPiece get_title() const {
256  const Json::Value& v = Storage("title");
257  if (v == Json::Value::null) return StringPiece("");
258  return StringPiece(v.asCString());
259  }
260 
268  void set_title(const StringPiece& value) {
269  *MutableStorage("title") = value.data();
270  }
271 
272  private:
273  void operator=(const LiveStreamSnippet&);
274 }; // LiveStreamSnippet
275 } // namespace google_youtube_api
276 #endif // GOOGLE_YOUTUBE_API_LIVE_STREAM_SNIPPET_H_
void clear_published_at()
Definition: live_stream_snippet.h:209
const StringPiece get_channel_id() const
Definition: live_stream_snippet.h:108
void set_description(const StringPiece &value)
Definition: live_stream_snippet.h:159
Definition: access_policy.cc:40
void clear_is_default_stream()
Definition: live_stream_snippet.h:175
Definition: live_stream_snippet.h:51
void set_title(const StringPiece &value)
Definition: live_stream_snippet.h:268
const StringPiece get_title() const
Definition: live_stream_snippet.h:255
bool has_title() const
Definition: live_stream_snippet.h:240
const StringPiece GetTypeName() const
Definition: live_stream_snippet.h:84
void clear_channel_id()
Definition: live_stream_snippet.h:100
void set_channel_id(const StringPiece &value)
Definition: live_stream_snippet.h:122
void set_published_at(client::DateTime value)
Definition: live_stream_snippet.h:230
bool has_description() const
Definition: live_stream_snippet.h:131
const StringPiece get_description() const
Definition: live_stream_snippet.h:146
client::DateTime get_published_at() const
Definition: live_stream_snippet.h:217
bool has_channel_id() const
Definition: live_stream_snippet.h:93
Definition: access_policy.h:38
bool has_is_default_stream() const
Definition: live_stream_snippet.h:168
bool has_published_at() const
Definition: live_stream_snippet.h:202
void clear_title()
Definition: live_stream_snippet.h:247
void set_is_default_stream(bool value)
Definition: live_stream_snippet.h:192
void clear_description()
Definition: live_stream_snippet.h:138
bool get_is_default_stream() const
Definition: live_stream_snippet.h:183