gmail  v1
imap_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_IMAP_SETTINGS_H_
31 #define GOOGLE_GMAIL_API_IMAP_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 
51 class ImapSettings : public client::JsonCppData {
52  public:
58  static ImapSettings* New();
59 
65  explicit ImapSettings(const Json::Value& storage);
66 
72  explicit ImapSettings(Json::Value* storage);
73 
77  virtual ~ImapSettings();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_gmail_api::ImapSettings");
86  }
87 
93  bool has_auto_expunge() const {
94  return Storage().isMember("autoExpunge");
95  }
96 
101  MutableStorage()->removeMember("autoExpunge");
102  }
103 
104 
108  bool get_auto_expunge() const {
109  const Json::Value& storage = Storage("autoExpunge");
110  return client::JsonValueToCppValueHelper<bool >(storage);
111  }
112 
122  void set_auto_expunge(bool value) {
123  client::SetJsonValueFromCppValueHelper<bool >(
124  value, MutableStorage("autoExpunge"));
125  }
126 
132  bool has_enabled() const {
133  return Storage().isMember("enabled");
134  }
135 
139  void clear_enabled() {
140  MutableStorage()->removeMember("enabled");
141  }
142 
143 
147  bool get_enabled() const {
148  const Json::Value& storage = Storage("enabled");
149  return client::JsonValueToCppValueHelper<bool >(storage);
150  }
151 
159  void set_enabled(bool value) {
160  client::SetJsonValueFromCppValueHelper<bool >(
161  value, MutableStorage("enabled"));
162  }
163 
169  bool has_expunge_behavior() const {
170  return Storage().isMember("expungeBehavior");
171  }
172 
177  MutableStorage()->removeMember("expungeBehavior");
178  }
179 
180 
184  const StringPiece get_expunge_behavior() const {
185  const Json::Value& v = Storage("expungeBehavior");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
198  void set_expunge_behavior(const StringPiece& value) {
199  *MutableStorage("expungeBehavior") = value.data();
200  }
201 
207  bool has_max_folder_size() const {
208  return Storage().isMember("maxFolderSize");
209  }
210 
215  MutableStorage()->removeMember("maxFolderSize");
216  }
217 
218 
222  int32 get_max_folder_size() const {
223  const Json::Value& storage = Storage("maxFolderSize");
224  return client::JsonValueToCppValueHelper<int32 >(storage);
225  }
226 
236  void set_max_folder_size(int32 value) {
237  client::SetJsonValueFromCppValueHelper<int32 >(
238  value, MutableStorage("maxFolderSize"));
239  }
240 
241  private:
242  void operator=(const ImapSettings&);
243 }; // ImapSettings
244 } // namespace google_gmail_api
245 #endif // GOOGLE_GMAIL_API_IMAP_SETTINGS_H_
void clear_auto_expunge()
Definition: imap_settings.h:100
void set_expunge_behavior(const StringPiece &value)
Definition: imap_settings.h:198
Definition: imap_settings.h:51
bool has_enabled() const
Definition: imap_settings.h:132
bool has_expunge_behavior() const
Definition: imap_settings.h:169
const StringPiece GetTypeName() const
Definition: imap_settings.h:84
void set_auto_expunge(bool value)
Definition: imap_settings.h:122
void set_enabled(bool value)
Definition: imap_settings.h:159
Definition: auto_forwarding.h:38
bool has_auto_expunge() const
Definition: imap_settings.h:93
void clear_enabled()
Definition: imap_settings.h:139
bool get_enabled() const
Definition: imap_settings.h:147
bool has_max_folder_size() const
Definition: imap_settings.h:207
void set_max_folder_size(int32 value)
Definition: imap_settings.h:236
const StringPiece get_expunge_behavior() const
Definition: imap_settings.h:184
void clear_max_folder_size()
Definition: imap_settings.h:214
int32 get_max_folder_size() const
Definition: imap_settings.h:222
bool get_auto_expunge() const
Definition: imap_settings.h:108
void clear_expunge_behavior()
Definition: imap_settings.h:176
Definition: auto_forwarding.cc:40