gmail  v1
label.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_LABEL_H_
31 #define GOOGLE_GMAIL_API_LABEL_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 #include "google/gmail_api/label_color.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_gmail_api {
46 using namespace googleapis;
47 
53 class Label : public client::JsonCppData {
54  public:
60  static Label* New();
61 
67  explicit Label(const Json::Value& storage);
68 
74  explicit Label(Json::Value* storage);
75 
79  virtual ~Label();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_gmail_api::Label");
88  }
89 
95  bool has_color() const {
96  return Storage().isMember("color");
97  }
98 
102  void clear_color() {
103  MutableStorage()->removeMember("color");
104  }
105 
106 
110  const LabelColor get_color() const;
111 
120  LabelColor mutable_color();
121 
127  bool has_id() const {
128  return Storage().isMember("id");
129  }
130 
134  void clear_id() {
135  MutableStorage()->removeMember("id");
136  }
137 
138 
142  const StringPiece get_id() const {
143  const Json::Value& v = Storage("id");
144  if (v == Json::Value::null) return StringPiece("");
145  return StringPiece(v.asCString());
146  }
147 
155  void set_id(const StringPiece& value) {
156  *MutableStorage("id") = value.data();
157  }
158 
165  return Storage().isMember("labelListVisibility");
166  }
167 
172  MutableStorage()->removeMember("labelListVisibility");
173  }
174 
175 
179  const StringPiece get_label_list_visibility() const {
180  const Json::Value& v = Storage("labelListVisibility");
181  if (v == Json::Value::null) return StringPiece("");
182  return StringPiece(v.asCString());
183  }
184 
192  void set_label_list_visibility(const StringPiece& value) {
193  *MutableStorage("labelListVisibility") = value.data();
194  }
195 
202  return Storage().isMember("messageListVisibility");
203  }
204 
209  MutableStorage()->removeMember("messageListVisibility");
210  }
211 
212 
216  const StringPiece get_message_list_visibility() const {
217  const Json::Value& v = Storage("messageListVisibility");
218  if (v == Json::Value::null) return StringPiece("");
219  return StringPiece(v.asCString());
220  }
221 
229  void set_message_list_visibility(const StringPiece& value) {
230  *MutableStorage("messageListVisibility") = value.data();
231  }
232 
238  bool has_messages_total() const {
239  return Storage().isMember("messagesTotal");
240  }
241 
246  MutableStorage()->removeMember("messagesTotal");
247  }
248 
249 
253  int32 get_messages_total() const {
254  const Json::Value& storage = Storage("messagesTotal");
255  return client::JsonValueToCppValueHelper<int32 >(storage);
256  }
257 
265  void set_messages_total(int32 value) {
266  client::SetJsonValueFromCppValueHelper<int32 >(
267  value, MutableStorage("messagesTotal"));
268  }
269 
275  bool has_messages_unread() const {
276  return Storage().isMember("messagesUnread");
277  }
278 
283  MutableStorage()->removeMember("messagesUnread");
284  }
285 
286 
290  int32 get_messages_unread() const {
291  const Json::Value& storage = Storage("messagesUnread");
292  return client::JsonValueToCppValueHelper<int32 >(storage);
293  }
294 
302  void set_messages_unread(int32 value) {
303  client::SetJsonValueFromCppValueHelper<int32 >(
304  value, MutableStorage("messagesUnread"));
305  }
306 
312  bool has_name() const {
313  return Storage().isMember("name");
314  }
315 
319  void clear_name() {
320  MutableStorage()->removeMember("name");
321  }
322 
323 
327  const StringPiece get_name() const {
328  const Json::Value& v = Storage("name");
329  if (v == Json::Value::null) return StringPiece("");
330  return StringPiece(v.asCString());
331  }
332 
340  void set_name(const StringPiece& value) {
341  *MutableStorage("name") = value.data();
342  }
343 
349  bool has_threads_total() const {
350  return Storage().isMember("threadsTotal");
351  }
352 
357  MutableStorage()->removeMember("threadsTotal");
358  }
359 
360 
364  int32 get_threads_total() const {
365  const Json::Value& storage = Storage("threadsTotal");
366  return client::JsonValueToCppValueHelper<int32 >(storage);
367  }
368 
376  void set_threads_total(int32 value) {
377  client::SetJsonValueFromCppValueHelper<int32 >(
378  value, MutableStorage("threadsTotal"));
379  }
380 
386  bool has_threads_unread() const {
387  return Storage().isMember("threadsUnread");
388  }
389 
394  MutableStorage()->removeMember("threadsUnread");
395  }
396 
397 
401  int32 get_threads_unread() const {
402  const Json::Value& storage = Storage("threadsUnread");
403  return client::JsonValueToCppValueHelper<int32 >(storage);
404  }
405 
413  void set_threads_unread(int32 value) {
414  client::SetJsonValueFromCppValueHelper<int32 >(
415  value, MutableStorage("threadsUnread"));
416  }
417 
423  bool has_type() const {
424  return Storage().isMember("type");
425  }
426 
430  void clear_type() {
431  MutableStorage()->removeMember("type");
432  }
433 
434 
438  const StringPiece get_type() const {
439  const Json::Value& v = Storage("type");
440  if (v == Json::Value::null) return StringPiece("");
441  return StringPiece(v.asCString());
442  }
443 
458  void set_type(const StringPiece& value) {
459  *MutableStorage("type") = value.data();
460  }
461 
462  private:
463  void operator=(const Label&);
464 }; // Label
465 } // namespace google_gmail_api
466 #endif // GOOGLE_GMAIL_API_LABEL_H_
int32 get_messages_total() const
Definition: label.h:253
int32 get_messages_unread() const
Definition: label.h:290
void set_messages_total(int32 value)
Definition: label.h:265
const StringPiece get_type() const
Definition: label.h:438
void clear_color()
Definition: label.h:102
const StringPiece get_label_list_visibility() const
Definition: label.h:179
bool has_id() const
Definition: label.h:127
void set_name(const StringPiece &value)
Definition: label.h:340
void set_messages_unread(int32 value)
Definition: label.h:302
int32 get_threads_total() const
Definition: label.h:364
void clear_label_list_visibility()
Definition: label.h:171
void clear_id()
Definition: label.h:134
bool has_color() const
Definition: label.h:95
void set_label_list_visibility(const StringPiece &value)
Definition: label.h:192
bool has_type() const
Definition: label.h:423
const StringPiece get_message_list_visibility() const
Definition: label.h:216
void set_threads_unread(int32 value)
Definition: label.h:413
const StringPiece get_id() const
Definition: label.h:142
void clear_messages_total()
Definition: label.h:245
void clear_threads_total()
Definition: label.h:356
void clear_type()
Definition: label.h:430
void clear_name()
Definition: label.h:319
int32 get_threads_unread() const
Definition: label.h:401
bool has_messages_total() const
Definition: label.h:238
Definition: auto_forwarding.h:38
const StringPiece GetTypeName() const
Definition: label.h:86
void set_type(const StringPiece &value)
Definition: label.h:458
bool has_threads_unread() const
Definition: label.h:386
bool has_label_list_visibility() const
Definition: label.h:164
void clear_threads_unread()
Definition: label.h:393
void set_message_list_visibility(const StringPiece &value)
Definition: label.h:229
void clear_message_list_visibility()
Definition: label.h:208
Definition: label.h:53
void clear_messages_unread()
Definition: label.h:282
bool has_name() const
Definition: label.h:312
Definition: label_color.h:50
bool has_threads_total() const
Definition: label.h:349
const StringPiece get_name() const
Definition: label.h:327
bool has_message_list_visibility() const
Definition: label.h:201
Definition: auto_forwarding.cc:40
bool has_messages_unread() const
Definition: label.h:275
void set_id(const StringPiece &value)
Definition: label.h:155
void set_threads_total(int32 value)
Definition: label.h:376