drive  v2
channel.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-03-19, 05:24:40 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Drive API (drive/v2)
24 // Generated from:
25 // Version: v2
26 // Revision: 393
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_DRIVE_API_CHANNEL_H_
31 #define GOOGLE_DRIVE_API_CHANNEL_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_drive_api {
44 using namespace googleapis;
45 
51 class Channel : public client::JsonCppData {
52  public:
58  static Channel* New();
59 
65  explicit Channel(const Json::Value& storage);
66 
72  explicit Channel(Json::Value* storage);
73 
77  virtual ~Channel();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_drive_api::Channel");
86  }
87 
93  bool has_address() const {
94  return Storage().isMember("address");
95  }
96 
100  void clear_address() {
101  MutableStorage()->removeMember("address");
102  }
103 
104 
108  const StringPiece get_address() const {
109  const Json::Value& v = Storage("address");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
121  void set_address(const StringPiece& value) {
122  *MutableStorage("address") = 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 
158  void set_expiration(int64 value) {
159  client::SetJsonValueFromCppValueHelper<int64 >(
160  value, MutableStorage("expiration"));
161  }
162 
168  bool has_id() const {
169  return Storage().isMember("id");
170  }
171 
175  void clear_id() {
176  MutableStorage()->removeMember("id");
177  }
178 
179 
183  const StringPiece get_id() const {
184  const Json::Value& v = Storage("id");
185  if (v == Json::Value::null) return StringPiece("");
186  return StringPiece(v.asCString());
187  }
188 
196  void set_id(const StringPiece& value) {
197  *MutableStorage("id") = value.data();
198  }
199 
205  bool has_kind() const {
206  return Storage().isMember("kind");
207  }
208 
212  void clear_kind() {
213  MutableStorage()->removeMember("kind");
214  }
215 
216 
220  const StringPiece get_kind() const {
221  const Json::Value& v = Storage("kind");
222  if (v == Json::Value::null) return StringPiece("");
223  return StringPiece(v.asCString());
224  }
225 
234  void set_kind(const StringPiece& value) {
235  *MutableStorage("kind") = value.data();
236  }
237 
243  bool has_params() const {
244  return Storage().isMember("params");
245  }
246 
250  void clear_params() {
251  MutableStorage()->removeMember("params");
252  }
253 
254 
258  const client::JsonCppAssociativeArray<string > get_params() const {
259  const Json::Value& storage = Storage("params");
260  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
261  }
262 
270  client::JsonCppAssociativeArray<string > mutable_params() {
271  Json::Value* storage = MutableStorage("params");
272  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
273  }
274 
280  bool has_payload() const {
281  return Storage().isMember("payload");
282  }
283 
287  void clear_payload() {
288  MutableStorage()->removeMember("payload");
289  }
290 
291 
295  bool get_payload() const {
296  const Json::Value& storage = Storage("payload");
297  return client::JsonValueToCppValueHelper<bool >(storage);
298  }
299 
307  void set_payload(bool value) {
308  client::SetJsonValueFromCppValueHelper<bool >(
309  value, MutableStorage("payload"));
310  }
311 
317  bool has_resource_id() const {
318  return Storage().isMember("resourceId");
319  }
320 
325  MutableStorage()->removeMember("resourceId");
326  }
327 
328 
332  const StringPiece get_resource_id() const {
333  const Json::Value& v = Storage("resourceId");
334  if (v == Json::Value::null) return StringPiece("");
335  return StringPiece(v.asCString());
336  }
337 
346  void set_resource_id(const StringPiece& value) {
347  *MutableStorage("resourceId") = value.data();
348  }
349 
355  bool has_resource_uri() const {
356  return Storage().isMember("resourceUri");
357  }
358 
363  MutableStorage()->removeMember("resourceUri");
364  }
365 
366 
370  const StringPiece get_resource_uri() const {
371  const Json::Value& v = Storage("resourceUri");
372  if (v == Json::Value::null) return StringPiece("");
373  return StringPiece(v.asCString());
374  }
375 
383  void set_resource_uri(const StringPiece& value) {
384  *MutableStorage("resourceUri") = value.data();
385  }
386 
392  bool has_token() const {
393  return Storage().isMember("token");
394  }
395 
399  void clear_token() {
400  MutableStorage()->removeMember("token");
401  }
402 
403 
407  const StringPiece get_token() const {
408  const Json::Value& v = Storage("token");
409  if (v == Json::Value::null) return StringPiece("");
410  return StringPiece(v.asCString());
411  }
412 
421  void set_token(const StringPiece& value) {
422  *MutableStorage("token") = value.data();
423  }
424 
430  bool has_type() const {
431  return Storage().isMember("type");
432  }
433 
437  void clear_type() {
438  MutableStorage()->removeMember("type");
439  }
440 
441 
445  const StringPiece get_type() const {
446  const Json::Value& v = Storage("type");
447  if (v == Json::Value::null) return StringPiece("");
448  return StringPiece(v.asCString());
449  }
450 
458  void set_type(const StringPiece& value) {
459  *MutableStorage("type") = value.data();
460  }
461 
462  private:
463  void operator=(const Channel&);
464 }; // Channel
465 } // namespace google_drive_api
466 #endif // GOOGLE_DRIVE_API_CHANNEL_H_
bool has_type() const
Definition: channel.h:430
void set_resource_uri(const StringPiece &value)
Definition: channel.h:383
const StringPiece GetTypeName() const
Definition: channel.h:84
void clear_resource_uri()
Definition: channel.h:362
bool has_id() const
Definition: channel.h:168
const StringPiece get_address() const
Definition: channel.h:108
void set_id(const StringPiece &value)
Definition: channel.h:196
bool has_resource_id() const
Definition: channel.h:317
void clear_resource_id()
Definition: channel.h:324
int64 get_expiration() const
Definition: channel.h:145
client::JsonCppAssociativeArray< string > mutable_params()
Definition: channel.h:270
void set_address(const StringPiece &value)
Definition: channel.h:121
void clear_kind()
Definition: channel.h:212
void clear_type()
Definition: channel.h:437
void set_kind(const StringPiece &value)
Definition: channel.h:234
bool has_kind() const
Definition: channel.h:205
void clear_payload()
Definition: channel.h:287
void clear_id()
Definition: channel.h:175
void set_expiration(int64 value)
Definition: channel.h:158
const StringPiece get_token() const
Definition: channel.h:407
bool has_expiration() const
Definition: channel.h:130
void set_payload(bool value)
Definition: channel.h:307
void set_token(const StringPiece &value)
Definition: channel.h:421
const StringPiece get_id() const
Definition: channel.h:183
bool get_payload() const
Definition: channel.h:295
bool has_address() const
Definition: channel.h:93
Definition: about.h:41
bool has_resource_uri() const
Definition: channel.h:355
const StringPiece get_type() const
Definition: channel.h:445
void set_resource_id(const StringPiece &value)
Definition: channel.h:346
bool has_token() const
Definition: channel.h:392
void clear_address()
Definition: channel.h:100
void clear_expiration()
Definition: channel.h:137
const StringPiece get_resource_uri() const
Definition: channel.h:370
const client::JsonCppAssociativeArray< string > get_params() const
Definition: channel.h:258
void clear_token()
Definition: channel.h:399
const StringPiece get_kind() const
Definition: channel.h:220
void set_type(const StringPiece &value)
Definition: channel.h:458
Definition: channel.h:51
const StringPiece get_resource_id() const
Definition: channel.h:332
void clear_params()
Definition: channel.h:250
Definition: about.cc:43
bool has_params() const
Definition: channel.h:243
bool has_payload() const
Definition: channel.h:280