drive  v2
app_list.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_APP_LIST_H_
31 #define GOOGLE_DRIVE_API_APP_LIST_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/drive_api/app.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_drive_api {
45 using namespace googleapis;
46 
53 class AppList : public client::JsonCppData {
54  public:
60  static AppList* New();
61 
67  explicit AppList(const Json::Value& storage);
68 
74  explicit AppList(Json::Value* storage);
75 
79  virtual ~AppList();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_drive_api::AppList");
88  }
89 
95  bool has_default_app_ids() const {
96  return Storage().isMember("defaultAppIds");
97  }
98 
103  MutableStorage()->removeMember("defaultAppIds");
104  }
105 
106 
110  const client::JsonCppArray<string > get_default_app_ids() const {
111  const Json::Value& storage = Storage("defaultAppIds");
112  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
113  }
114 
124  client::JsonCppArray<string > mutable_defaultAppIds() {
125  Json::Value* storage = MutableStorage("defaultAppIds");
126  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
127  }
128 
134  bool has_etag() const {
135  return Storage().isMember("etag");
136  }
137 
141  void clear_etag() {
142  MutableStorage()->removeMember("etag");
143  }
144 
145 
149  const StringPiece get_etag() const {
150  const Json::Value& v = Storage("etag");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
162  void set_etag(const StringPiece& value) {
163  *MutableStorage("etag") = value.data();
164  }
165 
171  bool has_items() const {
172  return Storage().isMember("items");
173  }
174 
178  void clear_items() {
179  MutableStorage()->removeMember("items");
180  }
181 
182 
186  const client::JsonCppArray<App > get_items() const;
187 
195  client::JsonCppArray<App > mutable_items();
196 
202  bool has_kind() const {
203  return Storage().isMember("kind");
204  }
205 
209  void clear_kind() {
210  MutableStorage()->removeMember("kind");
211  }
212 
213 
217  const StringPiece get_kind() const {
218  const Json::Value& v = Storage("kind");
219  if (v == Json::Value::null) return StringPiece("");
220  return StringPiece(v.asCString());
221  }
222 
230  void set_kind(const StringPiece& value) {
231  *MutableStorage("kind") = value.data();
232  }
233 
239  bool has_self_link() const {
240  return Storage().isMember("selfLink");
241  }
242 
247  MutableStorage()->removeMember("selfLink");
248  }
249 
250 
254  const StringPiece get_self_link() const {
255  const Json::Value& v = Storage("selfLink");
256  if (v == Json::Value::null) return StringPiece("");
257  return StringPiece(v.asCString());
258  }
259 
267  void set_self_link(const StringPiece& value) {
268  *MutableStorage("selfLink") = value.data();
269  }
270 
271  private:
272  void operator=(const AppList&);
273 }; // AppList
274 } // namespace google_drive_api
275 #endif // GOOGLE_DRIVE_API_APP_LIST_H_
void clear_items()
Definition: app_list.h:178
void clear_self_link()
Definition: app_list.h:246
bool has_default_app_ids() const
Definition: app_list.h:95
bool has_self_link() const
Definition: app_list.h:239
bool has_kind() const
Definition: app_list.h:202
void set_kind(const StringPiece &value)
Definition: app_list.h:230
const StringPiece get_self_link() const
Definition: app_list.h:254
void clear_kind()
Definition: app_list.h:209
const StringPiece get_etag() const
Definition: app_list.h:149
const StringPiece GetTypeName() const
Definition: app_list.h:86
void clear_etag()
Definition: app_list.h:141
Definition: about.h:41
void set_self_link(const StringPiece &value)
Definition: app_list.h:267
void clear_default_app_ids()
Definition: app_list.h:102
Definition: app_list.h:53
void set_etag(const StringPiece &value)
Definition: app_list.h:162
const client::JsonCppArray< string > get_default_app_ids() const
Definition: app_list.h:110
bool has_etag() const
Definition: app_list.h:134
const StringPiece get_kind() const
Definition: app_list.h:217
Definition: about.cc:43
client::JsonCppArray< string > mutable_defaultAppIds()
Definition: app_list.h:124
bool has_items() const
Definition: app_list.h:171