youtube  v3
channel_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_CHANNEL_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_CHANNEL_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/channel_localization.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 
54 class ChannelSnippet : public client::JsonCppData {
55  public:
61  static ChannelSnippet* New();
62 
68  explicit ChannelSnippet(const Json::Value& storage);
69 
75  explicit ChannelSnippet(Json::Value* storage);
76 
80  virtual ~ChannelSnippet();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_youtube_api::ChannelSnippet");
89  }
90 
96  bool has_country() const {
97  return Storage().isMember("country");
98  }
99 
103  void clear_country() {
104  MutableStorage()->removeMember("country");
105  }
106 
107 
111  const StringPiece get_country() const {
112  const Json::Value& v = Storage("country");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
124  void set_country(const StringPiece& value) {
125  *MutableStorage("country") = value.data();
126  }
127 
133  bool has_custom_url() const {
134  return Storage().isMember("customUrl");
135  }
136 
141  MutableStorage()->removeMember("customUrl");
142  }
143 
144 
148  const StringPiece get_custom_url() const {
149  const Json::Value& v = Storage("customUrl");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
161  void set_custom_url(const StringPiece& value) {
162  *MutableStorage("customUrl") = value.data();
163  }
164 
170  bool has_default_language() const {
171  return Storage().isMember("defaultLanguage");
172  }
173 
178  MutableStorage()->removeMember("defaultLanguage");
179  }
180 
181 
185  const StringPiece get_default_language() const {
186  const Json::Value& v = Storage("defaultLanguage");
187  if (v == Json::Value::null) return StringPiece("");
188  return StringPiece(v.asCString());
189  }
190 
198  void set_default_language(const StringPiece& value) {
199  *MutableStorage("defaultLanguage") = value.data();
200  }
201 
207  bool has_description() const {
208  return Storage().isMember("description");
209  }
210 
215  MutableStorage()->removeMember("description");
216  }
217 
218 
222  const StringPiece get_description() const {
223  const Json::Value& v = Storage("description");
224  if (v == Json::Value::null) return StringPiece("");
225  return StringPiece(v.asCString());
226  }
227 
235  void set_description(const StringPiece& value) {
236  *MutableStorage("description") = value.data();
237  }
238 
244  bool has_localized() const {
245  return Storage().isMember("localized");
246  }
247 
252  MutableStorage()->removeMember("localized");
253  }
254 
255 
259  const ChannelLocalization get_localized() const;
260 
269  ChannelLocalization mutable_localized();
270 
276  bool has_published_at() const {
277  return Storage().isMember("publishedAt");
278  }
279 
284  MutableStorage()->removeMember("publishedAt");
285  }
286 
287 
291  client::DateTime get_published_at() const {
292  const Json::Value& storage = Storage("publishedAt");
293  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
294  }
295 
304  void set_published_at(client::DateTime value) {
305  client::SetJsonValueFromCppValueHelper<client::DateTime >(
306  value, MutableStorage("publishedAt"));
307  }
308 
314  bool has_thumbnails() const {
315  return Storage().isMember("thumbnails");
316  }
317 
322  MutableStorage()->removeMember("thumbnails");
323  }
324 
325 
329  const ThumbnailDetails get_thumbnails() const;
330 
351  ThumbnailDetails mutable_thumbnails();
352 
358  bool has_title() const {
359  return Storage().isMember("title");
360  }
361 
365  void clear_title() {
366  MutableStorage()->removeMember("title");
367  }
368 
369 
373  const StringPiece get_title() const {
374  const Json::Value& v = Storage("title");
375  if (v == Json::Value::null) return StringPiece("");
376  return StringPiece(v.asCString());
377  }
378 
386  void set_title(const StringPiece& value) {
387  *MutableStorage("title") = value.data();
388  }
389 
390  private:
391  void operator=(const ChannelSnippet&);
392 }; // ChannelSnippet
393 } // namespace google_youtube_api
394 #endif // GOOGLE_YOUTUBE_API_CHANNEL_SNIPPET_H_
Definition: access_policy.cc:40
bool has_published_at() const
Definition: channel_snippet.h:276
bool has_title() const
Definition: channel_snippet.h:358
bool has_localized() const
Definition: channel_snippet.h:244
const StringPiece get_custom_url() const
Definition: channel_snippet.h:148
const StringPiece get_default_language() const
Definition: channel_snippet.h:185
void set_title(const StringPiece &value)
Definition: channel_snippet.h:386
const StringPiece get_description() const
Definition: channel_snippet.h:222
void clear_custom_url()
Definition: channel_snippet.h:140
client::DateTime get_published_at() const
Definition: channel_snippet.h:291
void clear_published_at()
Definition: channel_snippet.h:283
bool has_custom_url() const
Definition: channel_snippet.h:133
const StringPiece get_country() const
Definition: channel_snippet.h:111
void set_default_language(const StringPiece &value)
Definition: channel_snippet.h:198
bool has_default_language() const
Definition: channel_snippet.h:170
Definition: channel_localization.h:50
void clear_localized()
Definition: channel_snippet.h:251
void clear_title()
Definition: channel_snippet.h:365
void clear_thumbnails()
Definition: channel_snippet.h:321
bool has_thumbnails() const
Definition: channel_snippet.h:314
void set_description(const StringPiece &value)
Definition: channel_snippet.h:235
void clear_default_language()
Definition: channel_snippet.h:177
Definition: channel_snippet.h:54
Definition: access_policy.h:38
void set_country(const StringPiece &value)
Definition: channel_snippet.h:124
void set_custom_url(const StringPiece &value)
Definition: channel_snippet.h:161
void set_published_at(client::DateTime value)
Definition: channel_snippet.h:304
void clear_description()
Definition: channel_snippet.h:214
void clear_country()
Definition: channel_snippet.h:103
Definition: thumbnail_details.h:51
bool has_description() const
Definition: channel_snippet.h:207
const StringPiece get_title() const
Definition: channel_snippet.h:373
bool has_country() const
Definition: channel_snippet.h:96
const StringPiece GetTypeName() const
Definition: channel_snippet.h:87