androidenterprise  v1
group_license.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_GROUP_LICENSE_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_GROUP_LICENSE_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 
44 using namespace googleapis;
45 
66 class GroupLicense : public client::JsonCppData {
67  public:
73  static GroupLicense* New();
74 
80  explicit GroupLicense(const Json::Value& storage);
81 
87  explicit GroupLicense(Json::Value* storage);
88 
92  virtual ~GroupLicense();
93 
99  const StringPiece GetTypeName() const {
100  return StringPiece("google_androidenterprise_api::GroupLicense");
101  }
102 
108  bool has_acquisition_kind() const {
109  return Storage().isMember("acquisitionKind");
110  }
111 
116  MutableStorage()->removeMember("acquisitionKind");
117  }
118 
119 
123  const StringPiece get_acquisition_kind() const {
124  const Json::Value& v = Storage("acquisitionKind");
125  if (v == Json::Value::null) return StringPiece("");
126  return StringPiece(v.asCString());
127  }
128 
139  void set_acquisition_kind(const StringPiece& value) {
140  *MutableStorage("acquisitionKind") = value.data();
141  }
142 
148  bool has_approval() const {
149  return Storage().isMember("approval");
150  }
151 
155  void clear_approval() {
156  MutableStorage()->removeMember("approval");
157  }
158 
159 
163  const StringPiece get_approval() const {
164  const Json::Value& v = Storage("approval");
165  if (v == Json::Value::null) return StringPiece("");
166  return StringPiece(v.asCString());
167  }
168 
180  void set_approval(const StringPiece& value) {
181  *MutableStorage("approval") = value.data();
182  }
183 
189  bool has_kind() const {
190  return Storage().isMember("kind");
191  }
192 
196  void clear_kind() {
197  MutableStorage()->removeMember("kind");
198  }
199 
200 
204  const StringPiece get_kind() const {
205  const Json::Value& v = Storage("kind");
206  if (v == Json::Value::null) return StringPiece("");
207  return StringPiece(v.asCString());
208  }
209 
214  void set_kind(const StringPiece& value) {
215  *MutableStorage("kind") = value.data();
216  }
217 
223  bool has_num_provisioned() const {
224  return Storage().isMember("numProvisioned");
225  }
226 
231  MutableStorage()->removeMember("numProvisioned");
232  }
233 
234 
238  int32 get_num_provisioned() const {
239  const Json::Value& storage = Storage("numProvisioned");
240  return client::JsonValueToCppValueHelper<int32 >(storage);
241  }
242 
251  void set_num_provisioned(int32 value) {
252  client::SetJsonValueFromCppValueHelper<int32 >(
253  value, MutableStorage("numProvisioned"));
254  }
255 
261  bool has_num_purchased() const {
262  return Storage().isMember("numPurchased");
263  }
264 
269  MutableStorage()->removeMember("numPurchased");
270  }
271 
272 
276  int32 get_num_purchased() const {
277  const Json::Value& storage = Storage("numPurchased");
278  return client::JsonValueToCppValueHelper<int32 >(storage);
279  }
280 
290  void set_num_purchased(int32 value) {
291  client::SetJsonValueFromCppValueHelper<int32 >(
292  value, MutableStorage("numPurchased"));
293  }
294 
300  bool has_permissions() const {
301  return Storage().isMember("permissions");
302  }
303 
308  MutableStorage()->removeMember("permissions");
309  }
310 
311 
315  const StringPiece get_permissions() const {
316  const Json::Value& v = Storage("permissions");
317  if (v == Json::Value::null) return StringPiece("");
318  return StringPiece(v.asCString());
319  }
320 
338  void set_permissions(const StringPiece& value) {
339  *MutableStorage("permissions") = value.data();
340  }
341 
347  bool has_product_id() const {
348  return Storage().isMember("productId");
349  }
350 
355  MutableStorage()->removeMember("productId");
356  }
357 
358 
362  const StringPiece get_product_id() const {
363  const Json::Value& v = Storage("productId");
364  if (v == Json::Value::null) return StringPiece("");
365  return StringPiece(v.asCString());
366  }
367 
376  void set_product_id(const StringPiece& value) {
377  *MutableStorage("productId") = value.data();
378  }
379 
380  private:
381  void operator=(const GroupLicense&);
382 }; // GroupLicense
383 } // namespace google_androidenterprise_api
384 #endif // GOOGLE_ANDROIDENTERPRISE_API_GROUP_LICENSE_H_
void clear_permissions()
Definition: group_license.h:307
void set_num_provisioned(int32 value)
Definition: group_license.h:251
void set_product_id(const StringPiece &value)
Definition: group_license.h:376
void set_kind(const StringPiece &value)
Definition: group_license.h:214
bool has_kind() const
Definition: group_license.h:189
bool has_product_id() const
Definition: group_license.h:347
void clear_acquisition_kind()
Definition: group_license.h:115
bool has_num_provisioned() const
Definition: group_license.h:223
void clear_num_purchased()
Definition: group_license.h:268
void clear_num_provisioned()
Definition: group_license.h:230
bool has_permissions() const
Definition: group_license.h:300
void clear_approval()
Definition: group_license.h:155
const StringPiece get_acquisition_kind() const
Definition: group_license.h:123
int32 get_num_purchased() const
Definition: group_license.h:276
void set_num_purchased(int32 value)
Definition: group_license.h:290
Definition: administrator.h:38
bool has_approval() const
Definition: group_license.h:148
Definition: administrator.cc:40
const StringPiece get_kind() const
Definition: group_license.h:204
bool has_acquisition_kind() const
Definition: group_license.h:108
void clear_kind()
Definition: group_license.h:196
void clear_product_id()
Definition: group_license.h:354
bool has_num_purchased() const
Definition: group_license.h:261
const StringPiece get_approval() const
Definition: group_license.h:163
int32 get_num_provisioned() const
Definition: group_license.h:238
const StringPiece get_permissions() const
Definition: group_license.h:315
void set_approval(const StringPiece &value)
Definition: group_license.h:180
Definition: group_license.h:66
void set_acquisition_kind(const StringPiece &value)
Definition: group_license.h:139
void set_permissions(const StringPiece &value)
Definition: group_license.h:338
const StringPiece get_product_id() const
Definition: group_license.h:362
const StringPiece GetTypeName() const
Definition: group_license.h:99