books  v1
concurrent_access_restriction.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_CONCURRENT_ACCESS_RESTRICTION_H_
31 #define GOOGLE_BOOKS_API_CONCURRENT_ACCESS_RESTRICTION_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/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 ConcurrentAccessRestriction : public client::JsonCppData {
52  public:
58  static ConcurrentAccessRestriction* New();
59 
65  explicit ConcurrentAccessRestriction(const Json::Value& storage);
66 
72  explicit ConcurrentAccessRestriction(Json::Value* storage);
73 
77  virtual ~ConcurrentAccessRestriction();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_books_api::ConcurrentAccessRestriction");
86  }
87 
93  bool has_device_allowed() const {
94  return Storage().isMember("deviceAllowed");
95  }
96 
101  MutableStorage()->removeMember("deviceAllowed");
102  }
103 
104 
108  bool get_device_allowed() const {
109  const Json::Value& storage = Storage("deviceAllowed");
110  return client::JsonValueToCppValueHelper<bool >(storage);
111  }
112 
120  void set_device_allowed(bool value) {
121  client::SetJsonValueFromCppValueHelper<bool >(
122  value, MutableStorage("deviceAllowed"));
123  }
124 
130  bool has_kind() const {
131  return Storage().isMember("kind");
132  }
133 
137  void clear_kind() {
138  MutableStorage()->removeMember("kind");
139  }
140 
141 
145  const StringPiece get_kind() const {
146  const Json::Value& v = Storage("kind");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
158  void set_kind(const StringPiece& value) {
159  *MutableStorage("kind") = value.data();
160  }
161 
168  return Storage().isMember("maxConcurrentDevices");
169  }
170 
175  MutableStorage()->removeMember("maxConcurrentDevices");
176  }
177 
178 
183  const Json::Value& storage = Storage("maxConcurrentDevices");
184  return client::JsonValueToCppValueHelper<int32 >(storage);
185  }
186 
194  void set_max_concurrent_devices(int32 value) {
195  client::SetJsonValueFromCppValueHelper<int32 >(
196  value, MutableStorage("maxConcurrentDevices"));
197  }
198 
204  bool has_message() const {
205  return Storage().isMember("message");
206  }
207 
211  void clear_message() {
212  MutableStorage()->removeMember("message");
213  }
214 
215 
219  const StringPiece get_message() const {
220  const Json::Value& v = Storage("message");
221  if (v == Json::Value::null) return StringPiece("");
222  return StringPiece(v.asCString());
223  }
224 
232  void set_message(const StringPiece& value) {
233  *MutableStorage("message") = value.data();
234  }
235 
241  bool has_nonce() const {
242  return Storage().isMember("nonce");
243  }
244 
248  void clear_nonce() {
249  MutableStorage()->removeMember("nonce");
250  }
251 
252 
256  const StringPiece get_nonce() const {
257  const Json::Value& v = Storage("nonce");
258  if (v == Json::Value::null) return StringPiece("");
259  return StringPiece(v.asCString());
260  }
261 
269  void set_nonce(const StringPiece& value) {
270  *MutableStorage("nonce") = value.data();
271  }
272 
278  bool has_reason_code() const {
279  return Storage().isMember("reasonCode");
280  }
281 
286  MutableStorage()->removeMember("reasonCode");
287  }
288 
289 
293  const StringPiece get_reason_code() const {
294  const Json::Value& v = Storage("reasonCode");
295  if (v == Json::Value::null) return StringPiece("");
296  return StringPiece(v.asCString());
297  }
298 
306  void set_reason_code(const StringPiece& value) {
307  *MutableStorage("reasonCode") = value.data();
308  }
309 
315  bool has_restricted() const {
316  return Storage().isMember("restricted");
317  }
318 
323  MutableStorage()->removeMember("restricted");
324  }
325 
326 
330  bool get_restricted() const {
331  const Json::Value& storage = Storage("restricted");
332  return client::JsonValueToCppValueHelper<bool >(storage);
333  }
334 
342  void set_restricted(bool value) {
343  client::SetJsonValueFromCppValueHelper<bool >(
344  value, MutableStorage("restricted"));
345  }
346 
352  bool has_signature() const {
353  return Storage().isMember("signature");
354  }
355 
360  MutableStorage()->removeMember("signature");
361  }
362 
363 
367  const StringPiece get_signature() const {
368  const Json::Value& v = Storage("signature");
369  if (v == Json::Value::null) return StringPiece("");
370  return StringPiece(v.asCString());
371  }
372 
380  void set_signature(const StringPiece& value) {
381  *MutableStorage("signature") = value.data();
382  }
383 
389  bool has_source() const {
390  return Storage().isMember("source");
391  }
392 
396  void clear_source() {
397  MutableStorage()->removeMember("source");
398  }
399 
400 
404  const StringPiece get_source() const {
405  const Json::Value& v = Storage("source");
406  if (v == Json::Value::null) return StringPiece("");
407  return StringPiece(v.asCString());
408  }
409 
418  void set_source(const StringPiece& value) {
419  *MutableStorage("source") = value.data();
420  }
421 
427  bool has_time_window_seconds() const {
428  return Storage().isMember("timeWindowSeconds");
429  }
430 
435  MutableStorage()->removeMember("timeWindowSeconds");
436  }
437 
438 
442  int32 get_time_window_seconds() const {
443  const Json::Value& storage = Storage("timeWindowSeconds");
444  return client::JsonValueToCppValueHelper<int32 >(storage);
445  }
446 
454  void set_time_window_seconds(int32 value) {
455  client::SetJsonValueFromCppValueHelper<int32 >(
456  value, MutableStorage("timeWindowSeconds"));
457  }
458 
464  bool has_volume_id() const {
465  return Storage().isMember("volumeId");
466  }
467 
472  MutableStorage()->removeMember("volumeId");
473  }
474 
475 
479  const StringPiece get_volume_id() const {
480  const Json::Value& v = Storage("volumeId");
481  if (v == Json::Value::null) return StringPiece("");
482  return StringPiece(v.asCString());
483  }
484 
492  void set_volume_id(const StringPiece& value) {
493  *MutableStorage("volumeId") = value.data();
494  }
495 
496  private:
497  void operator=(const ConcurrentAccessRestriction&);
498 }; // ConcurrentAccessRestriction
499 } // namespace google_books_api
500 #endif // GOOGLE_BOOKS_API_CONCURRENT_ACCESS_RESTRICTION_H_
void clear_source()
Definition: concurrent_access_restriction.h:396
int32 get_time_window_seconds() const
Definition: concurrent_access_restriction.h:442
void set_volume_id(const StringPiece &value)
Definition: concurrent_access_restriction.h:492
void clear_time_window_seconds()
Definition: concurrent_access_restriction.h:434
void set_time_window_seconds(int32 value)
Definition: concurrent_access_restriction.h:454
void clear_signature()
Definition: concurrent_access_restriction.h:359
void clear_message()
Definition: concurrent_access_restriction.h:211
bool has_kind() const
Definition: concurrent_access_restriction.h:130
bool get_restricted() const
Definition: concurrent_access_restriction.h:330
bool has_reason_code() const
Definition: concurrent_access_restriction.h:278
void set_kind(const StringPiece &value)
Definition: concurrent_access_restriction.h:158
void clear_nonce()
Definition: concurrent_access_restriction.h:248
const StringPiece get_source() const
Definition: concurrent_access_restriction.h:404
const StringPiece get_message() const
Definition: concurrent_access_restriction.h:219
bool get_device_allowed() const
Definition: concurrent_access_restriction.h:108
bool has_volume_id() const
Definition: concurrent_access_restriction.h:464
void set_message(const StringPiece &value)
Definition: concurrent_access_restriction.h:232
bool has_nonce() const
Definition: concurrent_access_restriction.h:241
void set_nonce(const StringPiece &value)
Definition: concurrent_access_restriction.h:269
void clear_reason_code()
Definition: concurrent_access_restriction.h:285
void set_device_allowed(bool value)
Definition: concurrent_access_restriction.h:120
Definition: annotation.h:42
void clear_restricted()
Definition: concurrent_access_restriction.h:322
void clear_max_concurrent_devices()
Definition: concurrent_access_restriction.h:174
const StringPiece get_volume_id() const
Definition: concurrent_access_restriction.h:479
void clear_kind()
Definition: concurrent_access_restriction.h:137
void set_reason_code(const StringPiece &value)
Definition: concurrent_access_restriction.h:306
bool has_device_allowed() const
Definition: concurrent_access_restriction.h:93
const StringPiece get_kind() const
Definition: concurrent_access_restriction.h:145
Definition: annotation.cc:44
bool has_source() const
Definition: concurrent_access_restriction.h:389
Definition: concurrent_access_restriction.h:51
bool has_restricted() const
Definition: concurrent_access_restriction.h:315
bool has_signature() const
Definition: concurrent_access_restriction.h:352
bool has_message() const
Definition: concurrent_access_restriction.h:204
bool has_time_window_seconds() const
Definition: concurrent_access_restriction.h:427
void clear_volume_id()
Definition: concurrent_access_restriction.h:471
void set_restricted(bool value)
Definition: concurrent_access_restriction.h:342
const StringPiece get_signature() const
Definition: concurrent_access_restriction.h:367
void clear_device_allowed()
Definition: concurrent_access_restriction.h:100
void set_signature(const StringPiece &value)
Definition: concurrent_access_restriction.h:380
const StringPiece get_nonce() const
Definition: concurrent_access_restriction.h:256
int32 get_max_concurrent_devices() const
Definition: concurrent_access_restriction.h:182
const StringPiece GetTypeName() const
Definition: concurrent_access_restriction.h:84
bool has_max_concurrent_devices() const
Definition: concurrent_access_restriction.h:167
void set_source(const StringPiece &value)
Definition: concurrent_access_restriction.h:418
void set_max_concurrent_devices(int32 value)
Definition: concurrent_access_restriction.h:194
const StringPiece get_reason_code() const
Definition: concurrent_access_restriction.h:293