gmail  v1
history.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_HISTORY_H_
31 #define GOOGLE_GMAIL_API_HISTORY_H_
32 
33 #include "googleapis/base/integral_types.h"
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/history_label_added.h"
39 #include "google/gmail_api/history_label_removed.h"
40 #include "google/gmail_api/history_message_added.h"
41 #include "google/gmail_api/history_message_deleted.h"
42 #include "google/gmail_api/message.h"
43 
44 namespace Json {
45 class Value;
46 } // namespace Json
47 
48 namespace google_gmail_api {
49 using namespace googleapis;
50 
57 class History : public client::JsonCppData {
58  public:
64  static History* New();
65 
71  explicit History(const Json::Value& storage);
72 
78  explicit History(Json::Value* storage);
79 
83  virtual ~History();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_gmail_api::History");
92  }
93 
99  bool has_id() const {
100  return Storage().isMember("id");
101  }
102 
106  void clear_id() {
107  MutableStorage()->removeMember("id");
108  }
109 
110 
114  uint64 get_id() const {
115  const Json::Value& storage = Storage("id");
116  return client::JsonValueToCppValueHelper<uint64 >(storage);
117  }
118 
126  void set_id(uint64 value) {
127  client::SetJsonValueFromCppValueHelper<uint64 >(
128  value, MutableStorage("id"));
129  }
130 
136  bool has_labels_added() const {
137  return Storage().isMember("labelsAdded");
138  }
139 
144  MutableStorage()->removeMember("labelsAdded");
145  }
146 
147 
151  const client::JsonCppArray<HistoryLabelAdded > get_labels_added() const;
152 
161  client::JsonCppArray<HistoryLabelAdded > mutable_labelsAdded();
162 
168  bool has_labels_removed() const {
169  return Storage().isMember("labelsRemoved");
170  }
171 
176  MutableStorage()->removeMember("labelsRemoved");
177  }
178 
179 
183  const client::JsonCppArray<HistoryLabelRemoved > get_labels_removed() const;
184 
193  client::JsonCppArray<HistoryLabelRemoved > mutable_labelsRemoved();
194 
200  bool has_messages() const {
201  return Storage().isMember("messages");
202  }
203 
207  void clear_messages() {
208  MutableStorage()->removeMember("messages");
209  }
210 
211 
215  const client::JsonCppArray<Message > get_messages() const;
216 
227  client::JsonCppArray<Message > mutable_messages();
228 
234  bool has_messages_added() const {
235  return Storage().isMember("messagesAdded");
236  }
237 
242  MutableStorage()->removeMember("messagesAdded");
243  }
244 
245 
249  const client::JsonCppArray<HistoryMessageAdded > get_messages_added() const;
250 
259  client::JsonCppArray<HistoryMessageAdded > mutable_messagesAdded();
260 
266  bool has_messages_deleted() const {
267  return Storage().isMember("messagesDeleted");
268  }
269 
274  MutableStorage()->removeMember("messagesDeleted");
275  }
276 
277 
282  const client::JsonCppArray<HistoryMessageDeleted > get_messages_deleted() const;
283 
292  client::JsonCppArray<HistoryMessageDeleted > mutable_messagesDeleted();
293 
294  private:
295  void operator=(const History&);
296 }; // History
297 } // namespace google_gmail_api
298 #endif // GOOGLE_GMAIL_API_HISTORY_H_
bool has_messages_added() const
Definition: history.h:234
void clear_id()
Definition: history.h:106
bool has_id() const
Definition: history.h:99
void clear_labels_removed()
Definition: history.h:175
void clear_messages_deleted()
Definition: history.h:273
void set_id(uint64 value)
Definition: history.h:126
uint64 get_id() const
Definition: history.h:114
bool has_labels_removed() const
Definition: history.h:168
bool has_labels_added() const
Definition: history.h:136
Definition: auto_forwarding.h:38
const StringPiece GetTypeName() const
Definition: history.h:90
void clear_messages()
Definition: history.h:207
void clear_messages_added()
Definition: history.h:241
Definition: history.h:57
bool has_messages_deleted() const
Definition: history.h:266
bool has_messages() const
Definition: history.h:200
Definition: auto_forwarding.cc:40
void clear_labels_added()
Definition: history.h:143