youtube  v3
guide_category.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_GUIDE_CATEGORY_H_
31 #define GOOGLE_YOUTUBE_API_GUIDE_CATEGORY_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/guide_category_snippet.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_youtube_api {
45 using namespace googleapis;
46 
56 class GuideCategory : public client::JsonCppData {
57  public:
63  static GuideCategory* New();
64 
70  explicit GuideCategory(const Json::Value& storage);
71 
77  explicit GuideCategory(Json::Value* storage);
78 
82  virtual ~GuideCategory();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_youtube_api::GuideCategory");
91  }
92 
98  bool has_etag() const {
99  return Storage().isMember("etag");
100  }
101 
105  void clear_etag() {
106  MutableStorage()->removeMember("etag");
107  }
108 
109 
113  const StringPiece get_etag() const {
114  const Json::Value& v = Storage("etag");
115  if (v == Json::Value::null) return StringPiece("");
116  return StringPiece(v.asCString());
117  }
118 
126  void set_etag(const StringPiece& value) {
127  *MutableStorage("etag") = value.data();
128  }
129 
135  bool has_id() const {
136  return Storage().isMember("id");
137  }
138 
142  void clear_id() {
143  MutableStorage()->removeMember("id");
144  }
145 
146 
150  const StringPiece get_id() const {
151  const Json::Value& v = Storage("id");
152  if (v == Json::Value::null) return StringPiece("");
153  return StringPiece(v.asCString());
154  }
155 
163  void set_id(const StringPiece& value) {
164  *MutableStorage("id") = value.data();
165  }
166 
172  bool has_kind() const {
173  return Storage().isMember("kind");
174  }
175 
179  void clear_kind() {
180  MutableStorage()->removeMember("kind");
181  }
182 
183 
187  const StringPiece get_kind() const {
188  const Json::Value& v = Storage("kind");
189  if (v == Json::Value::null) return StringPiece("");
190  return StringPiece(v.asCString());
191  }
192 
201  void set_kind(const StringPiece& value) {
202  *MutableStorage("kind") = value.data();
203  }
204 
210  bool has_snippet() const {
211  return Storage().isMember("snippet");
212  }
213 
217  void clear_snippet() {
218  MutableStorage()->removeMember("snippet");
219  }
220 
221 
225  const GuideCategorySnippet get_snippet() const;
226 
235  GuideCategorySnippet mutable_snippet();
236 
237  private:
238  void operator=(const GuideCategory&);
239 }; // GuideCategory
240 } // namespace google_youtube_api
241 #endif // GOOGLE_YOUTUBE_API_GUIDE_CATEGORY_H_
void clear_etag()
Definition: guide_category.h:105
Definition: access_policy.cc:40
const StringPiece get_kind() const
Definition: guide_category.h:187
const StringPiece get_etag() const
Definition: guide_category.h:113
Definition: guide_category.h:56
bool has_snippet() const
Definition: guide_category.h:210
void clear_snippet()
Definition: guide_category.h:217
bool has_id() const
Definition: guide_category.h:135
Definition: guide_category_snippet.h:50
Definition: access_policy.h:38
void clear_id()
Definition: guide_category.h:142
void set_id(const StringPiece &value)
Definition: guide_category.h:163
void set_kind(const StringPiece &value)
Definition: guide_category.h:201
const StringPiece GetTypeName() const
Definition: guide_category.h:89
bool has_kind() const
Definition: guide_category.h:172
const StringPiece get_id() const
Definition: guide_category.h:150
void clear_kind()
Definition: guide_category.h:179
bool has_etag() const
Definition: guide_category.h:98
void set_etag(const StringPiece &value)
Definition: guide_category.h:126