tasks  v1
task.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-02-15, 11:16:04 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Tasks API (tasks/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 71
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_TASKS_API_TASK_H_
31 #define GOOGLE_TASKS_API_TASK_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_tasks_api {
44 using namespace googleapis;
45 
51 class Task : public client::JsonCppData {
52  public:
58  class TaskLinks : public client::JsonCppData {
59  public:
65  static TaskLinks* New();
66 
72  explicit TaskLinks(const Json::Value& storage);
73 
79  explicit TaskLinks(Json::Value* storage);
80 
84  virtual ~TaskLinks();
85 
91  const StringPiece GetTypeName() const {
92  return StringPiece("google_tasks_api::TaskLinks");
93  }
94 
100  bool has_description() const {
101  return Storage().isMember("description");
102  }
103 
108  MutableStorage()->removeMember("description");
109  }
110 
111 
115  const StringPiece get_description() const {
116  const Json::Value& v = Storage("description");
117  if (v == Json::Value::null) return StringPiece("");
118  return StringPiece(v.asCString());
119  }
120 
128  void set_description(const StringPiece& value) {
129  *MutableStorage("description") = value.data();
130  }
131 
137  bool has_link() const {
138  return Storage().isMember("link");
139  }
140 
144  void clear_link() {
145  MutableStorage()->removeMember("link");
146  }
147 
148 
152  const StringPiece get_link() const {
153  const Json::Value& v = Storage("link");
154  if (v == Json::Value::null) return StringPiece("");
155  return StringPiece(v.asCString());
156  }
157 
165  void set_link(const StringPiece& value) {
166  *MutableStorage("link") = value.data();
167  }
168 
174  bool has_type() const {
175  return Storage().isMember("type");
176  }
177 
181  void clear_type() {
182  MutableStorage()->removeMember("type");
183  }
184 
185 
189  const StringPiece get_type() const {
190  const Json::Value& v = Storage("type");
191  if (v == Json::Value::null) return StringPiece("");
192  return StringPiece(v.asCString());
193  }
194 
202  void set_type(const StringPiece& value) {
203  *MutableStorage("type") = value.data();
204  }
205 
206  private:
207  void operator=(const TaskLinks&);
208  }; // TaskLinks
214  static Task* New();
215 
221  explicit Task(const Json::Value& storage);
222 
228  explicit Task(Json::Value* storage);
229 
233  virtual ~Task();
234 
240  const StringPiece GetTypeName() const {
241  return StringPiece("google_tasks_api::Task");
242  }
243 
249  bool has_completed() const {
250  return Storage().isMember("completed");
251  }
252 
257  MutableStorage()->removeMember("completed");
258  }
259 
260 
264  client::DateTime get_completed() const {
265  const Json::Value& storage = Storage("completed");
266  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
267  }
268 
277  void set_completed(client::DateTime value) {
278  client::SetJsonValueFromCppValueHelper<client::DateTime >(
279  value, MutableStorage("completed"));
280  }
281 
287  bool has_deleted() const {
288  return Storage().isMember("deleted");
289  }
290 
294  void clear_deleted() {
295  MutableStorage()->removeMember("deleted");
296  }
297 
298 
302  bool get_deleted() const {
303  const Json::Value& storage = Storage("deleted");
304  return client::JsonValueToCppValueHelper<bool >(storage);
305  }
306 
314  void set_deleted(bool value) {
315  client::SetJsonValueFromCppValueHelper<bool >(
316  value, MutableStorage("deleted"));
317  }
318 
324  bool has_due() const {
325  return Storage().isMember("due");
326  }
327 
331  void clear_due() {
332  MutableStorage()->removeMember("due");
333  }
334 
335 
339  client::DateTime get_due() const {
340  const Json::Value& storage = Storage("due");
341  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
342  }
343 
354  void set_due(client::DateTime value) {
355  client::SetJsonValueFromCppValueHelper<client::DateTime >(
356  value, MutableStorage("due"));
357  }
358 
364  bool has_etag() const {
365  return Storage().isMember("etag");
366  }
367 
371  void clear_etag() {
372  MutableStorage()->removeMember("etag");
373  }
374 
375 
379  const StringPiece get_etag() const {
380  const Json::Value& v = Storage("etag");
381  if (v == Json::Value::null) return StringPiece("");
382  return StringPiece(v.asCString());
383  }
384 
392  void set_etag(const StringPiece& value) {
393  *MutableStorage("etag") = value.data();
394  }
395 
401  bool has_hidden() const {
402  return Storage().isMember("hidden");
403  }
404 
408  void clear_hidden() {
409  MutableStorage()->removeMember("hidden");
410  }
411 
412 
416  bool get_hidden() const {
417  const Json::Value& storage = Storage("hidden");
418  return client::JsonValueToCppValueHelper<bool >(storage);
419  }
420 
430  void set_hidden(bool value) {
431  client::SetJsonValueFromCppValueHelper<bool >(
432  value, MutableStorage("hidden"));
433  }
434 
440  bool has_id() const {
441  return Storage().isMember("id");
442  }
443 
447  void clear_id() {
448  MutableStorage()->removeMember("id");
449  }
450 
451 
455  const StringPiece get_id() const {
456  const Json::Value& v = Storage("id");
457  if (v == Json::Value::null) return StringPiece("");
458  return StringPiece(v.asCString());
459  }
460 
468  void set_id(const StringPiece& value) {
469  *MutableStorage("id") = value.data();
470  }
471 
477  bool has_kind() const {
478  return Storage().isMember("kind");
479  }
480 
484  void clear_kind() {
485  MutableStorage()->removeMember("kind");
486  }
487 
488 
492  const StringPiece get_kind() const {
493  const Json::Value& v = Storage("kind");
494  if (v == Json::Value::null) return StringPiece("");
495  return StringPiece(v.asCString());
496  }
497 
505  void set_kind(const StringPiece& value) {
506  *MutableStorage("kind") = value.data();
507  }
508 
514  bool has_links() const {
515  return Storage().isMember("links");
516  }
517 
521  void clear_links() {
522  MutableStorage()->removeMember("links");
523  }
524 
525 
529  const client::JsonCppArray<TaskLinks > get_links() const {
530  const Json::Value& storage = Storage("links");
531  return client::JsonValueToCppValueHelper<client::JsonCppArray<TaskLinks > >(storage);
532  }
533 
541  client::JsonCppArray<TaskLinks > mutable_links() {
542  Json::Value* storage = MutableStorage("links");
543  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<TaskLinks > >(storage);
544  }
545 
551  bool has_notes() const {
552  return Storage().isMember("notes");
553  }
554 
558  void clear_notes() {
559  MutableStorage()->removeMember("notes");
560  }
561 
562 
566  const StringPiece get_notes() const {
567  const Json::Value& v = Storage("notes");
568  if (v == Json::Value::null) return StringPiece("");
569  return StringPiece(v.asCString());
570  }
571 
579  void set_notes(const StringPiece& value) {
580  *MutableStorage("notes") = value.data();
581  }
582 
588  bool has_parent() const {
589  return Storage().isMember("parent");
590  }
591 
595  void clear_parent() {
596  MutableStorage()->removeMember("parent");
597  }
598 
599 
603  const StringPiece get_parent() const {
604  const Json::Value& v = Storage("parent");
605  if (v == Json::Value::null) return StringPiece("");
606  return StringPiece(v.asCString());
607  }
608 
618  void set_parent(const StringPiece& value) {
619  *MutableStorage("parent") = value.data();
620  }
621 
627  bool has_position() const {
628  return Storage().isMember("position");
629  }
630 
634  void clear_position() {
635  MutableStorage()->removeMember("position");
636  }
637 
638 
642  const StringPiece get_position() const {
643  const Json::Value& v = Storage("position");
644  if (v == Json::Value::null) return StringPiece("");
645  return StringPiece(v.asCString());
646  }
647 
660  void set_position(const StringPiece& value) {
661  *MutableStorage("position") = value.data();
662  }
663 
669  bool has_self_link() const {
670  return Storage().isMember("selfLink");
671  }
672 
677  MutableStorage()->removeMember("selfLink");
678  }
679 
680 
684  const StringPiece get_self_link() const {
685  const Json::Value& v = Storage("selfLink");
686  if (v == Json::Value::null) return StringPiece("");
687  return StringPiece(v.asCString());
688  }
689 
697  void set_self_link(const StringPiece& value) {
698  *MutableStorage("selfLink") = value.data();
699  }
700 
706  bool has_status() const {
707  return Storage().isMember("status");
708  }
709 
713  void clear_status() {
714  MutableStorage()->removeMember("status");
715  }
716 
717 
721  const StringPiece get_status() const {
722  const Json::Value& v = Storage("status");
723  if (v == Json::Value::null) return StringPiece("");
724  return StringPiece(v.asCString());
725  }
726 
734  void set_status(const StringPiece& value) {
735  *MutableStorage("status") = value.data();
736  }
737 
743  bool has_title() const {
744  return Storage().isMember("title");
745  }
746 
750  void clear_title() {
751  MutableStorage()->removeMember("title");
752  }
753 
754 
758  const StringPiece get_title() const {
759  const Json::Value& v = Storage("title");
760  if (v == Json::Value::null) return StringPiece("");
761  return StringPiece(v.asCString());
762  }
763 
771  void set_title(const StringPiece& value) {
772  *MutableStorage("title") = value.data();
773  }
774 
780  bool has_updated() const {
781  return Storage().isMember("updated");
782  }
783 
787  void clear_updated() {
788  MutableStorage()->removeMember("updated");
789  }
790 
791 
795  client::DateTime get_updated() const {
796  const Json::Value& storage = Storage("updated");
797  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
798  }
799 
807  void set_updated(client::DateTime value) {
808  client::SetJsonValueFromCppValueHelper<client::DateTime >(
809  value, MutableStorage("updated"));
810  }
811 
812  private:
813  void operator=(const Task&);
814 }; // Task
815 } // namespace google_tasks_api
816 #endif // GOOGLE_TASKS_API_TASK_H_
bool has_notes() const
Definition: task.h:551
bool has_hidden() const
Definition: task.h:401
void set_completed(client::DateTime value)
Definition: task.h:277
client::DateTime get_updated() const
Definition: task.h:795
void clear_position()
Definition: task.h:634
void set_position(const StringPiece &value)
Definition: task.h:660
void set_hidden(bool value)
Definition: task.h:430
client::DateTime get_due() const
Definition: task.h:339
void clear_self_link()
Definition: task.h:676
client::JsonCppArray< TaskLinks > mutable_links()
Definition: task.h:541
void clear_kind()
Definition: task.h:484
void clear_id()
Definition: task.h:447
bool get_hidden() const
Definition: task.h:416
void set_updated(client::DateTime value)
Definition: task.h:807
void set_deleted(bool value)
Definition: task.h:314
void set_title(const StringPiece &value)
Definition: task.h:771
void set_self_link(const StringPiece &value)
Definition: task.h:697
void set_notes(const StringPiece &value)
Definition: task.h:579
bool has_position() const
Definition: task.h:627
void clear_links()
Definition: task.h:521
const StringPiece get_kind() const
Definition: task.h:492
void clear_status()
Definition: task.h:713
bool has_status() const
Definition: task.h:706
const StringPiece get_position() const
Definition: task.h:642
void clear_hidden()
Definition: task.h:408
bool has_kind() const
Definition: task.h:477
const StringPiece get_status() const
Definition: task.h:721
void clear_title()
Definition: task.h:750
void set_id(const StringPiece &value)
Definition: task.h:468
const StringPiece get_self_link() const
Definition: task.h:684
const StringPiece get_parent() const
Definition: task.h:603
bool has_due() const
Definition: task.h:324
Definition: task.h:39
void clear_due()
Definition: task.h:331
void clear_deleted()
Definition: task.h:294
bool has_deleted() const
Definition: task.h:287
void clear_etag()
Definition: task.h:371
client::DateTime get_completed() const
Definition: task.h:264
void set_etag(const StringPiece &value)
Definition: task.h:392
const StringPiece get_notes() const
Definition: task.h:566
bool has_etag() const
Definition: task.h:364
void clear_completed()
Definition: task.h:256
const StringPiece GetTypeName() const
Definition: task.h:240
void clear_updated()
Definition: task.h:787
bool has_links() const
Definition: task.h:514
bool has_updated() const
Definition: task.h:780
const StringPiece get_id() const
Definition: task.h:455
bool has_id() const
Definition: task.h:440
bool get_deleted() const
Definition: task.h:302
bool has_parent() const
Definition: task.h:588
Definition: task.cc:41
const StringPiece get_title() const
Definition: task.h:758
const client::JsonCppArray< TaskLinks > get_links() const
Definition: task.h:529
void clear_parent()
Definition: task.h:595
void set_status(const StringPiece &value)
Definition: task.h:734
const StringPiece get_etag() const
Definition: task.h:379
Definition: task.h:51
void set_parent(const StringPiece &value)
Definition: task.h:618
bool has_title() const
Definition: task.h:743
bool has_self_link() const
Definition: task.h:669
bool has_completed() const
Definition: task.h:249
void set_due(client::DateTime value)
Definition: task.h:354
void set_kind(const StringPiece &value)
Definition: task.h:505
void clear_notes()
Definition: task.h:558