gmail  v1
smtp_msa.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_SMTP_MSA_H_
31 #define GOOGLE_GMAIL_API_SMTP_MSA_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 SmtpMsa : public client::JsonCppData {
52  public:
58  static SmtpMsa* New();
59 
65  explicit SmtpMsa(const Json::Value& storage);
66 
72  explicit SmtpMsa(Json::Value* storage);
73 
77  virtual ~SmtpMsa();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_gmail_api::SmtpMsa");
86  }
87 
93  bool has_host() const {
94  return Storage().isMember("host");
95  }
96 
100  void clear_host() {
101  MutableStorage()->removeMember("host");
102  }
103 
104 
108  const StringPiece get_host() const {
109  const Json::Value& v = Storage("host");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
121  void set_host(const StringPiece& value) {
122  *MutableStorage("host") = value.data();
123  }
124 
130  bool has_password() const {
131  return Storage().isMember("password");
132  }
133 
137  void clear_password() {
138  MutableStorage()->removeMember("password");
139  }
140 
141 
145  const StringPiece get_password() const {
146  const Json::Value& v = Storage("password");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
160  void set_password(const StringPiece& value) {
161  *MutableStorage("password") = value.data();
162  }
163 
169  bool has_port() const {
170  return Storage().isMember("port");
171  }
172 
176  void clear_port() {
177  MutableStorage()->removeMember("port");
178  }
179 
180 
184  int32 get_port() const {
185  const Json::Value& storage = Storage("port");
186  return client::JsonValueToCppValueHelper<int32 >(storage);
187  }
188 
196  void set_port(int32 value) {
197  client::SetJsonValueFromCppValueHelper<int32 >(
198  value, MutableStorage("port"));
199  }
200 
206  bool has_security_mode() const {
207  return Storage().isMember("securityMode");
208  }
209 
214  MutableStorage()->removeMember("securityMode");
215  }
216 
217 
221  const StringPiece get_security_mode() const {
222  const Json::Value& v = Storage("securityMode");
223  if (v == Json::Value::null) return StringPiece("");
224  return StringPiece(v.asCString());
225  }
226 
235  void set_security_mode(const StringPiece& value) {
236  *MutableStorage("securityMode") = value.data();
237  }
238 
244  bool has_username() const {
245  return Storage().isMember("username");
246  }
247 
251  void clear_username() {
252  MutableStorage()->removeMember("username");
253  }
254 
255 
259  const StringPiece get_username() const {
260  const Json::Value& v = Storage("username");
261  if (v == Json::Value::null) return StringPiece("");
262  return StringPiece(v.asCString());
263  }
264 
274  void set_username(const StringPiece& value) {
275  *MutableStorage("username") = value.data();
276  }
277 
278  private:
279  void operator=(const SmtpMsa&);
280 }; // SmtpMsa
281 } // namespace google_gmail_api
282 #endif // GOOGLE_GMAIL_API_SMTP_MSA_H_
bool has_password() const
Definition: smtp_msa.h:130
void clear_username()
Definition: smtp_msa.h:251
int32 get_port() const
Definition: smtp_msa.h:184
void set_host(const StringPiece &value)
Definition: smtp_msa.h:121
void set_port(int32 value)
Definition: smtp_msa.h:196
const StringPiece GetTypeName() const
Definition: smtp_msa.h:84
void set_password(const StringPiece &value)
Definition: smtp_msa.h:160
void clear_host()
Definition: smtp_msa.h:100
Definition: auto_forwarding.h:38
void clear_password()
Definition: smtp_msa.h:137
bool has_security_mode() const
Definition: smtp_msa.h:206
const StringPiece get_username() const
Definition: smtp_msa.h:259
const StringPiece get_security_mode() const
Definition: smtp_msa.h:221
bool has_port() const
Definition: smtp_msa.h:169
void clear_port()
Definition: smtp_msa.h:176
Definition: smtp_msa.h:51
const StringPiece get_password() const
Definition: smtp_msa.h:145
void set_security_mode(const StringPiece &value)
Definition: smtp_msa.h:235
bool has_host() const
Definition: smtp_msa.h:93
void clear_security_mode()
Definition: smtp_msa.h:213
bool has_username() const
Definition: smtp_msa.h:244
Definition: auto_forwarding.cc:40
const StringPiece get_host() const
Definition: smtp_msa.h:108
void set_username(const StringPiece &value)
Definition: smtp_msa.h:274