gmail  v1
smime_info.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_SMIME_INFO_H_
31 #define GOOGLE_GMAIL_API_SMIME_INFO_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 SmimeInfo : public client::JsonCppData {
52  public:
58  static SmimeInfo* New();
59 
65  explicit SmimeInfo(const Json::Value& storage);
66 
72  explicit SmimeInfo(Json::Value* storage);
73 
77  virtual ~SmimeInfo();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_gmail_api::SmimeInfo");
86  }
87 
94  return Storage().isMember("encryptedKeyPassword");
95  }
96 
101  MutableStorage()->removeMember("encryptedKeyPassword");
102  }
103 
104 
108  const StringPiece get_encrypted_key_password() const {
109  const Json::Value& v = Storage("encryptedKeyPassword");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
121  void set_encrypted_key_password(const StringPiece& value) {
122  *MutableStorage("encryptedKeyPassword") = value.data();
123  }
124 
130  bool has_expiration() const {
131  return Storage().isMember("expiration");
132  }
133 
138  MutableStorage()->removeMember("expiration");
139  }
140 
141 
145  int64 get_expiration() const {
146  const Json::Value& storage = Storage("expiration");
147  return client::JsonValueToCppValueHelper<int64 >(storage);
148  }
149 
157  void set_expiration(int64 value) {
158  client::SetJsonValueFromCppValueHelper<int64 >(
159  value, MutableStorage("expiration"));
160  }
161 
167  bool has_id() const {
168  return Storage().isMember("id");
169  }
170 
174  void clear_id() {
175  MutableStorage()->removeMember("id");
176  }
177 
178 
182  const StringPiece get_id() const {
183  const Json::Value& v = Storage("id");
184  if (v == Json::Value::null) return StringPiece("");
185  return StringPiece(v.asCString());
186  }
187 
195  void set_id(const StringPiece& value) {
196  *MutableStorage("id") = value.data();
197  }
198 
204  bool has_is_default() const {
205  return Storage().isMember("isDefault");
206  }
207 
212  MutableStorage()->removeMember("isDefault");
213  }
214 
215 
219  bool get_is_default() const {
220  const Json::Value& storage = Storage("isDefault");
221  return client::JsonValueToCppValueHelper<bool >(storage);
222  }
223 
231  void set_is_default(bool value) {
232  client::SetJsonValueFromCppValueHelper<bool >(
233  value, MutableStorage("isDefault"));
234  }
235 
241  bool has_issuer_cn() const {
242  return Storage().isMember("issuerCn");
243  }
244 
249  MutableStorage()->removeMember("issuerCn");
250  }
251 
252 
256  const StringPiece get_issuer_cn() const {
257  const Json::Value& v = Storage("issuerCn");
258  if (v == Json::Value::null) return StringPiece("");
259  return StringPiece(v.asCString());
260  }
261 
269  void set_issuer_cn(const StringPiece& value) {
270  *MutableStorage("issuerCn") = value.data();
271  }
272 
278  bool has_pem() const {
279  return Storage().isMember("pem");
280  }
281 
285  void clear_pem() {
286  MutableStorage()->removeMember("pem");
287  }
288 
289 
293  const StringPiece get_pem() const {
294  const Json::Value& v = Storage("pem");
295  if (v == Json::Value::null) return StringPiece("");
296  return StringPiece(v.asCString());
297  }
298 
308  void set_pem(const StringPiece& value) {
309  *MutableStorage("pem") = value.data();
310  }
311 
317  bool has_pkcs12() const {
318  return Storage().isMember("pkcs12");
319  }
320 
324  void clear_pkcs12() {
325  MutableStorage()->removeMember("pkcs12");
326  }
327 
328 
332  const StringPiece get_pkcs12() const {
333  const Json::Value& v = Storage("pkcs12");
334  if (v == Json::Value::null) return StringPiece("");
335  return StringPiece(v.asCString());
336  }
337 
349  void set_pkcs12(const StringPiece& value) {
350  *MutableStorage("pkcs12") = value.data();
351  }
352 
353  private:
354  void operator=(const SmimeInfo&);
355 }; // SmimeInfo
356 } // namespace google_gmail_api
357 #endif // GOOGLE_GMAIL_API_SMIME_INFO_H_
bool has_id() const
Definition: smime_info.h:167
bool has_pem() const
Definition: smime_info.h:278
const StringPiece get_pkcs12() const
Definition: smime_info.h:332
void clear_expiration()
Definition: smime_info.h:137
void clear_encrypted_key_password()
Definition: smime_info.h:100
bool has_encrypted_key_password() const
Definition: smime_info.h:93
void clear_pkcs12()
Definition: smime_info.h:324
const StringPiece GetTypeName() const
Definition: smime_info.h:84
void set_is_default(bool value)
Definition: smime_info.h:231
void set_encrypted_key_password(const StringPiece &value)
Definition: smime_info.h:121
int64 get_expiration() const
Definition: smime_info.h:145
void set_pem(const StringPiece &value)
Definition: smime_info.h:308
const StringPiece get_encrypted_key_password() const
Definition: smime_info.h:108
const StringPiece get_id() const
Definition: smime_info.h:182
void clear_id()
Definition: smime_info.h:174
void clear_is_default()
Definition: smime_info.h:211
bool has_expiration() const
Definition: smime_info.h:130
const StringPiece get_pem() const
Definition: smime_info.h:293
void set_id(const StringPiece &value)
Definition: smime_info.h:195
Definition: auto_forwarding.h:38
void set_issuer_cn(const StringPiece &value)
Definition: smime_info.h:269
bool get_is_default() const
Definition: smime_info.h:219
bool has_pkcs12() const
Definition: smime_info.h:317
void set_pkcs12(const StringPiece &value)
Definition: smime_info.h:349
void set_expiration(int64 value)
Definition: smime_info.h:157
void clear_pem()
Definition: smime_info.h:285
Definition: smime_info.h:51
bool has_issuer_cn() const
Definition: smime_info.h:241
bool has_is_default() const
Definition: smime_info.h:204
void clear_issuer_cn()
Definition: smime_info.h:248
Definition: auto_forwarding.cc:40
const StringPiece get_issuer_cn() const
Definition: smime_info.h:256