books  v1
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-03-14, 18:51:48 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Books API (books/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 114
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_BOOKS_API_CATEGORY_H_
31 #define GOOGLE_BOOKS_API_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_books_api {
43 using namespace googleapis;
44 
50 class Category : public client::JsonCppData {
51  public:
57  class CategoryItems : public client::JsonCppData {
58  public:
64  static CategoryItems* New();
65 
71  explicit CategoryItems(const Json::Value& storage);
72 
78  explicit CategoryItems(Json::Value* storage);
79 
83  virtual ~CategoryItems();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_books_api::CategoryItems");
92  }
93 
99  bool has_badge_url() const {
100  return Storage().isMember("badgeUrl");
101  }
102 
107  MutableStorage()->removeMember("badgeUrl");
108  }
109 
110 
114  const StringPiece get_badge_url() const {
115  const Json::Value& v = Storage("badgeUrl");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
124  void set_badge_url(const StringPiece& value) {
125  *MutableStorage("badgeUrl") = value.data();
126  }
127 
133  bool has_category_id() const {
134  return Storage().isMember("categoryId");
135  }
136 
141  MutableStorage()->removeMember("categoryId");
142  }
143 
144 
148  const StringPiece get_category_id() const {
149  const Json::Value& v = Storage("categoryId");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
158  void set_category_id(const StringPiece& value) {
159  *MutableStorage("categoryId") = value.data();
160  }
161 
167  bool has_name() const {
168  return Storage().isMember("name");
169  }
170 
174  void clear_name() {
175  MutableStorage()->removeMember("name");
176  }
177 
178 
182  const StringPiece get_name() const {
183  const Json::Value& v = Storage("name");
184  if (v == Json::Value::null) return StringPiece("");
185  return StringPiece(v.asCString());
186  }
187 
192  void set_name(const StringPiece& value) {
193  *MutableStorage("name") = value.data();
194  }
195 
196  private:
197  void operator=(const CategoryItems&);
198  }; // CategoryItems
204  static Category* New();
205 
211  explicit Category(const Json::Value& storage);
212 
218  explicit Category(Json::Value* storage);
219 
223  virtual ~Category();
224 
230  const StringPiece GetTypeName() const {
231  return StringPiece("google_books_api::Category");
232  }
233 
239  bool has_items() const {
240  return Storage().isMember("items");
241  }
242 
246  void clear_items() {
247  MutableStorage()->removeMember("items");
248  }
249 
250 
254  const client::JsonCppArray<CategoryItems > get_items() const {
255  const Json::Value& storage = Storage("items");
256  return client::JsonValueToCppValueHelper<client::JsonCppArray<CategoryItems > >(storage);
257  }
258 
266  client::JsonCppArray<CategoryItems > mutable_items() {
267  Json::Value* storage = MutableStorage("items");
268  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<CategoryItems > >(storage);
269  }
270 
276  bool has_kind() const {
277  return Storage().isMember("kind");
278  }
279 
283  void clear_kind() {
284  MutableStorage()->removeMember("kind");
285  }
286 
287 
291  const StringPiece get_kind() const {
292  const Json::Value& v = Storage("kind");
293  if (v == Json::Value::null) return StringPiece("");
294  return StringPiece(v.asCString());
295  }
296 
304  void set_kind(const StringPiece& value) {
305  *MutableStorage("kind") = value.data();
306  }
307 
308  private:
309  void operator=(const Category&);
310 }; // Category
311 } // namespace google_books_api
312 #endif // GOOGLE_BOOKS_API_CATEGORY_H_
void set_kind(const StringPiece &value)
Definition: category.h:304
void clear_badge_url()
Definition: category.h:106
const StringPiece get_badge_url() const
Definition: category.h:114
client::JsonCppArray< CategoryItems > mutable_items()
Definition: category.h:266
void clear_name()
Definition: category.h:174
void set_name(const StringPiece &value)
Definition: category.h:192
const StringPiece GetTypeName() const
Definition: category.h:230
Definition: category.h:50
const StringPiece get_kind() const
Definition: category.h:291
Definition: annotation.h:42
const StringPiece GetTypeName() const
Definition: category.h:90
bool has_name() const
Definition: category.h:167
bool has_category_id() const
Definition: category.h:133
void clear_category_id()
Definition: category.h:140
void set_category_id(const StringPiece &value)
Definition: category.h:158
void set_badge_url(const StringPiece &value)
Definition: category.h:124
Definition: annotation.cc:44
void clear_items()
Definition: category.h:246
const StringPiece get_category_id() const
Definition: category.h:148
void clear_kind()
Definition: category.h:283
const StringPiece get_name() const
Definition: category.h:182
bool has_badge_url() const
Definition: category.h:99
bool has_kind() const
Definition: category.h:276
const client::JsonCppArray< CategoryItems > get_items() const
Definition: category.h:254
bool has_items() const
Definition: category.h:239