youtube  v3
search_result_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_SEARCH_RESULT_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_SEARCH_RESULT_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 
54 class SearchResultSnippet : public client::JsonCppData {
55  public:
61  static SearchResultSnippet* New();
62 
68  explicit SearchResultSnippet(const Json::Value& storage);
69 
75  explicit SearchResultSnippet(Json::Value* storage);
76 
80  virtual ~SearchResultSnippet();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_youtube_api::SearchResultSnippet");
89  }
90 
96  bool has_channel_id() const {
97  return Storage().isMember("channelId");
98  }
99 
104  MutableStorage()->removeMember("channelId");
105  }
106 
107 
111  const StringPiece get_channel_id() const {
112  const Json::Value& v = Storage("channelId");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
125  void set_channel_id(const StringPiece& value) {
126  *MutableStorage("channelId") = value.data();
127  }
128 
134  bool has_channel_title() const {
135  return Storage().isMember("channelTitle");
136  }
137 
142  MutableStorage()->removeMember("channelTitle");
143  }
144 
145 
149  const StringPiece get_channel_title() const {
150  const Json::Value& v = Storage("channelTitle");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
163  void set_channel_title(const StringPiece& value) {
164  *MutableStorage("channelTitle") = value.data();
165  }
166 
172  bool has_description() const {
173  return Storage().isMember("description");
174  }
175 
180  MutableStorage()->removeMember("description");
181  }
182 
183 
187  const StringPiece get_description() const {
188  const Json::Value& v = Storage("description");
189  if (v == Json::Value::null) return StringPiece("");
190  return StringPiece(v.asCString());
191  }
192 
200  void set_description(const StringPiece& value) {
201  *MutableStorage("description") = value.data();
202  }
203 
210  return Storage().isMember("liveBroadcastContent");
211  }
212 
217  MutableStorage()->removeMember("liveBroadcastContent");
218  }
219 
220 
224  const StringPiece get_live_broadcast_content() const {
225  const Json::Value& v = Storage("liveBroadcastContent");
226  if (v == Json::Value::null) return StringPiece("");
227  return StringPiece(v.asCString());
228  }
229 
239  void set_live_broadcast_content(const StringPiece& value) {
240  *MutableStorage("liveBroadcastContent") = value.data();
241  }
242 
248  bool has_published_at() const {
249  return Storage().isMember("publishedAt");
250  }
251 
256  MutableStorage()->removeMember("publishedAt");
257  }
258 
259 
263  client::DateTime get_published_at() const {
264  const Json::Value& storage = Storage("publishedAt");
265  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
266  }
267 
277  void set_published_at(client::DateTime value) {
278  client::SetJsonValueFromCppValueHelper<client::DateTime >(
279  value, MutableStorage("publishedAt"));
280  }
281 
287  bool has_thumbnails() const {
288  return Storage().isMember("thumbnails");
289  }
290 
295  MutableStorage()->removeMember("thumbnails");
296  }
297 
298 
302  const ThumbnailDetails get_thumbnails() const;
303 
314  ThumbnailDetails mutable_thumbnails();
315 
321  bool has_title() const {
322  return Storage().isMember("title");
323  }
324 
328  void clear_title() {
329  MutableStorage()->removeMember("title");
330  }
331 
332 
336  const StringPiece get_title() const {
337  const Json::Value& v = Storage("title");
338  if (v == Json::Value::null) return StringPiece("");
339  return StringPiece(v.asCString());
340  }
341 
349  void set_title(const StringPiece& value) {
350  *MutableStorage("title") = value.data();
351  }
352 
353  private:
354  void operator=(const SearchResultSnippet&);
355 }; // SearchResultSnippet
356 } // namespace google_youtube_api
357 #endif // GOOGLE_YOUTUBE_API_SEARCH_RESULT_SNIPPET_H_
client::DateTime get_published_at() const
Definition: search_result_snippet.h:263
const StringPiece get_live_broadcast_content() const
Definition: search_result_snippet.h:224
Definition: access_policy.cc:40
void clear_channel_id()
Definition: search_result_snippet.h:103
void clear_published_at()
Definition: search_result_snippet.h:255
bool has_channel_id() const
Definition: search_result_snippet.h:96
const StringPiece get_channel_title() const
Definition: search_result_snippet.h:149
bool has_channel_title() const
Definition: search_result_snippet.h:134
void set_channel_title(const StringPiece &value)
Definition: search_result_snippet.h:163
void clear_channel_title()
Definition: search_result_snippet.h:141
const StringPiece get_title() const
Definition: search_result_snippet.h:336
Definition: search_result_snippet.h:54
void clear_live_broadcast_content()
Definition: search_result_snippet.h:216
const StringPiece get_channel_id() const
Definition: search_result_snippet.h:111
bool has_live_broadcast_content() const
Definition: search_result_snippet.h:209
void set_published_at(client::DateTime value)
Definition: search_result_snippet.h:277
void set_live_broadcast_content(const StringPiece &value)
Definition: search_result_snippet.h:239
void set_description(const StringPiece &value)
Definition: search_result_snippet.h:200
Definition: access_policy.h:38
void set_title(const StringPiece &value)
Definition: search_result_snippet.h:349
void clear_title()
Definition: search_result_snippet.h:328
void set_channel_id(const StringPiece &value)
Definition: search_result_snippet.h:125
bool has_published_at() const
Definition: search_result_snippet.h:248
const StringPiece get_description() const
Definition: search_result_snippet.h:187
Definition: thumbnail_details.h:51
void clear_description()
Definition: search_result_snippet.h:179
bool has_description() const
Definition: search_result_snippet.h:172
bool has_title() const
Definition: search_result_snippet.h:321
bool has_thumbnails() const
Definition: search_result_snippet.h:287
const StringPiece GetTypeName() const
Definition: search_result_snippet.h:87
void clear_thumbnails()
Definition: search_result_snippet.h:294