gmail  v1
send_as.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_SEND_AS_H_
31 #define GOOGLE_GMAIL_API_SEND_AS_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/gmail_api/smtp_msa.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_gmail_api {
45 using namespace googleapis;
46 
54 class SendAs : public client::JsonCppData {
55  public:
61  static SendAs* New();
62 
68  explicit SendAs(const Json::Value& storage);
69 
75  explicit SendAs(Json::Value* storage);
76 
80  virtual ~SendAs();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_gmail_api::SendAs");
89  }
90 
96  bool has_display_name() const {
97  return Storage().isMember("displayName");
98  }
99 
104  MutableStorage()->removeMember("displayName");
105  }
106 
107 
111  const StringPiece get_display_name() const {
112  const Json::Value& v = Storage("displayName");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
129  void set_display_name(const StringPiece& value) {
130  *MutableStorage("displayName") = value.data();
131  }
132 
138  bool has_is_default() const {
139  return Storage().isMember("isDefault");
140  }
141 
146  MutableStorage()->removeMember("isDefault");
147  }
148 
149 
153  bool get_is_default() const {
154  const Json::Value& storage = Storage("isDefault");
155  return client::JsonValueToCppValueHelper<bool >(storage);
156  }
157 
170  void set_is_default(bool value) {
171  client::SetJsonValueFromCppValueHelper<bool >(
172  value, MutableStorage("isDefault"));
173  }
174 
180  bool has_is_primary() const {
181  return Storage().isMember("isPrimary");
182  }
183 
188  MutableStorage()->removeMember("isPrimary");
189  }
190 
191 
195  bool get_is_primary() const {
196  const Json::Value& storage = Storage("isPrimary");
197  return client::JsonValueToCppValueHelper<bool >(storage);
198  }
199 
209  void set_is_primary(bool value) {
210  client::SetJsonValueFromCppValueHelper<bool >(
211  value, MutableStorage("isPrimary"));
212  }
213 
219  bool has_reply_to_address() const {
220  return Storage().isMember("replyToAddress");
221  }
222 
227  MutableStorage()->removeMember("replyToAddress");
228  }
229 
230 
234  const StringPiece get_reply_to_address() const {
235  const Json::Value& v = Storage("replyToAddress");
236  if (v == Json::Value::null) return StringPiece("");
237  return StringPiece(v.asCString());
238  }
239 
249  void set_reply_to_address(const StringPiece& value) {
250  *MutableStorage("replyToAddress") = value.data();
251  }
252 
258  bool has_send_as_email() const {
259  return Storage().isMember("sendAsEmail");
260  }
261 
266  MutableStorage()->removeMember("sendAsEmail");
267  }
268 
269 
273  const StringPiece get_send_as_email() const {
274  const Json::Value& v = Storage("sendAsEmail");
275  if (v == Json::Value::null) return StringPiece("");
276  return StringPiece(v.asCString());
277  }
278 
287  void set_send_as_email(const StringPiece& value) {
288  *MutableStorage("sendAsEmail") = value.data();
289  }
290 
296  bool has_signature() const {
297  return Storage().isMember("signature");
298  }
299 
304  MutableStorage()->removeMember("signature");
305  }
306 
307 
311  const StringPiece get_signature() const {
312  const Json::Value& v = Storage("signature");
313  if (v == Json::Value::null) return StringPiece("");
314  return StringPiece(v.asCString());
315  }
316 
325  void set_signature(const StringPiece& value) {
326  *MutableStorage("signature") = value.data();
327  }
328 
334  bool has_smtp_msa() const {
335  return Storage().isMember("smtpMsa");
336  }
337 
341  void clear_smtp_msa() {
342  MutableStorage()->removeMember("smtpMsa");
343  }
344 
345 
349  const SmtpMsa get_smtp_msa() const;
350 
361  SmtpMsa mutable_smtpMsa();
362 
368  bool has_treat_as_alias() const {
369  return Storage().isMember("treatAsAlias");
370  }
371 
376  MutableStorage()->removeMember("treatAsAlias");
377  }
378 
379 
383  bool get_treat_as_alias() const {
384  const Json::Value& storage = Storage("treatAsAlias");
385  return client::JsonValueToCppValueHelper<bool >(storage);
386  }
387 
396  void set_treat_as_alias(bool value) {
397  client::SetJsonValueFromCppValueHelper<bool >(
398  value, MutableStorage("treatAsAlias"));
399  }
400 
406  bool has_verification_status() const {
407  return Storage().isMember("verificationStatus");
408  }
409 
414  MutableStorage()->removeMember("verificationStatus");
415  }
416 
417 
421  const StringPiece get_verification_status() const {
422  const Json::Value& v = Storage("verificationStatus");
423  if (v == Json::Value::null) return StringPiece("");
424  return StringPiece(v.asCString());
425  }
426 
435  void set_verification_status(const StringPiece& value) {
436  *MutableStorage("verificationStatus") = value.data();
437  }
438 
439  private:
440  void operator=(const SendAs&);
441 }; // SendAs
442 } // namespace google_gmail_api
443 #endif // GOOGLE_GMAIL_API_SEND_AS_H_
bool get_treat_as_alias() const
Definition: send_as.h:383
void clear_treat_as_alias()
Definition: send_as.h:375
bool has_smtp_msa() const
Definition: send_as.h:334
bool has_treat_as_alias() const
Definition: send_as.h:368
void set_is_primary(bool value)
Definition: send_as.h:209
void set_send_as_email(const StringPiece &value)
Definition: send_as.h:287
bool has_verification_status() const
Definition: send_as.h:406
const StringPiece GetTypeName() const
Definition: send_as.h:87
bool get_is_primary() const
Definition: send_as.h:195
void clear_smtp_msa()
Definition: send_as.h:341
void clear_is_primary()
Definition: send_as.h:187
void clear_is_default()
Definition: send_as.h:145
const StringPiece get_display_name() const
Definition: send_as.h:111
bool has_is_default() const
Definition: send_as.h:138
void clear_reply_to_address()
Definition: send_as.h:226
bool has_is_primary() const
Definition: send_as.h:180
void clear_display_name()
Definition: send_as.h:103
void set_reply_to_address(const StringPiece &value)
Definition: send_as.h:249
Definition: auto_forwarding.h:38
Definition: send_as.h:54
void set_verification_status(const StringPiece &value)
Definition: send_as.h:435
bool has_send_as_email() const
Definition: send_as.h:258
void set_treat_as_alias(bool value)
Definition: send_as.h:396
const StringPiece get_reply_to_address() const
Definition: send_as.h:234
bool has_reply_to_address() const
Definition: send_as.h:219
const StringPiece get_verification_status() const
Definition: send_as.h:421
void clear_verification_status()
Definition: send_as.h:413
bool has_display_name() const
Definition: send_as.h:96
Definition: smtp_msa.h:51
const StringPiece get_signature() const
Definition: send_as.h:311
void clear_send_as_email()
Definition: send_as.h:265
const StringPiece get_send_as_email() const
Definition: send_as.h:273
bool get_is_default() const
Definition: send_as.h:153
bool has_signature() const
Definition: send_as.h:296
void set_signature(const StringPiece &value)
Definition: send_as.h:325
void set_display_name(const StringPiece &value)
Definition: send_as.h:129
Definition: auto_forwarding.cc:40
void set_is_default(bool value)
Definition: send_as.h:170
void clear_signature()
Definition: send_as.h:303