calendar  v3
event_date_time.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_EVENT_DATE_TIME_H_
31 #define GOOGLE_CALENDAR_API_EVENT_DATE_TIME_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_calendar_api {
44 using namespace googleapis;
45 
51 class EventDateTime : public client::JsonCppData {
52  public:
58  static EventDateTime* New();
59 
65  explicit EventDateTime(const Json::Value& storage);
66 
72  explicit EventDateTime(Json::Value* storage);
73 
77  virtual ~EventDateTime();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_calendar_api::EventDateTime");
86  }
87 
93  bool has_date() const {
94  return Storage().isMember("date");
95  }
96 
100  void clear_date() {
101  MutableStorage()->removeMember("date");
102  }
103 
104 
108  client::Date get_date() const {
109  const Json::Value& storage = Storage("date");
110  return client::JsonValueToCppValueHelper<client::Date >(storage);
111  }
112 
120  void set_date(client::Date value) {
121  client::SetJsonValueFromCppValueHelper<client::Date >(
122  value, MutableStorage("date"));
123  }
124 
130  bool has_date_time() const {
131  return Storage().isMember("dateTime");
132  }
133 
138  MutableStorage()->removeMember("dateTime");
139  }
140 
141 
145  client::DateTime get_date_time() const {
146  const Json::Value& storage = Storage("dateTime");
147  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
148  }
149 
159  void set_date_time(client::DateTime value) {
160  client::SetJsonValueFromCppValueHelper<client::DateTime >(
161  value, MutableStorage("dateTime"));
162  }
163 
169  bool has_time_zone() const {
170  return Storage().isMember("timeZone");
171  }
172 
177  MutableStorage()->removeMember("timeZone");
178  }
179 
180 
184  const StringPiece get_time_zone() const {
185  const Json::Value& v = Storage("timeZone");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
201  void set_time_zone(const StringPiece& value) {
202  *MutableStorage("timeZone") = value.data();
203  }
204 
205  private:
206  void operator=(const EventDateTime&);
207 }; // EventDateTime
208 } // namespace google_calendar_api
209 #endif // GOOGLE_CALENDAR_API_EVENT_DATE_TIME_H_
client::DateTime get_date_time() const
Definition: event_date_time.h:145
bool has_date_time() const
Definition: event_date_time.h:130
bool has_date() const
Definition: event_date_time.h:93
void set_date_time(client::DateTime value)
Definition: event_date_time.h:159
void clear_date()
Definition: event_date_time.h:100
client::Date get_date() const
Definition: event_date_time.h:108
void clear_date_time()
Definition: event_date_time.h:137
bool has_time_zone() const
Definition: event_date_time.h:169
Definition: event_date_time.h:51
Definition: acl.h:40
const StringPiece GetTypeName() const
Definition: event_date_time.h:84
const StringPiece get_time_zone() const
Definition: event_date_time.h:184
void set_date(client::Date value)
Definition: event_date_time.h:120
Definition: acl.cc:42
void clear_time_zone()
Definition: event_date_time.h:176
void set_time_zone(const StringPiece &value)
Definition: event_date_time.h:201