books  v1
annotationdata.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_ANNOTATIONDATA_H_
31 #define GOOGLE_BOOKS_API_ANNOTATIONDATA_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/client/util/date_time.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_books_api {
44 using namespace googleapis;
45 
51 class Annotationdata : public client::JsonCppData {
52  public:
58  static Annotationdata* New();
59 
65  explicit Annotationdata(const Json::Value& storage);
66 
72  explicit Annotationdata(Json::Value* storage);
73 
77  virtual ~Annotationdata();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_books_api::Annotationdata");
86  }
87 
93  bool has_annotation_type() const {
94  return Storage().isMember("annotationType");
95  }
96 
101  MutableStorage()->removeMember("annotationType");
102  }
103 
104 
108  const StringPiece get_annotation_type() const {
109  const Json::Value& v = Storage("annotationType");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
121  void set_annotation_type(const StringPiece& value) {
122  *MutableStorage("annotationType") = value.data();
123  }
124 
130  bool has_data() const {
131  return Storage().isMember("data");
132  }
133 
137  void clear_data() {
138  MutableStorage()->removeMember("data");
139  }
140 
141 
145  const client::JsonCppData get_data() const {
146  const Json::Value& storage = Storage("data");
147  return client::JsonValueToCppValueHelper<client::JsonCppData >(storage);
148  }
149 
154  client::JsonCppData mutable_data() {
155  Json::Value* storage = MutableStorage("data");
156  return client::JsonValueToMutableCppValueHelper<client::JsonCppData >(storage);
157  }
158 
164  bool has_encoded_data() const {
165  return Storage().isMember("encoded_data");
166  }
167 
172  MutableStorage()->removeMember("encoded_data");
173  }
174 
175 
179  const StringPiece get_encoded_data() const {
180  const Json::Value& v = Storage("encoded_data");
181  if (v == Json::Value::null) return StringPiece("");
182  return StringPiece(v.asCString());
183  }
184 
192  void set_encoded_data(const StringPiece& value) {
193  *MutableStorage("encoded_data") = value.data();
194  }
195 
201  bool has_id() const {
202  return Storage().isMember("id");
203  }
204 
208  void clear_id() {
209  MutableStorage()->removeMember("id");
210  }
211 
212 
216  const StringPiece get_id() const {
217  const Json::Value& v = Storage("id");
218  if (v == Json::Value::null) return StringPiece("");
219  return StringPiece(v.asCString());
220  }
221 
229  void set_id(const StringPiece& value) {
230  *MutableStorage("id") = value.data();
231  }
232 
238  bool has_kind() const {
239  return Storage().isMember("kind");
240  }
241 
245  void clear_kind() {
246  MutableStorage()->removeMember("kind");
247  }
248 
249 
253  const StringPiece get_kind() const {
254  const Json::Value& v = Storage("kind");
255  if (v == Json::Value::null) return StringPiece("");
256  return StringPiece(v.asCString());
257  }
258 
266  void set_kind(const StringPiece& value) {
267  *MutableStorage("kind") = value.data();
268  }
269 
275  bool has_layer_id() const {
276  return Storage().isMember("layerId");
277  }
278 
282  void clear_layer_id() {
283  MutableStorage()->removeMember("layerId");
284  }
285 
286 
290  const StringPiece get_layer_id() const {
291  const Json::Value& v = Storage("layerId");
292  if (v == Json::Value::null) return StringPiece("");
293  return StringPiece(v.asCString());
294  }
295 
303  void set_layer_id(const StringPiece& value) {
304  *MutableStorage("layerId") = value.data();
305  }
306 
312  bool has_self_link() const {
313  return Storage().isMember("selfLink");
314  }
315 
320  MutableStorage()->removeMember("selfLink");
321  }
322 
323 
327  const StringPiece get_self_link() const {
328  const Json::Value& v = Storage("selfLink");
329  if (v == Json::Value::null) return StringPiece("");
330  return StringPiece(v.asCString());
331  }
332 
340  void set_self_link(const StringPiece& value) {
341  *MutableStorage("selfLink") = value.data();
342  }
343 
349  bool has_updated() const {
350  return Storage().isMember("updated");
351  }
352 
356  void clear_updated() {
357  MutableStorage()->removeMember("updated");
358  }
359 
360 
364  client::DateTime get_updated() const {
365  const Json::Value& storage = Storage("updated");
366  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
367  }
368 
377  void set_updated(client::DateTime value) {
378  client::SetJsonValueFromCppValueHelper<client::DateTime >(
379  value, MutableStorage("updated"));
380  }
381 
387  bool has_volume_id() const {
388  return Storage().isMember("volumeId");
389  }
390 
395  MutableStorage()->removeMember("volumeId");
396  }
397 
398 
402  const StringPiece get_volume_id() const {
403  const Json::Value& v = Storage("volumeId");
404  if (v == Json::Value::null) return StringPiece("");
405  return StringPiece(v.asCString());
406  }
407 
415  void set_volume_id(const StringPiece& value) {
416  *MutableStorage("volumeId") = value.data();
417  }
418 
419  private:
420  void operator=(const Annotationdata&);
421 }; // Annotationdata
422 } // namespace google_books_api
423 #endif // GOOGLE_BOOKS_API_ANNOTATIONDATA_H_
void clear_data()
Definition: annotationdata.h:137
bool has_volume_id() const
Definition: annotationdata.h:387
const StringPiece get_kind() const
Definition: annotationdata.h:253
void clear_updated()
Definition: annotationdata.h:356
const client::JsonCppData get_data() const
Definition: annotationdata.h:145
bool has_annotation_type() const
Definition: annotationdata.h:93
void set_layer_id(const StringPiece &value)
Definition: annotationdata.h:303
client::DateTime get_updated() const
Definition: annotationdata.h:364
const StringPiece get_self_link() const
Definition: annotationdata.h:327
Definition: annotationdata.h:51
void set_self_link(const StringPiece &value)
Definition: annotationdata.h:340
const StringPiece get_encoded_data() const
Definition: annotationdata.h:179
const StringPiece get_layer_id() const
Definition: annotationdata.h:290
bool has_updated() const
Definition: annotationdata.h:349
bool has_kind() const
Definition: annotationdata.h:238
client::JsonCppData mutable_data()
Definition: annotationdata.h:154
bool has_encoded_data() const
Definition: annotationdata.h:164
void clear_self_link()
Definition: annotationdata.h:319
void clear_encoded_data()
Definition: annotationdata.h:171
Definition: annotation.h:42
const StringPiece get_volume_id() const
Definition: annotationdata.h:402
void clear_layer_id()
Definition: annotationdata.h:282
const StringPiece GetTypeName() const
Definition: annotationdata.h:84
Definition: annotation.cc:44
void clear_id()
Definition: annotationdata.h:208
void set_kind(const StringPiece &value)
Definition: annotationdata.h:266
void set_annotation_type(const StringPiece &value)
Definition: annotationdata.h:121
void set_updated(client::DateTime value)
Definition: annotationdata.h:377
void clear_annotation_type()
Definition: annotationdata.h:100
bool has_layer_id() const
Definition: annotationdata.h:275
bool has_data() const
Definition: annotationdata.h:130
void set_volume_id(const StringPiece &value)
Definition: annotationdata.h:415
const StringPiece get_annotation_type() const
Definition: annotationdata.h:108
void clear_kind()
Definition: annotationdata.h:245
bool has_self_link() const
Definition: annotationdata.h:312
void clear_volume_id()
Definition: annotationdata.h:394
void set_id(const StringPiece &value)
Definition: annotationdata.h:229
const StringPiece get_id() const
Definition: annotationdata.h:216
void set_encoded_data(const StringPiece &value)
Definition: annotationdata.h:192
bool has_id() const
Definition: annotationdata.h:201