androidenterprise  v1
device.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_DEVICE_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_DEVICE_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 #include "google/androidenterprise_api/device_report.h"
39 #include "google/androidenterprise_api/policy.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
46 using namespace googleapis;
47 
54 class Device : public client::JsonCppData {
55  public:
61  static Device* New();
62 
68  explicit Device(const Json::Value& storage);
69 
75  explicit Device(Json::Value* storage);
76 
80  virtual ~Device();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_androidenterprise_api::Device");
89  }
90 
96  bool has_android_id() const {
97  return Storage().isMember("androidId");
98  }
99 
104  MutableStorage()->removeMember("androidId");
105  }
106 
107 
111  const StringPiece get_android_id() const {
112  const Json::Value& v = Storage("androidId");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
125  void set_android_id(const StringPiece& value) {
126  *MutableStorage("androidId") = value.data();
127  }
128 
134  bool has_kind() const {
135  return Storage().isMember("kind");
136  }
137 
141  void clear_kind() {
142  MutableStorage()->removeMember("kind");
143  }
144 
145 
149  const StringPiece get_kind() const {
150  const Json::Value& v = Storage("kind");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
159  void set_kind(const StringPiece& value) {
160  *MutableStorage("kind") = value.data();
161  }
162 
168  bool has_management_type() const {
169  return Storage().isMember("managementType");
170  }
171 
176  MutableStorage()->removeMember("managementType");
177  }
178 
179 
183  const StringPiece get_management_type() const {
184  const Json::Value& v = Storage("managementType");
185  if (v == Json::Value::null) return StringPiece("");
186  return StringPiece(v.asCString());
187  }
188 
208  void set_management_type(const StringPiece& value) {
209  *MutableStorage("managementType") = value.data();
210  }
211 
217  bool has_policy() const {
218  return Storage().isMember("policy");
219  }
220 
224  void clear_policy() {
225  MutableStorage()->removeMember("policy");
226  }
227 
228 
232  const Policy get_policy() const;
233 
241  Policy mutable_policy();
242 
248  bool has_report() const {
249  return Storage().isMember("report");
250  }
251 
255  void clear_report() {
256  MutableStorage()->removeMember("report");
257  }
258 
259 
263  const DeviceReport get_report() const;
264 
272  DeviceReport mutable_report();
273 
274  private:
275  void operator=(const Device&);
276 }; // Device
277 } // namespace google_androidenterprise_api
278 #endif // GOOGLE_ANDROIDENTERPRISE_API_DEVICE_H_
void clear_policy()
Definition: device.h:224
void clear_android_id()
Definition: device.h:103
void clear_kind()
Definition: device.h:141
void clear_report()
Definition: device.h:255
bool has_kind() const
Definition: device.h:134
const StringPiece get_android_id() const
Definition: device.h:111
void set_android_id(const StringPiece &value)
Definition: device.h:125
void set_management_type(const StringPiece &value)
Definition: device.h:208
const StringPiece GetTypeName() const
Definition: device.h:87
const StringPiece get_management_type() const
Definition: device.h:183
bool has_report() const
Definition: device.h:248
bool has_android_id() const
Definition: device.h:96
void clear_management_type()
Definition: device.h:175
Definition: administrator.h:38
Definition: administrator.cc:40
const StringPiece get_kind() const
Definition: device.h:149
bool has_management_type() const
Definition: device.h:168
Definition: device_report.h:53
bool has_policy() const
Definition: device.h:217
void set_kind(const StringPiece &value)
Definition: device.h:159