books  v1
annotations_summary.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_ANNOTATIONS_SUMMARY_H_
31 #define GOOGLE_BOOKS_API_ANNOTATIONS_SUMMARY_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/client/util/date_time.h"
38 #include "googleapis/strings/stringpiece.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_books_api {
45 using namespace googleapis;
46 
52 class AnnotationsSummary : public client::JsonCppData {
53  public:
59  class AnnotationsSummaryLayers : public client::JsonCppData {
60  public:
66  static AnnotationsSummaryLayers* New();
67 
73  explicit AnnotationsSummaryLayers(const Json::Value& storage);
74 
80  explicit AnnotationsSummaryLayers(Json::Value* storage);
81 
85  virtual ~AnnotationsSummaryLayers();
86 
92  const StringPiece GetTypeName() const {
93  return StringPiece("google_books_api::AnnotationsSummaryLayers");
94  }
95 
103  return Storage().isMember("allowedCharacterCount");
104  }
105 
110  MutableStorage()->removeMember("allowedCharacterCount");
111  }
112 
113 
118  const Json::Value& storage = Storage("allowedCharacterCount");
119  return client::JsonValueToCppValueHelper<int32 >(storage);
120  }
121 
126  void set_allowed_character_count(int32 value) {
127  client::SetJsonValueFromCppValueHelper<int32 >(
128  value, MutableStorage("allowedCharacterCount"));
129  }
130 
136  bool has_layer_id() const {
137  return Storage().isMember("layerId");
138  }
139 
143  void clear_layer_id() {
144  MutableStorage()->removeMember("layerId");
145  }
146 
147 
151  const StringPiece get_layer_id() const {
152  const Json::Value& v = Storage("layerId");
153  if (v == Json::Value::null) return StringPiece("");
154  return StringPiece(v.asCString());
155  }
156 
161  void set_layer_id(const StringPiece& value) {
162  *MutableStorage("layerId") = value.data();
163  }
164 
170  bool has_limit_type() const {
171  return Storage().isMember("limitType");
172  }
173 
178  MutableStorage()->removeMember("limitType");
179  }
180 
181 
185  const StringPiece get_limit_type() const {
186  const Json::Value& v = Storage("limitType");
187  if (v == Json::Value::null) return StringPiece("");
188  return StringPiece(v.asCString());
189  }
190 
195  void set_limit_type(const StringPiece& value) {
196  *MutableStorage("limitType") = value.data();
197  }
198 
207  return Storage().isMember("remainingCharacterCount");
208  }
209 
214  MutableStorage()->removeMember("remainingCharacterCount");
215  }
216 
217 
222  const Json::Value& storage = Storage("remainingCharacterCount");
223  return client::JsonValueToCppValueHelper<int32 >(storage);
224  }
225 
230  void set_remaining_character_count(int32 value) {
231  client::SetJsonValueFromCppValueHelper<int32 >(
232  value, MutableStorage("remainingCharacterCount"));
233  }
234 
240  bool has_updated() const {
241  return Storage().isMember("updated");
242  }
243 
247  void clear_updated() {
248  MutableStorage()->removeMember("updated");
249  }
250 
251 
255  client::DateTime get_updated() const {
256  const Json::Value& storage = Storage("updated");
257  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
258  }
259 
264  void set_updated(client::DateTime value) {
265  client::SetJsonValueFromCppValueHelper<client::DateTime >(
266  value, MutableStorage("updated"));
267  }
268 
269  private:
270  void operator=(const AnnotationsSummaryLayers&);
271  }; // AnnotationsSummaryLayers
277  static AnnotationsSummary* New();
278 
284  explicit AnnotationsSummary(const Json::Value& storage);
285 
291  explicit AnnotationsSummary(Json::Value* storage);
292 
296  virtual ~AnnotationsSummary();
297 
303  const StringPiece GetTypeName() const {
304  return StringPiece("google_books_api::AnnotationsSummary");
305  }
306 
312  bool has_kind() const {
313  return Storage().isMember("kind");
314  }
315 
319  void clear_kind() {
320  MutableStorage()->removeMember("kind");
321  }
322 
323 
327  const StringPiece get_kind() const {
328  const Json::Value& v = Storage("kind");
329  if (v == Json::Value::null) return StringPiece("");
330  return StringPiece(v.asCString());
331  }
332 
337  void set_kind(const StringPiece& value) {
338  *MutableStorage("kind") = value.data();
339  }
340 
346  bool has_layers() const {
347  return Storage().isMember("layers");
348  }
349 
353  void clear_layers() {
354  MutableStorage()->removeMember("layers");
355  }
356 
357 
361  const client::JsonCppArray<AnnotationsSummaryLayers > get_layers() const {
362  const Json::Value& storage = Storage("layers");
363  return client::JsonValueToCppValueHelper<client::JsonCppArray<AnnotationsSummaryLayers > >(storage);
364  }
365 
370  client::JsonCppArray<AnnotationsSummaryLayers > mutable_layers() {
371  Json::Value* storage = MutableStorage("layers");
372  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<AnnotationsSummaryLayers > >(storage);
373  }
374 
375  private:
376  void operator=(const AnnotationsSummary&);
377 }; // AnnotationsSummary
378 } // namespace google_books_api
379 #endif // GOOGLE_BOOKS_API_ANNOTATIONS_SUMMARY_H_
void set_allowed_character_count(int32 value)
Definition: annotations_summary.h:126
bool has_allowed_character_count() const
Definition: annotations_summary.h:102
const StringPiece GetTypeName() const
Definition: annotations_summary.h:303
int32 get_remaining_character_count() const
Definition: annotations_summary.h:221
const StringPiece get_kind() const
Definition: annotations_summary.h:327
void clear_limit_type()
Definition: annotations_summary.h:177
bool has_remaining_character_count() const
Definition: annotations_summary.h:206
void clear_allowed_character_count()
Definition: annotations_summary.h:109
void set_kind(const StringPiece &value)
Definition: annotations_summary.h:337
bool has_layer_id() const
Definition: annotations_summary.h:136
const StringPiece get_limit_type() const
Definition: annotations_summary.h:185
const client::JsonCppArray< AnnotationsSummaryLayers > get_layers() const
Definition: annotations_summary.h:361
void set_updated(client::DateTime value)
Definition: annotations_summary.h:264
int32 get_allowed_character_count() const
Definition: annotations_summary.h:117
void clear_remaining_character_count()
Definition: annotations_summary.h:213
void clear_kind()
Definition: annotations_summary.h:319
bool has_limit_type() const
Definition: annotations_summary.h:170
void set_remaining_character_count(int32 value)
Definition: annotations_summary.h:230
const StringPiece GetTypeName() const
Definition: annotations_summary.h:92
Definition: annotation.h:42
Definition: annotations_summary.h:52
bool has_updated() const
Definition: annotations_summary.h:240
void clear_layer_id()
Definition: annotations_summary.h:143
Definition: annotation.cc:44
bool has_kind() const
Definition: annotations_summary.h:312
void set_layer_id(const StringPiece &value)
Definition: annotations_summary.h:161
bool has_layers() const
Definition: annotations_summary.h:346
client::JsonCppArray< AnnotationsSummaryLayers > mutable_layers()
Definition: annotations_summary.h:370
const StringPiece get_layer_id() const
Definition: annotations_summary.h:151
void clear_updated()
Definition: annotations_summary.h:247
client::DateTime get_updated() const
Definition: annotations_summary.h:255
void set_limit_type(const StringPiece &value)
Definition: annotations_summary.h:195
void clear_layers()
Definition: annotations_summary.h:353