calendar  v3
free_busy_response.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_FREE_BUSY_RESPONSE_H_
31 #define GOOGLE_CALENDAR_API_FREE_BUSY_RESPONSE_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/free_busy_calendar.h"
40 #include "google/calendar_api/free_busy_group.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_calendar_api {
47 using namespace googleapis;
48 
54 class FreeBusyResponse : public client::JsonCppData {
55  public:
61  static FreeBusyResponse* New();
62 
68  explicit FreeBusyResponse(const Json::Value& storage);
69 
75  explicit FreeBusyResponse(Json::Value* storage);
76 
80  virtual ~FreeBusyResponse();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_calendar_api::FreeBusyResponse");
89  }
90 
96  bool has_calendars() const {
97  return Storage().isMember("calendars");
98  }
99 
104  MutableStorage()->removeMember("calendars");
105  }
106 
107 
111  const client::JsonCppAssociativeArray<FreeBusyCalendar > get_calendars() const;
112 
121  client::JsonCppAssociativeArray<FreeBusyCalendar > mutable_calendars();
122 
128  bool has_groups() const {
129  return Storage().isMember("groups");
130  }
131 
135  void clear_groups() {
136  MutableStorage()->removeMember("groups");
137  }
138 
139 
143  const client::JsonCppAssociativeArray<FreeBusyGroup > get_groups() const;
144 
152  client::JsonCppAssociativeArray<FreeBusyGroup > mutable_groups();
153 
159  bool has_kind() const {
160  return Storage().isMember("kind");
161  }
162 
166  void clear_kind() {
167  MutableStorage()->removeMember("kind");
168  }
169 
170 
174  const StringPiece get_kind() const {
175  const Json::Value& v = Storage("kind");
176  if (v == Json::Value::null) return StringPiece("");
177  return StringPiece(v.asCString());
178  }
179 
187  void set_kind(const StringPiece& value) {
188  *MutableStorage("kind") = value.data();
189  }
190 
196  bool has_time_max() const {
197  return Storage().isMember("timeMax");
198  }
199 
203  void clear_time_max() {
204  MutableStorage()->removeMember("timeMax");
205  }
206 
207 
211  client::DateTime get_time_max() const {
212  const Json::Value& storage = Storage("timeMax");
213  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
214  }
215 
223  void set_time_max(client::DateTime value) {
224  client::SetJsonValueFromCppValueHelper<client::DateTime >(
225  value, MutableStorage("timeMax"));
226  }
227 
233  bool has_time_min() const {
234  return Storage().isMember("timeMin");
235  }
236 
240  void clear_time_min() {
241  MutableStorage()->removeMember("timeMin");
242  }
243 
244 
248  client::DateTime get_time_min() const {
249  const Json::Value& storage = Storage("timeMin");
250  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
251  }
252 
260  void set_time_min(client::DateTime value) {
261  client::SetJsonValueFromCppValueHelper<client::DateTime >(
262  value, MutableStorage("timeMin"));
263  }
264 
265  private:
266  void operator=(const FreeBusyResponse&);
267 }; // FreeBusyResponse
268 } // namespace google_calendar_api
269 #endif // GOOGLE_CALENDAR_API_FREE_BUSY_RESPONSE_H_
const StringPiece get_kind() const
Definition: free_busy_response.h:174
Definition: free_busy_response.h:54
bool has_time_min() const
Definition: free_busy_response.h:233
client::DateTime get_time_min() const
Definition: free_busy_response.h:248
client::DateTime get_time_max() const
Definition: free_busy_response.h:211
void clear_calendars()
Definition: free_busy_response.h:103
void clear_kind()
Definition: free_busy_response.h:166
void set_time_max(client::DateTime value)
Definition: free_busy_response.h:223
bool has_groups() const
Definition: free_busy_response.h:128
void set_time_min(client::DateTime value)
Definition: free_busy_response.h:260
bool has_time_max() const
Definition: free_busy_response.h:196
Definition: acl.h:40
void clear_groups()
Definition: free_busy_response.h:135
Definition: acl.cc:42
void clear_time_max()
Definition: free_busy_response.h:203
void set_kind(const StringPiece &value)
Definition: free_busy_response.h:187
bool has_kind() const
Definition: free_busy_response.h:159
const StringPiece GetTypeName() const
Definition: free_busy_response.h:87
void clear_time_min()
Definition: free_busy_response.h:240
bool has_calendars() const
Definition: free_busy_response.h:96