calendar  v3
acl_rule.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, 04:06:47 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Calendar API (calendar/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 411
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_CALENDAR_API_ACL_RULE_H_
31 #define GOOGLE_CALENDAR_API_ACL_RULE_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_calendar_api {
43 using namespace googleapis;
44 
50 class AclRule : public client::JsonCppData {
51  public:
57  class AclRuleScope : public client::JsonCppData {
58  public:
64  static AclRuleScope* New();
65 
71  explicit AclRuleScope(const Json::Value& storage);
72 
78  explicit AclRuleScope(Json::Value* storage);
79 
83  virtual ~AclRuleScope();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_calendar_api::AclRuleScope");
92  }
93 
99  bool has_type() const {
100  return Storage().isMember("type");
101  }
102 
106  void clear_type() {
107  MutableStorage()->removeMember("type");
108  }
109 
110 
114  const StringPiece get_type() const {
115  const Json::Value& v = Storage("type");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
139  void set_type(const StringPiece& value) {
140  *MutableStorage("type") = value.data();
141  }
142 
148  bool has_value() const {
149  return Storage().isMember("value");
150  }
151 
155  void clear_value() {
156  MutableStorage()->removeMember("value");
157  }
158 
159 
163  const StringPiece get_value() const {
164  const Json::Value& v = Storage("value");
165  if (v == Json::Value::null) return StringPiece("");
166  return StringPiece(v.asCString());
167  }
168 
177  void set_value(const StringPiece& value) {
178  *MutableStorage("value") = value.data();
179  }
180 
181  private:
182  void operator=(const AclRuleScope&);
183  }; // AclRuleScope
189  static AclRule* New();
190 
196  explicit AclRule(const Json::Value& storage);
197 
203  explicit AclRule(Json::Value* storage);
204 
208  virtual ~AclRule();
209 
215  const StringPiece GetTypeName() const {
216  return StringPiece("google_calendar_api::AclRule");
217  }
218 
224  bool has_etag() const {
225  return Storage().isMember("etag");
226  }
227 
231  void clear_etag() {
232  MutableStorage()->removeMember("etag");
233  }
234 
235 
239  const StringPiece get_etag() const {
240  const Json::Value& v = Storage("etag");
241  if (v == Json::Value::null) return StringPiece("");
242  return StringPiece(v.asCString());
243  }
244 
252  void set_etag(const StringPiece& value) {
253  *MutableStorage("etag") = value.data();
254  }
255 
261  bool has_id() const {
262  return Storage().isMember("id");
263  }
264 
268  void clear_id() {
269  MutableStorage()->removeMember("id");
270  }
271 
272 
276  const StringPiece get_id() const {
277  const Json::Value& v = Storage("id");
278  if (v == Json::Value::null) return StringPiece("");
279  return StringPiece(v.asCString());
280  }
281 
289  void set_id(const StringPiece& value) {
290  *MutableStorage("id") = value.data();
291  }
292 
298  bool has_kind() const {
299  return Storage().isMember("kind");
300  }
301 
305  void clear_kind() {
306  MutableStorage()->removeMember("kind");
307  }
308 
309 
313  const StringPiece get_kind() const {
314  const Json::Value& v = Storage("kind");
315  if (v == Json::Value::null) return StringPiece("");
316  return StringPiece(v.asCString());
317  }
318 
326  void set_kind(const StringPiece& value) {
327  *MutableStorage("kind") = value.data();
328  }
329 
335  bool has_role() const {
336  return Storage().isMember("role");
337  }
338 
342  void clear_role() {
343  MutableStorage()->removeMember("role");
344  }
345 
346 
350  const StringPiece get_role() const {
351  const Json::Value& v = Storage("role");
352  if (v == Json::Value::null) return StringPiece("");
353  return StringPiece(v.asCString());
354  }
355 
380  void set_role(const StringPiece& value) {
381  *MutableStorage("role") = value.data();
382  }
383 
389  bool has_scope() const {
390  return Storage().isMember("scope");
391  }
392 
396  void clear_scope() {
397  MutableStorage()->removeMember("scope");
398  }
399 
400 
404  const AclRuleScope get_scope() const {
405  const Json::Value& storage = Storage("scope");
406  return client::JsonValueToCppValueHelper<AclRuleScope >(storage);
407  }
408 
417  Json::Value* storage = MutableStorage("scope");
418  return client::JsonValueToMutableCppValueHelper<AclRuleScope >(storage);
419  }
420 
421  private:
422  void operator=(const AclRule&);
423 }; // AclRule
424 } // namespace google_calendar_api
425 #endif // GOOGLE_CALENDAR_API_ACL_RULE_H_
const StringPiece get_kind() const
Definition: acl_rule.h:313
void clear_kind()
Definition: acl_rule.h:305
void set_role(const StringPiece &value)
Definition: acl_rule.h:380
void clear_type()
Definition: acl_rule.h:106
bool has_etag() const
Definition: acl_rule.h:224
void clear_role()
Definition: acl_rule.h:342
bool has_kind() const
Definition: acl_rule.h:298
const StringPiece get_type() const
Definition: acl_rule.h:114
bool has_id() const
Definition: acl_rule.h:261
Definition: acl_rule.h:50
const StringPiece get_value() const
Definition: acl_rule.h:163
const StringPiece get_role() const
Definition: acl_rule.h:350
bool has_scope() const
Definition: acl_rule.h:389
const StringPiece get_etag() const
Definition: acl_rule.h:239
bool has_value() const
Definition: acl_rule.h:148
void clear_etag()
Definition: acl_rule.h:231
Definition: acl.h:40
void set_id(const StringPiece &value)
Definition: acl_rule.h:289
void set_value(const StringPiece &value)
Definition: acl_rule.h:177
void set_kind(const StringPiece &value)
Definition: acl_rule.h:326
Definition: acl.cc:42
const StringPiece get_id() const
Definition: acl_rule.h:276
const StringPiece GetTypeName() const
Definition: acl_rule.h:90
AclRuleScope mutable_scope()
Definition: acl_rule.h:416
void set_type(const StringPiece &value)
Definition: acl_rule.h:139
void set_etag(const StringPiece &value)
Definition: acl_rule.h:252
void clear_id()
Definition: acl_rule.h:268
const StringPiece GetTypeName() const
Definition: acl_rule.h:215
bool has_role() const
Definition: acl_rule.h:335
const AclRuleScope get_scope() const
Definition: acl_rule.h:404
void clear_value()
Definition: acl_rule.h:155
void clear_scope()
Definition: acl_rule.h:396
bool has_type() const
Definition: acl_rule.h:99