admin  directory_v1
role.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-01-30, 07:22:56 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Admin Directory API (admin/directory_v1)
24 // Generated from:
25 // Version: directory_v1
26 // Revision: 117
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_ADMIN_ADMIN_API_ROLE_H_
31 #define GOOGLE_ADMIN_ADMIN_API_ROLE_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_admin_admin_api {
44 using namespace googleapis;
45 
51 class Role : public client::JsonCppData {
52  public:
58  class RoleRolePrivileges : public client::JsonCppData {
59  public:
65  static RoleRolePrivileges* New();
66 
72  explicit RoleRolePrivileges(const Json::Value& storage);
73 
79  explicit RoleRolePrivileges(Json::Value* storage);
80 
84  virtual ~RoleRolePrivileges();
85 
91  const StringPiece GetTypeName() const {
92  return StringPiece("google_admin_admin_api::RoleRolePrivileges");
93  }
94 
100  bool has_privilege_name() const {
101  return Storage().isMember("privilegeName");
102  }
103 
108  MutableStorage()->removeMember("privilegeName");
109  }
110 
111 
115  const StringPiece get_privilege_name() const {
116  const Json::Value& v = Storage("privilegeName");
117  if (v == Json::Value::null) return StringPiece("");
118  return StringPiece(v.asCString());
119  }
120 
128  void set_privilege_name(const StringPiece& value) {
129  *MutableStorage("privilegeName") = value.data();
130  }
131 
137  bool has_service_id() const {
138  return Storage().isMember("serviceId");
139  }
140 
145  MutableStorage()->removeMember("serviceId");
146  }
147 
148 
152  const StringPiece get_service_id() const {
153  const Json::Value& v = Storage("serviceId");
154  if (v == Json::Value::null) return StringPiece("");
155  return StringPiece(v.asCString());
156  }
157 
166  void set_service_id(const StringPiece& value) {
167  *MutableStorage("serviceId") = value.data();
168  }
169 
170  private:
171  void operator=(const RoleRolePrivileges&);
172  }; // RoleRolePrivileges
178  static Role* New();
179 
185  explicit Role(const Json::Value& storage);
186 
192  explicit Role(Json::Value* storage);
193 
197  virtual ~Role();
198 
204  const StringPiece GetTypeName() const {
205  return StringPiece("google_admin_admin_api::Role");
206  }
207 
213  bool has_etag() const {
214  return Storage().isMember("etag");
215  }
216 
220  void clear_etag() {
221  MutableStorage()->removeMember("etag");
222  }
223 
224 
228  const StringPiece get_etag() const {
229  const Json::Value& v = Storage("etag");
230  if (v == Json::Value::null) return StringPiece("");
231  return StringPiece(v.asCString());
232  }
233 
241  void set_etag(const StringPiece& value) {
242  *MutableStorage("etag") = value.data();
243  }
244 
250  bool has_is_super_admin_role() const {
251  return Storage().isMember("isSuperAdminRole");
252  }
253 
258  MutableStorage()->removeMember("isSuperAdminRole");
259  }
260 
261 
265  bool get_is_super_admin_role() const {
266  const Json::Value& storage = Storage("isSuperAdminRole");
267  return client::JsonValueToCppValueHelper<bool >(storage);
268  }
269 
277  void set_is_super_admin_role(bool value) {
278  client::SetJsonValueFromCppValueHelper<bool >(
279  value, MutableStorage("isSuperAdminRole"));
280  }
281 
287  bool has_is_system_role() const {
288  return Storage().isMember("isSystemRole");
289  }
290 
295  MutableStorage()->removeMember("isSystemRole");
296  }
297 
298 
302  bool get_is_system_role() const {
303  const Json::Value& storage = Storage("isSystemRole");
304  return client::JsonValueToCppValueHelper<bool >(storage);
305  }
306 
314  void set_is_system_role(bool value) {
315  client::SetJsonValueFromCppValueHelper<bool >(
316  value, MutableStorage("isSystemRole"));
317  }
318 
324  bool has_kind() const {
325  return Storage().isMember("kind");
326  }
327 
331  void clear_kind() {
332  MutableStorage()->removeMember("kind");
333  }
334 
335 
339  const StringPiece get_kind() const {
340  const Json::Value& v = Storage("kind");
341  if (v == Json::Value::null) return StringPiece("");
342  return StringPiece(v.asCString());
343  }
344 
352  void set_kind(const StringPiece& value) {
353  *MutableStorage("kind") = value.data();
354  }
355 
361  bool has_role_description() const {
362  return Storage().isMember("roleDescription");
363  }
364 
369  MutableStorage()->removeMember("roleDescription");
370  }
371 
372 
376  const StringPiece get_role_description() const {
377  const Json::Value& v = Storage("roleDescription");
378  if (v == Json::Value::null) return StringPiece("");
379  return StringPiece(v.asCString());
380  }
381 
389  void set_role_description(const StringPiece& value) {
390  *MutableStorage("roleDescription") = value.data();
391  }
392 
398  bool has_role_id() const {
399  return Storage().isMember("roleId");
400  }
401 
405  void clear_role_id() {
406  MutableStorage()->removeMember("roleId");
407  }
408 
409 
413  int64 get_role_id() const {
414  const Json::Value& storage = Storage("roleId");
415  return client::JsonValueToCppValueHelper<int64 >(storage);
416  }
417 
425  void set_role_id(int64 value) {
426  client::SetJsonValueFromCppValueHelper<int64 >(
427  value, MutableStorage("roleId"));
428  }
429 
435  bool has_role_name() const {
436  return Storage().isMember("roleName");
437  }
438 
443  MutableStorage()->removeMember("roleName");
444  }
445 
446 
450  const StringPiece get_role_name() const {
451  const Json::Value& v = Storage("roleName");
452  if (v == Json::Value::null) return StringPiece("");
453  return StringPiece(v.asCString());
454  }
455 
463  void set_role_name(const StringPiece& value) {
464  *MutableStorage("roleName") = value.data();
465  }
466 
472  bool has_role_privileges() const {
473  return Storage().isMember("rolePrivileges");
474  }
475 
480  MutableStorage()->removeMember("rolePrivileges");
481  }
482 
483 
488  const client::JsonCppArray<RoleRolePrivileges > get_role_privileges() const {
489  const Json::Value& storage = Storage("rolePrivileges");
490  return client::JsonValueToCppValueHelper<client::JsonCppArray<RoleRolePrivileges > >(storage);
491  }
492 
501  client::JsonCppArray<RoleRolePrivileges > mutable_rolePrivileges() {
502  Json::Value* storage = MutableStorage("rolePrivileges");
503  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<RoleRolePrivileges > >(storage);
504  }
505 
506  private:
507  void operator=(const Role&);
508 }; // Role
509 } // namespace google_admin_admin_api
510 #endif // GOOGLE_ADMIN_ADMIN_API_ROLE_H_
int64 get_role_id() const
Definition: role.h:413
void clear_privilege_name()
Definition: role.h:107
void set_is_super_admin_role(bool value)
Definition: role.h:277
const StringPiece GetTypeName() const
Definition: role.h:91
void set_role_id(int64 value)
Definition: role.h:425
void set_service_id(const StringPiece &value)
Definition: role.h:166
void clear_role_privileges()
Definition: role.h:479
const client::JsonCppArray< RoleRolePrivileges > get_role_privileges() const
Definition: role.h:488
void clear_service_id()
Definition: role.h:144
Definition: alias.cc:40
const StringPiece get_privilege_name() const
Definition: role.h:115
client::JsonCppArray< RoleRolePrivileges > mutable_rolePrivileges()
Definition: role.h:501
bool has_is_system_role() const
Definition: role.h:287
void set_kind(const StringPiece &value)
Definition: role.h:352
void clear_is_super_admin_role()
Definition: role.h:257
bool has_privilege_name() const
Definition: role.h:100
void set_role_name(const StringPiece &value)
Definition: role.h:463
void clear_kind()
Definition: role.h:331
bool has_is_super_admin_role() const
Definition: role.h:250
void set_role_description(const StringPiece &value)
Definition: role.h:389
void set_etag(const StringPiece &value)
Definition: role.h:241
bool has_service_id() const
Definition: role.h:137
void clear_role_name()
Definition: role.h:442
void clear_role_description()
Definition: role.h:368
Definition: role.h:51
Definition: alias.h:38
void clear_role_id()
Definition: role.h:405
void set_is_system_role(bool value)
Definition: role.h:314
bool has_kind() const
Definition: role.h:324
const StringPiece get_etag() const
Definition: role.h:228
const StringPiece get_kind() const
Definition: role.h:339
void clear_etag()
Definition: role.h:220
bool get_is_super_admin_role() const
Definition: role.h:265
const StringPiece get_role_description() const
Definition: role.h:376
void set_privilege_name(const StringPiece &value)
Definition: role.h:128
const StringPiece get_role_name() const
Definition: role.h:450
void clear_is_system_role()
Definition: role.h:294
const StringPiece GetTypeName() const
Definition: role.h:204
bool has_etag() const
Definition: role.h:213
bool has_role_privileges() const
Definition: role.h:472
const StringPiece get_service_id() const
Definition: role.h:152
bool get_is_system_role() const
Definition: role.h:302
bool has_role_name() const
Definition: role.h:435
bool has_role_description() const
Definition: role.h:361
bool has_role_id() const
Definition: role.h:398