youtube  v3
channel_section.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_H_
31 #define GOOGLE_YOUTUBE_API_CHANNEL_SECTION_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/youtube_api/channel_section_content_details.h"
39 #include "google/youtube_api/channel_section_localization.h"
40 #include "google/youtube_api/channel_section_snippet.h"
41 #include "google/youtube_api/channel_section_targeting.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
47 namespace google_youtube_api {
48 using namespace googleapis;
49 
55 class ChannelSection : public client::JsonCppData {
56  public:
62  static ChannelSection* New();
63 
69  explicit ChannelSection(const Json::Value& storage);
70 
76  explicit ChannelSection(Json::Value* storage);
77 
81  virtual ~ChannelSection();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_youtube_api::ChannelSection");
90  }
91 
97  bool has_content_details() const {
98  return Storage().isMember("contentDetails");
99  }
100 
105  MutableStorage()->removeMember("contentDetails");
106  }
107 
108 
113  const ChannelSectionContentDetails get_content_details() const;
114 
124  ChannelSectionContentDetails mutable_contentDetails();
125 
131  bool has_etag() const {
132  return Storage().isMember("etag");
133  }
134 
138  void clear_etag() {
139  MutableStorage()->removeMember("etag");
140  }
141 
142 
146  const StringPiece get_etag() const {
147  const Json::Value& v = Storage("etag");
148  if (v == Json::Value::null) return StringPiece("");
149  return StringPiece(v.asCString());
150  }
151 
159  void set_etag(const StringPiece& value) {
160  *MutableStorage("etag") = value.data();
161  }
162 
168  bool has_id() const {
169  return Storage().isMember("id");
170  }
171 
175  void clear_id() {
176  MutableStorage()->removeMember("id");
177  }
178 
179 
183  const StringPiece get_id() const {
184  const Json::Value& v = Storage("id");
185  if (v == Json::Value::null) return StringPiece("");
186  return StringPiece(v.asCString());
187  }
188 
196  void set_id(const StringPiece& value) {
197  *MutableStorage("id") = value.data();
198  }
199 
205  bool has_kind() const {
206  return Storage().isMember("kind");
207  }
208 
212  void clear_kind() {
213  MutableStorage()->removeMember("kind");
214  }
215 
216 
220  const StringPiece get_kind() const {
221  const Json::Value& v = Storage("kind");
222  if (v == Json::Value::null) return StringPiece("");
223  return StringPiece(v.asCString());
224  }
225 
234  void set_kind(const StringPiece& value) {
235  *MutableStorage("kind") = value.data();
236  }
237 
243  bool has_localizations() const {
244  return Storage().isMember("localizations");
245  }
246 
251  MutableStorage()->removeMember("localizations");
252  }
253 
254 
258  const client::JsonCppAssociativeArray<ChannelSectionLocalization > get_localizations() const;
259 
268  client::JsonCppAssociativeArray<ChannelSectionLocalization > mutable_localizations();
269 
275  bool has_snippet() const {
276  return Storage().isMember("snippet");
277  }
278 
282  void clear_snippet() {
283  MutableStorage()->removeMember("snippet");
284  }
285 
286 
290  const ChannelSectionSnippet get_snippet() const;
291 
300  ChannelSectionSnippet mutable_snippet();
301 
307  bool has_targeting() const {
308  return Storage().isMember("targeting");
309  }
310 
315  MutableStorage()->removeMember("targeting");
316  }
317 
318 
322  const ChannelSectionTargeting get_targeting() const;
323 
333  ChannelSectionTargeting mutable_targeting();
334 
335  private:
336  void operator=(const ChannelSection&);
337 }; // ChannelSection
338 } // namespace google_youtube_api
339 #endif // GOOGLE_YOUTUBE_API_CHANNEL_SECTION_H_
Definition: channel_section_content_details.h:50
void set_kind(const StringPiece &value)
Definition: channel_section.h:234
Definition: access_policy.cc:40
bool has_targeting() const
Definition: channel_section.h:307
bool has_localizations() const
Definition: channel_section.h:243
Definition: channel_section.h:55
const StringPiece GetTypeName() const
Definition: channel_section.h:88
bool has_etag() const
Definition: channel_section.h:131
Definition: channel_section_snippet.h:53
void set_etag(const StringPiece &value)
Definition: channel_section.h:159
const StringPiece get_kind() const
Definition: channel_section.h:220
bool has_id() const
Definition: channel_section.h:168
void clear_targeting()
Definition: channel_section.h:314
void clear_content_details()
Definition: channel_section.h:104
void clear_snippet()
Definition: channel_section.h:282
Definition: access_policy.h:38
bool has_kind() const
Definition: channel_section.h:205
bool has_content_details() const
Definition: channel_section.h:97
void clear_id()
Definition: channel_section.h:175
void clear_etag()
Definition: channel_section.h:138
Definition: channel_section_targeting.h:50
void clear_localizations()
Definition: channel_section.h:250
const StringPiece get_etag() const
Definition: channel_section.h:146
const StringPiece get_id() const
Definition: channel_section.h:183
void clear_kind()
Definition: channel_section.h:212
bool has_snippet() const
Definition: channel_section.h:275
void set_id(const StringPiece &value)
Definition: channel_section.h:196