youtube  v3
channel_section_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_SECTION_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_CHANNEL_SECTION_SNIPPET_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 #include "google/youtube_api/channel_section_localization.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
53 class ChannelSectionSnippet : public client::JsonCppData {
54  public:
60  static ChannelSectionSnippet* New();
61 
67  explicit ChannelSectionSnippet(const Json::Value& storage);
68 
74  explicit ChannelSectionSnippet(Json::Value* storage);
75 
79  virtual ~ChannelSectionSnippet();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_youtube_api::ChannelSectionSnippet");
88  }
89 
95  bool has_channel_id() const {
96  return Storage().isMember("channelId");
97  }
98 
103  MutableStorage()->removeMember("channelId");
104  }
105 
106 
110  const StringPiece get_channel_id() const {
111  const Json::Value& v = Storage("channelId");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
124  void set_channel_id(const StringPiece& value) {
125  *MutableStorage("channelId") = value.data();
126  }
127 
133  bool has_default_language() const {
134  return Storage().isMember("defaultLanguage");
135  }
136 
141  MutableStorage()->removeMember("defaultLanguage");
142  }
143 
144 
148  const StringPiece get_default_language() const {
149  const Json::Value& v = Storage("defaultLanguage");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
161  void set_default_language(const StringPiece& value) {
162  *MutableStorage("defaultLanguage") = value.data();
163  }
164 
170  bool has_localized() const {
171  return Storage().isMember("localized");
172  }
173 
178  MutableStorage()->removeMember("localized");
179  }
180 
181 
185  const ChannelSectionLocalization get_localized() const;
186 
195  ChannelSectionLocalization mutable_localized();
196 
202  bool has_position() const {
203  return Storage().isMember("position");
204  }
205 
209  void clear_position() {
210  MutableStorage()->removeMember("position");
211  }
212 
213 
217  uint32 get_position() const {
218  const Json::Value& storage = Storage("position");
219  return client::JsonValueToCppValueHelper<uint32 >(storage);
220  }
221 
229  void set_position(uint32 value) {
230  client::SetJsonValueFromCppValueHelper<uint32 >(
231  value, MutableStorage("position"));
232  }
233 
239  bool has_style() const {
240  return Storage().isMember("style");
241  }
242 
246  void clear_style() {
247  MutableStorage()->removeMember("style");
248  }
249 
250 
254  const StringPiece get_style() const {
255  const Json::Value& v = Storage("style");
256  if (v == Json::Value::null) return StringPiece("");
257  return StringPiece(v.asCString());
258  }
259 
267  void set_style(const StringPiece& value) {
268  *MutableStorage("style") = value.data();
269  }
270 
276  bool has_title() const {
277  return Storage().isMember("title");
278  }
279 
283  void clear_title() {
284  MutableStorage()->removeMember("title");
285  }
286 
287 
291  const StringPiece get_title() const {
292  const Json::Value& v = Storage("title");
293  if (v == Json::Value::null) return StringPiece("");
294  return StringPiece(v.asCString());
295  }
296 
304  void set_title(const StringPiece& value) {
305  *MutableStorage("title") = value.data();
306  }
307 
313  bool has_type() const {
314  return Storage().isMember("type");
315  }
316 
320  void clear_type() {
321  MutableStorage()->removeMember("type");
322  }
323 
324 
328  const StringPiece get_type() const {
329  const Json::Value& v = Storage("type");
330  if (v == Json::Value::null) return StringPiece("");
331  return StringPiece(v.asCString());
332  }
333 
341  void set_type(const StringPiece& value) {
342  *MutableStorage("type") = value.data();
343  }
344 
345  private:
346  void operator=(const ChannelSectionSnippet&);
347 }; // ChannelSectionSnippet
348 } // namespace google_youtube_api
349 #endif // GOOGLE_YOUTUBE_API_CHANNEL_SECTION_SNIPPET_H_
Definition: access_policy.cc:40
void clear_style()
Definition: channel_section_snippet.h:246
void clear_channel_id()
Definition: channel_section_snippet.h:102
void set_default_language(const StringPiece &value)
Definition: channel_section_snippet.h:161
Definition: channel_section_snippet.h:53
void set_title(const StringPiece &value)
Definition: channel_section_snippet.h:304
const StringPiece GetTypeName() const
Definition: channel_section_snippet.h:86
void set_style(const StringPiece &value)
Definition: channel_section_snippet.h:267
bool has_style() const
Definition: channel_section_snippet.h:239
const StringPiece get_style() const
Definition: channel_section_snippet.h:254
const StringPiece get_title() const
Definition: channel_section_snippet.h:291
Definition: channel_section_localization.h:50
bool has_position() const
Definition: channel_section_snippet.h:202
const StringPiece get_default_language() const
Definition: channel_section_snippet.h:148
void clear_default_language()
Definition: channel_section_snippet.h:140
Definition: access_policy.h:38
void set_position(uint32 value)
Definition: channel_section_snippet.h:229
const StringPiece get_type() const
Definition: channel_section_snippet.h:328
const StringPiece get_channel_id() const
Definition: channel_section_snippet.h:110
bool has_channel_id() const
Definition: channel_section_snippet.h:95
uint32 get_position() const
Definition: channel_section_snippet.h:217
void clear_position()
Definition: channel_section_snippet.h:209
bool has_default_language() const
Definition: channel_section_snippet.h:133
void clear_localized()
Definition: channel_section_snippet.h:177
void set_type(const StringPiece &value)
Definition: channel_section_snippet.h:341
void clear_type()
Definition: channel_section_snippet.h:320
void clear_title()
Definition: channel_section_snippet.h:283
void set_channel_id(const StringPiece &value)
Definition: channel_section_snippet.h:124
bool has_title() const
Definition: channel_section_snippet.h:276
bool has_localized() const
Definition: channel_section_snippet.h:170
bool has_type() const
Definition: channel_section_snippet.h:313