youtube  v3
activity_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_ACTIVITY_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_ACTIVITY_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 ActivitySnippet : public client::JsonCppData {
55  public:
61  static ActivitySnippet* New();
62 
68  explicit ActivitySnippet(const Json::Value& storage);
69 
75  explicit ActivitySnippet(Json::Value* storage);
76 
80  virtual ~ActivitySnippet();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_youtube_api::ActivitySnippet");
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 
162  void set_channel_title(const StringPiece& value) {
163  *MutableStorage("channelTitle") = value.data();
164  }
165 
171  bool has_description() const {
172  return Storage().isMember("description");
173  }
174 
179  MutableStorage()->removeMember("description");
180  }
181 
182 
186  const StringPiece get_description() const {
187  const Json::Value& v = Storage("description");
188  if (v == Json::Value::null) return StringPiece("");
189  return StringPiece(v.asCString());
190  }
191 
199  void set_description(const StringPiece& value) {
200  *MutableStorage("description") = value.data();
201  }
202 
208  bool has_group_id() const {
209  return Storage().isMember("groupId");
210  }
211 
215  void clear_group_id() {
216  MutableStorage()->removeMember("groupId");
217  }
218 
219 
223  const StringPiece get_group_id() const {
224  const Json::Value& v = Storage("groupId");
225  if (v == Json::Value::null) return StringPiece("");
226  return StringPiece(v.asCString());
227  }
228 
241  void set_group_id(const StringPiece& value) {
242  *MutableStorage("groupId") = value.data();
243  }
244 
250  bool has_published_at() const {
251  return Storage().isMember("publishedAt");
252  }
253 
258  MutableStorage()->removeMember("publishedAt");
259  }
260 
261 
265  client::DateTime get_published_at() const {
266  const Json::Value& storage = Storage("publishedAt");
267  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
268  }
269 
278  void set_published_at(client::DateTime value) {
279  client::SetJsonValueFromCppValueHelper<client::DateTime >(
280  value, MutableStorage("publishedAt"));
281  }
282 
288  bool has_thumbnails() const {
289  return Storage().isMember("thumbnails");
290  }
291 
296  MutableStorage()->removeMember("thumbnails");
297  }
298 
299 
303  const ThumbnailDetails get_thumbnails() const;
304 
316  ThumbnailDetails mutable_thumbnails();
317 
323  bool has_title() const {
324  return Storage().isMember("title");
325  }
326 
330  void clear_title() {
331  MutableStorage()->removeMember("title");
332  }
333 
334 
338  const StringPiece get_title() const {
339  const Json::Value& v = Storage("title");
340  if (v == Json::Value::null) return StringPiece("");
341  return StringPiece(v.asCString());
342  }
343 
351  void set_title(const StringPiece& value) {
352  *MutableStorage("title") = value.data();
353  }
354 
360  bool has_type() const {
361  return Storage().isMember("type");
362  }
363 
367  void clear_type() {
368  MutableStorage()->removeMember("type");
369  }
370 
371 
375  const StringPiece get_type() const {
376  const Json::Value& v = Storage("type");
377  if (v == Json::Value::null) return StringPiece("");
378  return StringPiece(v.asCString());
379  }
380 
388  void set_type(const StringPiece& value) {
389  *MutableStorage("type") = value.data();
390  }
391 
392  private:
393  void operator=(const ActivitySnippet&);
394 }; // ActivitySnippet
395 } // namespace google_youtube_api
396 #endif // GOOGLE_YOUTUBE_API_ACTIVITY_SNIPPET_H_
void clear_thumbnails()
Definition: activity_snippet.h:295
const StringPiece get_description() const
Definition: activity_snippet.h:186
void set_group_id(const StringPiece &value)
Definition: activity_snippet.h:241
void clear_published_at()
Definition: activity_snippet.h:257
const StringPiece GetTypeName() const
Definition: activity_snippet.h:87
Definition: access_policy.cc:40
bool has_channel_id() const
Definition: activity_snippet.h:96
bool has_published_at() const
Definition: activity_snippet.h:250
void clear_channel_id()
Definition: activity_snippet.h:103
void set_published_at(client::DateTime value)
Definition: activity_snippet.h:278
void set_type(const StringPiece &value)
Definition: activity_snippet.h:388
const StringPiece get_title() const
Definition: activity_snippet.h:338
bool has_channel_title() const
Definition: activity_snippet.h:134
void clear_channel_title()
Definition: activity_snippet.h:141
const StringPiece get_channel_title() const
Definition: activity_snippet.h:149
bool has_title() const
Definition: activity_snippet.h:323
void set_title(const StringPiece &value)
Definition: activity_snippet.h:351
void clear_title()
Definition: activity_snippet.h:330
const StringPiece get_type() const
Definition: activity_snippet.h:375
void set_channel_title(const StringPiece &value)
Definition: activity_snippet.h:162
const StringPiece get_group_id() const
Definition: activity_snippet.h:223
const StringPiece get_channel_id() const
Definition: activity_snippet.h:111
Definition: activity_snippet.h:54
client::DateTime get_published_at() const
Definition: activity_snippet.h:265
void set_channel_id(const StringPiece &value)
Definition: activity_snippet.h:125
Definition: access_policy.h:38
bool has_group_id() const
Definition: activity_snippet.h:208
bool has_type() const
Definition: activity_snippet.h:360
void clear_group_id()
Definition: activity_snippet.h:215
bool has_description() const
Definition: activity_snippet.h:171
Definition: thumbnail_details.h:51
void clear_type()
Definition: activity_snippet.h:367
bool has_thumbnails() const
Definition: activity_snippet.h:288
void set_description(const StringPiece &value)
Definition: activity_snippet.h:199
void clear_description()
Definition: activity_snippet.h:178