calendar  v3
events.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-19, 04:06:47 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Calendar API (calendar/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 411
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_CALENDAR_API_EVENTS_H_
31 #define GOOGLE_CALENDAR_API_EVENTS_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 #include "google/calendar_api/event.h"
40 #include "google/calendar_api/event_reminder.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_calendar_api {
47 using namespace googleapis;
48 
54 class Events : public client::JsonCppData {
55  public:
61  static Events* New();
62 
68  explicit Events(const Json::Value& storage);
69 
75  explicit Events(Json::Value* storage);
76 
80  virtual ~Events();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_calendar_api::Events");
89  }
90 
96  bool has_access_role() const {
97  return Storage().isMember("accessRole");
98  }
99 
104  MutableStorage()->removeMember("accessRole");
105  }
106 
107 
111  const StringPiece get_access_role() const {
112  const Json::Value& v = Storage("accessRole");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
141  void set_access_role(const StringPiece& value) {
142  *MutableStorage("accessRole") = value.data();
143  }
144 
150  bool has_default_reminders() const {
151  return Storage().isMember("defaultReminders");
152  }
153 
158  MutableStorage()->removeMember("defaultReminders");
159  }
160 
161 
166  const client::JsonCppArray<EventReminder > get_default_reminders() const;
167 
178  client::JsonCppArray<EventReminder > mutable_defaultReminders();
179 
185  bool has_description() const {
186  return Storage().isMember("description");
187  }
188 
193  MutableStorage()->removeMember("description");
194  }
195 
196 
200  const StringPiece get_description() const {
201  const Json::Value& v = Storage("description");
202  if (v == Json::Value::null) return StringPiece("");
203  return StringPiece(v.asCString());
204  }
205 
213  void set_description(const StringPiece& value) {
214  *MutableStorage("description") = value.data();
215  }
216 
222  bool has_etag() const {
223  return Storage().isMember("etag");
224  }
225 
229  void clear_etag() {
230  MutableStorage()->removeMember("etag");
231  }
232 
233 
237  const StringPiece get_etag() const {
238  const Json::Value& v = Storage("etag");
239  if (v == Json::Value::null) return StringPiece("");
240  return StringPiece(v.asCString());
241  }
242 
250  void set_etag(const StringPiece& value) {
251  *MutableStorage("etag") = value.data();
252  }
253 
259  bool has_items() const {
260  return Storage().isMember("items");
261  }
262 
266  void clear_items() {
267  MutableStorage()->removeMember("items");
268  }
269 
270 
274  const client::JsonCppArray<Event > get_items() const;
275 
283  client::JsonCppArray<Event > mutable_items();
284 
290  bool has_kind() const {
291  return Storage().isMember("kind");
292  }
293 
297  void clear_kind() {
298  MutableStorage()->removeMember("kind");
299  }
300 
301 
305  const StringPiece get_kind() const {
306  const Json::Value& v = Storage("kind");
307  if (v == Json::Value::null) return StringPiece("");
308  return StringPiece(v.asCString());
309  }
310 
318  void set_kind(const StringPiece& value) {
319  *MutableStorage("kind") = value.data();
320  }
321 
327  bool has_next_page_token() const {
328  return Storage().isMember("nextPageToken");
329  }
330 
335  MutableStorage()->removeMember("nextPageToken");
336  }
337 
338 
342  const StringPiece get_next_page_token() const {
343  const Json::Value& v = Storage("nextPageToken");
344  if (v == Json::Value::null) return StringPiece("");
345  return StringPiece(v.asCString());
346  }
347 
356  void set_next_page_token(const StringPiece& value) {
357  *MutableStorage("nextPageToken") = value.data();
358  }
359 
365  bool has_next_sync_token() const {
366  return Storage().isMember("nextSyncToken");
367  }
368 
373  MutableStorage()->removeMember("nextSyncToken");
374  }
375 
376 
380  const StringPiece get_next_sync_token() const {
381  const Json::Value& v = Storage("nextSyncToken");
382  if (v == Json::Value::null) return StringPiece("");
383  return StringPiece(v.asCString());
384  }
385 
395  void set_next_sync_token(const StringPiece& value) {
396  *MutableStorage("nextSyncToken") = value.data();
397  }
398 
404  bool has_summary() const {
405  return Storage().isMember("summary");
406  }
407 
411  void clear_summary() {
412  MutableStorage()->removeMember("summary");
413  }
414 
415 
419  const StringPiece get_summary() const {
420  const Json::Value& v = Storage("summary");
421  if (v == Json::Value::null) return StringPiece("");
422  return StringPiece(v.asCString());
423  }
424 
432  void set_summary(const StringPiece& value) {
433  *MutableStorage("summary") = value.data();
434  }
435 
441  bool has_time_zone() const {
442  return Storage().isMember("timeZone");
443  }
444 
449  MutableStorage()->removeMember("timeZone");
450  }
451 
452 
456  const StringPiece get_time_zone() const {
457  const Json::Value& v = Storage("timeZone");
458  if (v == Json::Value::null) return StringPiece("");
459  return StringPiece(v.asCString());
460  }
461 
469  void set_time_zone(const StringPiece& value) {
470  *MutableStorage("timeZone") = value.data();
471  }
472 
478  bool has_updated() const {
479  return Storage().isMember("updated");
480  }
481 
485  void clear_updated() {
486  MutableStorage()->removeMember("updated");
487  }
488 
489 
493  client::DateTime get_updated() const {
494  const Json::Value& storage = Storage("updated");
495  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
496  }
497 
505  void set_updated(client::DateTime value) {
506  client::SetJsonValueFromCppValueHelper<client::DateTime >(
507  value, MutableStorage("updated"));
508  }
509 
510  private:
511  void operator=(const Events&);
512 }; // Events
513 } // namespace google_calendar_api
514 #endif // GOOGLE_CALENDAR_API_EVENTS_H_
void clear_items()
Definition: events.h:266
void set_next_page_token(const StringPiece &value)
Definition: events.h:356
bool has_description() const
Definition: events.h:185
const StringPiece get_time_zone() const
Definition: events.h:456
client::DateTime get_updated() const
Definition: events.h:493
void clear_time_zone()
Definition: events.h:448
bool has_updated() const
Definition: events.h:478
void set_summary(const StringPiece &value)
Definition: events.h:432
void set_kind(const StringPiece &value)
Definition: events.h:318
void clear_next_sync_token()
Definition: events.h:372
const StringPiece get_next_sync_token() const
Definition: events.h:380
void clear_next_page_token()
Definition: events.h:334
Definition: events.h:54
bool has_kind() const
Definition: events.h:290
const StringPiece get_next_page_token() const
Definition: events.h:342
void set_description(const StringPiece &value)
Definition: events.h:213
void clear_default_reminders()
Definition: events.h:157
void set_time_zone(const StringPiece &value)
Definition: events.h:469
void clear_access_role()
Definition: events.h:103
const StringPiece get_kind() const
Definition: events.h:305
bool has_access_role() const
Definition: events.h:96
void set_next_sync_token(const StringPiece &value)
Definition: events.h:395
bool has_summary() const
Definition: events.h:404
void clear_description()
Definition: events.h:192
bool has_next_sync_token() const
Definition: events.h:365
bool has_next_page_token() const
Definition: events.h:327
Definition: acl.h:40
bool has_items() const
Definition: events.h:259
void clear_kind()
Definition: events.h:297
void set_access_role(const StringPiece &value)
Definition: events.h:141
void set_etag(const StringPiece &value)
Definition: events.h:250
Definition: acl.cc:42
void clear_summary()
Definition: events.h:411
void clear_updated()
Definition: events.h:485
void set_updated(client::DateTime value)
Definition: events.h:505
const StringPiece get_access_role() const
Definition: events.h:111
const StringPiece get_description() const
Definition: events.h:200
bool has_default_reminders() const
Definition: events.h:150
bool has_time_zone() const
Definition: events.h:441
const StringPiece get_etag() const
Definition: events.h:237
const StringPiece get_summary() const
Definition: events.h:419
void clear_etag()
Definition: events.h:229
const StringPiece GetTypeName() const
Definition: events.h:87
bool has_etag() const
Definition: events.h:222