tasks  v1
task_list.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_LIST_H_
31 #define GOOGLE_TASKS_API_TASK_LIST_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 TaskList : public client::JsonCppData {
52  public:
58  static TaskList* New();
59 
65  explicit TaskList(const Json::Value& storage);
66 
72  explicit TaskList(Json::Value* storage);
73 
77  virtual ~TaskList();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_tasks_api::TaskList");
86  }
87 
93  bool has_etag() const {
94  return Storage().isMember("etag");
95  }
96 
100  void clear_etag() {
101  MutableStorage()->removeMember("etag");
102  }
103 
104 
108  const StringPiece get_etag() const {
109  const Json::Value& v = Storage("etag");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
121  void set_etag(const StringPiece& value) {
122  *MutableStorage("etag") = value.data();
123  }
124 
130  bool has_id() const {
131  return Storage().isMember("id");
132  }
133 
137  void clear_id() {
138  MutableStorage()->removeMember("id");
139  }
140 
141 
145  const StringPiece get_id() const {
146  const Json::Value& v = Storage("id");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
158  void set_id(const StringPiece& value) {
159  *MutableStorage("id") = value.data();
160  }
161 
167  bool has_kind() const {
168  return Storage().isMember("kind");
169  }
170 
174  void clear_kind() {
175  MutableStorage()->removeMember("kind");
176  }
177 
178 
182  const StringPiece get_kind() const {
183  const Json::Value& v = Storage("kind");
184  if (v == Json::Value::null) return StringPiece("");
185  return StringPiece(v.asCString());
186  }
187 
195  void set_kind(const StringPiece& value) {
196  *MutableStorage("kind") = value.data();
197  }
198 
204  bool has_self_link() const {
205  return Storage().isMember("selfLink");
206  }
207 
212  MutableStorage()->removeMember("selfLink");
213  }
214 
215 
219  const StringPiece get_self_link() const {
220  const Json::Value& v = Storage("selfLink");
221  if (v == Json::Value::null) return StringPiece("");
222  return StringPiece(v.asCString());
223  }
224 
233  void set_self_link(const StringPiece& value) {
234  *MutableStorage("selfLink") = value.data();
235  }
236 
242  bool has_title() const {
243  return Storage().isMember("title");
244  }
245 
249  void clear_title() {
250  MutableStorage()->removeMember("title");
251  }
252 
253 
257  const StringPiece get_title() const {
258  const Json::Value& v = Storage("title");
259  if (v == Json::Value::null) return StringPiece("");
260  return StringPiece(v.asCString());
261  }
262 
270  void set_title(const StringPiece& value) {
271  *MutableStorage("title") = value.data();
272  }
273 
279  bool has_updated() const {
280  return Storage().isMember("updated");
281  }
282 
286  void clear_updated() {
287  MutableStorage()->removeMember("updated");
288  }
289 
290 
294  client::DateTime get_updated() const {
295  const Json::Value& storage = Storage("updated");
296  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
297  }
298 
306  void set_updated(client::DateTime value) {
307  client::SetJsonValueFromCppValueHelper<client::DateTime >(
308  value, MutableStorage("updated"));
309  }
310 
311  private:
312  void operator=(const TaskList&);
313 }; // TaskList
314 } // namespace google_tasks_api
315 #endif // GOOGLE_TASKS_API_TASK_LIST_H_
void clear_id()
Definition: task_list.h:137
void set_id(const StringPiece &value)
Definition: task_list.h:158
bool has_id() const
Definition: task_list.h:130
const StringPiece get_kind() const
Definition: task_list.h:182
void set_self_link(const StringPiece &value)
Definition: task_list.h:233
bool has_etag() const
Definition: task_list.h:93
bool has_self_link() const
Definition: task_list.h:204
void clear_kind()
Definition: task_list.h:174
void set_kind(const StringPiece &value)
Definition: task_list.h:195
const StringPiece get_title() const
Definition: task_list.h:257
client::DateTime get_updated() const
Definition: task_list.h:294
const StringPiece GetTypeName() const
Definition: task_list.h:84
void set_updated(client::DateTime value)
Definition: task_list.h:306
void clear_updated()
Definition: task_list.h:286
Definition: task_list.h:51
Definition: task.h:39
bool has_updated() const
Definition: task_list.h:279
void set_etag(const StringPiece &value)
Definition: task_list.h:121
void set_title(const StringPiece &value)
Definition: task_list.h:270
const StringPiece get_etag() const
Definition: task_list.h:108
bool has_title() const
Definition: task_list.h:242
Definition: task.cc:41
bool has_kind() const
Definition: task_list.h:167
void clear_self_link()
Definition: task_list.h:211
void clear_title()
Definition: task_list.h:249
const StringPiece get_id() const
Definition: task_list.h:145
const StringPiece get_self_link() const
Definition: task_list.h:219
void clear_etag()
Definition: task_list.h:100