gmail  v1
vacation_settings.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, 12:56:31 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Gmail API (gmail/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 110
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_GMAIL_API_VACATION_SETTINGS_H_
31 #define GOOGLE_GMAIL_API_VACATION_SETTINGS_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_gmail_api {
44 using namespace googleapis;
45 
52 class VacationSettings : public client::JsonCppData {
53  public:
59  static VacationSettings* New();
60 
66  explicit VacationSettings(const Json::Value& storage);
67 
73  explicit VacationSettings(Json::Value* storage);
74 
78  virtual ~VacationSettings();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_gmail_api::VacationSettings");
87  }
88 
94  bool has_enable_auto_reply() const {
95  return Storage().isMember("enableAutoReply");
96  }
97 
102  MutableStorage()->removeMember("enableAutoReply");
103  }
104 
105 
109  bool get_enable_auto_reply() const {
110  const Json::Value& storage = Storage("enableAutoReply");
111  return client::JsonValueToCppValueHelper<bool >(storage);
112  }
113 
121  void set_enable_auto_reply(bool value) {
122  client::SetJsonValueFromCppValueHelper<bool >(
123  value, MutableStorage("enableAutoReply"));
124  }
125 
131  bool has_end_time() const {
132  return Storage().isMember("endTime");
133  }
134 
138  void clear_end_time() {
139  MutableStorage()->removeMember("endTime");
140  }
141 
142 
146  int64 get_end_time() const {
147  const Json::Value& storage = Storage("endTime");
148  return client::JsonValueToCppValueHelper<int64 >(storage);
149  }
150 
161  void set_end_time(int64 value) {
162  client::SetJsonValueFromCppValueHelper<int64 >(
163  value, MutableStorage("endTime"));
164  }
165 
171  bool has_response_body_html() const {
172  return Storage().isMember("responseBodyHtml");
173  }
174 
179  MutableStorage()->removeMember("responseBodyHtml");
180  }
181 
182 
186  const StringPiece get_response_body_html() const {
187  const Json::Value& v = Storage("responseBodyHtml");
188  if (v == Json::Value::null) return StringPiece("");
189  return StringPiece(v.asCString());
190  }
191 
200  void set_response_body_html(const StringPiece& value) {
201  *MutableStorage("responseBodyHtml") = value.data();
202  }
203 
210  return Storage().isMember("responseBodyPlainText");
211  }
212 
217  MutableStorage()->removeMember("responseBodyPlainText");
218  }
219 
220 
224  const StringPiece get_response_body_plain_text() const {
225  const Json::Value& v = Storage("responseBodyPlainText");
226  if (v == Json::Value::null) return StringPiece("");
227  return StringPiece(v.asCString());
228  }
229 
237  void set_response_body_plain_text(const StringPiece& value) {
238  *MutableStorage("responseBodyPlainText") = value.data();
239  }
240 
246  bool has_response_subject() const {
247  return Storage().isMember("responseSubject");
248  }
249 
254  MutableStorage()->removeMember("responseSubject");
255  }
256 
257 
261  const StringPiece get_response_subject() const {
262  const Json::Value& v = Storage("responseSubject");
263  if (v == Json::Value::null) return StringPiece("");
264  return StringPiece(v.asCString());
265  }
266 
276  void set_response_subject(const StringPiece& value) {
277  *MutableStorage("responseSubject") = value.data();
278  }
279 
286  return Storage().isMember("restrictToContacts");
287  }
288 
293  MutableStorage()->removeMember("restrictToContacts");
294  }
295 
296 
301  const Json::Value& storage = Storage("restrictToContacts");
302  return client::JsonValueToCppValueHelper<bool >(storage);
303  }
304 
313  void set_restrict_to_contacts(bool value) {
314  client::SetJsonValueFromCppValueHelper<bool >(
315  value, MutableStorage("restrictToContacts"));
316  }
317 
323  bool has_restrict_to_domain() const {
324  return Storage().isMember("restrictToDomain");
325  }
326 
331  MutableStorage()->removeMember("restrictToDomain");
332  }
333 
334 
338  bool get_restrict_to_domain() const {
339  const Json::Value& storage = Storage("restrictToDomain");
340  return client::JsonValueToCppValueHelper<bool >(storage);
341  }
342 
352  void set_restrict_to_domain(bool value) {
353  client::SetJsonValueFromCppValueHelper<bool >(
354  value, MutableStorage("restrictToDomain"));
355  }
356 
362  bool has_start_time() const {
363  return Storage().isMember("startTime");
364  }
365 
370  MutableStorage()->removeMember("startTime");
371  }
372 
373 
377  int64 get_start_time() const {
378  const Json::Value& storage = Storage("startTime");
379  return client::JsonValueToCppValueHelper<int64 >(storage);
380  }
381 
392  void set_start_time(int64 value) {
393  client::SetJsonValueFromCppValueHelper<int64 >(
394  value, MutableStorage("startTime"));
395  }
396 
397  private:
398  void operator=(const VacationSettings&);
399 }; // VacationSettings
400 } // namespace google_gmail_api
401 #endif // GOOGLE_GMAIL_API_VACATION_SETTINGS_H_
void clear_restrict_to_contacts()
Definition: vacation_settings.h:292
bool has_restrict_to_domain() const
Definition: vacation_settings.h:323
bool has_end_time() const
Definition: vacation_settings.h:131
void set_enable_auto_reply(bool value)
Definition: vacation_settings.h:121
bool get_restrict_to_domain() const
Definition: vacation_settings.h:338
void set_response_body_plain_text(const StringPiece &value)
Definition: vacation_settings.h:237
bool has_start_time() const
Definition: vacation_settings.h:362
const StringPiece get_response_subject() const
Definition: vacation_settings.h:261
bool has_response_body_plain_text() const
Definition: vacation_settings.h:209
const StringPiece get_response_body_html() const
Definition: vacation_settings.h:186
bool get_restrict_to_contacts() const
Definition: vacation_settings.h:300
void clear_end_time()
Definition: vacation_settings.h:138
void set_end_time(int64 value)
Definition: vacation_settings.h:161
Definition: vacation_settings.h:52
void clear_start_time()
Definition: vacation_settings.h:369
bool has_response_body_html() const
Definition: vacation_settings.h:171
bool has_response_subject() const
Definition: vacation_settings.h:246
bool has_restrict_to_contacts() const
Definition: vacation_settings.h:285
Definition: auto_forwarding.h:38
void set_restrict_to_contacts(bool value)
Definition: vacation_settings.h:313
void clear_response_body_html()
Definition: vacation_settings.h:178
const StringPiece GetTypeName() const
Definition: vacation_settings.h:85
void set_restrict_to_domain(bool value)
Definition: vacation_settings.h:352
void clear_restrict_to_domain()
Definition: vacation_settings.h:330
void set_response_body_html(const StringPiece &value)
Definition: vacation_settings.h:200
int64 get_start_time() const
Definition: vacation_settings.h:377
void set_response_subject(const StringPiece &value)
Definition: vacation_settings.h:276
void clear_enable_auto_reply()
Definition: vacation_settings.h:101
void set_start_time(int64 value)
Definition: vacation_settings.h:392
void clear_response_subject()
Definition: vacation_settings.h:253
const StringPiece get_response_body_plain_text() const
Definition: vacation_settings.h:224
int64 get_end_time() const
Definition: vacation_settings.h:146
bool has_enable_auto_reply() const
Definition: vacation_settings.h:94
Definition: auto_forwarding.cc:40
void clear_response_body_plain_text()
Definition: vacation_settings.h:216
bool get_enable_auto_reply() const
Definition: vacation_settings.h:109