youtube  v3
subscription_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_SUBSCRIPTION_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_SUBSCRIPTION_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/resource_id.h"
40 #include "google/youtube_api/thumbnail_details.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_youtube_api {
47 using namespace googleapis;
48 
55 class SubscriptionSnippet : public client::JsonCppData {
56  public:
62  static SubscriptionSnippet* New();
63 
69  explicit SubscriptionSnippet(const Json::Value& storage);
70 
76  explicit SubscriptionSnippet(Json::Value* storage);
77 
81  virtual ~SubscriptionSnippet();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_youtube_api::SubscriptionSnippet");
90  }
91 
97  bool has_channel_id() const {
98  return Storage().isMember("channelId");
99  }
100 
105  MutableStorage()->removeMember("channelId");
106  }
107 
108 
112  const StringPiece get_channel_id() const {
113  const Json::Value& v = Storage("channelId");
114  if (v == Json::Value::null) return StringPiece("");
115  return StringPiece(v.asCString());
116  }
117 
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_published_at() const {
209  return Storage().isMember("publishedAt");
210  }
211 
216  MutableStorage()->removeMember("publishedAt");
217  }
218 
219 
223  client::DateTime get_published_at() const {
224  const Json::Value& storage = Storage("publishedAt");
225  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
226  }
227 
236  void set_published_at(client::DateTime value) {
237  client::SetJsonValueFromCppValueHelper<client::DateTime >(
238  value, MutableStorage("publishedAt"));
239  }
240 
246  bool has_resource_id() const {
247  return Storage().isMember("resourceId");
248  }
249 
254  MutableStorage()->removeMember("resourceId");
255  }
256 
257 
261  const ResourceId get_resource_id() const;
262 
272  ResourceId mutable_resourceId();
273 
279  bool has_thumbnails() const {
280  return Storage().isMember("thumbnails");
281  }
282 
287  MutableStorage()->removeMember("thumbnails");
288  }
289 
290 
294  const ThumbnailDetails get_thumbnails() const;
295 
306  ThumbnailDetails mutable_thumbnails();
307 
313  bool has_title() const {
314  return Storage().isMember("title");
315  }
316 
320  void clear_title() {
321  MutableStorage()->removeMember("title");
322  }
323 
324 
328  const StringPiece get_title() const {
329  const Json::Value& v = Storage("title");
330  if (v == Json::Value::null) return StringPiece("");
331  return StringPiece(v.asCString());
332  }
333 
341  void set_title(const StringPiece& value) {
342  *MutableStorage("title") = value.data();
343  }
344 
345  private:
346  void operator=(const SubscriptionSnippet&);
347 }; // SubscriptionSnippet
348 } // namespace google_youtube_api
349 #endif // GOOGLE_YOUTUBE_API_SUBSCRIPTION_SNIPPET_H_
bool has_channel_id() const
Definition: subscription_snippet.h:97
Definition: access_policy.cc:40
void set_channel_title(const StringPiece &value)
Definition: subscription_snippet.h:162
void clear_published_at()
Definition: subscription_snippet.h:215
bool has_resource_id() const
Definition: subscription_snippet.h:246
void set_description(const StringPiece &value)
Definition: subscription_snippet.h:199
bool has_thumbnails() const
Definition: subscription_snippet.h:279
void clear_channel_title()
Definition: subscription_snippet.h:141
void set_title(const StringPiece &value)
Definition: subscription_snippet.h:341
const StringPiece get_title() const
Definition: subscription_snippet.h:328
void clear_thumbnails()
Definition: subscription_snippet.h:286
void clear_title()
Definition: subscription_snippet.h:320
bool has_channel_title() const
Definition: subscription_snippet.h:134
const StringPiece get_channel_id() const
Definition: subscription_snippet.h:112
void clear_description()
Definition: subscription_snippet.h:178
Definition: access_policy.h:38
void set_channel_id(const StringPiece &value)
Definition: subscription_snippet.h:125
const StringPiece GetTypeName() const
Definition: subscription_snippet.h:88
const StringPiece get_channel_title() const
Definition: subscription_snippet.h:149
Definition: subscription_snippet.h:55
bool has_description() const
Definition: subscription_snippet.h:171
bool has_title() const
Definition: subscription_snippet.h:313
client::DateTime get_published_at() const
Definition: subscription_snippet.h:223
Definition: thumbnail_details.h:51
void clear_resource_id()
Definition: subscription_snippet.h:253
bool has_published_at() const
Definition: subscription_snippet.h:208
const StringPiece get_description() const
Definition: subscription_snippet.h:186
void set_published_at(client::DateTime value)
Definition: subscription_snippet.h:236
Definition: resource_id.h:50
void clear_channel_id()
Definition: subscription_snippet.h:104