drive  v2
property.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_H_
31 #define GOOGLE_DRIVE_API_PROPERTY_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_drive_api {
43 using namespace googleapis;
44 
57 class Property : public client::JsonCppData {
58  public:
64  static Property* New();
65 
71  explicit Property(const Json::Value& storage);
72 
78  explicit Property(Json::Value* storage);
79 
83  virtual ~Property();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_drive_api::Property");
92  }
93 
99  bool has_etag() const {
100  return Storage().isMember("etag");
101  }
102 
106  void clear_etag() {
107  MutableStorage()->removeMember("etag");
108  }
109 
110 
114  const StringPiece get_etag() const {
115  const Json::Value& v = Storage("etag");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
127  void set_etag(const StringPiece& value) {
128  *MutableStorage("etag") = value.data();
129  }
130 
136  bool has_key() const {
137  return Storage().isMember("key");
138  }
139 
143  void clear_key() {
144  MutableStorage()->removeMember("key");
145  }
146 
147 
151  const StringPiece get_key() const {
152  const Json::Value& v = Storage("key");
153  if (v == Json::Value::null) return StringPiece("");
154  return StringPiece(v.asCString());
155  }
156 
164  void set_key(const StringPiece& value) {
165  *MutableStorage("key") = value.data();
166  }
167 
173  bool has_kind() const {
174  return Storage().isMember("kind");
175  }
176 
180  void clear_kind() {
181  MutableStorage()->removeMember("kind");
182  }
183 
184 
188  const StringPiece get_kind() const {
189  const Json::Value& v = Storage("kind");
190  if (v == Json::Value::null) return StringPiece("");
191  return StringPiece(v.asCString());
192  }
193 
201  void set_kind(const StringPiece& value) {
202  *MutableStorage("kind") = value.data();
203  }
204 
210  bool has_self_link() const {
211  return Storage().isMember("selfLink");
212  }
213 
218  MutableStorage()->removeMember("selfLink");
219  }
220 
221 
225  const StringPiece get_self_link() const {
226  const Json::Value& v = Storage("selfLink");
227  if (v == Json::Value::null) return StringPiece("");
228  return StringPiece(v.asCString());
229  }
230 
238  void set_self_link(const StringPiece& value) {
239  *MutableStorage("selfLink") = value.data();
240  }
241 
247  bool has_value() const {
248  return Storage().isMember("value");
249  }
250 
254  void clear_value() {
255  MutableStorage()->removeMember("value");
256  }
257 
258 
262  const StringPiece get_value() const {
263  const Json::Value& v = Storage("value");
264  if (v == Json::Value::null) return StringPiece("");
265  return StringPiece(v.asCString());
266  }
267 
275  void set_value(const StringPiece& value) {
276  *MutableStorage("value") = value.data();
277  }
278 
284  bool has_visibility() const {
285  return Storage().isMember("visibility");
286  }
287 
292  MutableStorage()->removeMember("visibility");
293  }
294 
295 
299  const StringPiece get_visibility() const {
300  const Json::Value& v = Storage("visibility");
301  if (v == Json::Value::null) return StringPiece("");
302  return StringPiece(v.asCString());
303  }
304 
313  void set_visibility(const StringPiece& value) {
314  *MutableStorage("visibility") = value.data();
315  }
316 
317  private:
318  void operator=(const Property&);
319 }; // Property
320 } // namespace google_drive_api
321 #endif // GOOGLE_DRIVE_API_PROPERTY_H_
const StringPiece get_key() const
Definition: property.h:151
const StringPiece GetTypeName() const
Definition: property.h:90
bool has_self_link() const
Definition: property.h:210
void clear_kind()
Definition: property.h:180
bool has_kind() const
Definition: property.h:173
const StringPiece get_etag() const
Definition: property.h:114
bool has_etag() const
Definition: property.h:99
void clear_etag()
Definition: property.h:106
const StringPiece get_self_link() const
Definition: property.h:225
bool has_value() const
Definition: property.h:247
bool has_key() const
Definition: property.h:136
bool has_visibility() const
Definition: property.h:284
const StringPiece get_value() const
Definition: property.h:262
void clear_key()
Definition: property.h:143
const StringPiece get_visibility() const
Definition: property.h:299
const StringPiece get_kind() const
Definition: property.h:188
void set_value(const StringPiece &value)
Definition: property.h:275
Definition: about.h:41
void set_self_link(const StringPiece &value)
Definition: property.h:238
Definition: property.h:57
void clear_value()
Definition: property.h:254
void clear_self_link()
Definition: property.h:217
void set_kind(const StringPiece &value)
Definition: property.h:201
void clear_visibility()
Definition: property.h:291
void set_visibility(const StringPiece &value)
Definition: property.h:313
void set_key(const StringPiece &value)
Definition: property.h:164
Definition: about.cc:43
void set_etag(const StringPiece &value)
Definition: property.h:127