androidenterprise  v1
permission.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-02-11, 20:26:36 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Google Play EMM API (androidenterprise/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 218
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_ANDROIDENTERPRISE_API_PERMISSION_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_PERMISSION_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 
43 using namespace googleapis;
44 
57 class Permission : public client::JsonCppData {
58  public:
64  static Permission* New();
65 
71  explicit Permission(const Json::Value& storage);
72 
78  explicit Permission(Json::Value* storage);
79 
83  virtual ~Permission();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_androidenterprise_api::Permission");
92  }
93 
99  bool has_description() const {
100  return Storage().isMember("description");
101  }
102 
107  MutableStorage()->removeMember("description");
108  }
109 
110 
114  const StringPiece get_description() const {
115  const Json::Value& v = Storage("description");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
128  void set_description(const StringPiece& value) {
129  *MutableStorage("description") = value.data();
130  }
131 
137  bool has_kind() const {
138  return Storage().isMember("kind");
139  }
140 
144  void clear_kind() {
145  MutableStorage()->removeMember("kind");
146  }
147 
148 
152  const StringPiece get_kind() const {
153  const Json::Value& v = Storage("kind");
154  if (v == Json::Value::null) return StringPiece("");
155  return StringPiece(v.asCString());
156  }
157 
162  void set_kind(const StringPiece& value) {
163  *MutableStorage("kind") = value.data();
164  }
165 
171  bool has_name() const {
172  return Storage().isMember("name");
173  }
174 
178  void clear_name() {
179  MutableStorage()->removeMember("name");
180  }
181 
182 
186  const StringPiece get_name() const {
187  const Json::Value& v = Storage("name");
188  if (v == Json::Value::null) return StringPiece("");
189  return StringPiece(v.asCString());
190  }
191 
199  void set_name(const StringPiece& value) {
200  *MutableStorage("name") = value.data();
201  }
202 
208  bool has_permission_id() const {
209  return Storage().isMember("permissionId");
210  }
211 
216  MutableStorage()->removeMember("permissionId");
217  }
218 
219 
223  const StringPiece get_permission_id() const {
224  const Json::Value& v = Storage("permissionId");
225  if (v == Json::Value::null) return StringPiece("");
226  return StringPiece(v.asCString());
227  }
228 
236  void set_permission_id(const StringPiece& value) {
237  *MutableStorage("permissionId") = value.data();
238  }
239 
240  private:
241  void operator=(const Permission&);
242 }; // Permission
243 } // namespace google_androidenterprise_api
244 #endif // GOOGLE_ANDROIDENTERPRISE_API_PERMISSION_H_
bool has_name() const
Definition: permission.h:171
void clear_kind()
Definition: permission.h:144
void set_name(const StringPiece &value)
Definition: permission.h:199
bool has_description() const
Definition: permission.h:99
const StringPiece get_permission_id() const
Definition: permission.h:223
void set_description(const StringPiece &value)
Definition: permission.h:128
bool has_kind() const
Definition: permission.h:137
void clear_name()
Definition: permission.h:178
void set_kind(const StringPiece &value)
Definition: permission.h:162
bool has_permission_id() const
Definition: permission.h:208
const StringPiece get_kind() const
Definition: permission.h:152
void clear_permission_id()
Definition: permission.h:215
const StringPiece get_name() const
Definition: permission.h:186
Definition: administrator.h:38
Definition: administrator.cc:40
void clear_description()
Definition: permission.h:106
Definition: permission.h:57
const StringPiece get_description() const
Definition: permission.h:114
void set_permission_id(const StringPiece &value)
Definition: permission.h:236
const StringPiece GetTypeName() const
Definition: permission.h:90