drive  v2
property_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_PROPERTY_LIST_H_
31 #define GOOGLE_DRIVE_API_PROPERTY_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/property.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_drive_api {
45 using namespace googleapis;
46 
53 class PropertyList : public client::JsonCppData {
54  public:
60  static PropertyList* New();
61 
67  explicit PropertyList(const Json::Value& storage);
68 
74  explicit PropertyList(Json::Value* storage);
75 
79  virtual ~PropertyList();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_drive_api::PropertyList");
88  }
89 
95  bool has_etag() const {
96  return Storage().isMember("etag");
97  }
98 
102  void clear_etag() {
103  MutableStorage()->removeMember("etag");
104  }
105 
106 
110  const StringPiece get_etag() const {
111  const Json::Value& v = Storage("etag");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
123  void set_etag(const StringPiece& value) {
124  *MutableStorage("etag") = value.data();
125  }
126 
132  bool has_items() const {
133  return Storage().isMember("items");
134  }
135 
139  void clear_items() {
140  MutableStorage()->removeMember("items");
141  }
142 
143 
147  const client::JsonCppArray<Property > get_items() const;
148 
156  client::JsonCppArray<Property > mutable_items();
157 
163  bool has_kind() const {
164  return Storage().isMember("kind");
165  }
166 
170  void clear_kind() {
171  MutableStorage()->removeMember("kind");
172  }
173 
174 
178  const StringPiece get_kind() const {
179  const Json::Value& v = Storage("kind");
180  if (v == Json::Value::null) return StringPiece("");
181  return StringPiece(v.asCString());
182  }
183 
191  void set_kind(const StringPiece& value) {
192  *MutableStorage("kind") = value.data();
193  }
194 
200  bool has_self_link() const {
201  return Storage().isMember("selfLink");
202  }
203 
208  MutableStorage()->removeMember("selfLink");
209  }
210 
211 
215  const StringPiece get_self_link() const {
216  const Json::Value& v = Storage("selfLink");
217  if (v == Json::Value::null) return StringPiece("");
218  return StringPiece(v.asCString());
219  }
220 
228  void set_self_link(const StringPiece& value) {
229  *MutableStorage("selfLink") = value.data();
230  }
231 
232  private:
233  void operator=(const PropertyList&);
234 }; // PropertyList
235 } // namespace google_drive_api
236 #endif // GOOGLE_DRIVE_API_PROPERTY_LIST_H_
void clear_items()
Definition: property_list.h:139
bool has_kind() const
Definition: property_list.h:163
const StringPiece GetTypeName() const
Definition: property_list.h:86
const StringPiece get_kind() const
Definition: property_list.h:178
void set_etag(const StringPiece &value)
Definition: property_list.h:123
void set_kind(const StringPiece &value)
Definition: property_list.h:191
Definition: property_list.h:53
void clear_self_link()
Definition: property_list.h:207
const StringPiece get_etag() const
Definition: property_list.h:110
Definition: about.h:41
bool has_etag() const
Definition: property_list.h:95
const StringPiece get_self_link() const
Definition: property_list.h:215
bool has_self_link() const
Definition: property_list.h:200
void set_self_link(const StringPiece &value)
Definition: property_list.h:228
bool has_items() const
Definition: property_list.h:132
void clear_kind()
Definition: property_list.h:170
Definition: about.cc:43
void clear_etag()
Definition: property_list.h:102