books  v1
family_info.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_FAMILY_INFO_H_
31 #define GOOGLE_BOOKS_API_FAMILY_INFO_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 FamilyInfo : public client::JsonCppData {
51  public:
57  class FamilyInfoMembership : public client::JsonCppData {
58  public:
64  static FamilyInfoMembership* New();
65 
71  explicit FamilyInfoMembership(const Json::Value& storage);
72 
78  explicit FamilyInfoMembership(Json::Value* storage);
79 
83  virtual ~FamilyInfoMembership();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_books_api::FamilyInfoMembership");
92  }
93 
99  bool has_acquire_permission() const {
100  return Storage().isMember("acquirePermission");
101  }
102 
107  MutableStorage()->removeMember("acquirePermission");
108  }
109 
110 
114  const StringPiece get_acquire_permission() const {
115  const Json::Value& v = Storage("acquirePermission");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
127  void set_acquire_permission(const StringPiece& value) {
128  *MutableStorage("acquirePermission") = value.data();
129  }
130 
136  bool has_age_group() const {
137  return Storage().isMember("ageGroup");
138  }
139 
144  MutableStorage()->removeMember("ageGroup");
145  }
146 
147 
151  const StringPiece get_age_group() const {
152  const Json::Value& v = Storage("ageGroup");
153  if (v == Json::Value::null) return StringPiece("");
154  return StringPiece(v.asCString());
155  }
156 
164  void set_age_group(const StringPiece& value) {
165  *MutableStorage("ageGroup") = value.data();
166  }
167 
175  return Storage().isMember("allowedMaturityRating");
176  }
177 
182  MutableStorage()->removeMember("allowedMaturityRating");
183  }
184 
185 
189  const StringPiece get_allowed_maturity_rating() const {
190  const Json::Value& v = Storage("allowedMaturityRating");
191  if (v == Json::Value::null) return StringPiece("");
192  return StringPiece(v.asCString());
193  }
194 
202  void set_allowed_maturity_rating(const StringPiece& value) {
203  *MutableStorage("allowedMaturityRating") = value.data();
204  }
205 
211  bool has_is_in_family() const {
212  return Storage().isMember("isInFamily");
213  }
214 
219  MutableStorage()->removeMember("isInFamily");
220  }
221 
222 
226  bool get_is_in_family() const {
227  const Json::Value& storage = Storage("isInFamily");
228  return client::JsonValueToCppValueHelper<bool >(storage);
229  }
230 
235  void set_is_in_family(bool value) {
236  client::SetJsonValueFromCppValueHelper<bool >(
237  value, MutableStorage("isInFamily"));
238  }
239 
245  bool has_role() const {
246  return Storage().isMember("role");
247  }
248 
252  void clear_role() {
253  MutableStorage()->removeMember("role");
254  }
255 
256 
260  const StringPiece get_role() const {
261  const Json::Value& v = Storage("role");
262  if (v == Json::Value::null) return StringPiece("");
263  return StringPiece(v.asCString());
264  }
265 
273  void set_role(const StringPiece& value) {
274  *MutableStorage("role") = value.data();
275  }
276 
277  private:
278  void operator=(const FamilyInfoMembership&);
279  }; // FamilyInfoMembership
285  static FamilyInfo* New();
286 
292  explicit FamilyInfo(const Json::Value& storage);
293 
299  explicit FamilyInfo(Json::Value* storage);
300 
304  virtual ~FamilyInfo();
305 
311  const StringPiece GetTypeName() const {
312  return StringPiece("google_books_api::FamilyInfo");
313  }
314 
320  bool has_kind() const {
321  return Storage().isMember("kind");
322  }
323 
327  void clear_kind() {
328  MutableStorage()->removeMember("kind");
329  }
330 
331 
335  const StringPiece get_kind() const {
336  const Json::Value& v = Storage("kind");
337  if (v == Json::Value::null) return StringPiece("");
338  return StringPiece(v.asCString());
339  }
340 
348  void set_kind(const StringPiece& value) {
349  *MutableStorage("kind") = value.data();
350  }
351 
357  bool has_membership() const {
358  return Storage().isMember("membership");
359  }
360 
365  MutableStorage()->removeMember("membership");
366  }
367 
368 
373  const Json::Value& storage = Storage("membership");
374  return client::JsonValueToCppValueHelper<FamilyInfoMembership >(storage);
375  }
376 
386  Json::Value* storage = MutableStorage("membership");
387  return client::JsonValueToMutableCppValueHelper<FamilyInfoMembership >(storage);
388  }
389 
390  private:
391  void operator=(const FamilyInfo&);
392 }; // FamilyInfo
393 } // namespace google_books_api
394 #endif // GOOGLE_BOOKS_API_FAMILY_INFO_H_
void set_role(const StringPiece &value)
Definition: family_info.h:273
void set_age_group(const StringPiece &value)
Definition: family_info.h:164
const StringPiece GetTypeName() const
Definition: family_info.h:311
void set_kind(const StringPiece &value)
Definition: family_info.h:348
void clear_age_group()
Definition: family_info.h:143
bool has_role() const
Definition: family_info.h:245
void set_acquire_permission(const StringPiece &value)
Definition: family_info.h:127
bool has_age_group() const
Definition: family_info.h:136
const StringPiece get_acquire_permission() const
Definition: family_info.h:114
bool has_acquire_permission() const
Definition: family_info.h:99
const StringPiece get_kind() const
Definition: family_info.h:335
Definition: family_info.h:50
bool has_is_in_family() const
Definition: family_info.h:211
void clear_membership()
Definition: family_info.h:364
const StringPiece GetTypeName() const
Definition: family_info.h:90
bool get_is_in_family() const
Definition: family_info.h:226
const StringPiece get_allowed_maturity_rating() const
Definition: family_info.h:189
void clear_kind()
Definition: family_info.h:327
const StringPiece get_age_group() const
Definition: family_info.h:151
Definition: annotation.h:42
void set_allowed_maturity_rating(const StringPiece &value)
Definition: family_info.h:202
Definition: annotation.cc:44
bool has_allowed_maturity_rating() const
Definition: family_info.h:174
void set_is_in_family(bool value)
Definition: family_info.h:235
const StringPiece get_role() const
Definition: family_info.h:260
FamilyInfoMembership mutable_membership()
Definition: family_info.h:385
bool has_membership() const
Definition: family_info.h:357
void clear_acquire_permission()
Definition: family_info.h:106
const FamilyInfoMembership get_membership() const
Definition: family_info.h:372
bool has_kind() const
Definition: family_info.h:320
void clear_is_in_family()
Definition: family_info.h:218
void clear_role()
Definition: family_info.h:252
void clear_allowed_maturity_rating()
Definition: family_info.h:181