OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.androidenterprise.v1; | 3 library googleapis.androidenterprise.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client androidenterprise/v1'; | 15 const core.String USER_AGENT = 'dart-api-client androidenterprise/v1'; |
16 | 16 |
17 /** Manages the deployment of apps to Android for Work users. */ | 17 /// Manages the deployment of apps to Android for Work users. |
18 class AndroidenterpriseApi { | 18 class AndroidenterpriseApi { |
19 /** Manage corporate Android devices */ | 19 /// Manage corporate Android devices |
20 static const AndroidenterpriseScope = "https://www.googleapis.com/auth/android
enterprise"; | 20 static const AndroidenterpriseScope = |
21 | 21 "https://www.googleapis.com/auth/androidenterprise"; |
22 | 22 |
23 final commons.ApiRequester _requester; | 23 final commons.ApiRequester _requester; |
24 | 24 |
25 DevicesResourceApi get devices => new DevicesResourceApi(_requester); | 25 DevicesResourceApi get devices => new DevicesResourceApi(_requester); |
26 EnterprisesResourceApi get enterprises => new EnterprisesResourceApi(_requeste
r); | 26 EnterprisesResourceApi get enterprises => |
27 EntitlementsResourceApi get entitlements => new EntitlementsResourceApi(_reque
ster); | 27 new EnterprisesResourceApi(_requester); |
28 GrouplicensesResourceApi get grouplicenses => new GrouplicensesResourceApi(_re
quester); | 28 EntitlementsResourceApi get entitlements => |
29 GrouplicenseusersResourceApi get grouplicenseusers => new GrouplicenseusersRes
ourceApi(_requester); | 29 new EntitlementsResourceApi(_requester); |
| 30 GrouplicensesResourceApi get grouplicenses => |
| 31 new GrouplicensesResourceApi(_requester); |
| 32 GrouplicenseusersResourceApi get grouplicenseusers => |
| 33 new GrouplicenseusersResourceApi(_requester); |
30 InstallsResourceApi get installs => new InstallsResourceApi(_requester); | 34 InstallsResourceApi get installs => new InstallsResourceApi(_requester); |
31 ManagedconfigurationsfordeviceResourceApi get managedconfigurationsfordevice =
> new ManagedconfigurationsfordeviceResourceApi(_requester); | 35 ManagedconfigurationsfordeviceResourceApi |
32 ManagedconfigurationsforuserResourceApi get managedconfigurationsforuser => ne
w ManagedconfigurationsforuserResourceApi(_requester); | 36 get managedconfigurationsfordevice => |
33 PermissionsResourceApi get permissions => new PermissionsResourceApi(_requeste
r); | 37 new ManagedconfigurationsfordeviceResourceApi(_requester); |
| 38 ManagedconfigurationsforuserResourceApi get managedconfigurationsforuser => |
| 39 new ManagedconfigurationsforuserResourceApi(_requester); |
| 40 PermissionsResourceApi get permissions => |
| 41 new PermissionsResourceApi(_requester); |
34 ProductsResourceApi get products => new ProductsResourceApi(_requester); | 42 ProductsResourceApi get products => new ProductsResourceApi(_requester); |
35 ServiceaccountkeysResourceApi get serviceaccountkeys => new Serviceaccountkeys
ResourceApi(_requester); | 43 ServiceaccountkeysResourceApi get serviceaccountkeys => |
36 StorelayoutclustersResourceApi get storelayoutclusters => new Storelayoutclust
ersResourceApi(_requester); | 44 new ServiceaccountkeysResourceApi(_requester); |
37 StorelayoutpagesResourceApi get storelayoutpages => new StorelayoutpagesResour
ceApi(_requester); | 45 StorelayoutclustersResourceApi get storelayoutclusters => |
| 46 new StorelayoutclustersResourceApi(_requester); |
| 47 StorelayoutpagesResourceApi get storelayoutpages => |
| 48 new StorelayoutpagesResourceApi(_requester); |
38 UsersResourceApi get users => new UsersResourceApi(_requester); | 49 UsersResourceApi get users => new UsersResourceApi(_requester); |
39 | 50 |
40 AndroidenterpriseApi(http.Client client, {core.String rootUrl: "https://www.go
ogleapis.com/", core.String servicePath: "androidenterprise/v1/"}) : | 51 AndroidenterpriseApi(http.Client client, |
41 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 52 {core.String rootUrl: "https://www.googleapis.com/", |
| 53 core.String servicePath: "androidenterprise/v1/"}) |
| 54 : _requester = |
| 55 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
42 } | 56 } |
43 | 57 |
44 | |
45 class DevicesResourceApi { | 58 class DevicesResourceApi { |
46 final commons.ApiRequester _requester; | 59 final commons.ApiRequester _requester; |
47 | 60 |
48 DevicesResourceApi(commons.ApiRequester client) : | 61 DevicesResourceApi(commons.ApiRequester client) : _requester = client; |
49 _requester = client; | |
50 | 62 |
51 /** | 63 /// Retrieves the details of a device. |
52 * Retrieves the details of a device. | 64 /// |
53 * | 65 /// Request parameters: |
54 * Request parameters: | 66 /// |
55 * | 67 /// [enterpriseId] - The ID of the enterprise. |
56 * [enterpriseId] - The ID of the enterprise. | 68 /// |
57 * | 69 /// [userId] - The ID of the user. |
58 * [userId] - The ID of the user. | 70 /// |
59 * | 71 /// [deviceId] - The ID of the device. |
60 * [deviceId] - The ID of the device. | 72 /// |
61 * | 73 /// Completes with a [Device]. |
62 * Completes with a [Device]. | 74 /// |
63 * | 75 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
64 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 76 /// an error. |
65 * error. | 77 /// |
66 * | 78 /// If the used [http.Client] completes with an error when making a REST |
67 * If the used [http.Client] completes with an error when making a REST call, | 79 /// call, this method will complete with the same error. |
68 * this method will complete with the same error. | 80 async.Future<Device> get( |
69 */ | 81 core.String enterpriseId, core.String userId, core.String deviceId) { |
70 async.Future<Device> get(core.String enterpriseId, core.String userId, core.St
ring deviceId) { | |
71 var _url = null; | 82 var _url = null; |
72 var _queryParams = new core.Map(); | 83 var _queryParams = new core.Map(); |
73 var _uploadMedia = null; | 84 var _uploadMedia = null; |
74 var _uploadOptions = null; | 85 var _uploadOptions = null; |
75 var _downloadOptions = commons.DownloadOptions.Metadata; | 86 var _downloadOptions = commons.DownloadOptions.Metadata; |
76 var _body = null; | 87 var _body = null; |
77 | 88 |
78 if (enterpriseId == null) { | 89 if (enterpriseId == null) { |
79 throw new core.ArgumentError("Parameter enterpriseId is required."); | 90 throw new core.ArgumentError("Parameter enterpriseId is required."); |
80 } | 91 } |
81 if (userId == null) { | 92 if (userId == null) { |
82 throw new core.ArgumentError("Parameter userId is required."); | 93 throw new core.ArgumentError("Parameter userId is required."); |
83 } | 94 } |
84 if (deviceId == null) { | 95 if (deviceId == null) { |
85 throw new core.ArgumentError("Parameter deviceId is required."); | 96 throw new core.ArgumentError("Parameter deviceId is required."); |
86 } | 97 } |
87 | 98 |
88 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId'); | 99 _url = 'enterprises/' + |
| 100 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 101 '/users/' + |
| 102 commons.Escaper.ecapeVariable('$userId') + |
| 103 '/devices/' + |
| 104 commons.Escaper.ecapeVariable('$deviceId'); |
89 | 105 |
90 var _response = _requester.request(_url, | 106 var _response = _requester.request(_url, "GET", |
91 "GET", | 107 body: _body, |
92 body: _body, | 108 queryParams: _queryParams, |
93 queryParams: _queryParams, | 109 uploadOptions: _uploadOptions, |
94 uploadOptions: _uploadOptions, | 110 uploadMedia: _uploadMedia, |
95 uploadMedia: _uploadMedia, | 111 downloadOptions: _downloadOptions); |
96 downloadOptions: _downloadOptions); | |
97 return _response.then((data) => new Device.fromJson(data)); | 112 return _response.then((data) => new Device.fromJson(data)); |
98 } | 113 } |
99 | 114 |
100 /** | 115 /// Retrieves whether a device's access to Google services is enabled or |
101 * Retrieves whether a device's access to Google services is enabled or | 116 /// disabled. The device state takes effect only if enforcing EMM policies on |
102 * disabled. The device state takes effect only if enforcing EMM policies on | 117 /// Android devices is enabled in the Google Admin Console. Otherwise, the |
103 * Android devices is enabled in the Google Admin Console. Otherwise, the | 118 /// device state is ignored and all devices are allowed access to Google |
104 * device state is ignored and all devices are allowed access to Google | 119 /// services. This is only supported for Google-managed users. |
105 * services. This is only supported for Google-managed users. | 120 /// |
106 * | 121 /// Request parameters: |
107 * Request parameters: | 122 /// |
108 * | 123 /// [enterpriseId] - The ID of the enterprise. |
109 * [enterpriseId] - The ID of the enterprise. | 124 /// |
110 * | 125 /// [userId] - The ID of the user. |
111 * [userId] - The ID of the user. | 126 /// |
112 * | 127 /// [deviceId] - The ID of the device. |
113 * [deviceId] - The ID of the device. | 128 /// |
114 * | 129 /// Completes with a [DeviceState]. |
115 * Completes with a [DeviceState]. | 130 /// |
116 * | 131 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
117 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 132 /// an error. |
118 * error. | 133 /// |
119 * | 134 /// If the used [http.Client] completes with an error when making a REST |
120 * If the used [http.Client] completes with an error when making a REST call, | 135 /// call, this method will complete with the same error. |
121 * this method will complete with the same error. | 136 async.Future<DeviceState> getState( |
122 */ | 137 core.String enterpriseId, core.String userId, core.String deviceId) { |
123 async.Future<DeviceState> getState(core.String enterpriseId, core.String userI
d, core.String deviceId) { | |
124 var _url = null; | 138 var _url = null; |
125 var _queryParams = new core.Map(); | 139 var _queryParams = new core.Map(); |
126 var _uploadMedia = null; | 140 var _uploadMedia = null; |
127 var _uploadOptions = null; | 141 var _uploadOptions = null; |
128 var _downloadOptions = commons.DownloadOptions.Metadata; | 142 var _downloadOptions = commons.DownloadOptions.Metadata; |
129 var _body = null; | 143 var _body = null; |
130 | 144 |
131 if (enterpriseId == null) { | 145 if (enterpriseId == null) { |
132 throw new core.ArgumentError("Parameter enterpriseId is required."); | 146 throw new core.ArgumentError("Parameter enterpriseId is required."); |
133 } | 147 } |
134 if (userId == null) { | 148 if (userId == null) { |
135 throw new core.ArgumentError("Parameter userId is required."); | 149 throw new core.ArgumentError("Parameter userId is required."); |
136 } | 150 } |
137 if (deviceId == null) { | 151 if (deviceId == null) { |
138 throw new core.ArgumentError("Parameter deviceId is required."); | 152 throw new core.ArgumentError("Parameter deviceId is required."); |
139 } | 153 } |
140 | 154 |
141 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/state'; | 155 _url = 'enterprises/' + |
| 156 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 157 '/users/' + |
| 158 commons.Escaper.ecapeVariable('$userId') + |
| 159 '/devices/' + |
| 160 commons.Escaper.ecapeVariable('$deviceId') + |
| 161 '/state'; |
142 | 162 |
143 var _response = _requester.request(_url, | 163 var _response = _requester.request(_url, "GET", |
144 "GET", | 164 body: _body, |
145 body: _body, | 165 queryParams: _queryParams, |
146 queryParams: _queryParams, | 166 uploadOptions: _uploadOptions, |
147 uploadOptions: _uploadOptions, | 167 uploadMedia: _uploadMedia, |
148 uploadMedia: _uploadMedia, | 168 downloadOptions: _downloadOptions); |
149 downloadOptions: _downloadOptions); | |
150 return _response.then((data) => new DeviceState.fromJson(data)); | 169 return _response.then((data) => new DeviceState.fromJson(data)); |
151 } | 170 } |
152 | 171 |
153 /** | 172 /// Retrieves the IDs of all of a user's devices. |
154 * Retrieves the IDs of all of a user's devices. | 173 /// |
155 * | 174 /// Request parameters: |
156 * Request parameters: | 175 /// |
157 * | 176 /// [enterpriseId] - The ID of the enterprise. |
158 * [enterpriseId] - The ID of the enterprise. | 177 /// |
159 * | 178 /// [userId] - The ID of the user. |
160 * [userId] - The ID of the user. | 179 /// |
161 * | 180 /// Completes with a [DevicesListResponse]. |
162 * Completes with a [DevicesListResponse]. | 181 /// |
163 * | 182 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
164 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 183 /// an error. |
165 * error. | 184 /// |
166 * | 185 /// If the used [http.Client] completes with an error when making a REST |
167 * If the used [http.Client] completes with an error when making a REST call, | 186 /// call, this method will complete with the same error. |
168 * this method will complete with the same error. | 187 async.Future<DevicesListResponse> list( |
169 */ | 188 core.String enterpriseId, core.String userId) { |
170 async.Future<DevicesListResponse> list(core.String enterpriseId, core.String u
serId) { | |
171 var _url = null; | 189 var _url = null; |
172 var _queryParams = new core.Map(); | 190 var _queryParams = new core.Map(); |
173 var _uploadMedia = null; | 191 var _uploadMedia = null; |
174 var _uploadOptions = null; | 192 var _uploadOptions = null; |
175 var _downloadOptions = commons.DownloadOptions.Metadata; | 193 var _downloadOptions = commons.DownloadOptions.Metadata; |
176 var _body = null; | 194 var _body = null; |
177 | 195 |
178 if (enterpriseId == null) { | 196 if (enterpriseId == null) { |
179 throw new core.ArgumentError("Parameter enterpriseId is required."); | 197 throw new core.ArgumentError("Parameter enterpriseId is required."); |
180 } | 198 } |
181 if (userId == null) { | 199 if (userId == null) { |
182 throw new core.ArgumentError("Parameter userId is required."); | 200 throw new core.ArgumentError("Parameter userId is required."); |
183 } | 201 } |
184 | 202 |
185 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices'; | 203 _url = 'enterprises/' + |
| 204 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 205 '/users/' + |
| 206 commons.Escaper.ecapeVariable('$userId') + |
| 207 '/devices'; |
186 | 208 |
187 var _response = _requester.request(_url, | 209 var _response = _requester.request(_url, "GET", |
188 "GET", | 210 body: _body, |
189 body: _body, | 211 queryParams: _queryParams, |
190 queryParams: _queryParams, | 212 uploadOptions: _uploadOptions, |
191 uploadOptions: _uploadOptions, | 213 uploadMedia: _uploadMedia, |
192 uploadMedia: _uploadMedia, | 214 downloadOptions: _downloadOptions); |
193 downloadOptions: _downloadOptions); | |
194 return _response.then((data) => new DevicesListResponse.fromJson(data)); | 215 return _response.then((data) => new DevicesListResponse.fromJson(data)); |
195 } | 216 } |
196 | 217 |
197 /** | 218 /// Sets whether a device's access to Google services is enabled or disabled. |
198 * Sets whether a device's access to Google services is enabled or disabled. | 219 /// The device state takes effect only if enforcing EMM policies on Android |
199 * The device state takes effect only if enforcing EMM policies on Android | 220 /// devices is enabled in the Google Admin Console. Otherwise, the device |
200 * devices is enabled in the Google Admin Console. Otherwise, the device state | 221 /// state is ignored and all devices are allowed access to Google services. |
201 * is ignored and all devices are allowed access to Google services. This is | 222 /// This is only supported for Google-managed users. |
202 * only supported for Google-managed users. | 223 /// |
203 * | 224 /// [request] - The metadata request object. |
204 * [request] - The metadata request object. | 225 /// |
205 * | 226 /// Request parameters: |
206 * Request parameters: | 227 /// |
207 * | 228 /// [enterpriseId] - The ID of the enterprise. |
208 * [enterpriseId] - The ID of the enterprise. | 229 /// |
209 * | 230 /// [userId] - The ID of the user. |
210 * [userId] - The ID of the user. | 231 /// |
211 * | 232 /// [deviceId] - The ID of the device. |
212 * [deviceId] - The ID of the device. | 233 /// |
213 * | 234 /// Completes with a [DeviceState]. |
214 * Completes with a [DeviceState]. | 235 /// |
215 * | 236 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
216 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 237 /// an error. |
217 * error. | 238 /// |
218 * | 239 /// If the used [http.Client] completes with an error when making a REST |
219 * If the used [http.Client] completes with an error when making a REST call, | 240 /// call, this method will complete with the same error. |
220 * this method will complete with the same error. | 241 async.Future<DeviceState> setState(DeviceState request, |
221 */ | 242 core.String enterpriseId, core.String userId, core.String deviceId) { |
222 async.Future<DeviceState> setState(DeviceState request, core.String enterprise
Id, core.String userId, core.String deviceId) { | |
223 var _url = null; | 243 var _url = null; |
224 var _queryParams = new core.Map(); | 244 var _queryParams = new core.Map(); |
225 var _uploadMedia = null; | 245 var _uploadMedia = null; |
226 var _uploadOptions = null; | 246 var _uploadOptions = null; |
227 var _downloadOptions = commons.DownloadOptions.Metadata; | 247 var _downloadOptions = commons.DownloadOptions.Metadata; |
228 var _body = null; | 248 var _body = null; |
229 | 249 |
230 if (request != null) { | 250 if (request != null) { |
231 _body = convert.JSON.encode((request).toJson()); | 251 _body = convert.JSON.encode((request).toJson()); |
232 } | 252 } |
233 if (enterpriseId == null) { | 253 if (enterpriseId == null) { |
234 throw new core.ArgumentError("Parameter enterpriseId is required."); | 254 throw new core.ArgumentError("Parameter enterpriseId is required."); |
235 } | 255 } |
236 if (userId == null) { | 256 if (userId == null) { |
237 throw new core.ArgumentError("Parameter userId is required."); | 257 throw new core.ArgumentError("Parameter userId is required."); |
238 } | 258 } |
239 if (deviceId == null) { | 259 if (deviceId == null) { |
240 throw new core.ArgumentError("Parameter deviceId is required."); | 260 throw new core.ArgumentError("Parameter deviceId is required."); |
241 } | 261 } |
242 | 262 |
243 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/state'; | 263 _url = 'enterprises/' + |
| 264 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 265 '/users/' + |
| 266 commons.Escaper.ecapeVariable('$userId') + |
| 267 '/devices/' + |
| 268 commons.Escaper.ecapeVariable('$deviceId') + |
| 269 '/state'; |
244 | 270 |
245 var _response = _requester.request(_url, | 271 var _response = _requester.request(_url, "PUT", |
246 "PUT", | 272 body: _body, |
247 body: _body, | 273 queryParams: _queryParams, |
248 queryParams: _queryParams, | 274 uploadOptions: _uploadOptions, |
249 uploadOptions: _uploadOptions, | 275 uploadMedia: _uploadMedia, |
250 uploadMedia: _uploadMedia, | 276 downloadOptions: _downloadOptions); |
251 downloadOptions: _downloadOptions); | |
252 return _response.then((data) => new DeviceState.fromJson(data)); | 277 return _response.then((data) => new DeviceState.fromJson(data)); |
253 } | 278 } |
254 | |
255 } | 279 } |
256 | 280 |
257 | |
258 class EnterprisesResourceApi { | 281 class EnterprisesResourceApi { |
259 final commons.ApiRequester _requester; | 282 final commons.ApiRequester _requester; |
260 | 283 |
261 EnterprisesResourceApi(commons.ApiRequester client) : | 284 EnterprisesResourceApi(commons.ApiRequester client) : _requester = client; |
262 _requester = client; | |
263 | 285 |
264 /** | 286 /// Acknowledges notifications that were received from |
265 * Acknowledges notifications that were received from | 287 /// Enterprises.PullNotificationSet to prevent subsequent calls from |
266 * Enterprises.PullNotificationSet to prevent subsequent calls from returning | 288 /// returning the same notifications. |
267 * the same notifications. | 289 /// |
268 * | 290 /// Request parameters: |
269 * Request parameters: | 291 /// |
270 * | 292 /// [notificationSetId] - The notification set ID as returned by |
271 * [notificationSetId] - The notification set ID as returned by | 293 /// Enterprises.PullNotificationSet. This must be provided. |
272 * Enterprises.PullNotificationSet. This must be provided. | 294 /// |
273 * | 295 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
274 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 296 /// an error. |
275 * error. | 297 /// |
276 * | 298 /// If the used [http.Client] completes with an error when making a REST |
277 * If the used [http.Client] completes with an error when making a REST call, | 299 /// call, this method will complete with the same error. |
278 * this method will complete with the same error. | |
279 */ | |
280 async.Future acknowledgeNotificationSet({core.String notificationSetId}) { | 300 async.Future acknowledgeNotificationSet({core.String notificationSetId}) { |
281 var _url = null; | 301 var _url = null; |
282 var _queryParams = new core.Map(); | 302 var _queryParams = new core.Map(); |
283 var _uploadMedia = null; | 303 var _uploadMedia = null; |
284 var _uploadOptions = null; | 304 var _uploadOptions = null; |
285 var _downloadOptions = commons.DownloadOptions.Metadata; | 305 var _downloadOptions = commons.DownloadOptions.Metadata; |
286 var _body = null; | 306 var _body = null; |
287 | 307 |
288 if (notificationSetId != null) { | 308 if (notificationSetId != null) { |
289 _queryParams["notificationSetId"] = [notificationSetId]; | 309 _queryParams["notificationSetId"] = [notificationSetId]; |
290 } | 310 } |
291 | 311 |
292 _downloadOptions = null; | 312 _downloadOptions = null; |
293 | 313 |
294 _url = 'enterprises/acknowledgeNotificationSet'; | 314 _url = 'enterprises/acknowledgeNotificationSet'; |
295 | 315 |
296 var _response = _requester.request(_url, | 316 var _response = _requester.request(_url, "POST", |
297 "POST", | 317 body: _body, |
298 body: _body, | 318 queryParams: _queryParams, |
299 queryParams: _queryParams, | 319 uploadOptions: _uploadOptions, |
300 uploadOptions: _uploadOptions, | 320 uploadMedia: _uploadMedia, |
301 uploadMedia: _uploadMedia, | 321 downloadOptions: _downloadOptions); |
302 downloadOptions: _downloadOptions); | |
303 return _response.then((data) => null); | 322 return _response.then((data) => null); |
304 } | 323 } |
305 | 324 |
306 /** | 325 /// Completes the signup flow, by specifying the Completion token and |
307 * Completes the signup flow, by specifying the Completion token and | 326 /// Enterprise token. This request must not be called multiple times for a |
308 * Enterprise token. This request must not be called multiple times for a | 327 /// given Enterprise Token. |
309 * given Enterprise Token. | 328 /// |
310 * | 329 /// Request parameters: |
311 * Request parameters: | 330 /// |
312 * | 331 /// [completionToken] - The Completion token initially returned by |
313 * [completionToken] - The Completion token initially returned by | 332 /// GenerateSignupUrl. |
314 * GenerateSignupUrl. | 333 /// |
315 * | 334 /// [enterpriseToken] - The Enterprise token appended to the Callback URL. |
316 * [enterpriseToken] - The Enterprise token appended to the Callback URL. | 335 /// |
317 * | 336 /// Completes with a [Enterprise]. |
318 * Completes with a [Enterprise]. | 337 /// |
319 * | 338 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
320 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 339 /// an error. |
321 * error. | 340 /// |
322 * | 341 /// If the used [http.Client] completes with an error when making a REST |
323 * If the used [http.Client] completes with an error when making a REST call, | 342 /// call, this method will complete with the same error. |
324 * this method will complete with the same error. | 343 async.Future<Enterprise> completeSignup( |
325 */ | 344 {core.String completionToken, core.String enterpriseToken}) { |
326 async.Future<Enterprise> completeSignup({core.String completionToken, core.Str
ing enterpriseToken}) { | |
327 var _url = null; | 345 var _url = null; |
328 var _queryParams = new core.Map(); | 346 var _queryParams = new core.Map(); |
329 var _uploadMedia = null; | 347 var _uploadMedia = null; |
330 var _uploadOptions = null; | 348 var _uploadOptions = null; |
331 var _downloadOptions = commons.DownloadOptions.Metadata; | 349 var _downloadOptions = commons.DownloadOptions.Metadata; |
332 var _body = null; | 350 var _body = null; |
333 | 351 |
334 if (completionToken != null) { | 352 if (completionToken != null) { |
335 _queryParams["completionToken"] = [completionToken]; | 353 _queryParams["completionToken"] = [completionToken]; |
336 } | 354 } |
337 if (enterpriseToken != null) { | 355 if (enterpriseToken != null) { |
338 _queryParams["enterpriseToken"] = [enterpriseToken]; | 356 _queryParams["enterpriseToken"] = [enterpriseToken]; |
339 } | 357 } |
340 | 358 |
341 _url = 'enterprises/completeSignup'; | 359 _url = 'enterprises/completeSignup'; |
342 | 360 |
343 var _response = _requester.request(_url, | 361 var _response = _requester.request(_url, "POST", |
344 "POST", | 362 body: _body, |
345 body: _body, | 363 queryParams: _queryParams, |
346 queryParams: _queryParams, | 364 uploadOptions: _uploadOptions, |
347 uploadOptions: _uploadOptions, | 365 uploadMedia: _uploadMedia, |
348 uploadMedia: _uploadMedia, | 366 downloadOptions: _downloadOptions); |
349 downloadOptions: _downloadOptions); | |
350 return _response.then((data) => new Enterprise.fromJson(data)); | 367 return _response.then((data) => new Enterprise.fromJson(data)); |
351 } | 368 } |
352 | 369 |
353 /** | 370 /// Returns a unique token to access an embeddable UI. To generate a web UI, |
354 * Returns a unique token to access an embeddable UI. To generate a web UI, | 371 /// pass the generated token into the managed Google Play javascript API. |
355 * pass the generated token into the managed Google Play javascript API. Each | 372 /// Each token may only be used to start one UI session. See the javascript |
356 * token may only be used to start one UI session. See the javascript API | 373 /// API documentation for further information. |
357 * documentation for further information. | 374 /// |
358 * | 375 /// [request] - The metadata request object. |
359 * [request] - The metadata request object. | 376 /// |
360 * | 377 /// Request parameters: |
361 * Request parameters: | 378 /// |
362 * | 379 /// [enterpriseId] - The ID of the enterprise. |
363 * [enterpriseId] - The ID of the enterprise. | 380 /// |
364 * | 381 /// Completes with a [AdministratorWebToken]. |
365 * Completes with a [AdministratorWebToken]. | 382 /// |
366 * | 383 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
367 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 384 /// an error. |
368 * error. | 385 /// |
369 * | 386 /// If the used [http.Client] completes with an error when making a REST |
370 * If the used [http.Client] completes with an error when making a REST call, | 387 /// call, this method will complete with the same error. |
371 * this method will complete with the same error. | 388 async.Future<AdministratorWebToken> createWebToken( |
372 */ | 389 AdministratorWebTokenSpec request, core.String enterpriseId) { |
373 async.Future<AdministratorWebToken> createWebToken(AdministratorWebTokenSpec r
equest, core.String enterpriseId) { | |
374 var _url = null; | 390 var _url = null; |
375 var _queryParams = new core.Map(); | 391 var _queryParams = new core.Map(); |
376 var _uploadMedia = null; | 392 var _uploadMedia = null; |
377 var _uploadOptions = null; | 393 var _uploadOptions = null; |
378 var _downloadOptions = commons.DownloadOptions.Metadata; | 394 var _downloadOptions = commons.DownloadOptions.Metadata; |
379 var _body = null; | 395 var _body = null; |
380 | 396 |
381 if (request != null) { | 397 if (request != null) { |
382 _body = convert.JSON.encode((request).toJson()); | 398 _body = convert.JSON.encode((request).toJson()); |
383 } | 399 } |
384 if (enterpriseId == null) { | 400 if (enterpriseId == null) { |
385 throw new core.ArgumentError("Parameter enterpriseId is required."); | 401 throw new core.ArgumentError("Parameter enterpriseId is required."); |
386 } | 402 } |
387 | 403 |
388 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/c
reateWebToken'; | 404 _url = 'enterprises/' + |
| 405 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 406 '/createWebToken'; |
389 | 407 |
390 var _response = _requester.request(_url, | 408 var _response = _requester.request(_url, "POST", |
391 "POST", | 409 body: _body, |
392 body: _body, | 410 queryParams: _queryParams, |
393 queryParams: _queryParams, | 411 uploadOptions: _uploadOptions, |
394 uploadOptions: _uploadOptions, | 412 uploadMedia: _uploadMedia, |
395 uploadMedia: _uploadMedia, | 413 downloadOptions: _downloadOptions); |
396 downloadOptions: _downloadOptions); | |
397 return _response.then((data) => new AdministratorWebToken.fromJson(data)); | 414 return _response.then((data) => new AdministratorWebToken.fromJson(data)); |
398 } | 415 } |
399 | 416 |
400 /** | 417 /// Deletes the binding between the EMM and enterprise. This is now |
401 * Deletes the binding between the EMM and enterprise. This is now deprecated. | 418 /// deprecated. Use this method only to unenroll customers that were |
402 * Use this method only to unenroll customers that were previously enrolled | 419 /// previously enrolled with the insert call, then enroll them again with the |
403 * with the insert call, then enroll them again with the enroll call. | 420 /// enroll call. |
404 * | 421 /// |
405 * Request parameters: | 422 /// Request parameters: |
406 * | 423 /// |
407 * [enterpriseId] - The ID of the enterprise. | 424 /// [enterpriseId] - The ID of the enterprise. |
408 * | 425 /// |
409 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 426 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
410 * error. | 427 /// an error. |
411 * | 428 /// |
412 * If the used [http.Client] completes with an error when making a REST call, | 429 /// If the used [http.Client] completes with an error when making a REST |
413 * this method will complete with the same error. | 430 /// call, this method will complete with the same error. |
414 */ | |
415 async.Future delete(core.String enterpriseId) { | 431 async.Future delete(core.String enterpriseId) { |
416 var _url = null; | 432 var _url = null; |
417 var _queryParams = new core.Map(); | 433 var _queryParams = new core.Map(); |
418 var _uploadMedia = null; | 434 var _uploadMedia = null; |
419 var _uploadOptions = null; | 435 var _uploadOptions = null; |
420 var _downloadOptions = commons.DownloadOptions.Metadata; | 436 var _downloadOptions = commons.DownloadOptions.Metadata; |
421 var _body = null; | 437 var _body = null; |
422 | 438 |
423 if (enterpriseId == null) { | 439 if (enterpriseId == null) { |
424 throw new core.ArgumentError("Parameter enterpriseId is required."); | 440 throw new core.ArgumentError("Parameter enterpriseId is required."); |
425 } | 441 } |
426 | 442 |
427 _downloadOptions = null; | 443 _downloadOptions = null; |
428 | 444 |
429 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId'); | 445 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId'); |
430 | 446 |
431 var _response = _requester.request(_url, | 447 var _response = _requester.request(_url, "DELETE", |
432 "DELETE", | 448 body: _body, |
433 body: _body, | 449 queryParams: _queryParams, |
434 queryParams: _queryParams, | 450 uploadOptions: _uploadOptions, |
435 uploadOptions: _uploadOptions, | 451 uploadMedia: _uploadMedia, |
436 uploadMedia: _uploadMedia, | 452 downloadOptions: _downloadOptions); |
437 downloadOptions: _downloadOptions); | |
438 return _response.then((data) => null); | 453 return _response.then((data) => null); |
439 } | 454 } |
440 | 455 |
441 /** | 456 /// Enrolls an enterprise with the calling EMM. |
442 * Enrolls an enterprise with the calling EMM. | 457 /// |
443 * | 458 /// [request] - The metadata request object. |
444 * [request] - The metadata request object. | 459 /// |
445 * | 460 /// Request parameters: |
446 * Request parameters: | 461 /// |
447 * | 462 /// [token] - The token provided by the enterprise to register the EMM. |
448 * [token] - The token provided by the enterprise to register the EMM. | 463 /// |
449 * | 464 /// Completes with a [Enterprise]. |
450 * Completes with a [Enterprise]. | 465 /// |
451 * | 466 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
452 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 467 /// an error. |
453 * error. | 468 /// |
454 * | 469 /// If the used [http.Client] completes with an error when making a REST |
455 * If the used [http.Client] completes with an error when making a REST call, | 470 /// call, this method will complete with the same error. |
456 * this method will complete with the same error. | |
457 */ | |
458 async.Future<Enterprise> enroll(Enterprise request, core.String token) { | 471 async.Future<Enterprise> enroll(Enterprise request, core.String token) { |
459 var _url = null; | 472 var _url = null; |
460 var _queryParams = new core.Map(); | 473 var _queryParams = new core.Map(); |
461 var _uploadMedia = null; | 474 var _uploadMedia = null; |
462 var _uploadOptions = null; | 475 var _uploadOptions = null; |
463 var _downloadOptions = commons.DownloadOptions.Metadata; | 476 var _downloadOptions = commons.DownloadOptions.Metadata; |
464 var _body = null; | 477 var _body = null; |
465 | 478 |
466 if (request != null) { | 479 if (request != null) { |
467 _body = convert.JSON.encode((request).toJson()); | 480 _body = convert.JSON.encode((request).toJson()); |
468 } | 481 } |
469 if (token == null) { | 482 if (token == null) { |
470 throw new core.ArgumentError("Parameter token is required."); | 483 throw new core.ArgumentError("Parameter token is required."); |
471 } | 484 } |
472 _queryParams["token"] = [token]; | 485 _queryParams["token"] = [token]; |
473 | 486 |
474 _url = 'enterprises/enroll'; | 487 _url = 'enterprises/enroll'; |
475 | 488 |
476 var _response = _requester.request(_url, | 489 var _response = _requester.request(_url, "POST", |
477 "POST", | 490 body: _body, |
478 body: _body, | 491 queryParams: _queryParams, |
479 queryParams: _queryParams, | 492 uploadOptions: _uploadOptions, |
480 uploadOptions: _uploadOptions, | 493 uploadMedia: _uploadMedia, |
481 uploadMedia: _uploadMedia, | 494 downloadOptions: _downloadOptions); |
482 downloadOptions: _downloadOptions); | |
483 return _response.then((data) => new Enterprise.fromJson(data)); | 495 return _response.then((data) => new Enterprise.fromJson(data)); |
484 } | 496 } |
485 | 497 |
486 /** | 498 /// Generates a sign-up URL. |
487 * Generates a sign-up URL. | 499 /// |
488 * | 500 /// Request parameters: |
489 * Request parameters: | 501 /// |
490 * | 502 /// [callbackUrl] - The callback URL to which the Admin will be redirected |
491 * [callbackUrl] - The callback URL to which the Admin will be redirected | 503 /// after successfully creating an enterprise. Before redirecting there the |
492 * after successfully creating an enterprise. Before redirecting there the | 504 /// system will add a single query parameter to this URL named |
493 * system will add a single query parameter to this URL named | 505 /// "enterpriseToken" which will contain an opaque token to be used for the |
494 * "enterpriseToken" which will contain an opaque token to be used for the | 506 /// CompleteSignup request. |
495 * CompleteSignup request. | 507 /// Beware that this means that the URL will be parsed, the parameter added |
496 * Beware that this means that the URL will be parsed, the parameter added and | 508 /// and then a new URL formatted, i.e. there may be some minor formatting |
497 * then a new URL formatted, i.e. there may be some minor formatting changes | 509 /// changes and, more importantly, the URL must be well-formed so that it can |
498 * and, more importantly, the URL must be well-formed so that it can be | 510 /// be parsed. |
499 * parsed. | 511 /// |
500 * | 512 /// Completes with a [SignupInfo]. |
501 * Completes with a [SignupInfo]. | 513 /// |
502 * | 514 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
503 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 515 /// an error. |
504 * error. | 516 /// |
505 * | 517 /// If the used [http.Client] completes with an error when making a REST |
506 * If the used [http.Client] completes with an error when making a REST call, | 518 /// call, this method will complete with the same error. |
507 * this method will complete with the same error. | |
508 */ | |
509 async.Future<SignupInfo> generateSignupUrl({core.String callbackUrl}) { | 519 async.Future<SignupInfo> generateSignupUrl({core.String callbackUrl}) { |
510 var _url = null; | 520 var _url = null; |
511 var _queryParams = new core.Map(); | 521 var _queryParams = new core.Map(); |
512 var _uploadMedia = null; | 522 var _uploadMedia = null; |
513 var _uploadOptions = null; | 523 var _uploadOptions = null; |
514 var _downloadOptions = commons.DownloadOptions.Metadata; | 524 var _downloadOptions = commons.DownloadOptions.Metadata; |
515 var _body = null; | 525 var _body = null; |
516 | 526 |
517 if (callbackUrl != null) { | 527 if (callbackUrl != null) { |
518 _queryParams["callbackUrl"] = [callbackUrl]; | 528 _queryParams["callbackUrl"] = [callbackUrl]; |
519 } | 529 } |
520 | 530 |
521 _url = 'enterprises/signupUrl'; | 531 _url = 'enterprises/signupUrl'; |
522 | 532 |
523 var _response = _requester.request(_url, | 533 var _response = _requester.request(_url, "POST", |
524 "POST", | 534 body: _body, |
525 body: _body, | 535 queryParams: _queryParams, |
526 queryParams: _queryParams, | 536 uploadOptions: _uploadOptions, |
527 uploadOptions: _uploadOptions, | 537 uploadMedia: _uploadMedia, |
528 uploadMedia: _uploadMedia, | 538 downloadOptions: _downloadOptions); |
529 downloadOptions: _downloadOptions); | |
530 return _response.then((data) => new SignupInfo.fromJson(data)); | 539 return _response.then((data) => new SignupInfo.fromJson(data)); |
531 } | 540 } |
532 | 541 |
533 /** | 542 /// Retrieves the name and domain of an enterprise. |
534 * Retrieves the name and domain of an enterprise. | 543 /// |
535 * | 544 /// Request parameters: |
536 * Request parameters: | 545 /// |
537 * | 546 /// [enterpriseId] - The ID of the enterprise. |
538 * [enterpriseId] - The ID of the enterprise. | 547 /// |
539 * | 548 /// Completes with a [Enterprise]. |
540 * Completes with a [Enterprise]. | 549 /// |
541 * | 550 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
542 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 551 /// an error. |
543 * error. | 552 /// |
544 * | 553 /// If the used [http.Client] completes with an error when making a REST |
545 * If the used [http.Client] completes with an error when making a REST call, | 554 /// call, this method will complete with the same error. |
546 * this method will complete with the same error. | |
547 */ | |
548 async.Future<Enterprise> get(core.String enterpriseId) { | 555 async.Future<Enterprise> get(core.String enterpriseId) { |
549 var _url = null; | 556 var _url = null; |
550 var _queryParams = new core.Map(); | 557 var _queryParams = new core.Map(); |
551 var _uploadMedia = null; | 558 var _uploadMedia = null; |
552 var _uploadOptions = null; | 559 var _uploadOptions = null; |
553 var _downloadOptions = commons.DownloadOptions.Metadata; | 560 var _downloadOptions = commons.DownloadOptions.Metadata; |
554 var _body = null; | 561 var _body = null; |
555 | 562 |
556 if (enterpriseId == null) { | 563 if (enterpriseId == null) { |
557 throw new core.ArgumentError("Parameter enterpriseId is required."); | 564 throw new core.ArgumentError("Parameter enterpriseId is required."); |
558 } | 565 } |
559 | 566 |
560 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId'); | 567 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId'); |
561 | 568 |
562 var _response = _requester.request(_url, | 569 var _response = _requester.request(_url, "GET", |
563 "GET", | 570 body: _body, |
564 body: _body, | 571 queryParams: _queryParams, |
565 queryParams: _queryParams, | 572 uploadOptions: _uploadOptions, |
566 uploadOptions: _uploadOptions, | 573 uploadMedia: _uploadMedia, |
567 uploadMedia: _uploadMedia, | 574 downloadOptions: _downloadOptions); |
568 downloadOptions: _downloadOptions); | |
569 return _response.then((data) => new Enterprise.fromJson(data)); | 575 return _response.then((data) => new Enterprise.fromJson(data)); |
570 } | 576 } |
571 | 577 |
572 /** | 578 /// Returns the Android Device Policy config resource. |
573 * Returns the Android Device Policy config resource. | 579 /// |
574 * | 580 /// Request parameters: |
575 * Request parameters: | 581 /// |
576 * | 582 /// [enterpriseId] - The ID of the enterprise. |
577 * [enterpriseId] - The ID of the enterprise. | 583 /// |
578 * | 584 /// Completes with a [AndroidDevicePolicyConfig]. |
579 * Completes with a [AndroidDevicePolicyConfig]. | 585 /// |
580 * | 586 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
581 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 587 /// an error. |
582 * error. | 588 /// |
583 * | 589 /// If the used [http.Client] completes with an error when making a REST |
584 * If the used [http.Client] completes with an error when making a REST call, | 590 /// call, this method will complete with the same error. |
585 * this method will complete with the same error. | 591 async.Future<AndroidDevicePolicyConfig> getAndroidDevicePolicyConfig( |
586 */ | 592 core.String enterpriseId) { |
587 async.Future<AndroidDevicePolicyConfig> getAndroidDevicePolicyConfig(core.Stri
ng enterpriseId) { | |
588 var _url = null; | 593 var _url = null; |
589 var _queryParams = new core.Map(); | 594 var _queryParams = new core.Map(); |
590 var _uploadMedia = null; | 595 var _uploadMedia = null; |
591 var _uploadOptions = null; | 596 var _uploadOptions = null; |
592 var _downloadOptions = commons.DownloadOptions.Metadata; | 597 var _downloadOptions = commons.DownloadOptions.Metadata; |
593 var _body = null; | 598 var _body = null; |
594 | 599 |
595 if (enterpriseId == null) { | 600 if (enterpriseId == null) { |
596 throw new core.ArgumentError("Parameter enterpriseId is required."); | 601 throw new core.ArgumentError("Parameter enterpriseId is required."); |
597 } | 602 } |
598 | 603 |
599 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/a
ndroidDevicePolicyConfig'; | 604 _url = 'enterprises/' + |
| 605 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 606 '/androidDevicePolicyConfig'; |
600 | 607 |
601 var _response = _requester.request(_url, | 608 var _response = _requester.request(_url, "GET", |
602 "GET", | 609 body: _body, |
603 body: _body, | 610 queryParams: _queryParams, |
604 queryParams: _queryParams, | 611 uploadOptions: _uploadOptions, |
605 uploadOptions: _uploadOptions, | 612 uploadMedia: _uploadMedia, |
606 uploadMedia: _uploadMedia, | 613 downloadOptions: _downloadOptions); |
607 downloadOptions: _downloadOptions); | 614 return _response |
608 return _response.then((data) => new AndroidDevicePolicyConfig.fromJson(data)
); | 615 .then((data) => new AndroidDevicePolicyConfig.fromJson(data)); |
609 } | 616 } |
610 | 617 |
611 /** | 618 /// Returns a service account and credentials. The service account can be |
612 * Returns a service account and credentials. The service account can be bound | 619 /// bound to the enterprise by calling setAccount. The service account is |
613 * to the enterprise by calling setAccount. The service account is unique to | 620 /// unique to this enterprise and EMM, and will be deleted if the enterprise |
614 * this enterprise and EMM, and will be deleted if the enterprise is unbound. | 621 /// is unbound. The credentials contain private key data and are not stored |
615 * The credentials contain private key data and are not stored server-side. | 622 /// server-side. |
616 * | 623 /// |
617 * This method can only be called after calling Enterprises.Enroll or | 624 /// This method can only be called after calling Enterprises.Enroll or |
618 * Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other | 625 /// Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other |
619 * times it will return an error. | 626 /// times it will return an error. |
620 * | 627 /// |
621 * Subsequent calls after the first will generate a new, unique set of | 628 /// Subsequent calls after the first will generate a new, unique set of |
622 * credentials, and invalidate the previously generated credentials. | 629 /// credentials, and invalidate the previously generated credentials. |
623 * | 630 /// |
624 * Once the service account is bound to the enterprise, it can be managed | 631 /// Once the service account is bound to the enterprise, it can be managed |
625 * using the serviceAccountKeys resource. | 632 /// using the serviceAccountKeys resource. |
626 * | 633 /// |
627 * Request parameters: | 634 /// Request parameters: |
628 * | 635 /// |
629 * [enterpriseId] - The ID of the enterprise. | 636 /// [enterpriseId] - The ID of the enterprise. |
630 * | 637 /// |
631 * [keyType] - The type of credential to return with the service account. | 638 /// [keyType] - The type of credential to return with the service account. |
632 * Required. | 639 /// Required. |
633 * Possible string values are: | 640 /// Possible string values are: |
634 * - "googleCredentials" | 641 /// - "googleCredentials" |
635 * - "pkcs12" | 642 /// - "pkcs12" |
636 * | 643 /// |
637 * Completes with a [ServiceAccount]. | 644 /// Completes with a [ServiceAccount]. |
638 * | 645 /// |
639 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 646 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
640 * error. | 647 /// an error. |
641 * | 648 /// |
642 * If the used [http.Client] completes with an error when making a REST call, | 649 /// If the used [http.Client] completes with an error when making a REST |
643 * this method will complete with the same error. | 650 /// call, this method will complete with the same error. |
644 */ | 651 async.Future<ServiceAccount> getServiceAccount(core.String enterpriseId, |
645 async.Future<ServiceAccount> getServiceAccount(core.String enterpriseId, {core
.String keyType}) { | 652 {core.String keyType}) { |
646 var _url = null; | 653 var _url = null; |
647 var _queryParams = new core.Map(); | 654 var _queryParams = new core.Map(); |
648 var _uploadMedia = null; | 655 var _uploadMedia = null; |
649 var _uploadOptions = null; | 656 var _uploadOptions = null; |
650 var _downloadOptions = commons.DownloadOptions.Metadata; | 657 var _downloadOptions = commons.DownloadOptions.Metadata; |
651 var _body = null; | 658 var _body = null; |
652 | 659 |
653 if (enterpriseId == null) { | 660 if (enterpriseId == null) { |
654 throw new core.ArgumentError("Parameter enterpriseId is required."); | 661 throw new core.ArgumentError("Parameter enterpriseId is required."); |
655 } | 662 } |
656 if (keyType != null) { | 663 if (keyType != null) { |
657 _queryParams["keyType"] = [keyType]; | 664 _queryParams["keyType"] = [keyType]; |
658 } | 665 } |
659 | 666 |
660 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
erviceAccount'; | 667 _url = 'enterprises/' + |
| 668 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 669 '/serviceAccount'; |
661 | 670 |
662 var _response = _requester.request(_url, | 671 var _response = _requester.request(_url, "GET", |
663 "GET", | 672 body: _body, |
664 body: _body, | 673 queryParams: _queryParams, |
665 queryParams: _queryParams, | 674 uploadOptions: _uploadOptions, |
666 uploadOptions: _uploadOptions, | 675 uploadMedia: _uploadMedia, |
667 uploadMedia: _uploadMedia, | 676 downloadOptions: _downloadOptions); |
668 downloadOptions: _downloadOptions); | |
669 return _response.then((data) => new ServiceAccount.fromJson(data)); | 677 return _response.then((data) => new ServiceAccount.fromJson(data)); |
670 } | 678 } |
671 | 679 |
672 /** | 680 /// Returns the store layout for the enterprise. If the store layout has not |
673 * Returns the store layout for the enterprise. If the store layout has not | 681 /// been set, returns "basic" as the store layout type and no homepage. |
674 * been set, returns "basic" as the store layout type and no homepage. | 682 /// |
675 * | 683 /// Request parameters: |
676 * Request parameters: | 684 /// |
677 * | 685 /// [enterpriseId] - The ID of the enterprise. |
678 * [enterpriseId] - The ID of the enterprise. | 686 /// |
679 * | 687 /// Completes with a [StoreLayout]. |
680 * Completes with a [StoreLayout]. | 688 /// |
681 * | 689 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
682 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 690 /// an error. |
683 * error. | 691 /// |
684 * | 692 /// If the used [http.Client] completes with an error when making a REST |
685 * If the used [http.Client] completes with an error when making a REST call, | 693 /// call, this method will complete with the same error. |
686 * this method will complete with the same error. | |
687 */ | |
688 async.Future<StoreLayout> getStoreLayout(core.String enterpriseId) { | 694 async.Future<StoreLayout> getStoreLayout(core.String enterpriseId) { |
689 var _url = null; | 695 var _url = null; |
690 var _queryParams = new core.Map(); | 696 var _queryParams = new core.Map(); |
691 var _uploadMedia = null; | 697 var _uploadMedia = null; |
692 var _uploadOptions = null; | 698 var _uploadOptions = null; |
693 var _downloadOptions = commons.DownloadOptions.Metadata; | 699 var _downloadOptions = commons.DownloadOptions.Metadata; |
694 var _body = null; | 700 var _body = null; |
695 | 701 |
696 if (enterpriseId == null) { | 702 if (enterpriseId == null) { |
697 throw new core.ArgumentError("Parameter enterpriseId is required."); | 703 throw new core.ArgumentError("Parameter enterpriseId is required."); |
698 } | 704 } |
699 | 705 |
700 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout'; | 706 _url = 'enterprises/' + |
| 707 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 708 '/storeLayout'; |
701 | 709 |
702 var _response = _requester.request(_url, | 710 var _response = _requester.request(_url, "GET", |
703 "GET", | 711 body: _body, |
704 body: _body, | 712 queryParams: _queryParams, |
705 queryParams: _queryParams, | 713 uploadOptions: _uploadOptions, |
706 uploadOptions: _uploadOptions, | 714 uploadMedia: _uploadMedia, |
707 uploadMedia: _uploadMedia, | 715 downloadOptions: _downloadOptions); |
708 downloadOptions: _downloadOptions); | |
709 return _response.then((data) => new StoreLayout.fromJson(data)); | 716 return _response.then((data) => new StoreLayout.fromJson(data)); |
710 } | 717 } |
711 | 718 |
712 /** | 719 /// Establishes the binding between the EMM and an enterprise. This is now |
713 * Establishes the binding between the EMM and an enterprise. This is now | 720 /// deprecated; use enroll instead. |
714 * deprecated; use enroll instead. | 721 /// |
715 * | 722 /// [request] - The metadata request object. |
716 * [request] - The metadata request object. | 723 /// |
717 * | 724 /// Request parameters: |
718 * Request parameters: | 725 /// |
719 * | 726 /// [token] - The token provided by the enterprise to register the EMM. |
720 * [token] - The token provided by the enterprise to register the EMM. | 727 /// |
721 * | 728 /// Completes with a [Enterprise]. |
722 * Completes with a [Enterprise]. | 729 /// |
723 * | 730 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
724 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 731 /// an error. |
725 * error. | 732 /// |
726 * | 733 /// If the used [http.Client] completes with an error when making a REST |
727 * If the used [http.Client] completes with an error when making a REST call, | 734 /// call, this method will complete with the same error. |
728 * this method will complete with the same error. | |
729 */ | |
730 async.Future<Enterprise> insert(Enterprise request, core.String token) { | 735 async.Future<Enterprise> insert(Enterprise request, core.String token) { |
731 var _url = null; | 736 var _url = null; |
732 var _queryParams = new core.Map(); | 737 var _queryParams = new core.Map(); |
733 var _uploadMedia = null; | 738 var _uploadMedia = null; |
734 var _uploadOptions = null; | 739 var _uploadOptions = null; |
735 var _downloadOptions = commons.DownloadOptions.Metadata; | 740 var _downloadOptions = commons.DownloadOptions.Metadata; |
736 var _body = null; | 741 var _body = null; |
737 | 742 |
738 if (request != null) { | 743 if (request != null) { |
739 _body = convert.JSON.encode((request).toJson()); | 744 _body = convert.JSON.encode((request).toJson()); |
740 } | 745 } |
741 if (token == null) { | 746 if (token == null) { |
742 throw new core.ArgumentError("Parameter token is required."); | 747 throw new core.ArgumentError("Parameter token is required."); |
743 } | 748 } |
744 _queryParams["token"] = [token]; | 749 _queryParams["token"] = [token]; |
745 | 750 |
746 _url = 'enterprises'; | 751 _url = 'enterprises'; |
747 | 752 |
748 var _response = _requester.request(_url, | 753 var _response = _requester.request(_url, "POST", |
749 "POST", | 754 body: _body, |
750 body: _body, | 755 queryParams: _queryParams, |
751 queryParams: _queryParams, | 756 uploadOptions: _uploadOptions, |
752 uploadOptions: _uploadOptions, | 757 uploadMedia: _uploadMedia, |
753 uploadMedia: _uploadMedia, | 758 downloadOptions: _downloadOptions); |
754 downloadOptions: _downloadOptions); | |
755 return _response.then((data) => new Enterprise.fromJson(data)); | 759 return _response.then((data) => new Enterprise.fromJson(data)); |
756 } | 760 } |
757 | 761 |
758 /** | 762 /// Looks up an enterprise by domain name. This is only supported for |
759 * Looks up an enterprise by domain name. This is only supported for | 763 /// enterprises created via the Google-initiated creation flow. Lookup of the |
760 * enterprises created via the Google-initiated creation flow. Lookup of the | 764 /// id is not needed for enterprises created via the EMM-initiated flow since |
761 * id is not needed for enterprises created via the EMM-initiated flow since | 765 /// the EMM learns the enterprise ID in the callback specified in the |
762 * the EMM learns the enterprise ID in the callback specified in the | 766 /// Enterprises.generateSignupUrl call. |
763 * Enterprises.generateSignupUrl call. | 767 /// |
764 * | 768 /// Request parameters: |
765 * Request parameters: | 769 /// |
766 * | 770 /// [domain] - The exact primary domain name of the enterprise to look up. |
767 * [domain] - The exact primary domain name of the enterprise to look up. | 771 /// |
768 * | 772 /// Completes with a [EnterprisesListResponse]. |
769 * Completes with a [EnterprisesListResponse]. | 773 /// |
770 * | 774 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
771 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 775 /// an error. |
772 * error. | 776 /// |
773 * | 777 /// If the used [http.Client] completes with an error when making a REST |
774 * If the used [http.Client] completes with an error when making a REST call, | 778 /// call, this method will complete with the same error. |
775 * this method will complete with the same error. | |
776 */ | |
777 async.Future<EnterprisesListResponse> list(core.String domain) { | 779 async.Future<EnterprisesListResponse> list(core.String domain) { |
778 var _url = null; | 780 var _url = null; |
779 var _queryParams = new core.Map(); | 781 var _queryParams = new core.Map(); |
780 var _uploadMedia = null; | 782 var _uploadMedia = null; |
781 var _uploadOptions = null; | 783 var _uploadOptions = null; |
782 var _downloadOptions = commons.DownloadOptions.Metadata; | 784 var _downloadOptions = commons.DownloadOptions.Metadata; |
783 var _body = null; | 785 var _body = null; |
784 | 786 |
785 if (domain == null) { | 787 if (domain == null) { |
786 throw new core.ArgumentError("Parameter domain is required."); | 788 throw new core.ArgumentError("Parameter domain is required."); |
787 } | 789 } |
788 _queryParams["domain"] = [domain]; | 790 _queryParams["domain"] = [domain]; |
789 | 791 |
790 _url = 'enterprises'; | 792 _url = 'enterprises'; |
791 | 793 |
792 var _response = _requester.request(_url, | 794 var _response = _requester.request(_url, "GET", |
793 "GET", | 795 body: _body, |
794 body: _body, | 796 queryParams: _queryParams, |
795 queryParams: _queryParams, | 797 uploadOptions: _uploadOptions, |
796 uploadOptions: _uploadOptions, | 798 uploadMedia: _uploadMedia, |
797 uploadMedia: _uploadMedia, | 799 downloadOptions: _downloadOptions); |
798 downloadOptions: _downloadOptions); | |
799 return _response.then((data) => new EnterprisesListResponse.fromJson(data)); | 800 return _response.then((data) => new EnterprisesListResponse.fromJson(data)); |
800 } | 801 } |
801 | 802 |
802 /** | 803 /// Pulls and returns a notification set for the enterprises associated with |
803 * Pulls and returns a notification set for the enterprises associated with | 804 /// the service account authenticated for the request. The notification set |
804 * the service account authenticated for the request. The notification set may | 805 /// may be empty if no notification are pending. |
805 * be empty if no notification are pending. | 806 /// A notification set returned needs to be acknowledged within 20 seconds by |
806 * A notification set returned needs to be acknowledged within 20 seconds by | 807 /// calling Enterprises.AcknowledgeNotificationSet, unless the notification |
807 * calling Enterprises.AcknowledgeNotificationSet, unless the notification set | 808 /// set is empty. |
808 * is empty. | 809 /// Notifications that are not acknowledged within the 20 seconds will |
809 * Notifications that are not acknowledged within the 20 seconds will | 810 /// eventually be included again in the response to another |
810 * eventually be included again in the response to another PullNotificationSet | 811 /// PullNotificationSet request, and those that are never acknowledged will |
811 * request, and those that are never acknowledged will ultimately be deleted | 812 /// ultimately be deleted according to the Google Cloud Platform Pub/Sub |
812 * according to the Google Cloud Platform Pub/Sub system policy. | 813 /// system policy. |
813 * Multiple requests might be performed concurrently to retrieve | 814 /// Multiple requests might be performed concurrently to retrieve |
814 * notifications, in which case the pending notifications (if any) will be | 815 /// notifications, in which case the pending notifications (if any) will be |
815 * split among each caller, if any are pending. | 816 /// split among each caller, if any are pending. |
816 * If no notifications are present, an empty notification list is returned. | 817 /// If no notifications are present, an empty notification list is returned. |
817 * Subsequent requests may return more notifications once they become | 818 /// Subsequent requests may return more notifications once they become |
818 * available. | 819 /// available. |
819 * | 820 /// |
820 * Request parameters: | 821 /// Request parameters: |
821 * | 822 /// |
822 * [requestMode] - The request mode for pulling notifications. | 823 /// [requestMode] - The request mode for pulling notifications. |
823 * Specifying waitForNotifications will cause the request to block and wait | 824 /// Specifying waitForNotifications will cause the request to block and wait |
824 * until one or more notifications are present, or return an empty | 825 /// until one or more notifications are present, or return an empty |
825 * notification list if no notifications are present after some time. | 826 /// notification list if no notifications are present after some time. |
826 * Speciying returnImmediately will cause the request to immediately return | 827 /// Speciying returnImmediately will cause the request to immediately return |
827 * the pending notifications, or an empty list if no notifications are | 828 /// the pending notifications, or an empty list if no notifications are |
828 * present. | 829 /// present. |
829 * If omitted, defaults to waitForNotifications. | 830 /// If omitted, defaults to waitForNotifications. |
830 * Possible string values are: | 831 /// Possible string values are: |
831 * - "returnImmediately" | 832 /// - "returnImmediately" |
832 * - "waitForNotifications" | 833 /// - "waitForNotifications" |
833 * | 834 /// |
834 * Completes with a [NotificationSet]. | 835 /// Completes with a [NotificationSet]. |
835 * | 836 /// |
836 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 837 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
837 * error. | 838 /// an error. |
838 * | 839 /// |
839 * If the used [http.Client] completes with an error when making a REST call, | 840 /// If the used [http.Client] completes with an error when making a REST |
840 * this method will complete with the same error. | 841 /// call, this method will complete with the same error. |
841 */ | |
842 async.Future<NotificationSet> pullNotificationSet({core.String requestMode}) { | 842 async.Future<NotificationSet> pullNotificationSet({core.String requestMode}) { |
843 var _url = null; | 843 var _url = null; |
844 var _queryParams = new core.Map(); | 844 var _queryParams = new core.Map(); |
845 var _uploadMedia = null; | 845 var _uploadMedia = null; |
846 var _uploadOptions = null; | 846 var _uploadOptions = null; |
847 var _downloadOptions = commons.DownloadOptions.Metadata; | 847 var _downloadOptions = commons.DownloadOptions.Metadata; |
848 var _body = null; | 848 var _body = null; |
849 | 849 |
850 if (requestMode != null) { | 850 if (requestMode != null) { |
851 _queryParams["requestMode"] = [requestMode]; | 851 _queryParams["requestMode"] = [requestMode]; |
852 } | 852 } |
853 | 853 |
854 _url = 'enterprises/pullNotificationSet'; | 854 _url = 'enterprises/pullNotificationSet'; |
855 | 855 |
856 var _response = _requester.request(_url, | 856 var _response = _requester.request(_url, "POST", |
857 "POST", | 857 body: _body, |
858 body: _body, | 858 queryParams: _queryParams, |
859 queryParams: _queryParams, | 859 uploadOptions: _uploadOptions, |
860 uploadOptions: _uploadOptions, | 860 uploadMedia: _uploadMedia, |
861 uploadMedia: _uploadMedia, | 861 downloadOptions: _downloadOptions); |
862 downloadOptions: _downloadOptions); | |
863 return _response.then((data) => new NotificationSet.fromJson(data)); | 862 return _response.then((data) => new NotificationSet.fromJson(data)); |
864 } | 863 } |
865 | 864 |
866 /** | 865 /// Sends a test notification to validate the EMM integration with the Google |
867 * Sends a test push notification to validate the EMM integration with the | 866 /// Cloud Pub/Sub service for this enterprise. |
868 * Google Cloud Pub/Sub service for this enterprise. | 867 /// |
869 * | 868 /// Request parameters: |
870 * Request parameters: | 869 /// |
871 * | 870 /// [enterpriseId] - The ID of the enterprise. |
872 * [enterpriseId] - The ID of the enterprise. | 871 /// |
873 * | 872 /// Completes with a [EnterprisesSendTestPushNotificationResponse]. |
874 * Completes with a [EnterprisesSendTestPushNotificationResponse]. | 873 /// |
875 * | 874 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
876 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 875 /// an error. |
877 * error. | 876 /// |
878 * | 877 /// If the used [http.Client] completes with an error when making a REST |
879 * If the used [http.Client] completes with an error when making a REST call, | 878 /// call, this method will complete with the same error. |
880 * this method will complete with the same error. | 879 async.Future<EnterprisesSendTestPushNotificationResponse> |
881 */ | 880 sendTestPushNotification(core.String enterpriseId) { |
882 async.Future<EnterprisesSendTestPushNotificationResponse> sendTestPushNotifica
tion(core.String enterpriseId) { | |
883 var _url = null; | 881 var _url = null; |
884 var _queryParams = new core.Map(); | 882 var _queryParams = new core.Map(); |
885 var _uploadMedia = null; | 883 var _uploadMedia = null; |
886 var _uploadOptions = null; | 884 var _uploadOptions = null; |
887 var _downloadOptions = commons.DownloadOptions.Metadata; | 885 var _downloadOptions = commons.DownloadOptions.Metadata; |
888 var _body = null; | 886 var _body = null; |
889 | 887 |
890 if (enterpriseId == null) { | 888 if (enterpriseId == null) { |
891 throw new core.ArgumentError("Parameter enterpriseId is required."); | 889 throw new core.ArgumentError("Parameter enterpriseId is required."); |
892 } | 890 } |
893 | 891 |
894 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
endTestPushNotification'; | 892 _url = 'enterprises/' + |
| 893 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 894 '/sendTestPushNotification'; |
895 | 895 |
896 var _response = _requester.request(_url, | 896 var _response = _requester.request(_url, "POST", |
897 "POST", | 897 body: _body, |
898 body: _body, | 898 queryParams: _queryParams, |
899 queryParams: _queryParams, | 899 uploadOptions: _uploadOptions, |
900 uploadOptions: _uploadOptions, | 900 uploadMedia: _uploadMedia, |
901 uploadMedia: _uploadMedia, | 901 downloadOptions: _downloadOptions); |
902 downloadOptions: _downloadOptions); | 902 return _response.then((data) => |
903 return _response.then((data) => new EnterprisesSendTestPushNotificationRespo
nse.fromJson(data)); | 903 new EnterprisesSendTestPushNotificationResponse.fromJson(data)); |
904 } | 904 } |
905 | 905 |
906 /** | 906 /// Sets the account that will be used to authenticate to the API as the |
907 * Sets the account that will be used to authenticate to the API as the | 907 /// enterprise. |
908 * enterprise. | 908 /// |
909 * | 909 /// [request] - The metadata request object. |
910 * [request] - The metadata request object. | 910 /// |
911 * | 911 /// Request parameters: |
912 * Request parameters: | 912 /// |
913 * | 913 /// [enterpriseId] - The ID of the enterprise. |
914 * [enterpriseId] - The ID of the enterprise. | 914 /// |
915 * | 915 /// Completes with a [EnterpriseAccount]. |
916 * Completes with a [EnterpriseAccount]. | 916 /// |
917 * | 917 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
918 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 918 /// an error. |
919 * error. | 919 /// |
920 * | 920 /// If the used [http.Client] completes with an error when making a REST |
921 * If the used [http.Client] completes with an error when making a REST call, | 921 /// call, this method will complete with the same error. |
922 * this method will complete with the same error. | 922 async.Future<EnterpriseAccount> setAccount( |
923 */ | 923 EnterpriseAccount request, core.String enterpriseId) { |
924 async.Future<EnterpriseAccount> setAccount(EnterpriseAccount request, core.Str
ing enterpriseId) { | |
925 var _url = null; | 924 var _url = null; |
926 var _queryParams = new core.Map(); | 925 var _queryParams = new core.Map(); |
927 var _uploadMedia = null; | 926 var _uploadMedia = null; |
928 var _uploadOptions = null; | 927 var _uploadOptions = null; |
929 var _downloadOptions = commons.DownloadOptions.Metadata; | 928 var _downloadOptions = commons.DownloadOptions.Metadata; |
930 var _body = null; | 929 var _body = null; |
931 | 930 |
932 if (request != null) { | 931 if (request != null) { |
933 _body = convert.JSON.encode((request).toJson()); | 932 _body = convert.JSON.encode((request).toJson()); |
934 } | 933 } |
935 if (enterpriseId == null) { | 934 if (enterpriseId == null) { |
936 throw new core.ArgumentError("Parameter enterpriseId is required."); | 935 throw new core.ArgumentError("Parameter enterpriseId is required."); |
937 } | 936 } |
938 | 937 |
939 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/a
ccount'; | 938 _url = 'enterprises/' + |
| 939 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 940 '/account'; |
940 | 941 |
941 var _response = _requester.request(_url, | 942 var _response = _requester.request(_url, "PUT", |
942 "PUT", | 943 body: _body, |
943 body: _body, | 944 queryParams: _queryParams, |
944 queryParams: _queryParams, | 945 uploadOptions: _uploadOptions, |
945 uploadOptions: _uploadOptions, | 946 uploadMedia: _uploadMedia, |
946 uploadMedia: _uploadMedia, | 947 downloadOptions: _downloadOptions); |
947 downloadOptions: _downloadOptions); | |
948 return _response.then((data) => new EnterpriseAccount.fromJson(data)); | 948 return _response.then((data) => new EnterpriseAccount.fromJson(data)); |
949 } | 949 } |
950 | 950 |
951 /** | 951 /// Sets the Android Device Policy config resource. EMM may use this method |
952 * Sets the Android Device Policy config resource. EMM may use this method to | 952 /// to enable or disable Android Device Policy support for the specified |
953 * enable or disable Android Device Policy support for the specified | 953 /// enterprise. To learn more about managing devices and apps with Android |
954 * enterprise. To learn more about managing devices and apps with Android | 954 /// Device Policy, see the Android Management API. |
955 * Device Policy, see the Android Management API. | 955 /// |
956 * | 956 /// [request] - The metadata request object. |
957 * [request] - The metadata request object. | 957 /// |
958 * | 958 /// Request parameters: |
959 * Request parameters: | 959 /// |
960 * | 960 /// [enterpriseId] - The ID of the enterprise. |
961 * [enterpriseId] - The ID of the enterprise. | 961 /// |
962 * | 962 /// Completes with a [AndroidDevicePolicyConfig]. |
963 * Completes with a [AndroidDevicePolicyConfig]. | 963 /// |
964 * | 964 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
965 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 965 /// an error. |
966 * error. | 966 /// |
967 * | 967 /// If the used [http.Client] completes with an error when making a REST |
968 * If the used [http.Client] completes with an error when making a REST call, | 968 /// call, this method will complete with the same error. |
969 * this method will complete with the same error. | 969 async.Future<AndroidDevicePolicyConfig> setAndroidDevicePolicyConfig( |
970 */ | 970 AndroidDevicePolicyConfig request, core.String enterpriseId) { |
971 async.Future<AndroidDevicePolicyConfig> setAndroidDevicePolicyConfig(AndroidDe
vicePolicyConfig request, core.String enterpriseId) { | |
972 var _url = null; | 971 var _url = null; |
973 var _queryParams = new core.Map(); | 972 var _queryParams = new core.Map(); |
974 var _uploadMedia = null; | 973 var _uploadMedia = null; |
975 var _uploadOptions = null; | 974 var _uploadOptions = null; |
976 var _downloadOptions = commons.DownloadOptions.Metadata; | 975 var _downloadOptions = commons.DownloadOptions.Metadata; |
977 var _body = null; | 976 var _body = null; |
978 | 977 |
979 if (request != null) { | 978 if (request != null) { |
980 _body = convert.JSON.encode((request).toJson()); | 979 _body = convert.JSON.encode((request).toJson()); |
981 } | 980 } |
982 if (enterpriseId == null) { | 981 if (enterpriseId == null) { |
983 throw new core.ArgumentError("Parameter enterpriseId is required."); | 982 throw new core.ArgumentError("Parameter enterpriseId is required."); |
984 } | 983 } |
985 | 984 |
986 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/a
ndroidDevicePolicyConfig'; | 985 _url = 'enterprises/' + |
| 986 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 987 '/androidDevicePolicyConfig'; |
987 | 988 |
988 var _response = _requester.request(_url, | 989 var _response = _requester.request(_url, "PUT", |
989 "PUT", | 990 body: _body, |
990 body: _body, | 991 queryParams: _queryParams, |
991 queryParams: _queryParams, | 992 uploadOptions: _uploadOptions, |
992 uploadOptions: _uploadOptions, | 993 uploadMedia: _uploadMedia, |
993 uploadMedia: _uploadMedia, | 994 downloadOptions: _downloadOptions); |
994 downloadOptions: _downloadOptions); | 995 return _response |
995 return _response.then((data) => new AndroidDevicePolicyConfig.fromJson(data)
); | 996 .then((data) => new AndroidDevicePolicyConfig.fromJson(data)); |
996 } | 997 } |
997 | 998 |
998 /** | 999 /// Sets the store layout for the enterprise. By default, storeLayoutType is |
999 * Sets the store layout for the enterprise. By default, storeLayoutType is | 1000 /// set to "basic" and the basic store layout is enabled. The basic layout |
1000 * set to "basic" and the basic store layout is enabled. The basic layout only | 1001 /// only contains apps approved by the admin, and that have been added to the |
1001 * contains apps approved by the admin, and that have been added to the | 1002 /// available product set for a user (using the setAvailableProductSet |
1002 * available product set for a user (using the setAvailableProductSet call). | 1003 /// call). Apps on the page are sorted in order of their product ID value. If |
1003 * Apps on the page are sorted in order of their product ID value. If you | 1004 /// you create a custom store layout (by setting storeLayoutType = "custom" |
1004 * create a custom store layout (by setting storeLayoutType = "custom" and | 1005 /// and setting a homepage), the basic store layout is disabled. |
1005 * setting a homepage), the basic store layout is disabled. | 1006 /// |
1006 * | 1007 /// [request] - The metadata request object. |
1007 * [request] - The metadata request object. | 1008 /// |
1008 * | 1009 /// Request parameters: |
1009 * Request parameters: | 1010 /// |
1010 * | 1011 /// [enterpriseId] - The ID of the enterprise. |
1011 * [enterpriseId] - The ID of the enterprise. | 1012 /// |
1012 * | 1013 /// Completes with a [StoreLayout]. |
1013 * Completes with a [StoreLayout]. | 1014 /// |
1014 * | 1015 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1015 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1016 /// an error. |
1016 * error. | 1017 /// |
1017 * | 1018 /// If the used [http.Client] completes with an error when making a REST |
1018 * If the used [http.Client] completes with an error when making a REST call, | 1019 /// call, this method will complete with the same error. |
1019 * this method will complete with the same error. | 1020 async.Future<StoreLayout> setStoreLayout( |
1020 */ | 1021 StoreLayout request, core.String enterpriseId) { |
1021 async.Future<StoreLayout> setStoreLayout(StoreLayout request, core.String ente
rpriseId) { | |
1022 var _url = null; | 1022 var _url = null; |
1023 var _queryParams = new core.Map(); | 1023 var _queryParams = new core.Map(); |
1024 var _uploadMedia = null; | 1024 var _uploadMedia = null; |
1025 var _uploadOptions = null; | 1025 var _uploadOptions = null; |
1026 var _downloadOptions = commons.DownloadOptions.Metadata; | 1026 var _downloadOptions = commons.DownloadOptions.Metadata; |
1027 var _body = null; | 1027 var _body = null; |
1028 | 1028 |
1029 if (request != null) { | 1029 if (request != null) { |
1030 _body = convert.JSON.encode((request).toJson()); | 1030 _body = convert.JSON.encode((request).toJson()); |
1031 } | 1031 } |
1032 if (enterpriseId == null) { | 1032 if (enterpriseId == null) { |
1033 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1033 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1034 } | 1034 } |
1035 | 1035 |
1036 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout'; | 1036 _url = 'enterprises/' + |
| 1037 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1038 '/storeLayout'; |
1037 | 1039 |
1038 var _response = _requester.request(_url, | 1040 var _response = _requester.request(_url, "PUT", |
1039 "PUT", | 1041 body: _body, |
1040 body: _body, | 1042 queryParams: _queryParams, |
1041 queryParams: _queryParams, | 1043 uploadOptions: _uploadOptions, |
1042 uploadOptions: _uploadOptions, | 1044 uploadMedia: _uploadMedia, |
1043 uploadMedia: _uploadMedia, | 1045 downloadOptions: _downloadOptions); |
1044 downloadOptions: _downloadOptions); | |
1045 return _response.then((data) => new StoreLayout.fromJson(data)); | 1046 return _response.then((data) => new StoreLayout.fromJson(data)); |
1046 } | 1047 } |
1047 | 1048 |
1048 /** | 1049 /// Unenrolls an enterprise from the calling EMM. |
1049 * Unenrolls an enterprise from the calling EMM. | 1050 /// |
1050 * | 1051 /// Request parameters: |
1051 * Request parameters: | 1052 /// |
1052 * | 1053 /// [enterpriseId] - The ID of the enterprise. |
1053 * [enterpriseId] - The ID of the enterprise. | 1054 /// |
1054 * | 1055 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1055 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1056 /// an error. |
1056 * error. | 1057 /// |
1057 * | 1058 /// If the used [http.Client] completes with an error when making a REST |
1058 * If the used [http.Client] completes with an error when making a REST call, | 1059 /// call, this method will complete with the same error. |
1059 * this method will complete with the same error. | |
1060 */ | |
1061 async.Future unenroll(core.String enterpriseId) { | 1060 async.Future unenroll(core.String enterpriseId) { |
1062 var _url = null; | 1061 var _url = null; |
1063 var _queryParams = new core.Map(); | 1062 var _queryParams = new core.Map(); |
1064 var _uploadMedia = null; | 1063 var _uploadMedia = null; |
1065 var _uploadOptions = null; | 1064 var _uploadOptions = null; |
1066 var _downloadOptions = commons.DownloadOptions.Metadata; | 1065 var _downloadOptions = commons.DownloadOptions.Metadata; |
1067 var _body = null; | 1066 var _body = null; |
1068 | 1067 |
1069 if (enterpriseId == null) { | 1068 if (enterpriseId == null) { |
1070 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1069 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1071 } | 1070 } |
1072 | 1071 |
1073 _downloadOptions = null; | 1072 _downloadOptions = null; |
1074 | 1073 |
1075 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
nenroll'; | 1074 _url = 'enterprises/' + |
| 1075 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1076 '/unenroll'; |
1076 | 1077 |
1077 var _response = _requester.request(_url, | 1078 var _response = _requester.request(_url, "POST", |
1078 "POST", | 1079 body: _body, |
1079 body: _body, | 1080 queryParams: _queryParams, |
1080 queryParams: _queryParams, | 1081 uploadOptions: _uploadOptions, |
1081 uploadOptions: _uploadOptions, | 1082 uploadMedia: _uploadMedia, |
1082 uploadMedia: _uploadMedia, | 1083 downloadOptions: _downloadOptions); |
1083 downloadOptions: _downloadOptions); | |
1084 return _response.then((data) => null); | 1084 return _response.then((data) => null); |
1085 } | 1085 } |
1086 | |
1087 } | 1086 } |
1088 | 1087 |
1089 | |
1090 class EntitlementsResourceApi { | 1088 class EntitlementsResourceApi { |
1091 final commons.ApiRequester _requester; | 1089 final commons.ApiRequester _requester; |
1092 | 1090 |
1093 EntitlementsResourceApi(commons.ApiRequester client) : | 1091 EntitlementsResourceApi(commons.ApiRequester client) : _requester = client; |
1094 _requester = client; | |
1095 | 1092 |
1096 /** | 1093 /// Removes an entitlement to an app for a user. |
1097 * Removes an entitlement to an app for a user. | 1094 /// |
1098 * | 1095 /// Request parameters: |
1099 * Request parameters: | 1096 /// |
1100 * | 1097 /// [enterpriseId] - The ID of the enterprise. |
1101 * [enterpriseId] - The ID of the enterprise. | 1098 /// |
1102 * | 1099 /// [userId] - The ID of the user. |
1103 * [userId] - The ID of the user. | 1100 /// |
1104 * | 1101 /// [entitlementId] - The ID of the entitlement (a product ID), e.g. |
1105 * [entitlementId] - The ID of the entitlement (a product ID), e.g. | 1102 /// "app:com.google.android.gm". |
1106 * "app:com.google.android.gm". | 1103 /// |
1107 * | 1104 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1108 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1105 /// an error. |
1109 * error. | 1106 /// |
1110 * | 1107 /// If the used [http.Client] completes with an error when making a REST |
1111 * If the used [http.Client] completes with an error when making a REST call, | 1108 /// call, this method will complete with the same error. |
1112 * this method will complete with the same error. | 1109 async.Future delete( |
1113 */ | 1110 core.String enterpriseId, core.String userId, core.String entitlementId) { |
1114 async.Future delete(core.String enterpriseId, core.String userId, core.String
entitlementId) { | |
1115 var _url = null; | 1111 var _url = null; |
1116 var _queryParams = new core.Map(); | 1112 var _queryParams = new core.Map(); |
1117 var _uploadMedia = null; | 1113 var _uploadMedia = null; |
1118 var _uploadOptions = null; | 1114 var _uploadOptions = null; |
1119 var _downloadOptions = commons.DownloadOptions.Metadata; | 1115 var _downloadOptions = commons.DownloadOptions.Metadata; |
1120 var _body = null; | 1116 var _body = null; |
1121 | 1117 |
1122 if (enterpriseId == null) { | 1118 if (enterpriseId == null) { |
1123 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1119 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1124 } | 1120 } |
1125 if (userId == null) { | 1121 if (userId == null) { |
1126 throw new core.ArgumentError("Parameter userId is required."); | 1122 throw new core.ArgumentError("Parameter userId is required."); |
1127 } | 1123 } |
1128 if (entitlementId == null) { | 1124 if (entitlementId == null) { |
1129 throw new core.ArgumentError("Parameter entitlementId is required."); | 1125 throw new core.ArgumentError("Parameter entitlementId is required."); |
1130 } | 1126 } |
1131 | 1127 |
1132 _downloadOptions = null; | 1128 _downloadOptions = null; |
1133 | 1129 |
1134 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/entitlements/' + commons.E
scaper.ecapeVariable('$entitlementId'); | 1130 _url = 'enterprises/' + |
| 1131 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1132 '/users/' + |
| 1133 commons.Escaper.ecapeVariable('$userId') + |
| 1134 '/entitlements/' + |
| 1135 commons.Escaper.ecapeVariable('$entitlementId'); |
1135 | 1136 |
1136 var _response = _requester.request(_url, | 1137 var _response = _requester.request(_url, "DELETE", |
1137 "DELETE", | 1138 body: _body, |
1138 body: _body, | 1139 queryParams: _queryParams, |
1139 queryParams: _queryParams, | 1140 uploadOptions: _uploadOptions, |
1140 uploadOptions: _uploadOptions, | 1141 uploadMedia: _uploadMedia, |
1141 uploadMedia: _uploadMedia, | 1142 downloadOptions: _downloadOptions); |
1142 downloadOptions: _downloadOptions); | |
1143 return _response.then((data) => null); | 1143 return _response.then((data) => null); |
1144 } | 1144 } |
1145 | 1145 |
1146 /** | 1146 /// Retrieves details of an entitlement. |
1147 * Retrieves details of an entitlement. | 1147 /// |
1148 * | 1148 /// Request parameters: |
1149 * Request parameters: | 1149 /// |
1150 * | 1150 /// [enterpriseId] - The ID of the enterprise. |
1151 * [enterpriseId] - The ID of the enterprise. | 1151 /// |
1152 * | 1152 /// [userId] - The ID of the user. |
1153 * [userId] - The ID of the user. | 1153 /// |
1154 * | 1154 /// [entitlementId] - The ID of the entitlement (a product ID), e.g. |
1155 * [entitlementId] - The ID of the entitlement (a product ID), e.g. | 1155 /// "app:com.google.android.gm". |
1156 * "app:com.google.android.gm". | 1156 /// |
1157 * | 1157 /// Completes with a [Entitlement]. |
1158 * Completes with a [Entitlement]. | 1158 /// |
1159 * | 1159 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1160 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1160 /// an error. |
1161 * error. | 1161 /// |
1162 * | 1162 /// If the used [http.Client] completes with an error when making a REST |
1163 * If the used [http.Client] completes with an error when making a REST call, | 1163 /// call, this method will complete with the same error. |
1164 * this method will complete with the same error. | 1164 async.Future<Entitlement> get( |
1165 */ | 1165 core.String enterpriseId, core.String userId, core.String entitlementId) { |
1166 async.Future<Entitlement> get(core.String enterpriseId, core.String userId, co
re.String entitlementId) { | |
1167 var _url = null; | 1166 var _url = null; |
1168 var _queryParams = new core.Map(); | 1167 var _queryParams = new core.Map(); |
1169 var _uploadMedia = null; | 1168 var _uploadMedia = null; |
1170 var _uploadOptions = null; | 1169 var _uploadOptions = null; |
1171 var _downloadOptions = commons.DownloadOptions.Metadata; | 1170 var _downloadOptions = commons.DownloadOptions.Metadata; |
1172 var _body = null; | 1171 var _body = null; |
1173 | 1172 |
1174 if (enterpriseId == null) { | 1173 if (enterpriseId == null) { |
1175 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1174 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1176 } | 1175 } |
1177 if (userId == null) { | 1176 if (userId == null) { |
1178 throw new core.ArgumentError("Parameter userId is required."); | 1177 throw new core.ArgumentError("Parameter userId is required."); |
1179 } | 1178 } |
1180 if (entitlementId == null) { | 1179 if (entitlementId == null) { |
1181 throw new core.ArgumentError("Parameter entitlementId is required."); | 1180 throw new core.ArgumentError("Parameter entitlementId is required."); |
1182 } | 1181 } |
1183 | 1182 |
1184 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/entitlements/' + commons.E
scaper.ecapeVariable('$entitlementId'); | 1183 _url = 'enterprises/' + |
| 1184 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1185 '/users/' + |
| 1186 commons.Escaper.ecapeVariable('$userId') + |
| 1187 '/entitlements/' + |
| 1188 commons.Escaper.ecapeVariable('$entitlementId'); |
1185 | 1189 |
1186 var _response = _requester.request(_url, | 1190 var _response = _requester.request(_url, "GET", |
1187 "GET", | 1191 body: _body, |
1188 body: _body, | 1192 queryParams: _queryParams, |
1189 queryParams: _queryParams, | 1193 uploadOptions: _uploadOptions, |
1190 uploadOptions: _uploadOptions, | 1194 uploadMedia: _uploadMedia, |
1191 uploadMedia: _uploadMedia, | 1195 downloadOptions: _downloadOptions); |
1192 downloadOptions: _downloadOptions); | |
1193 return _response.then((data) => new Entitlement.fromJson(data)); | 1196 return _response.then((data) => new Entitlement.fromJson(data)); |
1194 } | 1197 } |
1195 | 1198 |
1196 /** | 1199 /// Lists all entitlements for the specified user. Only the ID is set. |
1197 * Lists all entitlements for the specified user. Only the ID is set. | 1200 /// |
1198 * | 1201 /// Request parameters: |
1199 * Request parameters: | 1202 /// |
1200 * | 1203 /// [enterpriseId] - The ID of the enterprise. |
1201 * [enterpriseId] - The ID of the enterprise. | 1204 /// |
1202 * | 1205 /// [userId] - The ID of the user. |
1203 * [userId] - The ID of the user. | 1206 /// |
1204 * | 1207 /// Completes with a [EntitlementsListResponse]. |
1205 * Completes with a [EntitlementsListResponse]. | 1208 /// |
1206 * | 1209 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1207 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1210 /// an error. |
1208 * error. | 1211 /// |
1209 * | 1212 /// If the used [http.Client] completes with an error when making a REST |
1210 * If the used [http.Client] completes with an error when making a REST call, | 1213 /// call, this method will complete with the same error. |
1211 * this method will complete with the same error. | 1214 async.Future<EntitlementsListResponse> list( |
1212 */ | 1215 core.String enterpriseId, core.String userId) { |
1213 async.Future<EntitlementsListResponse> list(core.String enterpriseId, core.Str
ing userId) { | |
1214 var _url = null; | 1216 var _url = null; |
1215 var _queryParams = new core.Map(); | 1217 var _queryParams = new core.Map(); |
1216 var _uploadMedia = null; | 1218 var _uploadMedia = null; |
1217 var _uploadOptions = null; | 1219 var _uploadOptions = null; |
1218 var _downloadOptions = commons.DownloadOptions.Metadata; | 1220 var _downloadOptions = commons.DownloadOptions.Metadata; |
1219 var _body = null; | 1221 var _body = null; |
1220 | 1222 |
1221 if (enterpriseId == null) { | 1223 if (enterpriseId == null) { |
1222 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1224 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1223 } | 1225 } |
1224 if (userId == null) { | 1226 if (userId == null) { |
1225 throw new core.ArgumentError("Parameter userId is required."); | 1227 throw new core.ArgumentError("Parameter userId is required."); |
1226 } | 1228 } |
1227 | 1229 |
1228 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/entitlements'; | 1230 _url = 'enterprises/' + |
| 1231 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1232 '/users/' + |
| 1233 commons.Escaper.ecapeVariable('$userId') + |
| 1234 '/entitlements'; |
1229 | 1235 |
1230 var _response = _requester.request(_url, | 1236 var _response = _requester.request(_url, "GET", |
1231 "GET", | 1237 body: _body, |
1232 body: _body, | 1238 queryParams: _queryParams, |
1233 queryParams: _queryParams, | 1239 uploadOptions: _uploadOptions, |
1234 uploadOptions: _uploadOptions, | 1240 uploadMedia: _uploadMedia, |
1235 uploadMedia: _uploadMedia, | 1241 downloadOptions: _downloadOptions); |
1236 downloadOptions: _downloadOptions); | 1242 return _response |
1237 return _response.then((data) => new EntitlementsListResponse.fromJson(data))
; | 1243 .then((data) => new EntitlementsListResponse.fromJson(data)); |
1238 } | 1244 } |
1239 | 1245 |
1240 /** | 1246 /// Adds or updates an entitlement to an app for a user. This method supports |
1241 * Adds or updates an entitlement to an app for a user. This method supports | 1247 /// patch semantics. |
1242 * patch semantics. | 1248 /// |
1243 * | 1249 /// [request] - The metadata request object. |
1244 * [request] - The metadata request object. | 1250 /// |
1245 * | 1251 /// Request parameters: |
1246 * Request parameters: | 1252 /// |
1247 * | 1253 /// [enterpriseId] - The ID of the enterprise. |
1248 * [enterpriseId] - The ID of the enterprise. | 1254 /// |
1249 * | 1255 /// [userId] - The ID of the user. |
1250 * [userId] - The ID of the user. | 1256 /// |
1251 * | 1257 /// [entitlementId] - The ID of the entitlement (a product ID), e.g. |
1252 * [entitlementId] - The ID of the entitlement (a product ID), e.g. | 1258 /// "app:com.google.android.gm". |
1253 * "app:com.google.android.gm". | 1259 /// |
1254 * | 1260 /// [install] - Set to true to also install the product on all the user's |
1255 * [install] - Set to true to also install the product on all the user's | 1261 /// devices where possible. Failure to install on one or more devices will |
1256 * devices where possible. Failure to install on one or more devices will not | 1262 /// not prevent this operation from returning successfully, as long as the |
1257 * prevent this operation from returning successfully, as long as the | 1263 /// entitlement was successfully assigned to the user. |
1258 * entitlement was successfully assigned to the user. | 1264 /// |
1259 * | 1265 /// Completes with a [Entitlement]. |
1260 * Completes with a [Entitlement]. | 1266 /// |
1261 * | 1267 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1262 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1268 /// an error. |
1263 * error. | 1269 /// |
1264 * | 1270 /// If the used [http.Client] completes with an error when making a REST |
1265 * If the used [http.Client] completes with an error when making a REST call, | 1271 /// call, this method will complete with the same error. |
1266 * this method will complete with the same error. | 1272 async.Future<Entitlement> patch(Entitlement request, core.String enterpriseId, |
1267 */ | 1273 core.String userId, core.String entitlementId, |
1268 async.Future<Entitlement> patch(Entitlement request, core.String enterpriseId,
core.String userId, core.String entitlementId, {core.bool install}) { | 1274 {core.bool install}) { |
1269 var _url = null; | 1275 var _url = null; |
1270 var _queryParams = new core.Map(); | 1276 var _queryParams = new core.Map(); |
1271 var _uploadMedia = null; | 1277 var _uploadMedia = null; |
1272 var _uploadOptions = null; | 1278 var _uploadOptions = null; |
1273 var _downloadOptions = commons.DownloadOptions.Metadata; | 1279 var _downloadOptions = commons.DownloadOptions.Metadata; |
1274 var _body = null; | 1280 var _body = null; |
1275 | 1281 |
1276 if (request != null) { | 1282 if (request != null) { |
1277 _body = convert.JSON.encode((request).toJson()); | 1283 _body = convert.JSON.encode((request).toJson()); |
1278 } | 1284 } |
1279 if (enterpriseId == null) { | 1285 if (enterpriseId == null) { |
1280 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1286 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1281 } | 1287 } |
1282 if (userId == null) { | 1288 if (userId == null) { |
1283 throw new core.ArgumentError("Parameter userId is required."); | 1289 throw new core.ArgumentError("Parameter userId is required."); |
1284 } | 1290 } |
1285 if (entitlementId == null) { | 1291 if (entitlementId == null) { |
1286 throw new core.ArgumentError("Parameter entitlementId is required."); | 1292 throw new core.ArgumentError("Parameter entitlementId is required."); |
1287 } | 1293 } |
1288 if (install != null) { | 1294 if (install != null) { |
1289 _queryParams["install"] = ["${install}"]; | 1295 _queryParams["install"] = ["${install}"]; |
1290 } | 1296 } |
1291 | 1297 |
1292 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/entitlements/' + commons.E
scaper.ecapeVariable('$entitlementId'); | 1298 _url = 'enterprises/' + |
| 1299 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1300 '/users/' + |
| 1301 commons.Escaper.ecapeVariable('$userId') + |
| 1302 '/entitlements/' + |
| 1303 commons.Escaper.ecapeVariable('$entitlementId'); |
1293 | 1304 |
1294 var _response = _requester.request(_url, | 1305 var _response = _requester.request(_url, "PATCH", |
1295 "PATCH", | 1306 body: _body, |
1296 body: _body, | 1307 queryParams: _queryParams, |
1297 queryParams: _queryParams, | 1308 uploadOptions: _uploadOptions, |
1298 uploadOptions: _uploadOptions, | 1309 uploadMedia: _uploadMedia, |
1299 uploadMedia: _uploadMedia, | 1310 downloadOptions: _downloadOptions); |
1300 downloadOptions: _downloadOptions); | |
1301 return _response.then((data) => new Entitlement.fromJson(data)); | 1311 return _response.then((data) => new Entitlement.fromJson(data)); |
1302 } | 1312 } |
1303 | 1313 |
1304 /** | 1314 /// Adds or updates an entitlement to an app for a user. |
1305 * Adds or updates an entitlement to an app for a user. | 1315 /// |
1306 * | 1316 /// [request] - The metadata request object. |
1307 * [request] - The metadata request object. | 1317 /// |
1308 * | 1318 /// Request parameters: |
1309 * Request parameters: | 1319 /// |
1310 * | 1320 /// [enterpriseId] - The ID of the enterprise. |
1311 * [enterpriseId] - The ID of the enterprise. | 1321 /// |
1312 * | 1322 /// [userId] - The ID of the user. |
1313 * [userId] - The ID of the user. | 1323 /// |
1314 * | 1324 /// [entitlementId] - The ID of the entitlement (a product ID), e.g. |
1315 * [entitlementId] - The ID of the entitlement (a product ID), e.g. | 1325 /// "app:com.google.android.gm". |
1316 * "app:com.google.android.gm". | 1326 /// |
1317 * | 1327 /// [install] - Set to true to also install the product on all the user's |
1318 * [install] - Set to true to also install the product on all the user's | 1328 /// devices where possible. Failure to install on one or more devices will |
1319 * devices where possible. Failure to install on one or more devices will not | 1329 /// not prevent this operation from returning successfully, as long as the |
1320 * prevent this operation from returning successfully, as long as the | 1330 /// entitlement was successfully assigned to the user. |
1321 * entitlement was successfully assigned to the user. | 1331 /// |
1322 * | 1332 /// Completes with a [Entitlement]. |
1323 * Completes with a [Entitlement]. | 1333 /// |
1324 * | 1334 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1325 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1335 /// an error. |
1326 * error. | 1336 /// |
1327 * | 1337 /// If the used [http.Client] completes with an error when making a REST |
1328 * If the used [http.Client] completes with an error when making a REST call, | 1338 /// call, this method will complete with the same error. |
1329 * this method will complete with the same error. | 1339 async.Future<Entitlement> update(Entitlement request, |
1330 */ | 1340 core.String enterpriseId, core.String userId, core.String entitlementId, |
1331 async.Future<Entitlement> update(Entitlement request, core.String enterpriseId
, core.String userId, core.String entitlementId, {core.bool install}) { | 1341 {core.bool install}) { |
1332 var _url = null; | 1342 var _url = null; |
1333 var _queryParams = new core.Map(); | 1343 var _queryParams = new core.Map(); |
1334 var _uploadMedia = null; | 1344 var _uploadMedia = null; |
1335 var _uploadOptions = null; | 1345 var _uploadOptions = null; |
1336 var _downloadOptions = commons.DownloadOptions.Metadata; | 1346 var _downloadOptions = commons.DownloadOptions.Metadata; |
1337 var _body = null; | 1347 var _body = null; |
1338 | 1348 |
1339 if (request != null) { | 1349 if (request != null) { |
1340 _body = convert.JSON.encode((request).toJson()); | 1350 _body = convert.JSON.encode((request).toJson()); |
1341 } | 1351 } |
1342 if (enterpriseId == null) { | 1352 if (enterpriseId == null) { |
1343 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1353 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1344 } | 1354 } |
1345 if (userId == null) { | 1355 if (userId == null) { |
1346 throw new core.ArgumentError("Parameter userId is required."); | 1356 throw new core.ArgumentError("Parameter userId is required."); |
1347 } | 1357 } |
1348 if (entitlementId == null) { | 1358 if (entitlementId == null) { |
1349 throw new core.ArgumentError("Parameter entitlementId is required."); | 1359 throw new core.ArgumentError("Parameter entitlementId is required."); |
1350 } | 1360 } |
1351 if (install != null) { | 1361 if (install != null) { |
1352 _queryParams["install"] = ["${install}"]; | 1362 _queryParams["install"] = ["${install}"]; |
1353 } | 1363 } |
1354 | 1364 |
1355 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/entitlements/' + commons.E
scaper.ecapeVariable('$entitlementId'); | 1365 _url = 'enterprises/' + |
| 1366 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1367 '/users/' + |
| 1368 commons.Escaper.ecapeVariable('$userId') + |
| 1369 '/entitlements/' + |
| 1370 commons.Escaper.ecapeVariable('$entitlementId'); |
1356 | 1371 |
1357 var _response = _requester.request(_url, | 1372 var _response = _requester.request(_url, "PUT", |
1358 "PUT", | 1373 body: _body, |
1359 body: _body, | 1374 queryParams: _queryParams, |
1360 queryParams: _queryParams, | 1375 uploadOptions: _uploadOptions, |
1361 uploadOptions: _uploadOptions, | 1376 uploadMedia: _uploadMedia, |
1362 uploadMedia: _uploadMedia, | 1377 downloadOptions: _downloadOptions); |
1363 downloadOptions: _downloadOptions); | |
1364 return _response.then((data) => new Entitlement.fromJson(data)); | 1378 return _response.then((data) => new Entitlement.fromJson(data)); |
1365 } | 1379 } |
1366 | |
1367 } | 1380 } |
1368 | 1381 |
1369 | |
1370 class GrouplicensesResourceApi { | 1382 class GrouplicensesResourceApi { |
1371 final commons.ApiRequester _requester; | 1383 final commons.ApiRequester _requester; |
1372 | 1384 |
1373 GrouplicensesResourceApi(commons.ApiRequester client) : | 1385 GrouplicensesResourceApi(commons.ApiRequester client) : _requester = client; |
1374 _requester = client; | |
1375 | 1386 |
1376 /** | 1387 /// Retrieves details of an enterprise's group license for a product. |
1377 * Retrieves details of an enterprise's group license for a product. | 1388 /// |
1378 * | 1389 /// Request parameters: |
1379 * Request parameters: | 1390 /// |
1380 * | 1391 /// [enterpriseId] - The ID of the enterprise. |
1381 * [enterpriseId] - The ID of the enterprise. | 1392 /// |
1382 * | 1393 /// [groupLicenseId] - The ID of the product the group license is for, e.g. |
1383 * [groupLicenseId] - The ID of the product the group license is for, e.g. | 1394 /// "app:com.google.android.gm". |
1384 * "app:com.google.android.gm". | 1395 /// |
1385 * | 1396 /// Completes with a [GroupLicense]. |
1386 * Completes with a [GroupLicense]. | 1397 /// |
1387 * | 1398 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1388 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1399 /// an error. |
1389 * error. | 1400 /// |
1390 * | 1401 /// If the used [http.Client] completes with an error when making a REST |
1391 * If the used [http.Client] completes with an error when making a REST call, | 1402 /// call, this method will complete with the same error. |
1392 * this method will complete with the same error. | 1403 async.Future<GroupLicense> get( |
1393 */ | 1404 core.String enterpriseId, core.String groupLicenseId) { |
1394 async.Future<GroupLicense> get(core.String enterpriseId, core.String groupLice
nseId) { | |
1395 var _url = null; | 1405 var _url = null; |
1396 var _queryParams = new core.Map(); | 1406 var _queryParams = new core.Map(); |
1397 var _uploadMedia = null; | 1407 var _uploadMedia = null; |
1398 var _uploadOptions = null; | 1408 var _uploadOptions = null; |
1399 var _downloadOptions = commons.DownloadOptions.Metadata; | 1409 var _downloadOptions = commons.DownloadOptions.Metadata; |
1400 var _body = null; | 1410 var _body = null; |
1401 | 1411 |
1402 if (enterpriseId == null) { | 1412 if (enterpriseId == null) { |
1403 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1413 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1404 } | 1414 } |
1405 if (groupLicenseId == null) { | 1415 if (groupLicenseId == null) { |
1406 throw new core.ArgumentError("Parameter groupLicenseId is required."); | 1416 throw new core.ArgumentError("Parameter groupLicenseId is required."); |
1407 } | 1417 } |
1408 | 1418 |
1409 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/g
roupLicenses/' + commons.Escaper.ecapeVariable('$groupLicenseId'); | 1419 _url = 'enterprises/' + |
| 1420 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1421 '/groupLicenses/' + |
| 1422 commons.Escaper.ecapeVariable('$groupLicenseId'); |
1410 | 1423 |
1411 var _response = _requester.request(_url, | 1424 var _response = _requester.request(_url, "GET", |
1412 "GET", | 1425 body: _body, |
1413 body: _body, | 1426 queryParams: _queryParams, |
1414 queryParams: _queryParams, | 1427 uploadOptions: _uploadOptions, |
1415 uploadOptions: _uploadOptions, | 1428 uploadMedia: _uploadMedia, |
1416 uploadMedia: _uploadMedia, | 1429 downloadOptions: _downloadOptions); |
1417 downloadOptions: _downloadOptions); | |
1418 return _response.then((data) => new GroupLicense.fromJson(data)); | 1430 return _response.then((data) => new GroupLicense.fromJson(data)); |
1419 } | 1431 } |
1420 | 1432 |
1421 /** | 1433 /// Retrieves IDs of all products for which the enterprise has a group |
1422 * Retrieves IDs of all products for which the enterprise has a group license. | 1434 /// license. |
1423 * | 1435 /// |
1424 * Request parameters: | 1436 /// Request parameters: |
1425 * | 1437 /// |
1426 * [enterpriseId] - The ID of the enterprise. | 1438 /// [enterpriseId] - The ID of the enterprise. |
1427 * | 1439 /// |
1428 * Completes with a [GroupLicensesListResponse]. | 1440 /// Completes with a [GroupLicensesListResponse]. |
1429 * | 1441 /// |
1430 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1442 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1431 * error. | 1443 /// an error. |
1432 * | 1444 /// |
1433 * If the used [http.Client] completes with an error when making a REST call, | 1445 /// If the used [http.Client] completes with an error when making a REST |
1434 * this method will complete with the same error. | 1446 /// call, this method will complete with the same error. |
1435 */ | |
1436 async.Future<GroupLicensesListResponse> list(core.String enterpriseId) { | 1447 async.Future<GroupLicensesListResponse> list(core.String enterpriseId) { |
1437 var _url = null; | 1448 var _url = null; |
1438 var _queryParams = new core.Map(); | 1449 var _queryParams = new core.Map(); |
1439 var _uploadMedia = null; | 1450 var _uploadMedia = null; |
1440 var _uploadOptions = null; | 1451 var _uploadOptions = null; |
1441 var _downloadOptions = commons.DownloadOptions.Metadata; | 1452 var _downloadOptions = commons.DownloadOptions.Metadata; |
1442 var _body = null; | 1453 var _body = null; |
1443 | 1454 |
1444 if (enterpriseId == null) { | 1455 if (enterpriseId == null) { |
1445 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1456 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1446 } | 1457 } |
1447 | 1458 |
1448 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/g
roupLicenses'; | 1459 _url = 'enterprises/' + |
| 1460 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1461 '/groupLicenses'; |
1449 | 1462 |
1450 var _response = _requester.request(_url, | 1463 var _response = _requester.request(_url, "GET", |
1451 "GET", | 1464 body: _body, |
1452 body: _body, | 1465 queryParams: _queryParams, |
1453 queryParams: _queryParams, | 1466 uploadOptions: _uploadOptions, |
1454 uploadOptions: _uploadOptions, | 1467 uploadMedia: _uploadMedia, |
1455 uploadMedia: _uploadMedia, | 1468 downloadOptions: _downloadOptions); |
1456 downloadOptions: _downloadOptions); | 1469 return _response |
1457 return _response.then((data) => new GroupLicensesListResponse.fromJson(data)
); | 1470 .then((data) => new GroupLicensesListResponse.fromJson(data)); |
1458 } | 1471 } |
1459 | |
1460 } | 1472 } |
1461 | 1473 |
1462 | |
1463 class GrouplicenseusersResourceApi { | 1474 class GrouplicenseusersResourceApi { |
1464 final commons.ApiRequester _requester; | 1475 final commons.ApiRequester _requester; |
1465 | 1476 |
1466 GrouplicenseusersResourceApi(commons.ApiRequester client) : | 1477 GrouplicenseusersResourceApi(commons.ApiRequester client) |
1467 _requester = client; | 1478 : _requester = client; |
1468 | 1479 |
1469 /** | 1480 /// Retrieves the IDs of the users who have been granted entitlements under |
1470 * Retrieves the IDs of the users who have been granted entitlements under the | 1481 /// the license. |
1471 * license. | 1482 /// |
1472 * | 1483 /// Request parameters: |
1473 * Request parameters: | 1484 /// |
1474 * | 1485 /// [enterpriseId] - The ID of the enterprise. |
1475 * [enterpriseId] - The ID of the enterprise. | 1486 /// |
1476 * | 1487 /// [groupLicenseId] - The ID of the product the group license is for, e.g. |
1477 * [groupLicenseId] - The ID of the product the group license is for, e.g. | 1488 /// "app:com.google.android.gm". |
1478 * "app:com.google.android.gm". | 1489 /// |
1479 * | 1490 /// Completes with a [GroupLicenseUsersListResponse]. |
1480 * Completes with a [GroupLicenseUsersListResponse]. | 1491 /// |
1481 * | 1492 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1482 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1493 /// an error. |
1483 * error. | 1494 /// |
1484 * | 1495 /// If the used [http.Client] completes with an error when making a REST |
1485 * If the used [http.Client] completes with an error when making a REST call, | 1496 /// call, this method will complete with the same error. |
1486 * this method will complete with the same error. | 1497 async.Future<GroupLicenseUsersListResponse> list( |
1487 */ | 1498 core.String enterpriseId, core.String groupLicenseId) { |
1488 async.Future<GroupLicenseUsersListResponse> list(core.String enterpriseId, cor
e.String groupLicenseId) { | |
1489 var _url = null; | 1499 var _url = null; |
1490 var _queryParams = new core.Map(); | 1500 var _queryParams = new core.Map(); |
1491 var _uploadMedia = null; | 1501 var _uploadMedia = null; |
1492 var _uploadOptions = null; | 1502 var _uploadOptions = null; |
1493 var _downloadOptions = commons.DownloadOptions.Metadata; | 1503 var _downloadOptions = commons.DownloadOptions.Metadata; |
1494 var _body = null; | 1504 var _body = null; |
1495 | 1505 |
1496 if (enterpriseId == null) { | 1506 if (enterpriseId == null) { |
1497 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1507 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1498 } | 1508 } |
1499 if (groupLicenseId == null) { | 1509 if (groupLicenseId == null) { |
1500 throw new core.ArgumentError("Parameter groupLicenseId is required."); | 1510 throw new core.ArgumentError("Parameter groupLicenseId is required."); |
1501 } | 1511 } |
1502 | 1512 |
1503 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/g
roupLicenses/' + commons.Escaper.ecapeVariable('$groupLicenseId') + '/users'; | 1513 _url = 'enterprises/' + |
| 1514 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1515 '/groupLicenses/' + |
| 1516 commons.Escaper.ecapeVariable('$groupLicenseId') + |
| 1517 '/users'; |
1504 | 1518 |
1505 var _response = _requester.request(_url, | 1519 var _response = _requester.request(_url, "GET", |
1506 "GET", | 1520 body: _body, |
1507 body: _body, | 1521 queryParams: _queryParams, |
1508 queryParams: _queryParams, | 1522 uploadOptions: _uploadOptions, |
1509 uploadOptions: _uploadOptions, | 1523 uploadMedia: _uploadMedia, |
1510 uploadMedia: _uploadMedia, | 1524 downloadOptions: _downloadOptions); |
1511 downloadOptions: _downloadOptions); | 1525 return _response |
1512 return _response.then((data) => new GroupLicenseUsersListResponse.fromJson(d
ata)); | 1526 .then((data) => new GroupLicenseUsersListResponse.fromJson(data)); |
1513 } | 1527 } |
1514 | |
1515 } | 1528 } |
1516 | 1529 |
1517 | |
1518 class InstallsResourceApi { | 1530 class InstallsResourceApi { |
1519 final commons.ApiRequester _requester; | 1531 final commons.ApiRequester _requester; |
1520 | 1532 |
1521 InstallsResourceApi(commons.ApiRequester client) : | 1533 InstallsResourceApi(commons.ApiRequester client) : _requester = client; |
1522 _requester = client; | |
1523 | 1534 |
1524 /** | 1535 /// Requests to remove an app from a device. A call to get or list will still |
1525 * Requests to remove an app from a device. A call to get or list will still | 1536 /// show the app as installed on the device until it is actually removed. |
1526 * show the app as installed on the device until it is actually removed. | 1537 /// |
1527 * | 1538 /// Request parameters: |
1528 * Request parameters: | 1539 /// |
1529 * | 1540 /// [enterpriseId] - The ID of the enterprise. |
1530 * [enterpriseId] - The ID of the enterprise. | 1541 /// |
1531 * | 1542 /// [userId] - The ID of the user. |
1532 * [userId] - The ID of the user. | 1543 /// |
1533 * | 1544 /// [deviceId] - The Android ID of the device. |
1534 * [deviceId] - The Android ID of the device. | 1545 /// |
1535 * | 1546 /// [installId] - The ID of the product represented by the install, e.g. |
1536 * [installId] - The ID of the product represented by the install, e.g. | 1547 /// "app:com.google.android.gm". |
1537 * "app:com.google.android.gm". | 1548 /// |
1538 * | 1549 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1539 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1550 /// an error. |
1540 * error. | 1551 /// |
1541 * | 1552 /// If the used [http.Client] completes with an error when making a REST |
1542 * If the used [http.Client] completes with an error when making a REST call, | 1553 /// call, this method will complete with the same error. |
1543 * this method will complete with the same error. | 1554 async.Future delete(core.String enterpriseId, core.String userId, |
1544 */ | 1555 core.String deviceId, core.String installId) { |
1545 async.Future delete(core.String enterpriseId, core.String userId, core.String
deviceId, core.String installId) { | |
1546 var _url = null; | 1556 var _url = null; |
1547 var _queryParams = new core.Map(); | 1557 var _queryParams = new core.Map(); |
1548 var _uploadMedia = null; | 1558 var _uploadMedia = null; |
1549 var _uploadOptions = null; | 1559 var _uploadOptions = null; |
1550 var _downloadOptions = commons.DownloadOptions.Metadata; | 1560 var _downloadOptions = commons.DownloadOptions.Metadata; |
1551 var _body = null; | 1561 var _body = null; |
1552 | 1562 |
1553 if (enterpriseId == null) { | 1563 if (enterpriseId == null) { |
1554 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1564 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1555 } | 1565 } |
1556 if (userId == null) { | 1566 if (userId == null) { |
1557 throw new core.ArgumentError("Parameter userId is required."); | 1567 throw new core.ArgumentError("Parameter userId is required."); |
1558 } | 1568 } |
1559 if (deviceId == null) { | 1569 if (deviceId == null) { |
1560 throw new core.ArgumentError("Parameter deviceId is required."); | 1570 throw new core.ArgumentError("Parameter deviceId is required."); |
1561 } | 1571 } |
1562 if (installId == null) { | 1572 if (installId == null) { |
1563 throw new core.ArgumentError("Parameter installId is required."); | 1573 throw new core.ArgumentError("Parameter installId is required."); |
1564 } | 1574 } |
1565 | 1575 |
1566 _downloadOptions = null; | 1576 _downloadOptions = null; |
1567 | 1577 |
1568 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/installs/' + commons.Escaper.ecapeVariable('$in
stallId'); | 1578 _url = 'enterprises/' + |
| 1579 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1580 '/users/' + |
| 1581 commons.Escaper.ecapeVariable('$userId') + |
| 1582 '/devices/' + |
| 1583 commons.Escaper.ecapeVariable('$deviceId') + |
| 1584 '/installs/' + |
| 1585 commons.Escaper.ecapeVariable('$installId'); |
1569 | 1586 |
1570 var _response = _requester.request(_url, | 1587 var _response = _requester.request(_url, "DELETE", |
1571 "DELETE", | 1588 body: _body, |
1572 body: _body, | 1589 queryParams: _queryParams, |
1573 queryParams: _queryParams, | 1590 uploadOptions: _uploadOptions, |
1574 uploadOptions: _uploadOptions, | 1591 uploadMedia: _uploadMedia, |
1575 uploadMedia: _uploadMedia, | 1592 downloadOptions: _downloadOptions); |
1576 downloadOptions: _downloadOptions); | |
1577 return _response.then((data) => null); | 1593 return _response.then((data) => null); |
1578 } | 1594 } |
1579 | 1595 |
1580 /** | 1596 /// Retrieves details of an installation of an app on a device. |
1581 * Retrieves details of an installation of an app on a device. | 1597 /// |
1582 * | 1598 /// Request parameters: |
1583 * Request parameters: | 1599 /// |
1584 * | 1600 /// [enterpriseId] - The ID of the enterprise. |
1585 * [enterpriseId] - The ID of the enterprise. | 1601 /// |
1586 * | 1602 /// [userId] - The ID of the user. |
1587 * [userId] - The ID of the user. | 1603 /// |
1588 * | 1604 /// [deviceId] - The Android ID of the device. |
1589 * [deviceId] - The Android ID of the device. | 1605 /// |
1590 * | 1606 /// [installId] - The ID of the product represented by the install, e.g. |
1591 * [installId] - The ID of the product represented by the install, e.g. | 1607 /// "app:com.google.android.gm". |
1592 * "app:com.google.android.gm". | 1608 /// |
1593 * | 1609 /// Completes with a [Install]. |
1594 * Completes with a [Install]. | 1610 /// |
1595 * | 1611 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1596 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1612 /// an error. |
1597 * error. | 1613 /// |
1598 * | 1614 /// If the used [http.Client] completes with an error when making a REST |
1599 * If the used [http.Client] completes with an error when making a REST call, | 1615 /// call, this method will complete with the same error. |
1600 * this method will complete with the same error. | 1616 async.Future<Install> get(core.String enterpriseId, core.String userId, |
1601 */ | 1617 core.String deviceId, core.String installId) { |
1602 async.Future<Install> get(core.String enterpriseId, core.String userId, core.S
tring deviceId, core.String installId) { | |
1603 var _url = null; | 1618 var _url = null; |
1604 var _queryParams = new core.Map(); | 1619 var _queryParams = new core.Map(); |
1605 var _uploadMedia = null; | 1620 var _uploadMedia = null; |
1606 var _uploadOptions = null; | 1621 var _uploadOptions = null; |
1607 var _downloadOptions = commons.DownloadOptions.Metadata; | 1622 var _downloadOptions = commons.DownloadOptions.Metadata; |
1608 var _body = null; | 1623 var _body = null; |
1609 | 1624 |
1610 if (enterpriseId == null) { | 1625 if (enterpriseId == null) { |
1611 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1626 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1612 } | 1627 } |
1613 if (userId == null) { | 1628 if (userId == null) { |
1614 throw new core.ArgumentError("Parameter userId is required."); | 1629 throw new core.ArgumentError("Parameter userId is required."); |
1615 } | 1630 } |
1616 if (deviceId == null) { | 1631 if (deviceId == null) { |
1617 throw new core.ArgumentError("Parameter deviceId is required."); | 1632 throw new core.ArgumentError("Parameter deviceId is required."); |
1618 } | 1633 } |
1619 if (installId == null) { | 1634 if (installId == null) { |
1620 throw new core.ArgumentError("Parameter installId is required."); | 1635 throw new core.ArgumentError("Parameter installId is required."); |
1621 } | 1636 } |
1622 | 1637 |
1623 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/installs/' + commons.Escaper.ecapeVariable('$in
stallId'); | 1638 _url = 'enterprises/' + |
| 1639 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1640 '/users/' + |
| 1641 commons.Escaper.ecapeVariable('$userId') + |
| 1642 '/devices/' + |
| 1643 commons.Escaper.ecapeVariable('$deviceId') + |
| 1644 '/installs/' + |
| 1645 commons.Escaper.ecapeVariable('$installId'); |
1624 | 1646 |
1625 var _response = _requester.request(_url, | 1647 var _response = _requester.request(_url, "GET", |
1626 "GET", | 1648 body: _body, |
1627 body: _body, | 1649 queryParams: _queryParams, |
1628 queryParams: _queryParams, | 1650 uploadOptions: _uploadOptions, |
1629 uploadOptions: _uploadOptions, | 1651 uploadMedia: _uploadMedia, |
1630 uploadMedia: _uploadMedia, | 1652 downloadOptions: _downloadOptions); |
1631 downloadOptions: _downloadOptions); | |
1632 return _response.then((data) => new Install.fromJson(data)); | 1653 return _response.then((data) => new Install.fromJson(data)); |
1633 } | 1654 } |
1634 | 1655 |
1635 /** | 1656 /// Retrieves the details of all apps installed on the specified device. |
1636 * Retrieves the details of all apps installed on the specified device. | 1657 /// |
1637 * | 1658 /// Request parameters: |
1638 * Request parameters: | 1659 /// |
1639 * | 1660 /// [enterpriseId] - The ID of the enterprise. |
1640 * [enterpriseId] - The ID of the enterprise. | 1661 /// |
1641 * | 1662 /// [userId] - The ID of the user. |
1642 * [userId] - The ID of the user. | 1663 /// |
1643 * | 1664 /// [deviceId] - The Android ID of the device. |
1644 * [deviceId] - The Android ID of the device. | 1665 /// |
1645 * | 1666 /// Completes with a [InstallsListResponse]. |
1646 * Completes with a [InstallsListResponse]. | 1667 /// |
1647 * | 1668 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1648 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1669 /// an error. |
1649 * error. | 1670 /// |
1650 * | 1671 /// If the used [http.Client] completes with an error when making a REST |
1651 * If the used [http.Client] completes with an error when making a REST call, | 1672 /// call, this method will complete with the same error. |
1652 * this method will complete with the same error. | 1673 async.Future<InstallsListResponse> list( |
1653 */ | 1674 core.String enterpriseId, core.String userId, core.String deviceId) { |
1654 async.Future<InstallsListResponse> list(core.String enterpriseId, core.String
userId, core.String deviceId) { | |
1655 var _url = null; | 1675 var _url = null; |
1656 var _queryParams = new core.Map(); | 1676 var _queryParams = new core.Map(); |
1657 var _uploadMedia = null; | 1677 var _uploadMedia = null; |
1658 var _uploadOptions = null; | 1678 var _uploadOptions = null; |
1659 var _downloadOptions = commons.DownloadOptions.Metadata; | 1679 var _downloadOptions = commons.DownloadOptions.Metadata; |
1660 var _body = null; | 1680 var _body = null; |
1661 | 1681 |
1662 if (enterpriseId == null) { | 1682 if (enterpriseId == null) { |
1663 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1683 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1664 } | 1684 } |
1665 if (userId == null) { | 1685 if (userId == null) { |
1666 throw new core.ArgumentError("Parameter userId is required."); | 1686 throw new core.ArgumentError("Parameter userId is required."); |
1667 } | 1687 } |
1668 if (deviceId == null) { | 1688 if (deviceId == null) { |
1669 throw new core.ArgumentError("Parameter deviceId is required."); | 1689 throw new core.ArgumentError("Parameter deviceId is required."); |
1670 } | 1690 } |
1671 | 1691 |
1672 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/installs'; | 1692 _url = 'enterprises/' + |
| 1693 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1694 '/users/' + |
| 1695 commons.Escaper.ecapeVariable('$userId') + |
| 1696 '/devices/' + |
| 1697 commons.Escaper.ecapeVariable('$deviceId') + |
| 1698 '/installs'; |
1673 | 1699 |
1674 var _response = _requester.request(_url, | 1700 var _response = _requester.request(_url, "GET", |
1675 "GET", | 1701 body: _body, |
1676 body: _body, | 1702 queryParams: _queryParams, |
1677 queryParams: _queryParams, | 1703 uploadOptions: _uploadOptions, |
1678 uploadOptions: _uploadOptions, | 1704 uploadMedia: _uploadMedia, |
1679 uploadMedia: _uploadMedia, | 1705 downloadOptions: _downloadOptions); |
1680 downloadOptions: _downloadOptions); | |
1681 return _response.then((data) => new InstallsListResponse.fromJson(data)); | 1706 return _response.then((data) => new InstallsListResponse.fromJson(data)); |
1682 } | 1707 } |
1683 | 1708 |
1684 /** | 1709 /// Requests to install the latest version of an app to a device. If the app |
1685 * Requests to install the latest version of an app to a device. If the app is | 1710 /// is already installed, then it is updated to the latest version if |
1686 * already installed, then it is updated to the latest version if necessary. | 1711 /// necessary. This method supports patch semantics. |
1687 * This method supports patch semantics. | 1712 /// |
1688 * | 1713 /// [request] - The metadata request object. |
1689 * [request] - The metadata request object. | 1714 /// |
1690 * | 1715 /// Request parameters: |
1691 * Request parameters: | 1716 /// |
1692 * | 1717 /// [enterpriseId] - The ID of the enterprise. |
1693 * [enterpriseId] - The ID of the enterprise. | 1718 /// |
1694 * | 1719 /// [userId] - The ID of the user. |
1695 * [userId] - The ID of the user. | 1720 /// |
1696 * | 1721 /// [deviceId] - The Android ID of the device. |
1697 * [deviceId] - The Android ID of the device. | 1722 /// |
1698 * | 1723 /// [installId] - The ID of the product represented by the install, e.g. |
1699 * [installId] - The ID of the product represented by the install, e.g. | 1724 /// "app:com.google.android.gm". |
1700 * "app:com.google.android.gm". | 1725 /// |
1701 * | 1726 /// Completes with a [Install]. |
1702 * Completes with a [Install]. | 1727 /// |
1703 * | 1728 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1704 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1729 /// an error. |
1705 * error. | 1730 /// |
1706 * | 1731 /// If the used [http.Client] completes with an error when making a REST |
1707 * If the used [http.Client] completes with an error when making a REST call, | 1732 /// call, this method will complete with the same error. |
1708 * this method will complete with the same error. | 1733 async.Future<Install> patch(Install request, core.String enterpriseId, |
1709 */ | 1734 core.String userId, core.String deviceId, core.String installId) { |
1710 async.Future<Install> patch(Install request, core.String enterpriseId, core.St
ring userId, core.String deviceId, core.String installId) { | |
1711 var _url = null; | 1735 var _url = null; |
1712 var _queryParams = new core.Map(); | 1736 var _queryParams = new core.Map(); |
1713 var _uploadMedia = null; | 1737 var _uploadMedia = null; |
1714 var _uploadOptions = null; | 1738 var _uploadOptions = null; |
1715 var _downloadOptions = commons.DownloadOptions.Metadata; | 1739 var _downloadOptions = commons.DownloadOptions.Metadata; |
1716 var _body = null; | 1740 var _body = null; |
1717 | 1741 |
1718 if (request != null) { | 1742 if (request != null) { |
1719 _body = convert.JSON.encode((request).toJson()); | 1743 _body = convert.JSON.encode((request).toJson()); |
1720 } | 1744 } |
1721 if (enterpriseId == null) { | 1745 if (enterpriseId == null) { |
1722 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1746 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1723 } | 1747 } |
1724 if (userId == null) { | 1748 if (userId == null) { |
1725 throw new core.ArgumentError("Parameter userId is required."); | 1749 throw new core.ArgumentError("Parameter userId is required."); |
1726 } | 1750 } |
1727 if (deviceId == null) { | 1751 if (deviceId == null) { |
1728 throw new core.ArgumentError("Parameter deviceId is required."); | 1752 throw new core.ArgumentError("Parameter deviceId is required."); |
1729 } | 1753 } |
1730 if (installId == null) { | 1754 if (installId == null) { |
1731 throw new core.ArgumentError("Parameter installId is required."); | 1755 throw new core.ArgumentError("Parameter installId is required."); |
1732 } | 1756 } |
1733 | 1757 |
1734 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/installs/' + commons.Escaper.ecapeVariable('$in
stallId'); | 1758 _url = 'enterprises/' + |
| 1759 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1760 '/users/' + |
| 1761 commons.Escaper.ecapeVariable('$userId') + |
| 1762 '/devices/' + |
| 1763 commons.Escaper.ecapeVariable('$deviceId') + |
| 1764 '/installs/' + |
| 1765 commons.Escaper.ecapeVariable('$installId'); |
1735 | 1766 |
1736 var _response = _requester.request(_url, | 1767 var _response = _requester.request(_url, "PATCH", |
1737 "PATCH", | 1768 body: _body, |
1738 body: _body, | 1769 queryParams: _queryParams, |
1739 queryParams: _queryParams, | 1770 uploadOptions: _uploadOptions, |
1740 uploadOptions: _uploadOptions, | 1771 uploadMedia: _uploadMedia, |
1741 uploadMedia: _uploadMedia, | 1772 downloadOptions: _downloadOptions); |
1742 downloadOptions: _downloadOptions); | |
1743 return _response.then((data) => new Install.fromJson(data)); | 1773 return _response.then((data) => new Install.fromJson(data)); |
1744 } | 1774 } |
1745 | 1775 |
1746 /** | 1776 /// Requests to install the latest version of an app to a device. If the app |
1747 * Requests to install the latest version of an app to a device. If the app is | 1777 /// is already installed, then it is updated to the latest version if |
1748 * already installed, then it is updated to the latest version if necessary. | 1778 /// necessary. |
1749 * | 1779 /// |
1750 * [request] - The metadata request object. | 1780 /// [request] - The metadata request object. |
1751 * | 1781 /// |
1752 * Request parameters: | 1782 /// Request parameters: |
1753 * | 1783 /// |
1754 * [enterpriseId] - The ID of the enterprise. | 1784 /// [enterpriseId] - The ID of the enterprise. |
1755 * | 1785 /// |
1756 * [userId] - The ID of the user. | 1786 /// [userId] - The ID of the user. |
1757 * | 1787 /// |
1758 * [deviceId] - The Android ID of the device. | 1788 /// [deviceId] - The Android ID of the device. |
1759 * | 1789 /// |
1760 * [installId] - The ID of the product represented by the install, e.g. | 1790 /// [installId] - The ID of the product represented by the install, e.g. |
1761 * "app:com.google.android.gm". | 1791 /// "app:com.google.android.gm". |
1762 * | 1792 /// |
1763 * Completes with a [Install]. | 1793 /// Completes with a [Install]. |
1764 * | 1794 /// |
1765 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1795 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1766 * error. | 1796 /// an error. |
1767 * | 1797 /// |
1768 * If the used [http.Client] completes with an error when making a REST call, | 1798 /// If the used [http.Client] completes with an error when making a REST |
1769 * this method will complete with the same error. | 1799 /// call, this method will complete with the same error. |
1770 */ | 1800 async.Future<Install> update(Install request, core.String enterpriseId, |
1771 async.Future<Install> update(Install request, core.String enterpriseId, core.S
tring userId, core.String deviceId, core.String installId) { | 1801 core.String userId, core.String deviceId, core.String installId) { |
1772 var _url = null; | 1802 var _url = null; |
1773 var _queryParams = new core.Map(); | 1803 var _queryParams = new core.Map(); |
1774 var _uploadMedia = null; | 1804 var _uploadMedia = null; |
1775 var _uploadOptions = null; | 1805 var _uploadOptions = null; |
1776 var _downloadOptions = commons.DownloadOptions.Metadata; | 1806 var _downloadOptions = commons.DownloadOptions.Metadata; |
1777 var _body = null; | 1807 var _body = null; |
1778 | 1808 |
1779 if (request != null) { | 1809 if (request != null) { |
1780 _body = convert.JSON.encode((request).toJson()); | 1810 _body = convert.JSON.encode((request).toJson()); |
1781 } | 1811 } |
1782 if (enterpriseId == null) { | 1812 if (enterpriseId == null) { |
1783 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1813 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1784 } | 1814 } |
1785 if (userId == null) { | 1815 if (userId == null) { |
1786 throw new core.ArgumentError("Parameter userId is required."); | 1816 throw new core.ArgumentError("Parameter userId is required."); |
1787 } | 1817 } |
1788 if (deviceId == null) { | 1818 if (deviceId == null) { |
1789 throw new core.ArgumentError("Parameter deviceId is required."); | 1819 throw new core.ArgumentError("Parameter deviceId is required."); |
1790 } | 1820 } |
1791 if (installId == null) { | 1821 if (installId == null) { |
1792 throw new core.ArgumentError("Parameter installId is required."); | 1822 throw new core.ArgumentError("Parameter installId is required."); |
1793 } | 1823 } |
1794 | 1824 |
1795 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/installs/' + commons.Escaper.ecapeVariable('$in
stallId'); | 1825 _url = 'enterprises/' + |
| 1826 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1827 '/users/' + |
| 1828 commons.Escaper.ecapeVariable('$userId') + |
| 1829 '/devices/' + |
| 1830 commons.Escaper.ecapeVariable('$deviceId') + |
| 1831 '/installs/' + |
| 1832 commons.Escaper.ecapeVariable('$installId'); |
1796 | 1833 |
1797 var _response = _requester.request(_url, | 1834 var _response = _requester.request(_url, "PUT", |
1798 "PUT", | 1835 body: _body, |
1799 body: _body, | 1836 queryParams: _queryParams, |
1800 queryParams: _queryParams, | 1837 uploadOptions: _uploadOptions, |
1801 uploadOptions: _uploadOptions, | 1838 uploadMedia: _uploadMedia, |
1802 uploadMedia: _uploadMedia, | 1839 downloadOptions: _downloadOptions); |
1803 downloadOptions: _downloadOptions); | |
1804 return _response.then((data) => new Install.fromJson(data)); | 1840 return _response.then((data) => new Install.fromJson(data)); |
1805 } | 1841 } |
1806 | |
1807 } | 1842 } |
1808 | 1843 |
1809 | |
1810 class ManagedconfigurationsfordeviceResourceApi { | 1844 class ManagedconfigurationsfordeviceResourceApi { |
1811 final commons.ApiRequester _requester; | 1845 final commons.ApiRequester _requester; |
1812 | 1846 |
1813 ManagedconfigurationsfordeviceResourceApi(commons.ApiRequester client) : | 1847 ManagedconfigurationsfordeviceResourceApi(commons.ApiRequester client) |
1814 _requester = client; | 1848 : _requester = client; |
1815 | 1849 |
1816 /** | 1850 /// Removes a per-device managed configuration for an app for the specified |
1817 * Removes a per-device managed configuration for an app for the specified | 1851 /// device. |
1818 * device. | 1852 /// |
1819 * | 1853 /// Request parameters: |
1820 * Request parameters: | 1854 /// |
1821 * | 1855 /// [enterpriseId] - The ID of the enterprise. |
1822 * [enterpriseId] - The ID of the enterprise. | 1856 /// |
1823 * | 1857 /// [userId] - The ID of the user. |
1824 * [userId] - The ID of the user. | 1858 /// |
1825 * | 1859 /// [deviceId] - The Android ID of the device. |
1826 * [deviceId] - The Android ID of the device. | 1860 /// |
1827 * | 1861 /// [managedConfigurationForDeviceId] - The ID of the managed configuration |
1828 * [managedConfigurationForDeviceId] - The ID of the managed configuration (a | 1862 /// (a product ID), e.g. "app:com.google.android.gm". |
1829 * product ID), e.g. "app:com.google.android.gm". | 1863 /// |
1830 * | 1864 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1831 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1865 /// an error. |
1832 * error. | 1866 /// |
1833 * | 1867 /// If the used [http.Client] completes with an error when making a REST |
1834 * If the used [http.Client] completes with an error when making a REST call, | 1868 /// call, this method will complete with the same error. |
1835 * this method will complete with the same error. | 1869 async.Future delete(core.String enterpriseId, core.String userId, |
1836 */ | 1870 core.String deviceId, core.String managedConfigurationForDeviceId) { |
1837 async.Future delete(core.String enterpriseId, core.String userId, core.String
deviceId, core.String managedConfigurationForDeviceId) { | |
1838 var _url = null; | 1871 var _url = null; |
1839 var _queryParams = new core.Map(); | 1872 var _queryParams = new core.Map(); |
1840 var _uploadMedia = null; | 1873 var _uploadMedia = null; |
1841 var _uploadOptions = null; | 1874 var _uploadOptions = null; |
1842 var _downloadOptions = commons.DownloadOptions.Metadata; | 1875 var _downloadOptions = commons.DownloadOptions.Metadata; |
1843 var _body = null; | 1876 var _body = null; |
1844 | 1877 |
1845 if (enterpriseId == null) { | 1878 if (enterpriseId == null) { |
1846 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1879 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1847 } | 1880 } |
1848 if (userId == null) { | 1881 if (userId == null) { |
1849 throw new core.ArgumentError("Parameter userId is required."); | 1882 throw new core.ArgumentError("Parameter userId is required."); |
1850 } | 1883 } |
1851 if (deviceId == null) { | 1884 if (deviceId == null) { |
1852 throw new core.ArgumentError("Parameter deviceId is required."); | 1885 throw new core.ArgumentError("Parameter deviceId is required."); |
1853 } | 1886 } |
1854 if (managedConfigurationForDeviceId == null) { | 1887 if (managedConfigurationForDeviceId == null) { |
1855 throw new core.ArgumentError("Parameter managedConfigurationForDeviceId is
required."); | 1888 throw new core.ArgumentError( |
| 1889 "Parameter managedConfigurationForDeviceId is required."); |
1856 } | 1890 } |
1857 | 1891 |
1858 _downloadOptions = null; | 1892 _downloadOptions = null; |
1859 | 1893 |
1860 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/managedConfigurationsForDevice/' + commons.Esca
per.ecapeVariable('$managedConfigurationForDeviceId'); | 1894 _url = 'enterprises/' + |
| 1895 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1896 '/users/' + |
| 1897 commons.Escaper.ecapeVariable('$userId') + |
| 1898 '/devices/' + |
| 1899 commons.Escaper.ecapeVariable('$deviceId') + |
| 1900 '/managedConfigurationsForDevice/' + |
| 1901 commons.Escaper.ecapeVariable('$managedConfigurationForDeviceId'); |
1861 | 1902 |
1862 var _response = _requester.request(_url, | 1903 var _response = _requester.request(_url, "DELETE", |
1863 "DELETE", | 1904 body: _body, |
1864 body: _body, | 1905 queryParams: _queryParams, |
1865 queryParams: _queryParams, | 1906 uploadOptions: _uploadOptions, |
1866 uploadOptions: _uploadOptions, | 1907 uploadMedia: _uploadMedia, |
1867 uploadMedia: _uploadMedia, | 1908 downloadOptions: _downloadOptions); |
1868 downloadOptions: _downloadOptions); | |
1869 return _response.then((data) => null); | 1909 return _response.then((data) => null); |
1870 } | 1910 } |
1871 | 1911 |
1872 /** | 1912 /// Retrieves details of a per-device managed configuration. |
1873 * Retrieves details of a per-device managed configuration. | 1913 /// |
1874 * | 1914 /// Request parameters: |
1875 * Request parameters: | 1915 /// |
1876 * | 1916 /// [enterpriseId] - The ID of the enterprise. |
1877 * [enterpriseId] - The ID of the enterprise. | 1917 /// |
1878 * | 1918 /// [userId] - The ID of the user. |
1879 * [userId] - The ID of the user. | 1919 /// |
1880 * | 1920 /// [deviceId] - The Android ID of the device. |
1881 * [deviceId] - The Android ID of the device. | 1921 /// |
1882 * | 1922 /// [managedConfigurationForDeviceId] - The ID of the managed configuration |
1883 * [managedConfigurationForDeviceId] - The ID of the managed configuration (a | 1923 /// (a product ID), e.g. "app:com.google.android.gm". |
1884 * product ID), e.g. "app:com.google.android.gm". | 1924 /// |
1885 * | 1925 /// Completes with a [ManagedConfiguration]. |
1886 * Completes with a [ManagedConfiguration]. | 1926 /// |
1887 * | 1927 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1888 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1928 /// an error. |
1889 * error. | 1929 /// |
1890 * | 1930 /// If the used [http.Client] completes with an error when making a REST |
1891 * If the used [http.Client] completes with an error when making a REST call, | 1931 /// call, this method will complete with the same error. |
1892 * this method will complete with the same error. | 1932 async.Future<ManagedConfiguration> get( |
1893 */ | 1933 core.String enterpriseId, |
1894 async.Future<ManagedConfiguration> get(core.String enterpriseId, core.String u
serId, core.String deviceId, core.String managedConfigurationForDeviceId) { | 1934 core.String userId, |
| 1935 core.String deviceId, |
| 1936 core.String managedConfigurationForDeviceId) { |
1895 var _url = null; | 1937 var _url = null; |
1896 var _queryParams = new core.Map(); | 1938 var _queryParams = new core.Map(); |
1897 var _uploadMedia = null; | 1939 var _uploadMedia = null; |
1898 var _uploadOptions = null; | 1940 var _uploadOptions = null; |
1899 var _downloadOptions = commons.DownloadOptions.Metadata; | 1941 var _downloadOptions = commons.DownloadOptions.Metadata; |
1900 var _body = null; | 1942 var _body = null; |
1901 | 1943 |
1902 if (enterpriseId == null) { | 1944 if (enterpriseId == null) { |
1903 throw new core.ArgumentError("Parameter enterpriseId is required."); | 1945 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1904 } | 1946 } |
1905 if (userId == null) { | 1947 if (userId == null) { |
1906 throw new core.ArgumentError("Parameter userId is required."); | 1948 throw new core.ArgumentError("Parameter userId is required."); |
1907 } | 1949 } |
1908 if (deviceId == null) { | 1950 if (deviceId == null) { |
1909 throw new core.ArgumentError("Parameter deviceId is required."); | 1951 throw new core.ArgumentError("Parameter deviceId is required."); |
1910 } | 1952 } |
1911 if (managedConfigurationForDeviceId == null) { | 1953 if (managedConfigurationForDeviceId == null) { |
1912 throw new core.ArgumentError("Parameter managedConfigurationForDeviceId is
required."); | 1954 throw new core.ArgumentError( |
| 1955 "Parameter managedConfigurationForDeviceId is required."); |
1913 } | 1956 } |
1914 | 1957 |
1915 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/managedConfigurationsForDevice/' + commons.Esca
per.ecapeVariable('$managedConfigurationForDeviceId'); | 1958 _url = 'enterprises/' + |
| 1959 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 1960 '/users/' + |
| 1961 commons.Escaper.ecapeVariable('$userId') + |
| 1962 '/devices/' + |
| 1963 commons.Escaper.ecapeVariable('$deviceId') + |
| 1964 '/managedConfigurationsForDevice/' + |
| 1965 commons.Escaper.ecapeVariable('$managedConfigurationForDeviceId'); |
1916 | 1966 |
1917 var _response = _requester.request(_url, | 1967 var _response = _requester.request(_url, "GET", |
1918 "GET", | 1968 body: _body, |
1919 body: _body, | 1969 queryParams: _queryParams, |
1920 queryParams: _queryParams, | 1970 uploadOptions: _uploadOptions, |
1921 uploadOptions: _uploadOptions, | 1971 uploadMedia: _uploadMedia, |
1922 uploadMedia: _uploadMedia, | 1972 downloadOptions: _downloadOptions); |
1923 downloadOptions: _downloadOptions); | |
1924 return _response.then((data) => new ManagedConfiguration.fromJson(data)); | 1973 return _response.then((data) => new ManagedConfiguration.fromJson(data)); |
1925 } | 1974 } |
1926 | 1975 |
1927 /** | 1976 /// Lists all the per-device managed configurations for the specified device. |
1928 * Lists all the per-device managed configurations for the specified device. | 1977 /// Only the ID is set. |
1929 * Only the ID is set. | 1978 /// |
1930 * | 1979 /// Request parameters: |
1931 * Request parameters: | 1980 /// |
1932 * | 1981 /// [enterpriseId] - The ID of the enterprise. |
1933 * [enterpriseId] - The ID of the enterprise. | 1982 /// |
1934 * | 1983 /// [userId] - The ID of the user. |
1935 * [userId] - The ID of the user. | 1984 /// |
1936 * | 1985 /// [deviceId] - The Android ID of the device. |
1937 * [deviceId] - The Android ID of the device. | 1986 /// |
1938 * | 1987 /// Completes with a [ManagedConfigurationsForDeviceListResponse]. |
1939 * Completes with a [ManagedConfigurationsForDeviceListResponse]. | 1988 /// |
1940 * | 1989 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1941 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1990 /// an error. |
1942 * error. | 1991 /// |
1943 * | 1992 /// If the used [http.Client] completes with an error when making a REST |
1944 * If the used [http.Client] completes with an error when making a REST call, | 1993 /// call, this method will complete with the same error. |
1945 * this method will complete with the same error. | 1994 async.Future<ManagedConfigurationsForDeviceListResponse> list( |
1946 */ | 1995 core.String enterpriseId, core.String userId, core.String deviceId) { |
1947 async.Future<ManagedConfigurationsForDeviceListResponse> list(core.String ente
rpriseId, core.String userId, core.String deviceId) { | |
1948 var _url = null; | 1996 var _url = null; |
1949 var _queryParams = new core.Map(); | 1997 var _queryParams = new core.Map(); |
1950 var _uploadMedia = null; | 1998 var _uploadMedia = null; |
1951 var _uploadOptions = null; | 1999 var _uploadOptions = null; |
1952 var _downloadOptions = commons.DownloadOptions.Metadata; | 2000 var _downloadOptions = commons.DownloadOptions.Metadata; |
1953 var _body = null; | 2001 var _body = null; |
1954 | 2002 |
1955 if (enterpriseId == null) { | 2003 if (enterpriseId == null) { |
1956 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2004 throw new core.ArgumentError("Parameter enterpriseId is required."); |
1957 } | 2005 } |
1958 if (userId == null) { | 2006 if (userId == null) { |
1959 throw new core.ArgumentError("Parameter userId is required."); | 2007 throw new core.ArgumentError("Parameter userId is required."); |
1960 } | 2008 } |
1961 if (deviceId == null) { | 2009 if (deviceId == null) { |
1962 throw new core.ArgumentError("Parameter deviceId is required."); | 2010 throw new core.ArgumentError("Parameter deviceId is required."); |
1963 } | 2011 } |
1964 | 2012 |
1965 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/managedConfigurationsForDevice'; | 2013 _url = 'enterprises/' + |
| 2014 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2015 '/users/' + |
| 2016 commons.Escaper.ecapeVariable('$userId') + |
| 2017 '/devices/' + |
| 2018 commons.Escaper.ecapeVariable('$deviceId') + |
| 2019 '/managedConfigurationsForDevice'; |
1966 | 2020 |
1967 var _response = _requester.request(_url, | 2021 var _response = _requester.request(_url, "GET", |
1968 "GET", | 2022 body: _body, |
1969 body: _body, | 2023 queryParams: _queryParams, |
1970 queryParams: _queryParams, | 2024 uploadOptions: _uploadOptions, |
1971 uploadOptions: _uploadOptions, | 2025 uploadMedia: _uploadMedia, |
1972 uploadMedia: _uploadMedia, | 2026 downloadOptions: _downloadOptions); |
1973 downloadOptions: _downloadOptions); | 2027 return _response.then((data) => |
1974 return _response.then((data) => new ManagedConfigurationsForDeviceListRespon
se.fromJson(data)); | 2028 new ManagedConfigurationsForDeviceListResponse.fromJson(data)); |
1975 } | 2029 } |
1976 | 2030 |
1977 /** | 2031 /// Adds or updates a per-device managed configuration for an app for the |
1978 * Adds or updates a per-device managed configuration for an app for the | 2032 /// specified device. This method supports patch semantics. |
1979 * specified device. This method supports patch semantics. | 2033 /// |
1980 * | 2034 /// [request] - The metadata request object. |
1981 * [request] - The metadata request object. | 2035 /// |
1982 * | 2036 /// Request parameters: |
1983 * Request parameters: | 2037 /// |
1984 * | 2038 /// [enterpriseId] - The ID of the enterprise. |
1985 * [enterpriseId] - The ID of the enterprise. | 2039 /// |
1986 * | 2040 /// [userId] - The ID of the user. |
1987 * [userId] - The ID of the user. | 2041 /// |
1988 * | 2042 /// [deviceId] - The Android ID of the device. |
1989 * [deviceId] - The Android ID of the device. | 2043 /// |
1990 * | 2044 /// [managedConfigurationForDeviceId] - The ID of the managed configuration |
1991 * [managedConfigurationForDeviceId] - The ID of the managed configuration (a | 2045 /// (a product ID), e.g. "app:com.google.android.gm". |
1992 * product ID), e.g. "app:com.google.android.gm". | 2046 /// |
1993 * | 2047 /// Completes with a [ManagedConfiguration]. |
1994 * Completes with a [ManagedConfiguration]. | 2048 /// |
1995 * | 2049 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1996 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2050 /// an error. |
1997 * error. | 2051 /// |
1998 * | 2052 /// If the used [http.Client] completes with an error when making a REST |
1999 * If the used [http.Client] completes with an error when making a REST call, | 2053 /// call, this method will complete with the same error. |
2000 * this method will complete with the same error. | 2054 async.Future<ManagedConfiguration> patch( |
2001 */ | 2055 ManagedConfiguration request, |
2002 async.Future<ManagedConfiguration> patch(ManagedConfiguration request, core.St
ring enterpriseId, core.String userId, core.String deviceId, core.String managed
ConfigurationForDeviceId) { | 2056 core.String enterpriseId, |
| 2057 core.String userId, |
| 2058 core.String deviceId, |
| 2059 core.String managedConfigurationForDeviceId) { |
2003 var _url = null; | 2060 var _url = null; |
2004 var _queryParams = new core.Map(); | 2061 var _queryParams = new core.Map(); |
2005 var _uploadMedia = null; | 2062 var _uploadMedia = null; |
2006 var _uploadOptions = null; | 2063 var _uploadOptions = null; |
2007 var _downloadOptions = commons.DownloadOptions.Metadata; | 2064 var _downloadOptions = commons.DownloadOptions.Metadata; |
2008 var _body = null; | 2065 var _body = null; |
2009 | 2066 |
2010 if (request != null) { | 2067 if (request != null) { |
2011 _body = convert.JSON.encode((request).toJson()); | 2068 _body = convert.JSON.encode((request).toJson()); |
2012 } | 2069 } |
2013 if (enterpriseId == null) { | 2070 if (enterpriseId == null) { |
2014 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2071 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2015 } | 2072 } |
2016 if (userId == null) { | 2073 if (userId == null) { |
2017 throw new core.ArgumentError("Parameter userId is required."); | 2074 throw new core.ArgumentError("Parameter userId is required."); |
2018 } | 2075 } |
2019 if (deviceId == null) { | 2076 if (deviceId == null) { |
2020 throw new core.ArgumentError("Parameter deviceId is required."); | 2077 throw new core.ArgumentError("Parameter deviceId is required."); |
2021 } | 2078 } |
2022 if (managedConfigurationForDeviceId == null) { | 2079 if (managedConfigurationForDeviceId == null) { |
2023 throw new core.ArgumentError("Parameter managedConfigurationForDeviceId is
required."); | 2080 throw new core.ArgumentError( |
| 2081 "Parameter managedConfigurationForDeviceId is required."); |
2024 } | 2082 } |
2025 | 2083 |
2026 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/managedConfigurationsForDevice/' + commons.Esca
per.ecapeVariable('$managedConfigurationForDeviceId'); | 2084 _url = 'enterprises/' + |
| 2085 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2086 '/users/' + |
| 2087 commons.Escaper.ecapeVariable('$userId') + |
| 2088 '/devices/' + |
| 2089 commons.Escaper.ecapeVariable('$deviceId') + |
| 2090 '/managedConfigurationsForDevice/' + |
| 2091 commons.Escaper.ecapeVariable('$managedConfigurationForDeviceId'); |
2027 | 2092 |
2028 var _response = _requester.request(_url, | 2093 var _response = _requester.request(_url, "PATCH", |
2029 "PATCH", | 2094 body: _body, |
2030 body: _body, | 2095 queryParams: _queryParams, |
2031 queryParams: _queryParams, | 2096 uploadOptions: _uploadOptions, |
2032 uploadOptions: _uploadOptions, | 2097 uploadMedia: _uploadMedia, |
2033 uploadMedia: _uploadMedia, | 2098 downloadOptions: _downloadOptions); |
2034 downloadOptions: _downloadOptions); | |
2035 return _response.then((data) => new ManagedConfiguration.fromJson(data)); | 2099 return _response.then((data) => new ManagedConfiguration.fromJson(data)); |
2036 } | 2100 } |
2037 | 2101 |
2038 /** | 2102 /// Adds or updates a per-device managed configuration for an app for the |
2039 * Adds or updates a per-device managed configuration for an app for the | 2103 /// specified device. |
2040 * specified device. | 2104 /// |
2041 * | 2105 /// [request] - The metadata request object. |
2042 * [request] - The metadata request object. | 2106 /// |
2043 * | 2107 /// Request parameters: |
2044 * Request parameters: | 2108 /// |
2045 * | 2109 /// [enterpriseId] - The ID of the enterprise. |
2046 * [enterpriseId] - The ID of the enterprise. | 2110 /// |
2047 * | 2111 /// [userId] - The ID of the user. |
2048 * [userId] - The ID of the user. | 2112 /// |
2049 * | 2113 /// [deviceId] - The Android ID of the device. |
2050 * [deviceId] - The Android ID of the device. | 2114 /// |
2051 * | 2115 /// [managedConfigurationForDeviceId] - The ID of the managed configuration |
2052 * [managedConfigurationForDeviceId] - The ID of the managed configuration (a | 2116 /// (a product ID), e.g. "app:com.google.android.gm". |
2053 * product ID), e.g. "app:com.google.android.gm". | 2117 /// |
2054 * | 2118 /// Completes with a [ManagedConfiguration]. |
2055 * Completes with a [ManagedConfiguration]. | 2119 /// |
2056 * | 2120 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2057 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2121 /// an error. |
2058 * error. | 2122 /// |
2059 * | 2123 /// If the used [http.Client] completes with an error when making a REST |
2060 * If the used [http.Client] completes with an error when making a REST call, | 2124 /// call, this method will complete with the same error. |
2061 * this method will complete with the same error. | 2125 async.Future<ManagedConfiguration> update( |
2062 */ | 2126 ManagedConfiguration request, |
2063 async.Future<ManagedConfiguration> update(ManagedConfiguration request, core.S
tring enterpriseId, core.String userId, core.String deviceId, core.String manage
dConfigurationForDeviceId) { | 2127 core.String enterpriseId, |
| 2128 core.String userId, |
| 2129 core.String deviceId, |
| 2130 core.String managedConfigurationForDeviceId) { |
2064 var _url = null; | 2131 var _url = null; |
2065 var _queryParams = new core.Map(); | 2132 var _queryParams = new core.Map(); |
2066 var _uploadMedia = null; | 2133 var _uploadMedia = null; |
2067 var _uploadOptions = null; | 2134 var _uploadOptions = null; |
2068 var _downloadOptions = commons.DownloadOptions.Metadata; | 2135 var _downloadOptions = commons.DownloadOptions.Metadata; |
2069 var _body = null; | 2136 var _body = null; |
2070 | 2137 |
2071 if (request != null) { | 2138 if (request != null) { |
2072 _body = convert.JSON.encode((request).toJson()); | 2139 _body = convert.JSON.encode((request).toJson()); |
2073 } | 2140 } |
2074 if (enterpriseId == null) { | 2141 if (enterpriseId == null) { |
2075 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2142 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2076 } | 2143 } |
2077 if (userId == null) { | 2144 if (userId == null) { |
2078 throw new core.ArgumentError("Parameter userId is required."); | 2145 throw new core.ArgumentError("Parameter userId is required."); |
2079 } | 2146 } |
2080 if (deviceId == null) { | 2147 if (deviceId == null) { |
2081 throw new core.ArgumentError("Parameter deviceId is required."); | 2148 throw new core.ArgumentError("Parameter deviceId is required."); |
2082 } | 2149 } |
2083 if (managedConfigurationForDeviceId == null) { | 2150 if (managedConfigurationForDeviceId == null) { |
2084 throw new core.ArgumentError("Parameter managedConfigurationForDeviceId is
required."); | 2151 throw new core.ArgumentError( |
| 2152 "Parameter managedConfigurationForDeviceId is required."); |
2085 } | 2153 } |
2086 | 2154 |
2087 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/devices/' + commons.Escape
r.ecapeVariable('$deviceId') + '/managedConfigurationsForDevice/' + commons.Esca
per.ecapeVariable('$managedConfigurationForDeviceId'); | 2155 _url = 'enterprises/' + |
| 2156 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2157 '/users/' + |
| 2158 commons.Escaper.ecapeVariable('$userId') + |
| 2159 '/devices/' + |
| 2160 commons.Escaper.ecapeVariable('$deviceId') + |
| 2161 '/managedConfigurationsForDevice/' + |
| 2162 commons.Escaper.ecapeVariable('$managedConfigurationForDeviceId'); |
2088 | 2163 |
2089 var _response = _requester.request(_url, | 2164 var _response = _requester.request(_url, "PUT", |
2090 "PUT", | 2165 body: _body, |
2091 body: _body, | 2166 queryParams: _queryParams, |
2092 queryParams: _queryParams, | 2167 uploadOptions: _uploadOptions, |
2093 uploadOptions: _uploadOptions, | 2168 uploadMedia: _uploadMedia, |
2094 uploadMedia: _uploadMedia, | 2169 downloadOptions: _downloadOptions); |
2095 downloadOptions: _downloadOptions); | |
2096 return _response.then((data) => new ManagedConfiguration.fromJson(data)); | 2170 return _response.then((data) => new ManagedConfiguration.fromJson(data)); |
2097 } | 2171 } |
2098 | |
2099 } | 2172 } |
2100 | 2173 |
2101 | |
2102 class ManagedconfigurationsforuserResourceApi { | 2174 class ManagedconfigurationsforuserResourceApi { |
2103 final commons.ApiRequester _requester; | 2175 final commons.ApiRequester _requester; |
2104 | 2176 |
2105 ManagedconfigurationsforuserResourceApi(commons.ApiRequester client) : | 2177 ManagedconfigurationsforuserResourceApi(commons.ApiRequester client) |
2106 _requester = client; | 2178 : _requester = client; |
2107 | 2179 |
2108 /** | 2180 /// Removes a per-user managed configuration for an app for the specified |
2109 * Removes a per-user managed configuration for an app for the specified user. | 2181 /// user. |
2110 * | 2182 /// |
2111 * Request parameters: | 2183 /// Request parameters: |
2112 * | 2184 /// |
2113 * [enterpriseId] - The ID of the enterprise. | 2185 /// [enterpriseId] - The ID of the enterprise. |
2114 * | 2186 /// |
2115 * [userId] - The ID of the user. | 2187 /// [userId] - The ID of the user. |
2116 * | 2188 /// |
2117 * [managedConfigurationForUserId] - The ID of the managed configuration (a | 2189 /// [managedConfigurationForUserId] - The ID of the managed configuration (a |
2118 * product ID), e.g. "app:com.google.android.gm". | 2190 /// product ID), e.g. "app:com.google.android.gm". |
2119 * | 2191 /// |
2120 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2192 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2121 * error. | 2193 /// an error. |
2122 * | 2194 /// |
2123 * If the used [http.Client] completes with an error when making a REST call, | 2195 /// If the used [http.Client] completes with an error when making a REST |
2124 * this method will complete with the same error. | 2196 /// call, this method will complete with the same error. |
2125 */ | 2197 async.Future delete(core.String enterpriseId, core.String userId, |
2126 async.Future delete(core.String enterpriseId, core.String userId, core.String
managedConfigurationForUserId) { | 2198 core.String managedConfigurationForUserId) { |
2127 var _url = null; | 2199 var _url = null; |
2128 var _queryParams = new core.Map(); | 2200 var _queryParams = new core.Map(); |
2129 var _uploadMedia = null; | 2201 var _uploadMedia = null; |
2130 var _uploadOptions = null; | 2202 var _uploadOptions = null; |
2131 var _downloadOptions = commons.DownloadOptions.Metadata; | 2203 var _downloadOptions = commons.DownloadOptions.Metadata; |
2132 var _body = null; | 2204 var _body = null; |
2133 | 2205 |
2134 if (enterpriseId == null) { | 2206 if (enterpriseId == null) { |
2135 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2207 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2136 } | 2208 } |
2137 if (userId == null) { | 2209 if (userId == null) { |
2138 throw new core.ArgumentError("Parameter userId is required."); | 2210 throw new core.ArgumentError("Parameter userId is required."); |
2139 } | 2211 } |
2140 if (managedConfigurationForUserId == null) { | 2212 if (managedConfigurationForUserId == null) { |
2141 throw new core.ArgumentError("Parameter managedConfigurationForUserId is r
equired."); | 2213 throw new core.ArgumentError( |
| 2214 "Parameter managedConfigurationForUserId is required."); |
2142 } | 2215 } |
2143 | 2216 |
2144 _downloadOptions = null; | 2217 _downloadOptions = null; |
2145 | 2218 |
2146 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/managedConfigurationsForUs
er/' + commons.Escaper.ecapeVariable('$managedConfigurationForUserId'); | 2219 _url = 'enterprises/' + |
| 2220 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2221 '/users/' + |
| 2222 commons.Escaper.ecapeVariable('$userId') + |
| 2223 '/managedConfigurationsForUser/' + |
| 2224 commons.Escaper.ecapeVariable('$managedConfigurationForUserId'); |
2147 | 2225 |
2148 var _response = _requester.request(_url, | 2226 var _response = _requester.request(_url, "DELETE", |
2149 "DELETE", | 2227 body: _body, |
2150 body: _body, | 2228 queryParams: _queryParams, |
2151 queryParams: _queryParams, | 2229 uploadOptions: _uploadOptions, |
2152 uploadOptions: _uploadOptions, | 2230 uploadMedia: _uploadMedia, |
2153 uploadMedia: _uploadMedia, | 2231 downloadOptions: _downloadOptions); |
2154 downloadOptions: _downloadOptions); | |
2155 return _response.then((data) => null); | 2232 return _response.then((data) => null); |
2156 } | 2233 } |
2157 | 2234 |
2158 /** | 2235 /// Retrieves details of a per-user managed configuration for an app for the |
2159 * Retrieves details of a per-user managed configuration for an app for the | 2236 /// specified user. |
2160 * specified user. | 2237 /// |
2161 * | 2238 /// Request parameters: |
2162 * Request parameters: | 2239 /// |
2163 * | 2240 /// [enterpriseId] - The ID of the enterprise. |
2164 * [enterpriseId] - The ID of the enterprise. | 2241 /// |
2165 * | 2242 /// [userId] - The ID of the user. |
2166 * [userId] - The ID of the user. | 2243 /// |
2167 * | 2244 /// [managedConfigurationForUserId] - The ID of the managed configuration (a |
2168 * [managedConfigurationForUserId] - The ID of the managed configuration (a | 2245 /// product ID), e.g. "app:com.google.android.gm". |
2169 * product ID), e.g. "app:com.google.android.gm". | 2246 /// |
2170 * | 2247 /// Completes with a [ManagedConfiguration]. |
2171 * Completes with a [ManagedConfiguration]. | 2248 /// |
2172 * | 2249 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2173 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2250 /// an error. |
2174 * error. | 2251 /// |
2175 * | 2252 /// If the used [http.Client] completes with an error when making a REST |
2176 * If the used [http.Client] completes with an error when making a REST call, | 2253 /// call, this method will complete with the same error. |
2177 * this method will complete with the same error. | 2254 async.Future<ManagedConfiguration> get(core.String enterpriseId, |
2178 */ | 2255 core.String userId, core.String managedConfigurationForUserId) { |
2179 async.Future<ManagedConfiguration> get(core.String enterpriseId, core.String u
serId, core.String managedConfigurationForUserId) { | |
2180 var _url = null; | 2256 var _url = null; |
2181 var _queryParams = new core.Map(); | 2257 var _queryParams = new core.Map(); |
2182 var _uploadMedia = null; | 2258 var _uploadMedia = null; |
2183 var _uploadOptions = null; | 2259 var _uploadOptions = null; |
2184 var _downloadOptions = commons.DownloadOptions.Metadata; | 2260 var _downloadOptions = commons.DownloadOptions.Metadata; |
2185 var _body = null; | 2261 var _body = null; |
2186 | 2262 |
2187 if (enterpriseId == null) { | 2263 if (enterpriseId == null) { |
2188 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2264 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2189 } | 2265 } |
2190 if (userId == null) { | 2266 if (userId == null) { |
2191 throw new core.ArgumentError("Parameter userId is required."); | 2267 throw new core.ArgumentError("Parameter userId is required."); |
2192 } | 2268 } |
2193 if (managedConfigurationForUserId == null) { | 2269 if (managedConfigurationForUserId == null) { |
2194 throw new core.ArgumentError("Parameter managedConfigurationForUserId is r
equired."); | 2270 throw new core.ArgumentError( |
| 2271 "Parameter managedConfigurationForUserId is required."); |
2195 } | 2272 } |
2196 | 2273 |
2197 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/managedConfigurationsForUs
er/' + commons.Escaper.ecapeVariable('$managedConfigurationForUserId'); | 2274 _url = 'enterprises/' + |
| 2275 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2276 '/users/' + |
| 2277 commons.Escaper.ecapeVariable('$userId') + |
| 2278 '/managedConfigurationsForUser/' + |
| 2279 commons.Escaper.ecapeVariable('$managedConfigurationForUserId'); |
2198 | 2280 |
2199 var _response = _requester.request(_url, | 2281 var _response = _requester.request(_url, "GET", |
2200 "GET", | 2282 body: _body, |
2201 body: _body, | 2283 queryParams: _queryParams, |
2202 queryParams: _queryParams, | 2284 uploadOptions: _uploadOptions, |
2203 uploadOptions: _uploadOptions, | 2285 uploadMedia: _uploadMedia, |
2204 uploadMedia: _uploadMedia, | 2286 downloadOptions: _downloadOptions); |
2205 downloadOptions: _downloadOptions); | |
2206 return _response.then((data) => new ManagedConfiguration.fromJson(data)); | 2287 return _response.then((data) => new ManagedConfiguration.fromJson(data)); |
2207 } | 2288 } |
2208 | 2289 |
2209 /** | 2290 /// Lists all the per-user managed configurations for the specified user. |
2210 * Lists all the per-user managed configurations for the specified user. Only | 2291 /// Only the ID is set. |
2211 * the ID is set. | 2292 /// |
2212 * | 2293 /// Request parameters: |
2213 * Request parameters: | 2294 /// |
2214 * | 2295 /// [enterpriseId] - The ID of the enterprise. |
2215 * [enterpriseId] - The ID of the enterprise. | 2296 /// |
2216 * | 2297 /// [userId] - The ID of the user. |
2217 * [userId] - The ID of the user. | 2298 /// |
2218 * | 2299 /// Completes with a [ManagedConfigurationsForUserListResponse]. |
2219 * Completes with a [ManagedConfigurationsForUserListResponse]. | 2300 /// |
2220 * | 2301 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2221 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2302 /// an error. |
2222 * error. | 2303 /// |
2223 * | 2304 /// If the used [http.Client] completes with an error when making a REST |
2224 * If the used [http.Client] completes with an error when making a REST call, | 2305 /// call, this method will complete with the same error. |
2225 * this method will complete with the same error. | 2306 async.Future<ManagedConfigurationsForUserListResponse> list( |
2226 */ | 2307 core.String enterpriseId, core.String userId) { |
2227 async.Future<ManagedConfigurationsForUserListResponse> list(core.String enterp
riseId, core.String userId) { | |
2228 var _url = null; | 2308 var _url = null; |
2229 var _queryParams = new core.Map(); | 2309 var _queryParams = new core.Map(); |
2230 var _uploadMedia = null; | 2310 var _uploadMedia = null; |
2231 var _uploadOptions = null; | 2311 var _uploadOptions = null; |
2232 var _downloadOptions = commons.DownloadOptions.Metadata; | 2312 var _downloadOptions = commons.DownloadOptions.Metadata; |
2233 var _body = null; | 2313 var _body = null; |
2234 | 2314 |
2235 if (enterpriseId == null) { | 2315 if (enterpriseId == null) { |
2236 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2316 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2237 } | 2317 } |
2238 if (userId == null) { | 2318 if (userId == null) { |
2239 throw new core.ArgumentError("Parameter userId is required."); | 2319 throw new core.ArgumentError("Parameter userId is required."); |
2240 } | 2320 } |
2241 | 2321 |
2242 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/managedConfigurationsForUs
er'; | 2322 _url = 'enterprises/' + |
| 2323 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2324 '/users/' + |
| 2325 commons.Escaper.ecapeVariable('$userId') + |
| 2326 '/managedConfigurationsForUser'; |
2243 | 2327 |
2244 var _response = _requester.request(_url, | 2328 var _response = _requester.request(_url, "GET", |
2245 "GET", | 2329 body: _body, |
2246 body: _body, | 2330 queryParams: _queryParams, |
2247 queryParams: _queryParams, | 2331 uploadOptions: _uploadOptions, |
2248 uploadOptions: _uploadOptions, | 2332 uploadMedia: _uploadMedia, |
2249 uploadMedia: _uploadMedia, | 2333 downloadOptions: _downloadOptions); |
2250 downloadOptions: _downloadOptions); | 2334 return _response.then( |
2251 return _response.then((data) => new ManagedConfigurationsForUserListResponse
.fromJson(data)); | 2335 (data) => new ManagedConfigurationsForUserListResponse.fromJson(data)); |
2252 } | 2336 } |
2253 | 2337 |
2254 /** | 2338 /// Adds or updates a per-user managed configuration for an app for the |
2255 * Adds or updates a per-user managed configuration for an app for the | 2339 /// specified user. This method supports patch semantics. |
2256 * specified user. This method supports patch semantics. | 2340 /// |
2257 * | 2341 /// [request] - The metadata request object. |
2258 * [request] - The metadata request object. | 2342 /// |
2259 * | 2343 /// Request parameters: |
2260 * Request parameters: | 2344 /// |
2261 * | 2345 /// [enterpriseId] - The ID of the enterprise. |
2262 * [enterpriseId] - The ID of the enterprise. | 2346 /// |
2263 * | 2347 /// [userId] - The ID of the user. |
2264 * [userId] - The ID of the user. | 2348 /// |
2265 * | 2349 /// [managedConfigurationForUserId] - The ID of the managed configuration (a |
2266 * [managedConfigurationForUserId] - The ID of the managed configuration (a | 2350 /// product ID), e.g. "app:com.google.android.gm". |
2267 * product ID), e.g. "app:com.google.android.gm". | 2351 /// |
2268 * | 2352 /// Completes with a [ManagedConfiguration]. |
2269 * Completes with a [ManagedConfiguration]. | 2353 /// |
2270 * | 2354 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2271 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2355 /// an error. |
2272 * error. | 2356 /// |
2273 * | 2357 /// If the used [http.Client] completes with an error when making a REST |
2274 * If the used [http.Client] completes with an error when making a REST call, | 2358 /// call, this method will complete with the same error. |
2275 * this method will complete with the same error. | 2359 async.Future<ManagedConfiguration> patch( |
2276 */ | 2360 ManagedConfiguration request, |
2277 async.Future<ManagedConfiguration> patch(ManagedConfiguration request, core.St
ring enterpriseId, core.String userId, core.String managedConfigurationForUserId
) { | 2361 core.String enterpriseId, |
| 2362 core.String userId, |
| 2363 core.String managedConfigurationForUserId) { |
2278 var _url = null; | 2364 var _url = null; |
2279 var _queryParams = new core.Map(); | 2365 var _queryParams = new core.Map(); |
2280 var _uploadMedia = null; | 2366 var _uploadMedia = null; |
2281 var _uploadOptions = null; | 2367 var _uploadOptions = null; |
2282 var _downloadOptions = commons.DownloadOptions.Metadata; | 2368 var _downloadOptions = commons.DownloadOptions.Metadata; |
2283 var _body = null; | 2369 var _body = null; |
2284 | 2370 |
2285 if (request != null) { | 2371 if (request != null) { |
2286 _body = convert.JSON.encode((request).toJson()); | 2372 _body = convert.JSON.encode((request).toJson()); |
2287 } | 2373 } |
2288 if (enterpriseId == null) { | 2374 if (enterpriseId == null) { |
2289 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2375 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2290 } | 2376 } |
2291 if (userId == null) { | 2377 if (userId == null) { |
2292 throw new core.ArgumentError("Parameter userId is required."); | 2378 throw new core.ArgumentError("Parameter userId is required."); |
2293 } | 2379 } |
2294 if (managedConfigurationForUserId == null) { | 2380 if (managedConfigurationForUserId == null) { |
2295 throw new core.ArgumentError("Parameter managedConfigurationForUserId is r
equired."); | 2381 throw new core.ArgumentError( |
| 2382 "Parameter managedConfigurationForUserId is required."); |
2296 } | 2383 } |
2297 | 2384 |
2298 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/managedConfigurationsForUs
er/' + commons.Escaper.ecapeVariable('$managedConfigurationForUserId'); | 2385 _url = 'enterprises/' + |
| 2386 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2387 '/users/' + |
| 2388 commons.Escaper.ecapeVariable('$userId') + |
| 2389 '/managedConfigurationsForUser/' + |
| 2390 commons.Escaper.ecapeVariable('$managedConfigurationForUserId'); |
2299 | 2391 |
2300 var _response = _requester.request(_url, | 2392 var _response = _requester.request(_url, "PATCH", |
2301 "PATCH", | 2393 body: _body, |
2302 body: _body, | 2394 queryParams: _queryParams, |
2303 queryParams: _queryParams, | 2395 uploadOptions: _uploadOptions, |
2304 uploadOptions: _uploadOptions, | 2396 uploadMedia: _uploadMedia, |
2305 uploadMedia: _uploadMedia, | 2397 downloadOptions: _downloadOptions); |
2306 downloadOptions: _downloadOptions); | |
2307 return _response.then((data) => new ManagedConfiguration.fromJson(data)); | 2398 return _response.then((data) => new ManagedConfiguration.fromJson(data)); |
2308 } | 2399 } |
2309 | 2400 |
2310 /** | 2401 /// Adds or updates a per-user managed configuration for an app for the |
2311 * Adds or updates a per-user managed configuration for an app for the | 2402 /// specified user. |
2312 * specified user. | 2403 /// |
2313 * | 2404 /// [request] - The metadata request object. |
2314 * [request] - The metadata request object. | 2405 /// |
2315 * | 2406 /// Request parameters: |
2316 * Request parameters: | 2407 /// |
2317 * | 2408 /// [enterpriseId] - The ID of the enterprise. |
2318 * [enterpriseId] - The ID of the enterprise. | 2409 /// |
2319 * | 2410 /// [userId] - The ID of the user. |
2320 * [userId] - The ID of the user. | 2411 /// |
2321 * | 2412 /// [managedConfigurationForUserId] - The ID of the managed configuration (a |
2322 * [managedConfigurationForUserId] - The ID of the managed configuration (a | 2413 /// product ID), e.g. "app:com.google.android.gm". |
2323 * product ID), e.g. "app:com.google.android.gm". | 2414 /// |
2324 * | 2415 /// Completes with a [ManagedConfiguration]. |
2325 * Completes with a [ManagedConfiguration]. | 2416 /// |
2326 * | 2417 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2327 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2418 /// an error. |
2328 * error. | 2419 /// |
2329 * | 2420 /// If the used [http.Client] completes with an error when making a REST |
2330 * If the used [http.Client] completes with an error when making a REST call, | 2421 /// call, this method will complete with the same error. |
2331 * this method will complete with the same error. | 2422 async.Future<ManagedConfiguration> update( |
2332 */ | 2423 ManagedConfiguration request, |
2333 async.Future<ManagedConfiguration> update(ManagedConfiguration request, core.S
tring enterpriseId, core.String userId, core.String managedConfigurationForUserI
d) { | 2424 core.String enterpriseId, |
| 2425 core.String userId, |
| 2426 core.String managedConfigurationForUserId) { |
2334 var _url = null; | 2427 var _url = null; |
2335 var _queryParams = new core.Map(); | 2428 var _queryParams = new core.Map(); |
2336 var _uploadMedia = null; | 2429 var _uploadMedia = null; |
2337 var _uploadOptions = null; | 2430 var _uploadOptions = null; |
2338 var _downloadOptions = commons.DownloadOptions.Metadata; | 2431 var _downloadOptions = commons.DownloadOptions.Metadata; |
2339 var _body = null; | 2432 var _body = null; |
2340 | 2433 |
2341 if (request != null) { | 2434 if (request != null) { |
2342 _body = convert.JSON.encode((request).toJson()); | 2435 _body = convert.JSON.encode((request).toJson()); |
2343 } | 2436 } |
2344 if (enterpriseId == null) { | 2437 if (enterpriseId == null) { |
2345 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2438 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2346 } | 2439 } |
2347 if (userId == null) { | 2440 if (userId == null) { |
2348 throw new core.ArgumentError("Parameter userId is required."); | 2441 throw new core.ArgumentError("Parameter userId is required."); |
2349 } | 2442 } |
2350 if (managedConfigurationForUserId == null) { | 2443 if (managedConfigurationForUserId == null) { |
2351 throw new core.ArgumentError("Parameter managedConfigurationForUserId is r
equired."); | 2444 throw new core.ArgumentError( |
| 2445 "Parameter managedConfigurationForUserId is required."); |
2352 } | 2446 } |
2353 | 2447 |
2354 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/managedConfigurationsForUs
er/' + commons.Escaper.ecapeVariable('$managedConfigurationForUserId'); | 2448 _url = 'enterprises/' + |
| 2449 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2450 '/users/' + |
| 2451 commons.Escaper.ecapeVariable('$userId') + |
| 2452 '/managedConfigurationsForUser/' + |
| 2453 commons.Escaper.ecapeVariable('$managedConfigurationForUserId'); |
2355 | 2454 |
2356 var _response = _requester.request(_url, | 2455 var _response = _requester.request(_url, "PUT", |
2357 "PUT", | 2456 body: _body, |
2358 body: _body, | 2457 queryParams: _queryParams, |
2359 queryParams: _queryParams, | 2458 uploadOptions: _uploadOptions, |
2360 uploadOptions: _uploadOptions, | 2459 uploadMedia: _uploadMedia, |
2361 uploadMedia: _uploadMedia, | 2460 downloadOptions: _downloadOptions); |
2362 downloadOptions: _downloadOptions); | |
2363 return _response.then((data) => new ManagedConfiguration.fromJson(data)); | 2461 return _response.then((data) => new ManagedConfiguration.fromJson(data)); |
2364 } | 2462 } |
2365 | |
2366 } | 2463 } |
2367 | 2464 |
2368 | |
2369 class PermissionsResourceApi { | 2465 class PermissionsResourceApi { |
2370 final commons.ApiRequester _requester; | 2466 final commons.ApiRequester _requester; |
2371 | 2467 |
2372 PermissionsResourceApi(commons.ApiRequester client) : | 2468 PermissionsResourceApi(commons.ApiRequester client) : _requester = client; |
2373 _requester = client; | |
2374 | 2469 |
2375 /** | 2470 /// Retrieves details of an Android app permission for display to an |
2376 * Retrieves details of an Android app permission for display to an enterprise | 2471 /// enterprise admin. |
2377 * admin. | 2472 /// |
2378 * | 2473 /// Request parameters: |
2379 * Request parameters: | 2474 /// |
2380 * | 2475 /// [permissionId] - The ID of the permission. |
2381 * [permissionId] - The ID of the permission. | 2476 /// |
2382 * | 2477 /// [language] - The BCP47 tag for the user's preferred language (e.g. |
2383 * [language] - The BCP47 tag for the user's preferred language (e.g. "en-US", | 2478 /// "en-US", "de") |
2384 * "de") | 2479 /// |
2385 * | 2480 /// Completes with a [Permission]. |
2386 * Completes with a [Permission]. | 2481 /// |
2387 * | 2482 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2388 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2483 /// an error. |
2389 * error. | 2484 /// |
2390 * | 2485 /// If the used [http.Client] completes with an error when making a REST |
2391 * If the used [http.Client] completes with an error when making a REST call, | 2486 /// call, this method will complete with the same error. |
2392 * this method will complete with the same error. | 2487 async.Future<Permission> get(core.String permissionId, |
2393 */ | 2488 {core.String language}) { |
2394 async.Future<Permission> get(core.String permissionId, {core.String language})
{ | |
2395 var _url = null; | 2489 var _url = null; |
2396 var _queryParams = new core.Map(); | 2490 var _queryParams = new core.Map(); |
2397 var _uploadMedia = null; | 2491 var _uploadMedia = null; |
2398 var _uploadOptions = null; | 2492 var _uploadOptions = null; |
2399 var _downloadOptions = commons.DownloadOptions.Metadata; | 2493 var _downloadOptions = commons.DownloadOptions.Metadata; |
2400 var _body = null; | 2494 var _body = null; |
2401 | 2495 |
2402 if (permissionId == null) { | 2496 if (permissionId == null) { |
2403 throw new core.ArgumentError("Parameter permissionId is required."); | 2497 throw new core.ArgumentError("Parameter permissionId is required."); |
2404 } | 2498 } |
2405 if (language != null) { | 2499 if (language != null) { |
2406 _queryParams["language"] = [language]; | 2500 _queryParams["language"] = [language]; |
2407 } | 2501 } |
2408 | 2502 |
2409 _url = 'permissions/' + commons.Escaper.ecapeVariable('$permissionId'); | 2503 _url = 'permissions/' + commons.Escaper.ecapeVariable('$permissionId'); |
2410 | 2504 |
2411 var _response = _requester.request(_url, | 2505 var _response = _requester.request(_url, "GET", |
2412 "GET", | 2506 body: _body, |
2413 body: _body, | 2507 queryParams: _queryParams, |
2414 queryParams: _queryParams, | 2508 uploadOptions: _uploadOptions, |
2415 uploadOptions: _uploadOptions, | 2509 uploadMedia: _uploadMedia, |
2416 uploadMedia: _uploadMedia, | 2510 downloadOptions: _downloadOptions); |
2417 downloadOptions: _downloadOptions); | |
2418 return _response.then((data) => new Permission.fromJson(data)); | 2511 return _response.then((data) => new Permission.fromJson(data)); |
2419 } | 2512 } |
2420 | |
2421 } | 2513 } |
2422 | 2514 |
2423 | |
2424 class ProductsResourceApi { | 2515 class ProductsResourceApi { |
2425 final commons.ApiRequester _requester; | 2516 final commons.ApiRequester _requester; |
2426 | 2517 |
2427 ProductsResourceApi(commons.ApiRequester client) : | 2518 ProductsResourceApi(commons.ApiRequester client) : _requester = client; |
2428 _requester = client; | |
2429 | 2519 |
2430 /** | 2520 /// Approves the specified product and the relevant app permissions, if any. |
2431 * Approves the specified product and the relevant app permissions, if any. | 2521 /// The maximum number of products that you can approve per enterprise |
2432 * The maximum number of products that you can approve per enterprise customer | 2522 /// customer is 1,000. |
2433 * is 1,000. | 2523 /// |
2434 * | 2524 /// To learn how to use managed Google Play to design and create a store |
2435 * To learn how to use managed Google Play to design and create a store layout | 2525 /// layout to display approved products to your users, see Store Layout |
2436 * to display approved products to your users, see Store Layout Design. | 2526 /// Design. |
2437 * | 2527 /// |
2438 * [request] - The metadata request object. | 2528 /// [request] - The metadata request object. |
2439 * | 2529 /// |
2440 * Request parameters: | 2530 /// Request parameters: |
2441 * | 2531 /// |
2442 * [enterpriseId] - The ID of the enterprise. | 2532 /// [enterpriseId] - The ID of the enterprise. |
2443 * | 2533 /// |
2444 * [productId] - The ID of the product. | 2534 /// [productId] - The ID of the product. |
2445 * | 2535 /// |
2446 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2536 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2447 * error. | 2537 /// an error. |
2448 * | 2538 /// |
2449 * If the used [http.Client] completes with an error when making a REST call, | 2539 /// If the used [http.Client] completes with an error when making a REST |
2450 * this method will complete with the same error. | 2540 /// call, this method will complete with the same error. |
2451 */ | 2541 async.Future approve(ProductsApproveRequest request, core.String enterpriseId, |
2452 async.Future approve(ProductsApproveRequest request, core.String enterpriseId,
core.String productId) { | 2542 core.String productId) { |
2453 var _url = null; | 2543 var _url = null; |
2454 var _queryParams = new core.Map(); | 2544 var _queryParams = new core.Map(); |
2455 var _uploadMedia = null; | 2545 var _uploadMedia = null; |
2456 var _uploadOptions = null; | 2546 var _uploadOptions = null; |
2457 var _downloadOptions = commons.DownloadOptions.Metadata; | 2547 var _downloadOptions = commons.DownloadOptions.Metadata; |
2458 var _body = null; | 2548 var _body = null; |
2459 | 2549 |
2460 if (request != null) { | 2550 if (request != null) { |
2461 _body = convert.JSON.encode((request).toJson()); | 2551 _body = convert.JSON.encode((request).toJson()); |
2462 } | 2552 } |
2463 if (enterpriseId == null) { | 2553 if (enterpriseId == null) { |
2464 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2554 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2465 } | 2555 } |
2466 if (productId == null) { | 2556 if (productId == null) { |
2467 throw new core.ArgumentError("Parameter productId is required."); | 2557 throw new core.ArgumentError("Parameter productId is required."); |
2468 } | 2558 } |
2469 | 2559 |
2470 _downloadOptions = null; | 2560 _downloadOptions = null; |
2471 | 2561 |
2472 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/p
roducts/' + commons.Escaper.ecapeVariable('$productId') + '/approve'; | 2562 _url = 'enterprises/' + |
| 2563 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2564 '/products/' + |
| 2565 commons.Escaper.ecapeVariable('$productId') + |
| 2566 '/approve'; |
2473 | 2567 |
2474 var _response = _requester.request(_url, | 2568 var _response = _requester.request(_url, "POST", |
2475 "POST", | 2569 body: _body, |
2476 body: _body, | 2570 queryParams: _queryParams, |
2477 queryParams: _queryParams, | 2571 uploadOptions: _uploadOptions, |
2478 uploadOptions: _uploadOptions, | 2572 uploadMedia: _uploadMedia, |
2479 uploadMedia: _uploadMedia, | 2573 downloadOptions: _downloadOptions); |
2480 downloadOptions: _downloadOptions); | |
2481 return _response.then((data) => null); | 2574 return _response.then((data) => null); |
2482 } | 2575 } |
2483 | 2576 |
2484 /** | 2577 /// Generates a URL that can be rendered in an iframe to display the |
2485 * Generates a URL that can be rendered in an iframe to display the | 2578 /// permissions (if any) of a product. An enterprise admin must view these |
2486 * permissions (if any) of a product. An enterprise admin must view these | 2579 /// permissions and accept them on behalf of their organization in order to |
2487 * permissions and accept them on behalf of their organization in order to | 2580 /// approve that product. |
2488 * approve that product. | 2581 /// |
2489 * | 2582 /// Admins should accept the displayed permissions by interacting with a |
2490 * Admins should accept the displayed permissions by interacting with a | 2583 /// separate UI element in the EMM console, which in turn should trigger the |
2491 * separate UI element in the EMM console, which in turn should trigger the | 2584 /// use of this URL as the approvalUrlInfo.approvalUrl property in a |
2492 * use of this URL as the approvalUrlInfo.approvalUrl property in a | 2585 /// Products.approve call to approve the product. This URL can only be used |
2493 * Products.approve call to approve the product. This URL can only be used to | 2586 /// to display permissions for up to 1 day. |
2494 * display permissions for up to 1 day. | 2587 /// |
2495 * | 2588 /// Request parameters: |
2496 * Request parameters: | 2589 /// |
2497 * | 2590 /// [enterpriseId] - The ID of the enterprise. |
2498 * [enterpriseId] - The ID of the enterprise. | 2591 /// |
2499 * | 2592 /// [productId] - The ID of the product. |
2500 * [productId] - The ID of the product. | 2593 /// |
2501 * | 2594 /// [languageCode] - The BCP 47 language code used for permission names and |
2502 * [languageCode] - The BCP 47 language code used for permission names and | 2595 /// descriptions in the returned iframe, for instance "en-US". |
2503 * descriptions in the returned iframe, for instance "en-US". | 2596 /// |
2504 * | 2597 /// Completes with a [ProductsGenerateApprovalUrlResponse]. |
2505 * Completes with a [ProductsGenerateApprovalUrlResponse]. | 2598 /// |
2506 * | 2599 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2507 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2600 /// an error. |
2508 * error. | 2601 /// |
2509 * | 2602 /// If the used [http.Client] completes with an error when making a REST |
2510 * If the used [http.Client] completes with an error when making a REST call, | 2603 /// call, this method will complete with the same error. |
2511 * this method will complete with the same error. | 2604 async.Future<ProductsGenerateApprovalUrlResponse> generateApprovalUrl( |
2512 */ | 2605 core.String enterpriseId, core.String productId, |
2513 async.Future<ProductsGenerateApprovalUrlResponse> generateApprovalUrl(core.Str
ing enterpriseId, core.String productId, {core.String languageCode}) { | 2606 {core.String languageCode}) { |
2514 var _url = null; | 2607 var _url = null; |
2515 var _queryParams = new core.Map(); | 2608 var _queryParams = new core.Map(); |
2516 var _uploadMedia = null; | 2609 var _uploadMedia = null; |
2517 var _uploadOptions = null; | 2610 var _uploadOptions = null; |
2518 var _downloadOptions = commons.DownloadOptions.Metadata; | 2611 var _downloadOptions = commons.DownloadOptions.Metadata; |
2519 var _body = null; | 2612 var _body = null; |
2520 | 2613 |
2521 if (enterpriseId == null) { | 2614 if (enterpriseId == null) { |
2522 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2615 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2523 } | 2616 } |
2524 if (productId == null) { | 2617 if (productId == null) { |
2525 throw new core.ArgumentError("Parameter productId is required."); | 2618 throw new core.ArgumentError("Parameter productId is required."); |
2526 } | 2619 } |
2527 if (languageCode != null) { | 2620 if (languageCode != null) { |
2528 _queryParams["languageCode"] = [languageCode]; | 2621 _queryParams["languageCode"] = [languageCode]; |
2529 } | 2622 } |
2530 | 2623 |
2531 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/p
roducts/' + commons.Escaper.ecapeVariable('$productId') + '/generateApprovalUrl'
; | 2624 _url = 'enterprises/' + |
| 2625 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2626 '/products/' + |
| 2627 commons.Escaper.ecapeVariable('$productId') + |
| 2628 '/generateApprovalUrl'; |
2532 | 2629 |
2533 var _response = _requester.request(_url, | 2630 var _response = _requester.request(_url, "POST", |
2534 "POST", | 2631 body: _body, |
2535 body: _body, | 2632 queryParams: _queryParams, |
2536 queryParams: _queryParams, | 2633 uploadOptions: _uploadOptions, |
2537 uploadOptions: _uploadOptions, | 2634 uploadMedia: _uploadMedia, |
2538 uploadMedia: _uploadMedia, | 2635 downloadOptions: _downloadOptions); |
2539 downloadOptions: _downloadOptions); | 2636 return _response |
2540 return _response.then((data) => new ProductsGenerateApprovalUrlResponse.from
Json(data)); | 2637 .then((data) => new ProductsGenerateApprovalUrlResponse.fromJson(data)); |
2541 } | 2638 } |
2542 | 2639 |
2543 /** | 2640 /// Retrieves details of a product for display to an enterprise admin. |
2544 * Retrieves details of a product for display to an enterprise admin. | 2641 /// |
2545 * | 2642 /// Request parameters: |
2546 * Request parameters: | 2643 /// |
2547 * | 2644 /// [enterpriseId] - The ID of the enterprise. |
2548 * [enterpriseId] - The ID of the enterprise. | 2645 /// |
2549 * | 2646 /// [productId] - The ID of the product, e.g. "app:com.google.android.gm". |
2550 * [productId] - The ID of the product, e.g. "app:com.google.android.gm". | 2647 /// |
2551 * | 2648 /// [language] - The BCP47 tag for the user's preferred language (e.g. |
2552 * [language] - The BCP47 tag for the user's preferred language (e.g. "en-US", | 2649 /// "en-US", "de"). |
2553 * "de"). | 2650 /// |
2554 * | 2651 /// Completes with a [Product]. |
2555 * Completes with a [Product]. | 2652 /// |
2556 * | 2653 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2557 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2654 /// an error. |
2558 * error. | 2655 /// |
2559 * | 2656 /// If the used [http.Client] completes with an error when making a REST |
2560 * If the used [http.Client] completes with an error when making a REST call, | 2657 /// call, this method will complete with the same error. |
2561 * this method will complete with the same error. | 2658 async.Future<Product> get(core.String enterpriseId, core.String productId, |
2562 */ | 2659 {core.String language}) { |
2563 async.Future<Product> get(core.String enterpriseId, core.String productId, {co
re.String language}) { | |
2564 var _url = null; | 2660 var _url = null; |
2565 var _queryParams = new core.Map(); | 2661 var _queryParams = new core.Map(); |
2566 var _uploadMedia = null; | 2662 var _uploadMedia = null; |
2567 var _uploadOptions = null; | 2663 var _uploadOptions = null; |
2568 var _downloadOptions = commons.DownloadOptions.Metadata; | 2664 var _downloadOptions = commons.DownloadOptions.Metadata; |
2569 var _body = null; | 2665 var _body = null; |
2570 | 2666 |
2571 if (enterpriseId == null) { | 2667 if (enterpriseId == null) { |
2572 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2668 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2573 } | 2669 } |
2574 if (productId == null) { | 2670 if (productId == null) { |
2575 throw new core.ArgumentError("Parameter productId is required."); | 2671 throw new core.ArgumentError("Parameter productId is required."); |
2576 } | 2672 } |
2577 if (language != null) { | 2673 if (language != null) { |
2578 _queryParams["language"] = [language]; | 2674 _queryParams["language"] = [language]; |
2579 } | 2675 } |
2580 | 2676 |
2581 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/p
roducts/' + commons.Escaper.ecapeVariable('$productId'); | 2677 _url = 'enterprises/' + |
| 2678 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2679 '/products/' + |
| 2680 commons.Escaper.ecapeVariable('$productId'); |
2582 | 2681 |
2583 var _response = _requester.request(_url, | 2682 var _response = _requester.request(_url, "GET", |
2584 "GET", | 2683 body: _body, |
2585 body: _body, | 2684 queryParams: _queryParams, |
2586 queryParams: _queryParams, | 2685 uploadOptions: _uploadOptions, |
2587 uploadOptions: _uploadOptions, | 2686 uploadMedia: _uploadMedia, |
2588 uploadMedia: _uploadMedia, | 2687 downloadOptions: _downloadOptions); |
2589 downloadOptions: _downloadOptions); | |
2590 return _response.then((data) => new Product.fromJson(data)); | 2688 return _response.then((data) => new Product.fromJson(data)); |
2591 } | 2689 } |
2592 | 2690 |
2593 /** | 2691 /// Retrieves the schema that defines the configurable properties for this |
2594 * Retrieves the schema that defines the configurable properties for this | 2692 /// product. All products have a schema, but this schema may be empty if no |
2595 * product. All products have a schema, but this schema may be empty if no | 2693 /// managed configurations have been defined. This schema can be used to |
2596 * managed configurations have been defined. This schema can be used to | 2694 /// populate a UI that allows an admin to configure the product. To apply a |
2597 * populate a UI that allows an admin to configure the product. To apply a | 2695 /// managed configuration based on the schema obtained using this API, see |
2598 * managed configuration based on the schema obtained using this API, see | 2696 /// Managed Configurations through Play. |
2599 * Managed Configurations through Play. | 2697 /// |
2600 * | 2698 /// Request parameters: |
2601 * Request parameters: | 2699 /// |
2602 * | 2700 /// [enterpriseId] - The ID of the enterprise. |
2603 * [enterpriseId] - The ID of the enterprise. | 2701 /// |
2604 * | 2702 /// [productId] - The ID of the product. |
2605 * [productId] - The ID of the product. | 2703 /// |
2606 * | 2704 /// [language] - The BCP47 tag for the user's preferred language (e.g. |
2607 * [language] - The BCP47 tag for the user's preferred language (e.g. "en-US", | 2705 /// "en-US", "de"). |
2608 * "de"). | 2706 /// |
2609 * | 2707 /// Completes with a [AppRestrictionsSchema]. |
2610 * Completes with a [AppRestrictionsSchema]. | 2708 /// |
2611 * | 2709 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2612 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2710 /// an error. |
2613 * error. | 2711 /// |
2614 * | 2712 /// If the used [http.Client] completes with an error when making a REST |
2615 * If the used [http.Client] completes with an error when making a REST call, | 2713 /// call, this method will complete with the same error. |
2616 * this method will complete with the same error. | 2714 async.Future<AppRestrictionsSchema> getAppRestrictionsSchema( |
2617 */ | 2715 core.String enterpriseId, core.String productId, |
2618 async.Future<AppRestrictionsSchema> getAppRestrictionsSchema(core.String enter
priseId, core.String productId, {core.String language}) { | 2716 {core.String language}) { |
2619 var _url = null; | 2717 var _url = null; |
2620 var _queryParams = new core.Map(); | 2718 var _queryParams = new core.Map(); |
2621 var _uploadMedia = null; | 2719 var _uploadMedia = null; |
2622 var _uploadOptions = null; | 2720 var _uploadOptions = null; |
2623 var _downloadOptions = commons.DownloadOptions.Metadata; | 2721 var _downloadOptions = commons.DownloadOptions.Metadata; |
2624 var _body = null; | 2722 var _body = null; |
2625 | 2723 |
2626 if (enterpriseId == null) { | 2724 if (enterpriseId == null) { |
2627 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2725 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2628 } | 2726 } |
2629 if (productId == null) { | 2727 if (productId == null) { |
2630 throw new core.ArgumentError("Parameter productId is required."); | 2728 throw new core.ArgumentError("Parameter productId is required."); |
2631 } | 2729 } |
2632 if (language != null) { | 2730 if (language != null) { |
2633 _queryParams["language"] = [language]; | 2731 _queryParams["language"] = [language]; |
2634 } | 2732 } |
2635 | 2733 |
2636 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/p
roducts/' + commons.Escaper.ecapeVariable('$productId') + '/appRestrictionsSchem
a'; | 2734 _url = 'enterprises/' + |
| 2735 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2736 '/products/' + |
| 2737 commons.Escaper.ecapeVariable('$productId') + |
| 2738 '/appRestrictionsSchema'; |
2637 | 2739 |
2638 var _response = _requester.request(_url, | 2740 var _response = _requester.request(_url, "GET", |
2639 "GET", | 2741 body: _body, |
2640 body: _body, | 2742 queryParams: _queryParams, |
2641 queryParams: _queryParams, | 2743 uploadOptions: _uploadOptions, |
2642 uploadOptions: _uploadOptions, | 2744 uploadMedia: _uploadMedia, |
2643 uploadMedia: _uploadMedia, | 2745 downloadOptions: _downloadOptions); |
2644 downloadOptions: _downloadOptions); | |
2645 return _response.then((data) => new AppRestrictionsSchema.fromJson(data)); | 2746 return _response.then((data) => new AppRestrictionsSchema.fromJson(data)); |
2646 } | 2747 } |
2647 | 2748 |
2648 /** | 2749 /// Retrieves the Android app permissions required by this app. |
2649 * Retrieves the Android app permissions required by this app. | 2750 /// |
2650 * | 2751 /// Request parameters: |
2651 * Request parameters: | 2752 /// |
2652 * | 2753 /// [enterpriseId] - The ID of the enterprise. |
2653 * [enterpriseId] - The ID of the enterprise. | 2754 /// |
2654 * | 2755 /// [productId] - The ID of the product. |
2655 * [productId] - The ID of the product. | 2756 /// |
2656 * | 2757 /// Completes with a [ProductPermissions]. |
2657 * Completes with a [ProductPermissions]. | 2758 /// |
2658 * | 2759 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2659 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2760 /// an error. |
2660 * error. | 2761 /// |
2661 * | 2762 /// If the used [http.Client] completes with an error when making a REST |
2662 * If the used [http.Client] completes with an error when making a REST call, | 2763 /// call, this method will complete with the same error. |
2663 * this method will complete with the same error. | 2764 async.Future<ProductPermissions> getPermissions( |
2664 */ | 2765 core.String enterpriseId, core.String productId) { |
2665 async.Future<ProductPermissions> getPermissions(core.String enterpriseId, core
.String productId) { | |
2666 var _url = null; | 2766 var _url = null; |
2667 var _queryParams = new core.Map(); | 2767 var _queryParams = new core.Map(); |
2668 var _uploadMedia = null; | 2768 var _uploadMedia = null; |
2669 var _uploadOptions = null; | 2769 var _uploadOptions = null; |
2670 var _downloadOptions = commons.DownloadOptions.Metadata; | 2770 var _downloadOptions = commons.DownloadOptions.Metadata; |
2671 var _body = null; | 2771 var _body = null; |
2672 | 2772 |
2673 if (enterpriseId == null) { | 2773 if (enterpriseId == null) { |
2674 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2774 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2675 } | 2775 } |
2676 if (productId == null) { | 2776 if (productId == null) { |
2677 throw new core.ArgumentError("Parameter productId is required."); | 2777 throw new core.ArgumentError("Parameter productId is required."); |
2678 } | 2778 } |
2679 | 2779 |
2680 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/p
roducts/' + commons.Escaper.ecapeVariable('$productId') + '/permissions'; | 2780 _url = 'enterprises/' + |
| 2781 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2782 '/products/' + |
| 2783 commons.Escaper.ecapeVariable('$productId') + |
| 2784 '/permissions'; |
2681 | 2785 |
2682 var _response = _requester.request(_url, | 2786 var _response = _requester.request(_url, "GET", |
2683 "GET", | 2787 body: _body, |
2684 body: _body, | 2788 queryParams: _queryParams, |
2685 queryParams: _queryParams, | 2789 uploadOptions: _uploadOptions, |
2686 uploadOptions: _uploadOptions, | 2790 uploadMedia: _uploadMedia, |
2687 uploadMedia: _uploadMedia, | 2791 downloadOptions: _downloadOptions); |
2688 downloadOptions: _downloadOptions); | |
2689 return _response.then((data) => new ProductPermissions.fromJson(data)); | 2792 return _response.then((data) => new ProductPermissions.fromJson(data)); |
2690 } | 2793 } |
2691 | 2794 |
2692 /** | 2795 /// Finds approved products that match a query, or all approved products if |
2693 * Finds approved products that match a query, or all approved products if | 2796 /// there is no query. |
2694 * there is no query. | 2797 /// |
2695 * | 2798 /// Request parameters: |
2696 * Request parameters: | 2799 /// |
2697 * | 2800 /// [enterpriseId] - The ID of the enterprise. |
2698 * [enterpriseId] - The ID of the enterprise. | 2801 /// |
2699 * | 2802 /// [approved] - Specifies whether to search among all products (false) or |
2700 * [approved] - Specifies whether to search among all products (false) or | 2803 /// among only products that have been approved (true). Only "true" is |
2701 * among only products that have been approved (true). Only "true" is | 2804 /// supported, and should be specified. |
2702 * supported, and should be specified. | 2805 /// |
2703 * | 2806 /// [language] - The BCP47 tag for the user's preferred language (e.g. |
2704 * [language] - The BCP47 tag for the user's preferred language (e.g. "en-US", | 2807 /// "en-US", "de"). Results are returned in the language best matching the |
2705 * "de"). Results are returned in the language best matching the preferred | 2808 /// preferred language. |
2706 * language. | 2809 /// |
2707 * | 2810 /// [maxResults] - Specifies the maximum number of products that can be |
2708 * [maxResults] - Specifies the maximum number of products that can be | 2811 /// returned per request. If not specified, uses a default value of 100, |
2709 * returned per request. If not specified, uses a default value of 100, which | 2812 /// which is also the maximum retrievable within a single response. |
2710 * is also the maximum retrievable within a single response. | 2813 /// |
2711 * | 2814 /// [query] - The search query as typed in the Google Play store search box. |
2712 * [query] - The search query as typed in the Google Play store search box. If | 2815 /// If omitted, all approved apps will be returned (using the pagination |
2713 * omitted, all approved apps will be returned (using the pagination | 2816 /// parameters), including apps that are not available in the store (e.g. |
2714 * parameters), including apps that are not available in the store (e.g. | 2817 /// unpublished apps). |
2715 * unpublished apps). | 2818 /// |
2716 * | 2819 /// [token] - A pagination token is contained in a request''s response when |
2717 * [token] - A pagination token is contained in a request''s response when | 2820 /// there are more products. The token can be used in a subsequent request to |
2718 * there are more products. The token can be used in a subsequent request to | 2821 /// obtain more products, and so forth. This parameter cannot be used in the |
2719 * obtain more products, and so forth. This parameter cannot be used in the | 2822 /// initial request. |
2720 * initial request. | 2823 /// |
2721 * | 2824 /// Completes with a [ProductsListResponse]. |
2722 * Completes with a [ProductsListResponse]. | 2825 /// |
2723 * | 2826 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2724 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2827 /// an error. |
2725 * error. | 2828 /// |
2726 * | 2829 /// If the used [http.Client] completes with an error when making a REST |
2727 * If the used [http.Client] completes with an error when making a REST call, | 2830 /// call, this method will complete with the same error. |
2728 * this method will complete with the same error. | 2831 async.Future<ProductsListResponse> list(core.String enterpriseId, |
2729 */ | 2832 {core.bool approved, |
2730 async.Future<ProductsListResponse> list(core.String enterpriseId, {core.bool a
pproved, core.String language, core.int maxResults, core.String query, core.Stri
ng token}) { | 2833 core.String language, |
| 2834 core.int maxResults, |
| 2835 core.String query, |
| 2836 core.String token}) { |
2731 var _url = null; | 2837 var _url = null; |
2732 var _queryParams = new core.Map(); | 2838 var _queryParams = new core.Map(); |
2733 var _uploadMedia = null; | 2839 var _uploadMedia = null; |
2734 var _uploadOptions = null; | 2840 var _uploadOptions = null; |
2735 var _downloadOptions = commons.DownloadOptions.Metadata; | 2841 var _downloadOptions = commons.DownloadOptions.Metadata; |
2736 var _body = null; | 2842 var _body = null; |
2737 | 2843 |
2738 if (enterpriseId == null) { | 2844 if (enterpriseId == null) { |
2739 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2845 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2740 } | 2846 } |
2741 if (approved != null) { | 2847 if (approved != null) { |
2742 _queryParams["approved"] = ["${approved}"]; | 2848 _queryParams["approved"] = ["${approved}"]; |
2743 } | 2849 } |
2744 if (language != null) { | 2850 if (language != null) { |
2745 _queryParams["language"] = [language]; | 2851 _queryParams["language"] = [language]; |
2746 } | 2852 } |
2747 if (maxResults != null) { | 2853 if (maxResults != null) { |
2748 _queryParams["maxResults"] = ["${maxResults}"]; | 2854 _queryParams["maxResults"] = ["${maxResults}"]; |
2749 } | 2855 } |
2750 if (query != null) { | 2856 if (query != null) { |
2751 _queryParams["query"] = [query]; | 2857 _queryParams["query"] = [query]; |
2752 } | 2858 } |
2753 if (token != null) { | 2859 if (token != null) { |
2754 _queryParams["token"] = [token]; | 2860 _queryParams["token"] = [token]; |
2755 } | 2861 } |
2756 | 2862 |
2757 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/p
roducts'; | 2863 _url = 'enterprises/' + |
| 2864 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2865 '/products'; |
2758 | 2866 |
2759 var _response = _requester.request(_url, | 2867 var _response = _requester.request(_url, "GET", |
2760 "GET", | 2868 body: _body, |
2761 body: _body, | 2869 queryParams: _queryParams, |
2762 queryParams: _queryParams, | 2870 uploadOptions: _uploadOptions, |
2763 uploadOptions: _uploadOptions, | 2871 uploadMedia: _uploadMedia, |
2764 uploadMedia: _uploadMedia, | 2872 downloadOptions: _downloadOptions); |
2765 downloadOptions: _downloadOptions); | |
2766 return _response.then((data) => new ProductsListResponse.fromJson(data)); | 2873 return _response.then((data) => new ProductsListResponse.fromJson(data)); |
2767 } | 2874 } |
2768 | 2875 |
2769 /** | 2876 /// Unapproves the specified product (and the relevant app permissions, if |
2770 * Unapproves the specified product (and the relevant app permissions, if any) | 2877 /// any) |
2771 * | 2878 /// |
2772 * Request parameters: | 2879 /// Request parameters: |
2773 * | 2880 /// |
2774 * [enterpriseId] - The ID of the enterprise. | 2881 /// [enterpriseId] - The ID of the enterprise. |
2775 * | 2882 /// |
2776 * [productId] - The ID of the product. | 2883 /// [productId] - The ID of the product. |
2777 * | 2884 /// |
2778 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2885 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2779 * error. | 2886 /// an error. |
2780 * | 2887 /// |
2781 * If the used [http.Client] completes with an error when making a REST call, | 2888 /// If the used [http.Client] completes with an error when making a REST |
2782 * this method will complete with the same error. | 2889 /// call, this method will complete with the same error. |
2783 */ | |
2784 async.Future unapprove(core.String enterpriseId, core.String productId) { | 2890 async.Future unapprove(core.String enterpriseId, core.String productId) { |
2785 var _url = null; | 2891 var _url = null; |
2786 var _queryParams = new core.Map(); | 2892 var _queryParams = new core.Map(); |
2787 var _uploadMedia = null; | 2893 var _uploadMedia = null; |
2788 var _uploadOptions = null; | 2894 var _uploadOptions = null; |
2789 var _downloadOptions = commons.DownloadOptions.Metadata; | 2895 var _downloadOptions = commons.DownloadOptions.Metadata; |
2790 var _body = null; | 2896 var _body = null; |
2791 | 2897 |
2792 if (enterpriseId == null) { | 2898 if (enterpriseId == null) { |
2793 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2899 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2794 } | 2900 } |
2795 if (productId == null) { | 2901 if (productId == null) { |
2796 throw new core.ArgumentError("Parameter productId is required."); | 2902 throw new core.ArgumentError("Parameter productId is required."); |
2797 } | 2903 } |
2798 | 2904 |
2799 _downloadOptions = null; | 2905 _downloadOptions = null; |
2800 | 2906 |
2801 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/p
roducts/' + commons.Escaper.ecapeVariable('$productId') + '/unapprove'; | 2907 _url = 'enterprises/' + |
| 2908 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2909 '/products/' + |
| 2910 commons.Escaper.ecapeVariable('$productId') + |
| 2911 '/unapprove'; |
2802 | 2912 |
2803 var _response = _requester.request(_url, | 2913 var _response = _requester.request(_url, "POST", |
2804 "POST", | 2914 body: _body, |
2805 body: _body, | 2915 queryParams: _queryParams, |
2806 queryParams: _queryParams, | 2916 uploadOptions: _uploadOptions, |
2807 uploadOptions: _uploadOptions, | 2917 uploadMedia: _uploadMedia, |
2808 uploadMedia: _uploadMedia, | 2918 downloadOptions: _downloadOptions); |
2809 downloadOptions: _downloadOptions); | |
2810 return _response.then((data) => null); | 2919 return _response.then((data) => null); |
2811 } | 2920 } |
2812 | |
2813 } | 2921 } |
2814 | 2922 |
2815 | |
2816 class ServiceaccountkeysResourceApi { | 2923 class ServiceaccountkeysResourceApi { |
2817 final commons.ApiRequester _requester; | 2924 final commons.ApiRequester _requester; |
2818 | 2925 |
2819 ServiceaccountkeysResourceApi(commons.ApiRequester client) : | 2926 ServiceaccountkeysResourceApi(commons.ApiRequester client) |
2820 _requester = client; | 2927 : _requester = client; |
2821 | 2928 |
2822 /** | 2929 /// Removes and invalidates the specified credentials for the service account |
2823 * Removes and invalidates the specified credentials for the service account | 2930 /// associated with this enterprise. The calling service account must have |
2824 * associated with this enterprise. The calling service account must have been | 2931 /// been retrieved by calling Enterprises.GetServiceAccount and must have |
2825 * retrieved by calling Enterprises.GetServiceAccount and must have been set | 2932 /// been set as the enterprise service account by calling |
2826 * as the enterprise service account by calling Enterprises.SetAccount. | 2933 /// Enterprises.SetAccount. |
2827 * | 2934 /// |
2828 * Request parameters: | 2935 /// Request parameters: |
2829 * | 2936 /// |
2830 * [enterpriseId] - The ID of the enterprise. | 2937 /// [enterpriseId] - The ID of the enterprise. |
2831 * | 2938 /// |
2832 * [keyId] - The ID of the key. | 2939 /// [keyId] - The ID of the key. |
2833 * | 2940 /// |
2834 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2941 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2835 * error. | 2942 /// an error. |
2836 * | 2943 /// |
2837 * If the used [http.Client] completes with an error when making a REST call, | 2944 /// If the used [http.Client] completes with an error when making a REST |
2838 * this method will complete with the same error. | 2945 /// call, this method will complete with the same error. |
2839 */ | |
2840 async.Future delete(core.String enterpriseId, core.String keyId) { | 2946 async.Future delete(core.String enterpriseId, core.String keyId) { |
2841 var _url = null; | 2947 var _url = null; |
2842 var _queryParams = new core.Map(); | 2948 var _queryParams = new core.Map(); |
2843 var _uploadMedia = null; | 2949 var _uploadMedia = null; |
2844 var _uploadOptions = null; | 2950 var _uploadOptions = null; |
2845 var _downloadOptions = commons.DownloadOptions.Metadata; | 2951 var _downloadOptions = commons.DownloadOptions.Metadata; |
2846 var _body = null; | 2952 var _body = null; |
2847 | 2953 |
2848 if (enterpriseId == null) { | 2954 if (enterpriseId == null) { |
2849 throw new core.ArgumentError("Parameter enterpriseId is required."); | 2955 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2850 } | 2956 } |
2851 if (keyId == null) { | 2957 if (keyId == null) { |
2852 throw new core.ArgumentError("Parameter keyId is required."); | 2958 throw new core.ArgumentError("Parameter keyId is required."); |
2853 } | 2959 } |
2854 | 2960 |
2855 _downloadOptions = null; | 2961 _downloadOptions = null; |
2856 | 2962 |
2857 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
erviceAccountKeys/' + commons.Escaper.ecapeVariable('$keyId'); | 2963 _url = 'enterprises/' + |
| 2964 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 2965 '/serviceAccountKeys/' + |
| 2966 commons.Escaper.ecapeVariable('$keyId'); |
2858 | 2967 |
2859 var _response = _requester.request(_url, | 2968 var _response = _requester.request(_url, "DELETE", |
2860 "DELETE", | 2969 body: _body, |
2861 body: _body, | 2970 queryParams: _queryParams, |
2862 queryParams: _queryParams, | 2971 uploadOptions: _uploadOptions, |
2863 uploadOptions: _uploadOptions, | 2972 uploadMedia: _uploadMedia, |
2864 uploadMedia: _uploadMedia, | 2973 downloadOptions: _downloadOptions); |
2865 downloadOptions: _downloadOptions); | |
2866 return _response.then((data) => null); | 2974 return _response.then((data) => null); |
2867 } | 2975 } |
2868 | 2976 |
2869 /** | 2977 /// Generates new credentials for the service account associated with this |
2870 * Generates new credentials for the service account associated with this | 2978 /// enterprise. The calling service account must have been retrieved by |
2871 * enterprise. The calling service account must have been retrieved by calling | 2979 /// calling Enterprises.GetServiceAccount and must have been set as the |
2872 * Enterprises.GetServiceAccount and must have been set as the enterprise | 2980 /// enterprise service account by calling Enterprises.SetAccount. |
2873 * service account by calling Enterprises.SetAccount. | 2981 /// |
2874 * | 2982 /// Only the type of the key should be populated in the resource to be |
2875 * Only the type of the key should be populated in the resource to be | 2983 /// inserted. |
2876 * inserted. | 2984 /// |
2877 * | 2985 /// [request] - The metadata request object. |
2878 * [request] - The metadata request object. | 2986 /// |
2879 * | 2987 /// Request parameters: |
2880 * Request parameters: | 2988 /// |
2881 * | 2989 /// [enterpriseId] - The ID of the enterprise. |
2882 * [enterpriseId] - The ID of the enterprise. | 2990 /// |
2883 * | 2991 /// Completes with a [ServiceAccountKey]. |
2884 * Completes with a [ServiceAccountKey]. | 2992 /// |
2885 * | 2993 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2886 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2994 /// an error. |
2887 * error. | 2995 /// |
2888 * | 2996 /// If the used [http.Client] completes with an error when making a REST |
2889 * If the used [http.Client] completes with an error when making a REST call, | 2997 /// call, this method will complete with the same error. |
2890 * this method will complete with the same error. | 2998 async.Future<ServiceAccountKey> insert( |
2891 */ | 2999 ServiceAccountKey request, core.String enterpriseId) { |
2892 async.Future<ServiceAccountKey> insert(ServiceAccountKey request, core.String
enterpriseId) { | |
2893 var _url = null; | 3000 var _url = null; |
2894 var _queryParams = new core.Map(); | 3001 var _queryParams = new core.Map(); |
2895 var _uploadMedia = null; | 3002 var _uploadMedia = null; |
2896 var _uploadOptions = null; | 3003 var _uploadOptions = null; |
2897 var _downloadOptions = commons.DownloadOptions.Metadata; | 3004 var _downloadOptions = commons.DownloadOptions.Metadata; |
2898 var _body = null; | 3005 var _body = null; |
2899 | 3006 |
2900 if (request != null) { | 3007 if (request != null) { |
2901 _body = convert.JSON.encode((request).toJson()); | 3008 _body = convert.JSON.encode((request).toJson()); |
2902 } | 3009 } |
2903 if (enterpriseId == null) { | 3010 if (enterpriseId == null) { |
2904 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3011 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2905 } | 3012 } |
2906 | 3013 |
2907 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
erviceAccountKeys'; | 3014 _url = 'enterprises/' + |
| 3015 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3016 '/serviceAccountKeys'; |
2908 | 3017 |
2909 var _response = _requester.request(_url, | 3018 var _response = _requester.request(_url, "POST", |
2910 "POST", | 3019 body: _body, |
2911 body: _body, | 3020 queryParams: _queryParams, |
2912 queryParams: _queryParams, | 3021 uploadOptions: _uploadOptions, |
2913 uploadOptions: _uploadOptions, | 3022 uploadMedia: _uploadMedia, |
2914 uploadMedia: _uploadMedia, | 3023 downloadOptions: _downloadOptions); |
2915 downloadOptions: _downloadOptions); | |
2916 return _response.then((data) => new ServiceAccountKey.fromJson(data)); | 3024 return _response.then((data) => new ServiceAccountKey.fromJson(data)); |
2917 } | 3025 } |
2918 | 3026 |
2919 /** | 3027 /// Lists all active credentials for the service account associated with this |
2920 * Lists all active credentials for the service account associated with this | 3028 /// enterprise. Only the ID and key type are returned. The calling service |
2921 * enterprise. Only the ID and key type are returned. The calling service | 3029 /// account must have been retrieved by calling Enterprises.GetServiceAccount |
2922 * account must have been retrieved by calling Enterprises.GetServiceAccount | 3030 /// and must have been set as the enterprise service account by calling |
2923 * and must have been set as the enterprise service account by calling | 3031 /// Enterprises.SetAccount. |
2924 * Enterprises.SetAccount. | 3032 /// |
2925 * | 3033 /// Request parameters: |
2926 * Request parameters: | 3034 /// |
2927 * | 3035 /// [enterpriseId] - The ID of the enterprise. |
2928 * [enterpriseId] - The ID of the enterprise. | 3036 /// |
2929 * | 3037 /// Completes with a [ServiceAccountKeysListResponse]. |
2930 * Completes with a [ServiceAccountKeysListResponse]. | 3038 /// |
2931 * | 3039 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2932 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3040 /// an error. |
2933 * error. | 3041 /// |
2934 * | 3042 /// If the used [http.Client] completes with an error when making a REST |
2935 * If the used [http.Client] completes with an error when making a REST call, | 3043 /// call, this method will complete with the same error. |
2936 * this method will complete with the same error. | |
2937 */ | |
2938 async.Future<ServiceAccountKeysListResponse> list(core.String enterpriseId) { | 3044 async.Future<ServiceAccountKeysListResponse> list(core.String enterpriseId) { |
2939 var _url = null; | 3045 var _url = null; |
2940 var _queryParams = new core.Map(); | 3046 var _queryParams = new core.Map(); |
2941 var _uploadMedia = null; | 3047 var _uploadMedia = null; |
2942 var _uploadOptions = null; | 3048 var _uploadOptions = null; |
2943 var _downloadOptions = commons.DownloadOptions.Metadata; | 3049 var _downloadOptions = commons.DownloadOptions.Metadata; |
2944 var _body = null; | 3050 var _body = null; |
2945 | 3051 |
2946 if (enterpriseId == null) { | 3052 if (enterpriseId == null) { |
2947 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3053 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2948 } | 3054 } |
2949 | 3055 |
2950 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
erviceAccountKeys'; | 3056 _url = 'enterprises/' + |
| 3057 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3058 '/serviceAccountKeys'; |
2951 | 3059 |
2952 var _response = _requester.request(_url, | 3060 var _response = _requester.request(_url, "GET", |
2953 "GET", | 3061 body: _body, |
2954 body: _body, | 3062 queryParams: _queryParams, |
2955 queryParams: _queryParams, | 3063 uploadOptions: _uploadOptions, |
2956 uploadOptions: _uploadOptions, | 3064 uploadMedia: _uploadMedia, |
2957 uploadMedia: _uploadMedia, | 3065 downloadOptions: _downloadOptions); |
2958 downloadOptions: _downloadOptions); | 3066 return _response |
2959 return _response.then((data) => new ServiceAccountKeysListResponse.fromJson(
data)); | 3067 .then((data) => new ServiceAccountKeysListResponse.fromJson(data)); |
2960 } | 3068 } |
2961 | |
2962 } | 3069 } |
2963 | 3070 |
2964 | |
2965 class StorelayoutclustersResourceApi { | 3071 class StorelayoutclustersResourceApi { |
2966 final commons.ApiRequester _requester; | 3072 final commons.ApiRequester _requester; |
2967 | 3073 |
2968 StorelayoutclustersResourceApi(commons.ApiRequester client) : | 3074 StorelayoutclustersResourceApi(commons.ApiRequester client) |
2969 _requester = client; | 3075 : _requester = client; |
2970 | 3076 |
2971 /** | 3077 /// Deletes a cluster. |
2972 * Deletes a cluster. | 3078 /// |
2973 * | 3079 /// Request parameters: |
2974 * Request parameters: | 3080 /// |
2975 * | 3081 /// [enterpriseId] - The ID of the enterprise. |
2976 * [enterpriseId] - The ID of the enterprise. | 3082 /// |
2977 * | 3083 /// [pageId] - The ID of the page. |
2978 * [pageId] - The ID of the page. | 3084 /// |
2979 * | 3085 /// [clusterId] - The ID of the cluster. |
2980 * [clusterId] - The ID of the cluster. | 3086 /// |
2981 * | 3087 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2982 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3088 /// an error. |
2983 * error. | 3089 /// |
2984 * | 3090 /// If the used [http.Client] completes with an error when making a REST |
2985 * If the used [http.Client] completes with an error when making a REST call, | 3091 /// call, this method will complete with the same error. |
2986 * this method will complete with the same error. | 3092 async.Future delete( |
2987 */ | 3093 core.String enterpriseId, core.String pageId, core.String clusterId) { |
2988 async.Future delete(core.String enterpriseId, core.String pageId, core.String
clusterId) { | |
2989 var _url = null; | 3094 var _url = null; |
2990 var _queryParams = new core.Map(); | 3095 var _queryParams = new core.Map(); |
2991 var _uploadMedia = null; | 3096 var _uploadMedia = null; |
2992 var _uploadOptions = null; | 3097 var _uploadOptions = null; |
2993 var _downloadOptions = commons.DownloadOptions.Metadata; | 3098 var _downloadOptions = commons.DownloadOptions.Metadata; |
2994 var _body = null; | 3099 var _body = null; |
2995 | 3100 |
2996 if (enterpriseId == null) { | 3101 if (enterpriseId == null) { |
2997 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3102 throw new core.ArgumentError("Parameter enterpriseId is required."); |
2998 } | 3103 } |
2999 if (pageId == null) { | 3104 if (pageId == null) { |
3000 throw new core.ArgumentError("Parameter pageId is required."); | 3105 throw new core.ArgumentError("Parameter pageId is required."); |
3001 } | 3106 } |
3002 if (clusterId == null) { | 3107 if (clusterId == null) { |
3003 throw new core.ArgumentError("Parameter clusterId is required."); | 3108 throw new core.ArgumentError("Parameter clusterId is required."); |
3004 } | 3109 } |
3005 | 3110 |
3006 _downloadOptions = null; | 3111 _downloadOptions = null; |
3007 | 3112 |
3008 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId') + '/clusters/' + c
ommons.Escaper.ecapeVariable('$clusterId'); | 3113 _url = 'enterprises/' + |
| 3114 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3115 '/storeLayout/pages/' + |
| 3116 commons.Escaper.ecapeVariable('$pageId') + |
| 3117 '/clusters/' + |
| 3118 commons.Escaper.ecapeVariable('$clusterId'); |
3009 | 3119 |
3010 var _response = _requester.request(_url, | 3120 var _response = _requester.request(_url, "DELETE", |
3011 "DELETE", | 3121 body: _body, |
3012 body: _body, | 3122 queryParams: _queryParams, |
3013 queryParams: _queryParams, | 3123 uploadOptions: _uploadOptions, |
3014 uploadOptions: _uploadOptions, | 3124 uploadMedia: _uploadMedia, |
3015 uploadMedia: _uploadMedia, | 3125 downloadOptions: _downloadOptions); |
3016 downloadOptions: _downloadOptions); | |
3017 return _response.then((data) => null); | 3126 return _response.then((data) => null); |
3018 } | 3127 } |
3019 | 3128 |
3020 /** | 3129 /// Retrieves details of a cluster. |
3021 * Retrieves details of a cluster. | 3130 /// |
3022 * | 3131 /// Request parameters: |
3023 * Request parameters: | 3132 /// |
3024 * | 3133 /// [enterpriseId] - The ID of the enterprise. |
3025 * [enterpriseId] - The ID of the enterprise. | 3134 /// |
3026 * | 3135 /// [pageId] - The ID of the page. |
3027 * [pageId] - The ID of the page. | 3136 /// |
3028 * | 3137 /// [clusterId] - The ID of the cluster. |
3029 * [clusterId] - The ID of the cluster. | 3138 /// |
3030 * | 3139 /// Completes with a [StoreCluster]. |
3031 * Completes with a [StoreCluster]. | 3140 /// |
3032 * | 3141 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3033 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3142 /// an error. |
3034 * error. | 3143 /// |
3035 * | 3144 /// If the used [http.Client] completes with an error when making a REST |
3036 * If the used [http.Client] completes with an error when making a REST call, | 3145 /// call, this method will complete with the same error. |
3037 * this method will complete with the same error. | 3146 async.Future<StoreCluster> get( |
3038 */ | 3147 core.String enterpriseId, core.String pageId, core.String clusterId) { |
3039 async.Future<StoreCluster> get(core.String enterpriseId, core.String pageId, c
ore.String clusterId) { | |
3040 var _url = null; | 3148 var _url = null; |
3041 var _queryParams = new core.Map(); | 3149 var _queryParams = new core.Map(); |
3042 var _uploadMedia = null; | 3150 var _uploadMedia = null; |
3043 var _uploadOptions = null; | 3151 var _uploadOptions = null; |
3044 var _downloadOptions = commons.DownloadOptions.Metadata; | 3152 var _downloadOptions = commons.DownloadOptions.Metadata; |
3045 var _body = null; | 3153 var _body = null; |
3046 | 3154 |
3047 if (enterpriseId == null) { | 3155 if (enterpriseId == null) { |
3048 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3156 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3049 } | 3157 } |
3050 if (pageId == null) { | 3158 if (pageId == null) { |
3051 throw new core.ArgumentError("Parameter pageId is required."); | 3159 throw new core.ArgumentError("Parameter pageId is required."); |
3052 } | 3160 } |
3053 if (clusterId == null) { | 3161 if (clusterId == null) { |
3054 throw new core.ArgumentError("Parameter clusterId is required."); | 3162 throw new core.ArgumentError("Parameter clusterId is required."); |
3055 } | 3163 } |
3056 | 3164 |
3057 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId') + '/clusters/' + c
ommons.Escaper.ecapeVariable('$clusterId'); | 3165 _url = 'enterprises/' + |
| 3166 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3167 '/storeLayout/pages/' + |
| 3168 commons.Escaper.ecapeVariable('$pageId') + |
| 3169 '/clusters/' + |
| 3170 commons.Escaper.ecapeVariable('$clusterId'); |
3058 | 3171 |
3059 var _response = _requester.request(_url, | 3172 var _response = _requester.request(_url, "GET", |
3060 "GET", | 3173 body: _body, |
3061 body: _body, | 3174 queryParams: _queryParams, |
3062 queryParams: _queryParams, | 3175 uploadOptions: _uploadOptions, |
3063 uploadOptions: _uploadOptions, | 3176 uploadMedia: _uploadMedia, |
3064 uploadMedia: _uploadMedia, | 3177 downloadOptions: _downloadOptions); |
3065 downloadOptions: _downloadOptions); | |
3066 return _response.then((data) => new StoreCluster.fromJson(data)); | 3178 return _response.then((data) => new StoreCluster.fromJson(data)); |
3067 } | 3179 } |
3068 | 3180 |
3069 /** | 3181 /// Inserts a new cluster in a page. |
3070 * Inserts a new cluster in a page. | 3182 /// |
3071 * | 3183 /// [request] - The metadata request object. |
3072 * [request] - The metadata request object. | 3184 /// |
3073 * | 3185 /// Request parameters: |
3074 * Request parameters: | 3186 /// |
3075 * | 3187 /// [enterpriseId] - The ID of the enterprise. |
3076 * [enterpriseId] - The ID of the enterprise. | 3188 /// |
3077 * | 3189 /// [pageId] - The ID of the page. |
3078 * [pageId] - The ID of the page. | 3190 /// |
3079 * | 3191 /// Completes with a [StoreCluster]. |
3080 * Completes with a [StoreCluster]. | 3192 /// |
3081 * | 3193 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3082 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3194 /// an error. |
3083 * error. | 3195 /// |
3084 * | 3196 /// If the used [http.Client] completes with an error when making a REST |
3085 * If the used [http.Client] completes with an error when making a REST call, | 3197 /// call, this method will complete with the same error. |
3086 * this method will complete with the same error. | 3198 async.Future<StoreCluster> insert( |
3087 */ | 3199 StoreCluster request, core.String enterpriseId, core.String pageId) { |
3088 async.Future<StoreCluster> insert(StoreCluster request, core.String enterprise
Id, core.String pageId) { | |
3089 var _url = null; | 3200 var _url = null; |
3090 var _queryParams = new core.Map(); | 3201 var _queryParams = new core.Map(); |
3091 var _uploadMedia = null; | 3202 var _uploadMedia = null; |
3092 var _uploadOptions = null; | 3203 var _uploadOptions = null; |
3093 var _downloadOptions = commons.DownloadOptions.Metadata; | 3204 var _downloadOptions = commons.DownloadOptions.Metadata; |
3094 var _body = null; | 3205 var _body = null; |
3095 | 3206 |
3096 if (request != null) { | 3207 if (request != null) { |
3097 _body = convert.JSON.encode((request).toJson()); | 3208 _body = convert.JSON.encode((request).toJson()); |
3098 } | 3209 } |
3099 if (enterpriseId == null) { | 3210 if (enterpriseId == null) { |
3100 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3211 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3101 } | 3212 } |
3102 if (pageId == null) { | 3213 if (pageId == null) { |
3103 throw new core.ArgumentError("Parameter pageId is required."); | 3214 throw new core.ArgumentError("Parameter pageId is required."); |
3104 } | 3215 } |
3105 | 3216 |
3106 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId') + '/clusters'; | 3217 _url = 'enterprises/' + |
| 3218 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3219 '/storeLayout/pages/' + |
| 3220 commons.Escaper.ecapeVariable('$pageId') + |
| 3221 '/clusters'; |
3107 | 3222 |
3108 var _response = _requester.request(_url, | 3223 var _response = _requester.request(_url, "POST", |
3109 "POST", | 3224 body: _body, |
3110 body: _body, | 3225 queryParams: _queryParams, |
3111 queryParams: _queryParams, | 3226 uploadOptions: _uploadOptions, |
3112 uploadOptions: _uploadOptions, | 3227 uploadMedia: _uploadMedia, |
3113 uploadMedia: _uploadMedia, | 3228 downloadOptions: _downloadOptions); |
3114 downloadOptions: _downloadOptions); | |
3115 return _response.then((data) => new StoreCluster.fromJson(data)); | 3229 return _response.then((data) => new StoreCluster.fromJson(data)); |
3116 } | 3230 } |
3117 | 3231 |
3118 /** | 3232 /// Retrieves the details of all clusters on the specified page. |
3119 * Retrieves the details of all clusters on the specified page. | 3233 /// |
3120 * | 3234 /// Request parameters: |
3121 * Request parameters: | 3235 /// |
3122 * | 3236 /// [enterpriseId] - The ID of the enterprise. |
3123 * [enterpriseId] - The ID of the enterprise. | 3237 /// |
3124 * | 3238 /// [pageId] - The ID of the page. |
3125 * [pageId] - The ID of the page. | 3239 /// |
3126 * | 3240 /// Completes with a [StoreLayoutClustersListResponse]. |
3127 * Completes with a [StoreLayoutClustersListResponse]. | 3241 /// |
3128 * | 3242 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3129 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3243 /// an error. |
3130 * error. | 3244 /// |
3131 * | 3245 /// If the used [http.Client] completes with an error when making a REST |
3132 * If the used [http.Client] completes with an error when making a REST call, | 3246 /// call, this method will complete with the same error. |
3133 * this method will complete with the same error. | 3247 async.Future<StoreLayoutClustersListResponse> list( |
3134 */ | 3248 core.String enterpriseId, core.String pageId) { |
3135 async.Future<StoreLayoutClustersListResponse> list(core.String enterpriseId, c
ore.String pageId) { | |
3136 var _url = null; | 3249 var _url = null; |
3137 var _queryParams = new core.Map(); | 3250 var _queryParams = new core.Map(); |
3138 var _uploadMedia = null; | 3251 var _uploadMedia = null; |
3139 var _uploadOptions = null; | 3252 var _uploadOptions = null; |
3140 var _downloadOptions = commons.DownloadOptions.Metadata; | 3253 var _downloadOptions = commons.DownloadOptions.Metadata; |
3141 var _body = null; | 3254 var _body = null; |
3142 | 3255 |
3143 if (enterpriseId == null) { | 3256 if (enterpriseId == null) { |
3144 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3257 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3145 } | 3258 } |
3146 if (pageId == null) { | 3259 if (pageId == null) { |
3147 throw new core.ArgumentError("Parameter pageId is required."); | 3260 throw new core.ArgumentError("Parameter pageId is required."); |
3148 } | 3261 } |
3149 | 3262 |
3150 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId') + '/clusters'; | 3263 _url = 'enterprises/' + |
| 3264 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3265 '/storeLayout/pages/' + |
| 3266 commons.Escaper.ecapeVariable('$pageId') + |
| 3267 '/clusters'; |
3151 | 3268 |
3152 var _response = _requester.request(_url, | 3269 var _response = _requester.request(_url, "GET", |
3153 "GET", | 3270 body: _body, |
3154 body: _body, | 3271 queryParams: _queryParams, |
3155 queryParams: _queryParams, | 3272 uploadOptions: _uploadOptions, |
3156 uploadOptions: _uploadOptions, | 3273 uploadMedia: _uploadMedia, |
3157 uploadMedia: _uploadMedia, | 3274 downloadOptions: _downloadOptions); |
3158 downloadOptions: _downloadOptions); | 3275 return _response |
3159 return _response.then((data) => new StoreLayoutClustersListResponse.fromJson
(data)); | 3276 .then((data) => new StoreLayoutClustersListResponse.fromJson(data)); |
3160 } | 3277 } |
3161 | 3278 |
3162 /** | 3279 /// Updates a cluster. This method supports patch semantics. |
3163 * Updates a cluster. This method supports patch semantics. | 3280 /// |
3164 * | 3281 /// [request] - The metadata request object. |
3165 * [request] - The metadata request object. | 3282 /// |
3166 * | 3283 /// Request parameters: |
3167 * Request parameters: | 3284 /// |
3168 * | 3285 /// [enterpriseId] - The ID of the enterprise. |
3169 * [enterpriseId] - The ID of the enterprise. | 3286 /// |
3170 * | 3287 /// [pageId] - The ID of the page. |
3171 * [pageId] - The ID of the page. | 3288 /// |
3172 * | 3289 /// [clusterId] - The ID of the cluster. |
3173 * [clusterId] - The ID of the cluster. | 3290 /// |
3174 * | 3291 /// Completes with a [StoreCluster]. |
3175 * Completes with a [StoreCluster]. | 3292 /// |
3176 * | 3293 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3177 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3294 /// an error. |
3178 * error. | 3295 /// |
3179 * | 3296 /// If the used [http.Client] completes with an error when making a REST |
3180 * If the used [http.Client] completes with an error when making a REST call, | 3297 /// call, this method will complete with the same error. |
3181 * this method will complete with the same error. | 3298 async.Future<StoreCluster> patch(StoreCluster request, |
3182 */ | 3299 core.String enterpriseId, core.String pageId, core.String clusterId) { |
3183 async.Future<StoreCluster> patch(StoreCluster request, core.String enterpriseI
d, core.String pageId, core.String clusterId) { | |
3184 var _url = null; | 3300 var _url = null; |
3185 var _queryParams = new core.Map(); | 3301 var _queryParams = new core.Map(); |
3186 var _uploadMedia = null; | 3302 var _uploadMedia = null; |
3187 var _uploadOptions = null; | 3303 var _uploadOptions = null; |
3188 var _downloadOptions = commons.DownloadOptions.Metadata; | 3304 var _downloadOptions = commons.DownloadOptions.Metadata; |
3189 var _body = null; | 3305 var _body = null; |
3190 | 3306 |
3191 if (request != null) { | 3307 if (request != null) { |
3192 _body = convert.JSON.encode((request).toJson()); | 3308 _body = convert.JSON.encode((request).toJson()); |
3193 } | 3309 } |
3194 if (enterpriseId == null) { | 3310 if (enterpriseId == null) { |
3195 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3311 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3196 } | 3312 } |
3197 if (pageId == null) { | 3313 if (pageId == null) { |
3198 throw new core.ArgumentError("Parameter pageId is required."); | 3314 throw new core.ArgumentError("Parameter pageId is required."); |
3199 } | 3315 } |
3200 if (clusterId == null) { | 3316 if (clusterId == null) { |
3201 throw new core.ArgumentError("Parameter clusterId is required."); | 3317 throw new core.ArgumentError("Parameter clusterId is required."); |
3202 } | 3318 } |
3203 | 3319 |
3204 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId') + '/clusters/' + c
ommons.Escaper.ecapeVariable('$clusterId'); | 3320 _url = 'enterprises/' + |
| 3321 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3322 '/storeLayout/pages/' + |
| 3323 commons.Escaper.ecapeVariable('$pageId') + |
| 3324 '/clusters/' + |
| 3325 commons.Escaper.ecapeVariable('$clusterId'); |
3205 | 3326 |
3206 var _response = _requester.request(_url, | 3327 var _response = _requester.request(_url, "PATCH", |
3207 "PATCH", | 3328 body: _body, |
3208 body: _body, | 3329 queryParams: _queryParams, |
3209 queryParams: _queryParams, | 3330 uploadOptions: _uploadOptions, |
3210 uploadOptions: _uploadOptions, | 3331 uploadMedia: _uploadMedia, |
3211 uploadMedia: _uploadMedia, | 3332 downloadOptions: _downloadOptions); |
3212 downloadOptions: _downloadOptions); | |
3213 return _response.then((data) => new StoreCluster.fromJson(data)); | 3333 return _response.then((data) => new StoreCluster.fromJson(data)); |
3214 } | 3334 } |
3215 | 3335 |
3216 /** | 3336 /// Updates a cluster. |
3217 * Updates a cluster. | 3337 /// |
3218 * | 3338 /// [request] - The metadata request object. |
3219 * [request] - The metadata request object. | 3339 /// |
3220 * | 3340 /// Request parameters: |
3221 * Request parameters: | 3341 /// |
3222 * | 3342 /// [enterpriseId] - The ID of the enterprise. |
3223 * [enterpriseId] - The ID of the enterprise. | 3343 /// |
3224 * | 3344 /// [pageId] - The ID of the page. |
3225 * [pageId] - The ID of the page. | 3345 /// |
3226 * | 3346 /// [clusterId] - The ID of the cluster. |
3227 * [clusterId] - The ID of the cluster. | 3347 /// |
3228 * | 3348 /// Completes with a [StoreCluster]. |
3229 * Completes with a [StoreCluster]. | 3349 /// |
3230 * | 3350 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3231 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3351 /// an error. |
3232 * error. | 3352 /// |
3233 * | 3353 /// If the used [http.Client] completes with an error when making a REST |
3234 * If the used [http.Client] completes with an error when making a REST call, | 3354 /// call, this method will complete with the same error. |
3235 * this method will complete with the same error. | 3355 async.Future<StoreCluster> update(StoreCluster request, |
3236 */ | 3356 core.String enterpriseId, core.String pageId, core.String clusterId) { |
3237 async.Future<StoreCluster> update(StoreCluster request, core.String enterprise
Id, core.String pageId, core.String clusterId) { | |
3238 var _url = null; | 3357 var _url = null; |
3239 var _queryParams = new core.Map(); | 3358 var _queryParams = new core.Map(); |
3240 var _uploadMedia = null; | 3359 var _uploadMedia = null; |
3241 var _uploadOptions = null; | 3360 var _uploadOptions = null; |
3242 var _downloadOptions = commons.DownloadOptions.Metadata; | 3361 var _downloadOptions = commons.DownloadOptions.Metadata; |
3243 var _body = null; | 3362 var _body = null; |
3244 | 3363 |
3245 if (request != null) { | 3364 if (request != null) { |
3246 _body = convert.JSON.encode((request).toJson()); | 3365 _body = convert.JSON.encode((request).toJson()); |
3247 } | 3366 } |
3248 if (enterpriseId == null) { | 3367 if (enterpriseId == null) { |
3249 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3368 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3250 } | 3369 } |
3251 if (pageId == null) { | 3370 if (pageId == null) { |
3252 throw new core.ArgumentError("Parameter pageId is required."); | 3371 throw new core.ArgumentError("Parameter pageId is required."); |
3253 } | 3372 } |
3254 if (clusterId == null) { | 3373 if (clusterId == null) { |
3255 throw new core.ArgumentError("Parameter clusterId is required."); | 3374 throw new core.ArgumentError("Parameter clusterId is required."); |
3256 } | 3375 } |
3257 | 3376 |
3258 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId') + '/clusters/' + c
ommons.Escaper.ecapeVariable('$clusterId'); | 3377 _url = 'enterprises/' + |
| 3378 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3379 '/storeLayout/pages/' + |
| 3380 commons.Escaper.ecapeVariable('$pageId') + |
| 3381 '/clusters/' + |
| 3382 commons.Escaper.ecapeVariable('$clusterId'); |
3259 | 3383 |
3260 var _response = _requester.request(_url, | 3384 var _response = _requester.request(_url, "PUT", |
3261 "PUT", | 3385 body: _body, |
3262 body: _body, | 3386 queryParams: _queryParams, |
3263 queryParams: _queryParams, | 3387 uploadOptions: _uploadOptions, |
3264 uploadOptions: _uploadOptions, | 3388 uploadMedia: _uploadMedia, |
3265 uploadMedia: _uploadMedia, | 3389 downloadOptions: _downloadOptions); |
3266 downloadOptions: _downloadOptions); | |
3267 return _response.then((data) => new StoreCluster.fromJson(data)); | 3390 return _response.then((data) => new StoreCluster.fromJson(data)); |
3268 } | 3391 } |
3269 | |
3270 } | 3392 } |
3271 | 3393 |
3272 | |
3273 class StorelayoutpagesResourceApi { | 3394 class StorelayoutpagesResourceApi { |
3274 final commons.ApiRequester _requester; | 3395 final commons.ApiRequester _requester; |
3275 | 3396 |
3276 StorelayoutpagesResourceApi(commons.ApiRequester client) : | 3397 StorelayoutpagesResourceApi(commons.ApiRequester client) |
3277 _requester = client; | 3398 : _requester = client; |
3278 | 3399 |
3279 /** | 3400 /// Deletes a store page. |
3280 * Deletes a store page. | 3401 /// |
3281 * | 3402 /// Request parameters: |
3282 * Request parameters: | 3403 /// |
3283 * | 3404 /// [enterpriseId] - The ID of the enterprise. |
3284 * [enterpriseId] - The ID of the enterprise. | 3405 /// |
3285 * | 3406 /// [pageId] - The ID of the page. |
3286 * [pageId] - The ID of the page. | 3407 /// |
3287 * | 3408 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3288 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3409 /// an error. |
3289 * error. | 3410 /// |
3290 * | 3411 /// If the used [http.Client] completes with an error when making a REST |
3291 * If the used [http.Client] completes with an error when making a REST call, | 3412 /// call, this method will complete with the same error. |
3292 * this method will complete with the same error. | |
3293 */ | |
3294 async.Future delete(core.String enterpriseId, core.String pageId) { | 3413 async.Future delete(core.String enterpriseId, core.String pageId) { |
3295 var _url = null; | 3414 var _url = null; |
3296 var _queryParams = new core.Map(); | 3415 var _queryParams = new core.Map(); |
3297 var _uploadMedia = null; | 3416 var _uploadMedia = null; |
3298 var _uploadOptions = null; | 3417 var _uploadOptions = null; |
3299 var _downloadOptions = commons.DownloadOptions.Metadata; | 3418 var _downloadOptions = commons.DownloadOptions.Metadata; |
3300 var _body = null; | 3419 var _body = null; |
3301 | 3420 |
3302 if (enterpriseId == null) { | 3421 if (enterpriseId == null) { |
3303 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3422 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3304 } | 3423 } |
3305 if (pageId == null) { | 3424 if (pageId == null) { |
3306 throw new core.ArgumentError("Parameter pageId is required."); | 3425 throw new core.ArgumentError("Parameter pageId is required."); |
3307 } | 3426 } |
3308 | 3427 |
3309 _downloadOptions = null; | 3428 _downloadOptions = null; |
3310 | 3429 |
3311 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId'); | 3430 _url = 'enterprises/' + |
| 3431 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3432 '/storeLayout/pages/' + |
| 3433 commons.Escaper.ecapeVariable('$pageId'); |
3312 | 3434 |
3313 var _response = _requester.request(_url, | 3435 var _response = _requester.request(_url, "DELETE", |
3314 "DELETE", | 3436 body: _body, |
3315 body: _body, | 3437 queryParams: _queryParams, |
3316 queryParams: _queryParams, | 3438 uploadOptions: _uploadOptions, |
3317 uploadOptions: _uploadOptions, | 3439 uploadMedia: _uploadMedia, |
3318 uploadMedia: _uploadMedia, | 3440 downloadOptions: _downloadOptions); |
3319 downloadOptions: _downloadOptions); | |
3320 return _response.then((data) => null); | 3441 return _response.then((data) => null); |
3321 } | 3442 } |
3322 | 3443 |
3323 /** | 3444 /// Retrieves details of a store page. |
3324 * Retrieves details of a store page. | 3445 /// |
3325 * | 3446 /// Request parameters: |
3326 * Request parameters: | 3447 /// |
3327 * | 3448 /// [enterpriseId] - The ID of the enterprise. |
3328 * [enterpriseId] - The ID of the enterprise. | 3449 /// |
3329 * | 3450 /// [pageId] - The ID of the page. |
3330 * [pageId] - The ID of the page. | 3451 /// |
3331 * | 3452 /// Completes with a [StorePage]. |
3332 * Completes with a [StorePage]. | 3453 /// |
3333 * | 3454 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3334 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3455 /// an error. |
3335 * error. | 3456 /// |
3336 * | 3457 /// If the used [http.Client] completes with an error when making a REST |
3337 * If the used [http.Client] completes with an error when making a REST call, | 3458 /// call, this method will complete with the same error. |
3338 * this method will complete with the same error. | |
3339 */ | |
3340 async.Future<StorePage> get(core.String enterpriseId, core.String pageId) { | 3459 async.Future<StorePage> get(core.String enterpriseId, core.String pageId) { |
3341 var _url = null; | 3460 var _url = null; |
3342 var _queryParams = new core.Map(); | 3461 var _queryParams = new core.Map(); |
3343 var _uploadMedia = null; | 3462 var _uploadMedia = null; |
3344 var _uploadOptions = null; | 3463 var _uploadOptions = null; |
3345 var _downloadOptions = commons.DownloadOptions.Metadata; | 3464 var _downloadOptions = commons.DownloadOptions.Metadata; |
3346 var _body = null; | 3465 var _body = null; |
3347 | 3466 |
3348 if (enterpriseId == null) { | 3467 if (enterpriseId == null) { |
3349 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3468 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3350 } | 3469 } |
3351 if (pageId == null) { | 3470 if (pageId == null) { |
3352 throw new core.ArgumentError("Parameter pageId is required."); | 3471 throw new core.ArgumentError("Parameter pageId is required."); |
3353 } | 3472 } |
3354 | 3473 |
3355 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId'); | 3474 _url = 'enterprises/' + |
| 3475 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3476 '/storeLayout/pages/' + |
| 3477 commons.Escaper.ecapeVariable('$pageId'); |
3356 | 3478 |
3357 var _response = _requester.request(_url, | 3479 var _response = _requester.request(_url, "GET", |
3358 "GET", | 3480 body: _body, |
3359 body: _body, | 3481 queryParams: _queryParams, |
3360 queryParams: _queryParams, | 3482 uploadOptions: _uploadOptions, |
3361 uploadOptions: _uploadOptions, | 3483 uploadMedia: _uploadMedia, |
3362 uploadMedia: _uploadMedia, | 3484 downloadOptions: _downloadOptions); |
3363 downloadOptions: _downloadOptions); | |
3364 return _response.then((data) => new StorePage.fromJson(data)); | 3485 return _response.then((data) => new StorePage.fromJson(data)); |
3365 } | 3486 } |
3366 | 3487 |
3367 /** | 3488 /// Inserts a new store page. |
3368 * Inserts a new store page. | 3489 /// |
3369 * | 3490 /// [request] - The metadata request object. |
3370 * [request] - The metadata request object. | 3491 /// |
3371 * | 3492 /// Request parameters: |
3372 * Request parameters: | 3493 /// |
3373 * | 3494 /// [enterpriseId] - The ID of the enterprise. |
3374 * [enterpriseId] - The ID of the enterprise. | 3495 /// |
3375 * | 3496 /// Completes with a [StorePage]. |
3376 * Completes with a [StorePage]. | 3497 /// |
3377 * | 3498 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3378 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3499 /// an error. |
3379 * error. | 3500 /// |
3380 * | 3501 /// If the used [http.Client] completes with an error when making a REST |
3381 * If the used [http.Client] completes with an error when making a REST call, | 3502 /// call, this method will complete with the same error. |
3382 * this method will complete with the same error. | |
3383 */ | |
3384 async.Future<StorePage> insert(StorePage request, core.String enterpriseId) { | 3503 async.Future<StorePage> insert(StorePage request, core.String enterpriseId) { |
3385 var _url = null; | 3504 var _url = null; |
3386 var _queryParams = new core.Map(); | 3505 var _queryParams = new core.Map(); |
3387 var _uploadMedia = null; | 3506 var _uploadMedia = null; |
3388 var _uploadOptions = null; | 3507 var _uploadOptions = null; |
3389 var _downloadOptions = commons.DownloadOptions.Metadata; | 3508 var _downloadOptions = commons.DownloadOptions.Metadata; |
3390 var _body = null; | 3509 var _body = null; |
3391 | 3510 |
3392 if (request != null) { | 3511 if (request != null) { |
3393 _body = convert.JSON.encode((request).toJson()); | 3512 _body = convert.JSON.encode((request).toJson()); |
3394 } | 3513 } |
3395 if (enterpriseId == null) { | 3514 if (enterpriseId == null) { |
3396 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3515 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3397 } | 3516 } |
3398 | 3517 |
3399 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages'; | 3518 _url = 'enterprises/' + |
| 3519 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3520 '/storeLayout/pages'; |
3400 | 3521 |
3401 var _response = _requester.request(_url, | 3522 var _response = _requester.request(_url, "POST", |
3402 "POST", | 3523 body: _body, |
3403 body: _body, | 3524 queryParams: _queryParams, |
3404 queryParams: _queryParams, | 3525 uploadOptions: _uploadOptions, |
3405 uploadOptions: _uploadOptions, | 3526 uploadMedia: _uploadMedia, |
3406 uploadMedia: _uploadMedia, | 3527 downloadOptions: _downloadOptions); |
3407 downloadOptions: _downloadOptions); | |
3408 return _response.then((data) => new StorePage.fromJson(data)); | 3528 return _response.then((data) => new StorePage.fromJson(data)); |
3409 } | 3529 } |
3410 | 3530 |
3411 /** | 3531 /// Retrieves the details of all pages in the store. |
3412 * Retrieves the details of all pages in the store. | 3532 /// |
3413 * | 3533 /// Request parameters: |
3414 * Request parameters: | 3534 /// |
3415 * | 3535 /// [enterpriseId] - The ID of the enterprise. |
3416 * [enterpriseId] - The ID of the enterprise. | 3536 /// |
3417 * | 3537 /// Completes with a [StoreLayoutPagesListResponse]. |
3418 * Completes with a [StoreLayoutPagesListResponse]. | 3538 /// |
3419 * | 3539 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3420 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3540 /// an error. |
3421 * error. | 3541 /// |
3422 * | 3542 /// If the used [http.Client] completes with an error when making a REST |
3423 * If the used [http.Client] completes with an error when making a REST call, | 3543 /// call, this method will complete with the same error. |
3424 * this method will complete with the same error. | |
3425 */ | |
3426 async.Future<StoreLayoutPagesListResponse> list(core.String enterpriseId) { | 3544 async.Future<StoreLayoutPagesListResponse> list(core.String enterpriseId) { |
3427 var _url = null; | 3545 var _url = null; |
3428 var _queryParams = new core.Map(); | 3546 var _queryParams = new core.Map(); |
3429 var _uploadMedia = null; | 3547 var _uploadMedia = null; |
3430 var _uploadOptions = null; | 3548 var _uploadOptions = null; |
3431 var _downloadOptions = commons.DownloadOptions.Metadata; | 3549 var _downloadOptions = commons.DownloadOptions.Metadata; |
3432 var _body = null; | 3550 var _body = null; |
3433 | 3551 |
3434 if (enterpriseId == null) { | 3552 if (enterpriseId == null) { |
3435 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3553 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3436 } | 3554 } |
3437 | 3555 |
3438 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages'; | 3556 _url = 'enterprises/' + |
| 3557 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3558 '/storeLayout/pages'; |
3439 | 3559 |
3440 var _response = _requester.request(_url, | 3560 var _response = _requester.request(_url, "GET", |
3441 "GET", | 3561 body: _body, |
3442 body: _body, | 3562 queryParams: _queryParams, |
3443 queryParams: _queryParams, | 3563 uploadOptions: _uploadOptions, |
3444 uploadOptions: _uploadOptions, | 3564 uploadMedia: _uploadMedia, |
3445 uploadMedia: _uploadMedia, | 3565 downloadOptions: _downloadOptions); |
3446 downloadOptions: _downloadOptions); | 3566 return _response |
3447 return _response.then((data) => new StoreLayoutPagesListResponse.fromJson(da
ta)); | 3567 .then((data) => new StoreLayoutPagesListResponse.fromJson(data)); |
3448 } | 3568 } |
3449 | 3569 |
3450 /** | 3570 /// Updates the content of a store page. This method supports patch |
3451 * Updates the content of a store page. This method supports patch semantics. | 3571 /// semantics. |
3452 * | 3572 /// |
3453 * [request] - The metadata request object. | 3573 /// [request] - The metadata request object. |
3454 * | 3574 /// |
3455 * Request parameters: | 3575 /// Request parameters: |
3456 * | 3576 /// |
3457 * [enterpriseId] - The ID of the enterprise. | 3577 /// [enterpriseId] - The ID of the enterprise. |
3458 * | 3578 /// |
3459 * [pageId] - The ID of the page. | 3579 /// [pageId] - The ID of the page. |
3460 * | 3580 /// |
3461 * Completes with a [StorePage]. | 3581 /// Completes with a [StorePage]. |
3462 * | 3582 /// |
3463 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3583 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3464 * error. | 3584 /// an error. |
3465 * | 3585 /// |
3466 * If the used [http.Client] completes with an error when making a REST call, | 3586 /// If the used [http.Client] completes with an error when making a REST |
3467 * this method will complete with the same error. | 3587 /// call, this method will complete with the same error. |
3468 */ | 3588 async.Future<StorePage> patch( |
3469 async.Future<StorePage> patch(StorePage request, core.String enterpriseId, cor
e.String pageId) { | 3589 StorePage request, core.String enterpriseId, core.String pageId) { |
3470 var _url = null; | 3590 var _url = null; |
3471 var _queryParams = new core.Map(); | 3591 var _queryParams = new core.Map(); |
3472 var _uploadMedia = null; | 3592 var _uploadMedia = null; |
3473 var _uploadOptions = null; | 3593 var _uploadOptions = null; |
3474 var _downloadOptions = commons.DownloadOptions.Metadata; | 3594 var _downloadOptions = commons.DownloadOptions.Metadata; |
3475 var _body = null; | 3595 var _body = null; |
3476 | 3596 |
3477 if (request != null) { | 3597 if (request != null) { |
3478 _body = convert.JSON.encode((request).toJson()); | 3598 _body = convert.JSON.encode((request).toJson()); |
3479 } | 3599 } |
3480 if (enterpriseId == null) { | 3600 if (enterpriseId == null) { |
3481 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3601 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3482 } | 3602 } |
3483 if (pageId == null) { | 3603 if (pageId == null) { |
3484 throw new core.ArgumentError("Parameter pageId is required."); | 3604 throw new core.ArgumentError("Parameter pageId is required."); |
3485 } | 3605 } |
3486 | 3606 |
3487 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId'); | 3607 _url = 'enterprises/' + |
| 3608 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3609 '/storeLayout/pages/' + |
| 3610 commons.Escaper.ecapeVariable('$pageId'); |
3488 | 3611 |
3489 var _response = _requester.request(_url, | 3612 var _response = _requester.request(_url, "PATCH", |
3490 "PATCH", | 3613 body: _body, |
3491 body: _body, | 3614 queryParams: _queryParams, |
3492 queryParams: _queryParams, | 3615 uploadOptions: _uploadOptions, |
3493 uploadOptions: _uploadOptions, | 3616 uploadMedia: _uploadMedia, |
3494 uploadMedia: _uploadMedia, | 3617 downloadOptions: _downloadOptions); |
3495 downloadOptions: _downloadOptions); | |
3496 return _response.then((data) => new StorePage.fromJson(data)); | 3618 return _response.then((data) => new StorePage.fromJson(data)); |
3497 } | 3619 } |
3498 | 3620 |
3499 /** | 3621 /// Updates the content of a store page. |
3500 * Updates the content of a store page. | 3622 /// |
3501 * | 3623 /// [request] - The metadata request object. |
3502 * [request] - The metadata request object. | 3624 /// |
3503 * | 3625 /// Request parameters: |
3504 * Request parameters: | 3626 /// |
3505 * | 3627 /// [enterpriseId] - The ID of the enterprise. |
3506 * [enterpriseId] - The ID of the enterprise. | 3628 /// |
3507 * | 3629 /// [pageId] - The ID of the page. |
3508 * [pageId] - The ID of the page. | 3630 /// |
3509 * | 3631 /// Completes with a [StorePage]. |
3510 * Completes with a [StorePage]. | 3632 /// |
3511 * | 3633 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3512 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3634 /// an error. |
3513 * error. | 3635 /// |
3514 * | 3636 /// If the used [http.Client] completes with an error when making a REST |
3515 * If the used [http.Client] completes with an error when making a REST call, | 3637 /// call, this method will complete with the same error. |
3516 * this method will complete with the same error. | 3638 async.Future<StorePage> update( |
3517 */ | 3639 StorePage request, core.String enterpriseId, core.String pageId) { |
3518 async.Future<StorePage> update(StorePage request, core.String enterpriseId, co
re.String pageId) { | |
3519 var _url = null; | 3640 var _url = null; |
3520 var _queryParams = new core.Map(); | 3641 var _queryParams = new core.Map(); |
3521 var _uploadMedia = null; | 3642 var _uploadMedia = null; |
3522 var _uploadOptions = null; | 3643 var _uploadOptions = null; |
3523 var _downloadOptions = commons.DownloadOptions.Metadata; | 3644 var _downloadOptions = commons.DownloadOptions.Metadata; |
3524 var _body = null; | 3645 var _body = null; |
3525 | 3646 |
3526 if (request != null) { | 3647 if (request != null) { |
3527 _body = convert.JSON.encode((request).toJson()); | 3648 _body = convert.JSON.encode((request).toJson()); |
3528 } | 3649 } |
3529 if (enterpriseId == null) { | 3650 if (enterpriseId == null) { |
3530 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3651 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3531 } | 3652 } |
3532 if (pageId == null) { | 3653 if (pageId == null) { |
3533 throw new core.ArgumentError("Parameter pageId is required."); | 3654 throw new core.ArgumentError("Parameter pageId is required."); |
3534 } | 3655 } |
3535 | 3656 |
3536 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s
toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId'); | 3657 _url = 'enterprises/' + |
| 3658 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3659 '/storeLayout/pages/' + |
| 3660 commons.Escaper.ecapeVariable('$pageId'); |
3537 | 3661 |
3538 var _response = _requester.request(_url, | 3662 var _response = _requester.request(_url, "PUT", |
3539 "PUT", | 3663 body: _body, |
3540 body: _body, | 3664 queryParams: _queryParams, |
3541 queryParams: _queryParams, | 3665 uploadOptions: _uploadOptions, |
3542 uploadOptions: _uploadOptions, | 3666 uploadMedia: _uploadMedia, |
3543 uploadMedia: _uploadMedia, | 3667 downloadOptions: _downloadOptions); |
3544 downloadOptions: _downloadOptions); | |
3545 return _response.then((data) => new StorePage.fromJson(data)); | 3668 return _response.then((data) => new StorePage.fromJson(data)); |
3546 } | 3669 } |
3547 | |
3548 } | 3670 } |
3549 | 3671 |
3550 | |
3551 class UsersResourceApi { | 3672 class UsersResourceApi { |
3552 final commons.ApiRequester _requester; | 3673 final commons.ApiRequester _requester; |
3553 | 3674 |
3554 UsersResourceApi(commons.ApiRequester client) : | 3675 UsersResourceApi(commons.ApiRequester client) : _requester = client; |
3555 _requester = client; | |
3556 | 3676 |
3557 /** | 3677 /// Deleted an EMM-managed user. |
3558 * Deleted an EMM-managed user. | 3678 /// |
3559 * | 3679 /// Request parameters: |
3560 * Request parameters: | 3680 /// |
3561 * | 3681 /// [enterpriseId] - The ID of the enterprise. |
3562 * [enterpriseId] - The ID of the enterprise. | 3682 /// |
3563 * | 3683 /// [userId] - The ID of the user. |
3564 * [userId] - The ID of the user. | 3684 /// |
3565 * | 3685 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3566 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3686 /// an error. |
3567 * error. | 3687 /// |
3568 * | 3688 /// If the used [http.Client] completes with an error when making a REST |
3569 * If the used [http.Client] completes with an error when making a REST call, | 3689 /// call, this method will complete with the same error. |
3570 * this method will complete with the same error. | |
3571 */ | |
3572 async.Future delete(core.String enterpriseId, core.String userId) { | 3690 async.Future delete(core.String enterpriseId, core.String userId) { |
3573 var _url = null; | 3691 var _url = null; |
3574 var _queryParams = new core.Map(); | 3692 var _queryParams = new core.Map(); |
3575 var _uploadMedia = null; | 3693 var _uploadMedia = null; |
3576 var _uploadOptions = null; | 3694 var _uploadOptions = null; |
3577 var _downloadOptions = commons.DownloadOptions.Metadata; | 3695 var _downloadOptions = commons.DownloadOptions.Metadata; |
3578 var _body = null; | 3696 var _body = null; |
3579 | 3697 |
3580 if (enterpriseId == null) { | 3698 if (enterpriseId == null) { |
3581 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3699 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3582 } | 3700 } |
3583 if (userId == null) { | 3701 if (userId == null) { |
3584 throw new core.ArgumentError("Parameter userId is required."); | 3702 throw new core.ArgumentError("Parameter userId is required."); |
3585 } | 3703 } |
3586 | 3704 |
3587 _downloadOptions = null; | 3705 _downloadOptions = null; |
3588 | 3706 |
3589 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId'); | 3707 _url = 'enterprises/' + |
| 3708 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3709 '/users/' + |
| 3710 commons.Escaper.ecapeVariable('$userId'); |
3590 | 3711 |
3591 var _response = _requester.request(_url, | 3712 var _response = _requester.request(_url, "DELETE", |
3592 "DELETE", | 3713 body: _body, |
3593 body: _body, | 3714 queryParams: _queryParams, |
3594 queryParams: _queryParams, | 3715 uploadOptions: _uploadOptions, |
3595 uploadOptions: _uploadOptions, | 3716 uploadMedia: _uploadMedia, |
3596 uploadMedia: _uploadMedia, | 3717 downloadOptions: _downloadOptions); |
3597 downloadOptions: _downloadOptions); | |
3598 return _response.then((data) => null); | 3718 return _response.then((data) => null); |
3599 } | 3719 } |
3600 | 3720 |
3601 /** | 3721 /// Generates an authentication token which the device policy client can use |
3602 * Generates an authentication token which the device policy client can use to | 3722 /// to provision the given EMM-managed user account on a device. The |
3603 * provision the given EMM-managed user account on a device. The generated | 3723 /// generated token is single-use and expires after a few minutes. |
3604 * token is single-use and expires after a few minutes. | 3724 /// |
3605 * | 3725 /// This call only works with EMM-managed accounts. |
3606 * This call only works with EMM-managed accounts. | 3726 /// |
3607 * | 3727 /// Request parameters: |
3608 * Request parameters: | 3728 /// |
3609 * | 3729 /// [enterpriseId] - The ID of the enterprise. |
3610 * [enterpriseId] - The ID of the enterprise. | 3730 /// |
3611 * | 3731 /// [userId] - The ID of the user. |
3612 * [userId] - The ID of the user. | 3732 /// |
3613 * | 3733 /// Completes with a [AuthenticationToken]. |
3614 * Completes with a [AuthenticationToken]. | 3734 /// |
3615 * | 3735 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3616 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3736 /// an error. |
3617 * error. | 3737 /// |
3618 * | 3738 /// If the used [http.Client] completes with an error when making a REST |
3619 * If the used [http.Client] completes with an error when making a REST call, | 3739 /// call, this method will complete with the same error. |
3620 * this method will complete with the same error. | 3740 async.Future<AuthenticationToken> generateAuthenticationToken( |
3621 */ | 3741 core.String enterpriseId, core.String userId) { |
3622 async.Future<AuthenticationToken> generateAuthenticationToken(core.String ente
rpriseId, core.String userId) { | |
3623 var _url = null; | 3742 var _url = null; |
3624 var _queryParams = new core.Map(); | 3743 var _queryParams = new core.Map(); |
3625 var _uploadMedia = null; | 3744 var _uploadMedia = null; |
3626 var _uploadOptions = null; | 3745 var _uploadOptions = null; |
3627 var _downloadOptions = commons.DownloadOptions.Metadata; | 3746 var _downloadOptions = commons.DownloadOptions.Metadata; |
3628 var _body = null; | 3747 var _body = null; |
3629 | 3748 |
3630 if (enterpriseId == null) { | 3749 if (enterpriseId == null) { |
3631 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3750 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3632 } | 3751 } |
3633 if (userId == null) { | 3752 if (userId == null) { |
3634 throw new core.ArgumentError("Parameter userId is required."); | 3753 throw new core.ArgumentError("Parameter userId is required."); |
3635 } | 3754 } |
3636 | 3755 |
3637 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/authenticationToken'; | 3756 _url = 'enterprises/' + |
| 3757 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3758 '/users/' + |
| 3759 commons.Escaper.ecapeVariable('$userId') + |
| 3760 '/authenticationToken'; |
3638 | 3761 |
3639 var _response = _requester.request(_url, | 3762 var _response = _requester.request(_url, "POST", |
3640 "POST", | 3763 body: _body, |
3641 body: _body, | 3764 queryParams: _queryParams, |
3642 queryParams: _queryParams, | 3765 uploadOptions: _uploadOptions, |
3643 uploadOptions: _uploadOptions, | 3766 uploadMedia: _uploadMedia, |
3644 uploadMedia: _uploadMedia, | 3767 downloadOptions: _downloadOptions); |
3645 downloadOptions: _downloadOptions); | |
3646 return _response.then((data) => new AuthenticationToken.fromJson(data)); | 3768 return _response.then((data) => new AuthenticationToken.fromJson(data)); |
3647 } | 3769 } |
3648 | 3770 |
3649 /** | 3771 /// Generates a token (activation code) to allow this user to configure their |
3650 * Generates a token (activation code) to allow this user to configure their | 3772 /// managed account in the Android Setup Wizard. Revokes any previously |
3651 * managed account in the Android Setup Wizard. Revokes any previously | 3773 /// generated token. |
3652 * generated token. | 3774 /// |
3653 * | 3775 /// This call only works with Google managed accounts. |
3654 * This call only works with Google managed accounts. | 3776 /// |
3655 * | 3777 /// Request parameters: |
3656 * Request parameters: | 3778 /// |
3657 * | 3779 /// [enterpriseId] - The ID of the enterprise. |
3658 * [enterpriseId] - The ID of the enterprise. | 3780 /// |
3659 * | 3781 /// [userId] - The ID of the user. |
3660 * [userId] - The ID of the user. | 3782 /// |
3661 * | 3783 /// Completes with a [UserToken]. |
3662 * Completes with a [UserToken]. | 3784 /// |
3663 * | 3785 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3664 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3786 /// an error. |
3665 * error. | 3787 /// |
3666 * | 3788 /// If the used [http.Client] completes with an error when making a REST |
3667 * If the used [http.Client] completes with an error when making a REST call, | 3789 /// call, this method will complete with the same error. |
3668 * this method will complete with the same error. | 3790 async.Future<UserToken> generateToken( |
3669 */ | 3791 core.String enterpriseId, core.String userId) { |
3670 async.Future<UserToken> generateToken(core.String enterpriseId, core.String us
erId) { | |
3671 var _url = null; | 3792 var _url = null; |
3672 var _queryParams = new core.Map(); | 3793 var _queryParams = new core.Map(); |
3673 var _uploadMedia = null; | 3794 var _uploadMedia = null; |
3674 var _uploadOptions = null; | 3795 var _uploadOptions = null; |
3675 var _downloadOptions = commons.DownloadOptions.Metadata; | 3796 var _downloadOptions = commons.DownloadOptions.Metadata; |
3676 var _body = null; | 3797 var _body = null; |
3677 | 3798 |
3678 if (enterpriseId == null) { | 3799 if (enterpriseId == null) { |
3679 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3800 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3680 } | 3801 } |
3681 if (userId == null) { | 3802 if (userId == null) { |
3682 throw new core.ArgumentError("Parameter userId is required."); | 3803 throw new core.ArgumentError("Parameter userId is required."); |
3683 } | 3804 } |
3684 | 3805 |
3685 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/token'; | 3806 _url = 'enterprises/' + |
| 3807 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3808 '/users/' + |
| 3809 commons.Escaper.ecapeVariable('$userId') + |
| 3810 '/token'; |
3686 | 3811 |
3687 var _response = _requester.request(_url, | 3812 var _response = _requester.request(_url, "POST", |
3688 "POST", | 3813 body: _body, |
3689 body: _body, | 3814 queryParams: _queryParams, |
3690 queryParams: _queryParams, | 3815 uploadOptions: _uploadOptions, |
3691 uploadOptions: _uploadOptions, | 3816 uploadMedia: _uploadMedia, |
3692 uploadMedia: _uploadMedia, | 3817 downloadOptions: _downloadOptions); |
3693 downloadOptions: _downloadOptions); | |
3694 return _response.then((data) => new UserToken.fromJson(data)); | 3818 return _response.then((data) => new UserToken.fromJson(data)); |
3695 } | 3819 } |
3696 | 3820 |
3697 /** | 3821 /// Retrieves a user's details. |
3698 * Retrieves a user's details. | 3822 /// |
3699 * | 3823 /// Request parameters: |
3700 * Request parameters: | 3824 /// |
3701 * | 3825 /// [enterpriseId] - The ID of the enterprise. |
3702 * [enterpriseId] - The ID of the enterprise. | 3826 /// |
3703 * | 3827 /// [userId] - The ID of the user. |
3704 * [userId] - The ID of the user. | 3828 /// |
3705 * | 3829 /// Completes with a [User]. |
3706 * Completes with a [User]. | 3830 /// |
3707 * | 3831 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3708 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3832 /// an error. |
3709 * error. | 3833 /// |
3710 * | 3834 /// If the used [http.Client] completes with an error when making a REST |
3711 * If the used [http.Client] completes with an error when making a REST call, | 3835 /// call, this method will complete with the same error. |
3712 * this method will complete with the same error. | |
3713 */ | |
3714 async.Future<User> get(core.String enterpriseId, core.String userId) { | 3836 async.Future<User> get(core.String enterpriseId, core.String userId) { |
3715 var _url = null; | 3837 var _url = null; |
3716 var _queryParams = new core.Map(); | 3838 var _queryParams = new core.Map(); |
3717 var _uploadMedia = null; | 3839 var _uploadMedia = null; |
3718 var _uploadOptions = null; | 3840 var _uploadOptions = null; |
3719 var _downloadOptions = commons.DownloadOptions.Metadata; | 3841 var _downloadOptions = commons.DownloadOptions.Metadata; |
3720 var _body = null; | 3842 var _body = null; |
3721 | 3843 |
3722 if (enterpriseId == null) { | 3844 if (enterpriseId == null) { |
3723 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3845 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3724 } | 3846 } |
3725 if (userId == null) { | 3847 if (userId == null) { |
3726 throw new core.ArgumentError("Parameter userId is required."); | 3848 throw new core.ArgumentError("Parameter userId is required."); |
3727 } | 3849 } |
3728 | 3850 |
3729 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId'); | 3851 _url = 'enterprises/' + |
| 3852 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3853 '/users/' + |
| 3854 commons.Escaper.ecapeVariable('$userId'); |
3730 | 3855 |
3731 var _response = _requester.request(_url, | 3856 var _response = _requester.request(_url, "GET", |
3732 "GET", | 3857 body: _body, |
3733 body: _body, | 3858 queryParams: _queryParams, |
3734 queryParams: _queryParams, | 3859 uploadOptions: _uploadOptions, |
3735 uploadOptions: _uploadOptions, | 3860 uploadMedia: _uploadMedia, |
3736 uploadMedia: _uploadMedia, | 3861 downloadOptions: _downloadOptions); |
3737 downloadOptions: _downloadOptions); | |
3738 return _response.then((data) => new User.fromJson(data)); | 3862 return _response.then((data) => new User.fromJson(data)); |
3739 } | 3863 } |
3740 | 3864 |
3741 /** | 3865 /// Retrieves the set of products a user is entitled to access. |
3742 * Retrieves the set of products a user is entitled to access. | 3866 /// |
3743 * | 3867 /// Request parameters: |
3744 * Request parameters: | 3868 /// |
3745 * | 3869 /// [enterpriseId] - The ID of the enterprise. |
3746 * [enterpriseId] - The ID of the enterprise. | 3870 /// |
3747 * | 3871 /// [userId] - The ID of the user. |
3748 * [userId] - The ID of the user. | 3872 /// |
3749 * | 3873 /// Completes with a [ProductSet]. |
3750 * Completes with a [ProductSet]. | 3874 /// |
3751 * | 3875 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3752 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3876 /// an error. |
3753 * error. | 3877 /// |
3754 * | 3878 /// If the used [http.Client] completes with an error when making a REST |
3755 * If the used [http.Client] completes with an error when making a REST call, | 3879 /// call, this method will complete with the same error. |
3756 * this method will complete with the same error. | 3880 async.Future<ProductSet> getAvailableProductSet( |
3757 */ | 3881 core.String enterpriseId, core.String userId) { |
3758 async.Future<ProductSet> getAvailableProductSet(core.String enterpriseId, core
.String userId) { | |
3759 var _url = null; | 3882 var _url = null; |
3760 var _queryParams = new core.Map(); | 3883 var _queryParams = new core.Map(); |
3761 var _uploadMedia = null; | 3884 var _uploadMedia = null; |
3762 var _uploadOptions = null; | 3885 var _uploadOptions = null; |
3763 var _downloadOptions = commons.DownloadOptions.Metadata; | 3886 var _downloadOptions = commons.DownloadOptions.Metadata; |
3764 var _body = null; | 3887 var _body = null; |
3765 | 3888 |
3766 if (enterpriseId == null) { | 3889 if (enterpriseId == null) { |
3767 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3890 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3768 } | 3891 } |
3769 if (userId == null) { | 3892 if (userId == null) { |
3770 throw new core.ArgumentError("Parameter userId is required."); | 3893 throw new core.ArgumentError("Parameter userId is required."); |
3771 } | 3894 } |
3772 | 3895 |
3773 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/availableProductSet'; | 3896 _url = 'enterprises/' + |
| 3897 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3898 '/users/' + |
| 3899 commons.Escaper.ecapeVariable('$userId') + |
| 3900 '/availableProductSet'; |
3774 | 3901 |
3775 var _response = _requester.request(_url, | 3902 var _response = _requester.request(_url, "GET", |
3776 "GET", | 3903 body: _body, |
3777 body: _body, | 3904 queryParams: _queryParams, |
3778 queryParams: _queryParams, | 3905 uploadOptions: _uploadOptions, |
3779 uploadOptions: _uploadOptions, | 3906 uploadMedia: _uploadMedia, |
3780 uploadMedia: _uploadMedia, | 3907 downloadOptions: _downloadOptions); |
3781 downloadOptions: _downloadOptions); | |
3782 return _response.then((data) => new ProductSet.fromJson(data)); | 3908 return _response.then((data) => new ProductSet.fromJson(data)); |
3783 } | 3909 } |
3784 | 3910 |
3785 /** | 3911 /// Creates a new EMM-managed user. |
3786 * Creates a new EMM-managed user. | 3912 /// |
3787 * | 3913 /// The Users resource passed in the body of the request should include an |
3788 * The Users resource passed in the body of the request should include an | 3914 /// accountIdentifier and an accountType. |
3789 * accountIdentifier and an accountType. | 3915 /// If a corresponding user already exists with the same account identifier, |
3790 * If a corresponding user already exists with the same account identifier, | 3916 /// the user will be updated with the resource. In this case only the |
3791 * the user will be updated with the resource. In this case only the | 3917 /// displayName field can be changed. |
3792 * displayName field can be changed. | 3918 /// |
3793 * | 3919 /// [request] - The metadata request object. |
3794 * [request] - The metadata request object. | 3920 /// |
3795 * | 3921 /// Request parameters: |
3796 * Request parameters: | 3922 /// |
3797 * | 3923 /// [enterpriseId] - The ID of the enterprise. |
3798 * [enterpriseId] - The ID of the enterprise. | 3924 /// |
3799 * | 3925 /// Completes with a [User]. |
3800 * Completes with a [User]. | 3926 /// |
3801 * | 3927 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3802 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3928 /// an error. |
3803 * error. | 3929 /// |
3804 * | 3930 /// If the used [http.Client] completes with an error when making a REST |
3805 * If the used [http.Client] completes with an error when making a REST call, | 3931 /// call, this method will complete with the same error. |
3806 * this method will complete with the same error. | |
3807 */ | |
3808 async.Future<User> insert(User request, core.String enterpriseId) { | 3932 async.Future<User> insert(User request, core.String enterpriseId) { |
3809 var _url = null; | 3933 var _url = null; |
3810 var _queryParams = new core.Map(); | 3934 var _queryParams = new core.Map(); |
3811 var _uploadMedia = null; | 3935 var _uploadMedia = null; |
3812 var _uploadOptions = null; | 3936 var _uploadOptions = null; |
3813 var _downloadOptions = commons.DownloadOptions.Metadata; | 3937 var _downloadOptions = commons.DownloadOptions.Metadata; |
3814 var _body = null; | 3938 var _body = null; |
3815 | 3939 |
3816 if (request != null) { | 3940 if (request != null) { |
3817 _body = convert.JSON.encode((request).toJson()); | 3941 _body = convert.JSON.encode((request).toJson()); |
3818 } | 3942 } |
3819 if (enterpriseId == null) { | 3943 if (enterpriseId == null) { |
3820 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3944 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3821 } | 3945 } |
3822 | 3946 |
3823 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers'; | 3947 _url = 'enterprises/' + |
| 3948 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3949 '/users'; |
3824 | 3950 |
3825 var _response = _requester.request(_url, | 3951 var _response = _requester.request(_url, "POST", |
3826 "POST", | 3952 body: _body, |
3827 body: _body, | 3953 queryParams: _queryParams, |
3828 queryParams: _queryParams, | 3954 uploadOptions: _uploadOptions, |
3829 uploadOptions: _uploadOptions, | 3955 uploadMedia: _uploadMedia, |
3830 uploadMedia: _uploadMedia, | 3956 downloadOptions: _downloadOptions); |
3831 downloadOptions: _downloadOptions); | |
3832 return _response.then((data) => new User.fromJson(data)); | 3957 return _response.then((data) => new User.fromJson(data)); |
3833 } | 3958 } |
3834 | 3959 |
3835 /** | 3960 /// Looks up a user by primary email address. This is only supported for |
3836 * Looks up a user by primary email address. This is only supported for | 3961 /// Google-managed users. Lookup of the id is not needed for EMM-managed |
3837 * Google-managed users. Lookup of the id is not needed for EMM-managed users | 3962 /// users because the id is already returned in the result of the |
3838 * because the id is already returned in the result of the Users.insert call. | 3963 /// Users.insert call. |
3839 * | 3964 /// |
3840 * Request parameters: | 3965 /// Request parameters: |
3841 * | 3966 /// |
3842 * [enterpriseId] - The ID of the enterprise. | 3967 /// [enterpriseId] - The ID of the enterprise. |
3843 * | 3968 /// |
3844 * [email] - The exact primary email address of the user to look up. | 3969 /// [email] - The exact primary email address of the user to look up. |
3845 * | 3970 /// |
3846 * Completes with a [UsersListResponse]. | 3971 /// Completes with a [UsersListResponse]. |
3847 * | 3972 /// |
3848 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3973 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3849 * error. | 3974 /// an error. |
3850 * | 3975 /// |
3851 * If the used [http.Client] completes with an error when making a REST call, | 3976 /// If the used [http.Client] completes with an error when making a REST |
3852 * this method will complete with the same error. | 3977 /// call, this method will complete with the same error. |
3853 */ | 3978 async.Future<UsersListResponse> list( |
3854 async.Future<UsersListResponse> list(core.String enterpriseId, core.String ema
il) { | 3979 core.String enterpriseId, core.String email) { |
3855 var _url = null; | 3980 var _url = null; |
3856 var _queryParams = new core.Map(); | 3981 var _queryParams = new core.Map(); |
3857 var _uploadMedia = null; | 3982 var _uploadMedia = null; |
3858 var _uploadOptions = null; | 3983 var _uploadOptions = null; |
3859 var _downloadOptions = commons.DownloadOptions.Metadata; | 3984 var _downloadOptions = commons.DownloadOptions.Metadata; |
3860 var _body = null; | 3985 var _body = null; |
3861 | 3986 |
3862 if (enterpriseId == null) { | 3987 if (enterpriseId == null) { |
3863 throw new core.ArgumentError("Parameter enterpriseId is required."); | 3988 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3864 } | 3989 } |
3865 if (email == null) { | 3990 if (email == null) { |
3866 throw new core.ArgumentError("Parameter email is required."); | 3991 throw new core.ArgumentError("Parameter email is required."); |
3867 } | 3992 } |
3868 _queryParams["email"] = [email]; | 3993 _queryParams["email"] = [email]; |
3869 | 3994 |
3870 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers'; | 3995 _url = 'enterprises/' + |
| 3996 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 3997 '/users'; |
3871 | 3998 |
3872 var _response = _requester.request(_url, | 3999 var _response = _requester.request(_url, "GET", |
3873 "GET", | 4000 body: _body, |
3874 body: _body, | 4001 queryParams: _queryParams, |
3875 queryParams: _queryParams, | 4002 uploadOptions: _uploadOptions, |
3876 uploadOptions: _uploadOptions, | 4003 uploadMedia: _uploadMedia, |
3877 uploadMedia: _uploadMedia, | 4004 downloadOptions: _downloadOptions); |
3878 downloadOptions: _downloadOptions); | |
3879 return _response.then((data) => new UsersListResponse.fromJson(data)); | 4005 return _response.then((data) => new UsersListResponse.fromJson(data)); |
3880 } | 4006 } |
3881 | 4007 |
3882 /** | 4008 /// Updates the details of an EMM-managed user. |
3883 * Updates the details of an EMM-managed user. | 4009 /// |
3884 * | 4010 /// Can be used with EMM-managed users only (not Google managed users). Pass |
3885 * Can be used with EMM-managed users only (not Google managed users). Pass | 4011 /// the new details in the Users resource in the request body. Only the |
3886 * the new details in the Users resource in the request body. Only the | 4012 /// displayName field can be changed. Other fields must either be unset or |
3887 * displayName field can be changed. Other fields must either be unset or have | 4013 /// have the currently active value. This method supports patch semantics. |
3888 * the currently active value. This method supports patch semantics. | 4014 /// |
3889 * | 4015 /// [request] - The metadata request object. |
3890 * [request] - The metadata request object. | 4016 /// |
3891 * | 4017 /// Request parameters: |
3892 * Request parameters: | 4018 /// |
3893 * | 4019 /// [enterpriseId] - The ID of the enterprise. |
3894 * [enterpriseId] - The ID of the enterprise. | 4020 /// |
3895 * | 4021 /// [userId] - The ID of the user. |
3896 * [userId] - The ID of the user. | 4022 /// |
3897 * | 4023 /// Completes with a [User]. |
3898 * Completes with a [User]. | 4024 /// |
3899 * | 4025 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3900 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4026 /// an error. |
3901 * error. | 4027 /// |
3902 * | 4028 /// If the used [http.Client] completes with an error when making a REST |
3903 * If the used [http.Client] completes with an error when making a REST call, | 4029 /// call, this method will complete with the same error. |
3904 * this method will complete with the same error. | 4030 async.Future<User> patch( |
3905 */ | 4031 User request, core.String enterpriseId, core.String userId) { |
3906 async.Future<User> patch(User request, core.String enterpriseId, core.String u
serId) { | |
3907 var _url = null; | 4032 var _url = null; |
3908 var _queryParams = new core.Map(); | 4033 var _queryParams = new core.Map(); |
3909 var _uploadMedia = null; | 4034 var _uploadMedia = null; |
3910 var _uploadOptions = null; | 4035 var _uploadOptions = null; |
3911 var _downloadOptions = commons.DownloadOptions.Metadata; | 4036 var _downloadOptions = commons.DownloadOptions.Metadata; |
3912 var _body = null; | 4037 var _body = null; |
3913 | 4038 |
3914 if (request != null) { | 4039 if (request != null) { |
3915 _body = convert.JSON.encode((request).toJson()); | 4040 _body = convert.JSON.encode((request).toJson()); |
3916 } | 4041 } |
3917 if (enterpriseId == null) { | 4042 if (enterpriseId == null) { |
3918 throw new core.ArgumentError("Parameter enterpriseId is required."); | 4043 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3919 } | 4044 } |
3920 if (userId == null) { | 4045 if (userId == null) { |
3921 throw new core.ArgumentError("Parameter userId is required."); | 4046 throw new core.ArgumentError("Parameter userId is required."); |
3922 } | 4047 } |
3923 | 4048 |
3924 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId'); | 4049 _url = 'enterprises/' + |
| 4050 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 4051 '/users/' + |
| 4052 commons.Escaper.ecapeVariable('$userId'); |
3925 | 4053 |
3926 var _response = _requester.request(_url, | 4054 var _response = _requester.request(_url, "PATCH", |
3927 "PATCH", | 4055 body: _body, |
3928 body: _body, | 4056 queryParams: _queryParams, |
3929 queryParams: _queryParams, | 4057 uploadOptions: _uploadOptions, |
3930 uploadOptions: _uploadOptions, | 4058 uploadMedia: _uploadMedia, |
3931 uploadMedia: _uploadMedia, | 4059 downloadOptions: _downloadOptions); |
3932 downloadOptions: _downloadOptions); | |
3933 return _response.then((data) => new User.fromJson(data)); | 4060 return _response.then((data) => new User.fromJson(data)); |
3934 } | 4061 } |
3935 | 4062 |
3936 /** | 4063 /// Revokes a previously generated token (activation code) for the user. |
3937 * Revokes a previously generated token (activation code) for the user. | 4064 /// |
3938 * | 4065 /// Request parameters: |
3939 * Request parameters: | 4066 /// |
3940 * | 4067 /// [enterpriseId] - The ID of the enterprise. |
3941 * [enterpriseId] - The ID of the enterprise. | 4068 /// |
3942 * | 4069 /// [userId] - The ID of the user. |
3943 * [userId] - The ID of the user. | 4070 /// |
3944 * | 4071 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3945 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4072 /// an error. |
3946 * error. | 4073 /// |
3947 * | 4074 /// If the used [http.Client] completes with an error when making a REST |
3948 * If the used [http.Client] completes with an error when making a REST call, | 4075 /// call, this method will complete with the same error. |
3949 * this method will complete with the same error. | |
3950 */ | |
3951 async.Future revokeToken(core.String enterpriseId, core.String userId) { | 4076 async.Future revokeToken(core.String enterpriseId, core.String userId) { |
3952 var _url = null; | 4077 var _url = null; |
3953 var _queryParams = new core.Map(); | 4078 var _queryParams = new core.Map(); |
3954 var _uploadMedia = null; | 4079 var _uploadMedia = null; |
3955 var _uploadOptions = null; | 4080 var _uploadOptions = null; |
3956 var _downloadOptions = commons.DownloadOptions.Metadata; | 4081 var _downloadOptions = commons.DownloadOptions.Metadata; |
3957 var _body = null; | 4082 var _body = null; |
3958 | 4083 |
3959 if (enterpriseId == null) { | 4084 if (enterpriseId == null) { |
3960 throw new core.ArgumentError("Parameter enterpriseId is required."); | 4085 throw new core.ArgumentError("Parameter enterpriseId is required."); |
3961 } | 4086 } |
3962 if (userId == null) { | 4087 if (userId == null) { |
3963 throw new core.ArgumentError("Parameter userId is required."); | 4088 throw new core.ArgumentError("Parameter userId is required."); |
3964 } | 4089 } |
3965 | 4090 |
3966 _downloadOptions = null; | 4091 _downloadOptions = null; |
3967 | 4092 |
3968 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/token'; | 4093 _url = 'enterprises/' + |
| 4094 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 4095 '/users/' + |
| 4096 commons.Escaper.ecapeVariable('$userId') + |
| 4097 '/token'; |
3969 | 4098 |
3970 var _response = _requester.request(_url, | 4099 var _response = _requester.request(_url, "DELETE", |
3971 "DELETE", | 4100 body: _body, |
3972 body: _body, | 4101 queryParams: _queryParams, |
3973 queryParams: _queryParams, | 4102 uploadOptions: _uploadOptions, |
3974 uploadOptions: _uploadOptions, | 4103 uploadMedia: _uploadMedia, |
3975 uploadMedia: _uploadMedia, | 4104 downloadOptions: _downloadOptions); |
3976 downloadOptions: _downloadOptions); | |
3977 return _response.then((data) => null); | 4105 return _response.then((data) => null); |
3978 } | 4106 } |
3979 | 4107 |
3980 /** | 4108 /// Modifies the set of products that a user is entitled to access (referred |
3981 * Modifies the set of products that a user is entitled to access (referred to | 4109 /// to as whitelisted products). Only products that are approved or products |
3982 * as whitelisted products). Only products that are approved or products that | 4110 /// that were previously approved (products with revoked approval) can be |
3983 * were previously approved (products with revoked approval) can be | 4111 /// whitelisted. |
3984 * whitelisted. | 4112 /// |
3985 * | 4113 /// [request] - The metadata request object. |
3986 * [request] - The metadata request object. | 4114 /// |
3987 * | 4115 /// Request parameters: |
3988 * Request parameters: | 4116 /// |
3989 * | 4117 /// [enterpriseId] - The ID of the enterprise. |
3990 * [enterpriseId] - The ID of the enterprise. | 4118 /// |
3991 * | 4119 /// [userId] - The ID of the user. |
3992 * [userId] - The ID of the user. | 4120 /// |
3993 * | 4121 /// Completes with a [ProductSet]. |
3994 * Completes with a [ProductSet]. | 4122 /// |
3995 * | 4123 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3996 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4124 /// an error. |
3997 * error. | 4125 /// |
3998 * | 4126 /// If the used [http.Client] completes with an error when making a REST |
3999 * If the used [http.Client] completes with an error when making a REST call, | 4127 /// call, this method will complete with the same error. |
4000 * this method will complete with the same error. | 4128 async.Future<ProductSet> setAvailableProductSet( |
4001 */ | 4129 ProductSet request, core.String enterpriseId, core.String userId) { |
4002 async.Future<ProductSet> setAvailableProductSet(ProductSet request, core.Strin
g enterpriseId, core.String userId) { | |
4003 var _url = null; | 4130 var _url = null; |
4004 var _queryParams = new core.Map(); | 4131 var _queryParams = new core.Map(); |
4005 var _uploadMedia = null; | 4132 var _uploadMedia = null; |
4006 var _uploadOptions = null; | 4133 var _uploadOptions = null; |
4007 var _downloadOptions = commons.DownloadOptions.Metadata; | 4134 var _downloadOptions = commons.DownloadOptions.Metadata; |
4008 var _body = null; | 4135 var _body = null; |
4009 | 4136 |
4010 if (request != null) { | 4137 if (request != null) { |
4011 _body = convert.JSON.encode((request).toJson()); | 4138 _body = convert.JSON.encode((request).toJson()); |
4012 } | 4139 } |
4013 if (enterpriseId == null) { | 4140 if (enterpriseId == null) { |
4014 throw new core.ArgumentError("Parameter enterpriseId is required."); | 4141 throw new core.ArgumentError("Parameter enterpriseId is required."); |
4015 } | 4142 } |
4016 if (userId == null) { | 4143 if (userId == null) { |
4017 throw new core.ArgumentError("Parameter userId is required."); | 4144 throw new core.ArgumentError("Parameter userId is required."); |
4018 } | 4145 } |
4019 | 4146 |
4020 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/availableProductSet'; | 4147 _url = 'enterprises/' + |
| 4148 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 4149 '/users/' + |
| 4150 commons.Escaper.ecapeVariable('$userId') + |
| 4151 '/availableProductSet'; |
4021 | 4152 |
4022 var _response = _requester.request(_url, | 4153 var _response = _requester.request(_url, "PUT", |
4023 "PUT", | 4154 body: _body, |
4024 body: _body, | 4155 queryParams: _queryParams, |
4025 queryParams: _queryParams, | 4156 uploadOptions: _uploadOptions, |
4026 uploadOptions: _uploadOptions, | 4157 uploadMedia: _uploadMedia, |
4027 uploadMedia: _uploadMedia, | 4158 downloadOptions: _downloadOptions); |
4028 downloadOptions: _downloadOptions); | |
4029 return _response.then((data) => new ProductSet.fromJson(data)); | 4159 return _response.then((data) => new ProductSet.fromJson(data)); |
4030 } | 4160 } |
4031 | 4161 |
4032 /** | 4162 /// Updates the details of an EMM-managed user. |
4033 * Updates the details of an EMM-managed user. | 4163 /// |
4034 * | 4164 /// Can be used with EMM-managed users only (not Google managed users). Pass |
4035 * Can be used with EMM-managed users only (not Google managed users). Pass | 4165 /// the new details in the Users resource in the request body. Only the |
4036 * the new details in the Users resource in the request body. Only the | 4166 /// displayName field can be changed. Other fields must either be unset or |
4037 * displayName field can be changed. Other fields must either be unset or have | 4167 /// have the currently active value. |
4038 * the currently active value. | 4168 /// |
4039 * | 4169 /// [request] - The metadata request object. |
4040 * [request] - The metadata request object. | 4170 /// |
4041 * | 4171 /// Request parameters: |
4042 * Request parameters: | 4172 /// |
4043 * | 4173 /// [enterpriseId] - The ID of the enterprise. |
4044 * [enterpriseId] - The ID of the enterprise. | 4174 /// |
4045 * | 4175 /// [userId] - The ID of the user. |
4046 * [userId] - The ID of the user. | 4176 /// |
4047 * | 4177 /// Completes with a [User]. |
4048 * Completes with a [User]. | 4178 /// |
4049 * | 4179 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4050 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4180 /// an error. |
4051 * error. | 4181 /// |
4052 * | 4182 /// If the used [http.Client] completes with an error when making a REST |
4053 * If the used [http.Client] completes with an error when making a REST call, | 4183 /// call, this method will complete with the same error. |
4054 * this method will complete with the same error. | 4184 async.Future<User> update( |
4055 */ | 4185 User request, core.String enterpriseId, core.String userId) { |
4056 async.Future<User> update(User request, core.String enterpriseId, core.String
userId) { | |
4057 var _url = null; | 4186 var _url = null; |
4058 var _queryParams = new core.Map(); | 4187 var _queryParams = new core.Map(); |
4059 var _uploadMedia = null; | 4188 var _uploadMedia = null; |
4060 var _uploadOptions = null; | 4189 var _uploadOptions = null; |
4061 var _downloadOptions = commons.DownloadOptions.Metadata; | 4190 var _downloadOptions = commons.DownloadOptions.Metadata; |
4062 var _body = null; | 4191 var _body = null; |
4063 | 4192 |
4064 if (request != null) { | 4193 if (request != null) { |
4065 _body = convert.JSON.encode((request).toJson()); | 4194 _body = convert.JSON.encode((request).toJson()); |
4066 } | 4195 } |
4067 if (enterpriseId == null) { | 4196 if (enterpriseId == null) { |
4068 throw new core.ArgumentError("Parameter enterpriseId is required."); | 4197 throw new core.ArgumentError("Parameter enterpriseId is required."); |
4069 } | 4198 } |
4070 if (userId == null) { | 4199 if (userId == null) { |
4071 throw new core.ArgumentError("Parameter userId is required."); | 4200 throw new core.ArgumentError("Parameter userId is required."); |
4072 } | 4201 } |
4073 | 4202 |
4074 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId'); | 4203 _url = 'enterprises/' + |
| 4204 commons.Escaper.ecapeVariable('$enterpriseId') + |
| 4205 '/users/' + |
| 4206 commons.Escaper.ecapeVariable('$userId'); |
4075 | 4207 |
4076 var _response = _requester.request(_url, | 4208 var _response = _requester.request(_url, "PUT", |
4077 "PUT", | 4209 body: _body, |
4078 body: _body, | 4210 queryParams: _queryParams, |
4079 queryParams: _queryParams, | 4211 uploadOptions: _uploadOptions, |
4080 uploadOptions: _uploadOptions, | 4212 uploadMedia: _uploadMedia, |
4081 uploadMedia: _uploadMedia, | 4213 downloadOptions: _downloadOptions); |
4082 downloadOptions: _downloadOptions); | |
4083 return _response.then((data) => new User.fromJson(data)); | 4214 return _response.then((data) => new User.fromJson(data)); |
4084 } | 4215 } |
4085 | |
4086 } | 4216 } |
4087 | 4217 |
4088 | 4218 /// This represents an enterprise admin who can manage the enterprise in the |
4089 | 4219 /// managed Google Play store. |
4090 /** | |
4091 * This represents an enterprise admin who can manage the enterprise in the | |
4092 * managed Google Play store. | |
4093 */ | |
4094 class Administrator { | 4220 class Administrator { |
4095 /** The admin's email address. */ | 4221 /// The admin's email address. |
4096 core.String email; | 4222 core.String email; |
4097 | 4223 |
4098 Administrator(); | 4224 Administrator(); |
4099 | 4225 |
4100 Administrator.fromJson(core.Map _json) { | 4226 Administrator.fromJson(core.Map _json) { |
4101 if (_json.containsKey("email")) { | 4227 if (_json.containsKey("email")) { |
4102 email = _json["email"]; | 4228 email = _json["email"]; |
4103 } | 4229 } |
4104 } | 4230 } |
4105 | 4231 |
4106 core.Map<core.String, core.Object> toJson() { | 4232 core.Map<core.String, core.Object> toJson() { |
4107 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4233 final core.Map<core.String, core.Object> _json = |
| 4234 new core.Map<core.String, core.Object>(); |
4108 if (email != null) { | 4235 if (email != null) { |
4109 _json["email"] = email; | 4236 _json["email"] = email; |
4110 } | 4237 } |
4111 return _json; | 4238 return _json; |
4112 } | 4239 } |
4113 } | 4240 } |
4114 | 4241 |
4115 /** A token authorizing an admin to access an iframe. */ | 4242 /// A token authorizing an admin to access an iframe. |
4116 class AdministratorWebToken { | 4243 class AdministratorWebToken { |
4117 /** | 4244 /// Identifies what kind of resource this is. Value: the fixed string |
4118 * Identifies what kind of resource this is. Value: the fixed string | 4245 /// "androidenterprise#administratorWebToken". |
4119 * "androidenterprise#administratorWebToken". | |
4120 */ | |
4121 core.String kind; | 4246 core.String kind; |
4122 /** | 4247 |
4123 * An opaque token to be passed to the Play front-end to generate an iframe. | 4248 /// An opaque token to be passed to the Play front-end to generate an iframe. |
4124 */ | |
4125 core.String token; | 4249 core.String token; |
4126 | 4250 |
4127 AdministratorWebToken(); | 4251 AdministratorWebToken(); |
4128 | 4252 |
4129 AdministratorWebToken.fromJson(core.Map _json) { | 4253 AdministratorWebToken.fromJson(core.Map _json) { |
4130 if (_json.containsKey("kind")) { | 4254 if (_json.containsKey("kind")) { |
4131 kind = _json["kind"]; | 4255 kind = _json["kind"]; |
4132 } | 4256 } |
4133 if (_json.containsKey("token")) { | 4257 if (_json.containsKey("token")) { |
4134 token = _json["token"]; | 4258 token = _json["token"]; |
4135 } | 4259 } |
4136 } | 4260 } |
4137 | 4261 |
4138 core.Map<core.String, core.Object> toJson() { | 4262 core.Map<core.String, core.Object> toJson() { |
4139 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4263 final core.Map<core.String, core.Object> _json = |
| 4264 new core.Map<core.String, core.Object>(); |
4140 if (kind != null) { | 4265 if (kind != null) { |
4141 _json["kind"] = kind; | 4266 _json["kind"] = kind; |
4142 } | 4267 } |
4143 if (token != null) { | 4268 if (token != null) { |
4144 _json["token"] = token; | 4269 _json["token"] = token; |
4145 } | 4270 } |
4146 return _json; | 4271 return _json; |
4147 } | 4272 } |
4148 } | 4273 } |
4149 | 4274 |
4150 /** | 4275 /// Specification for a token used to generate iframes. The token specifies |
4151 * Specification for a token used to generate iframes. The token specifies what | 4276 /// what data the admin is allowed to modify and the URI the iframe is allowed |
4152 * data the admin is allowed to modify and the URI the iframe is allowed to | 4277 /// to communiate with. |
4153 * communiate with. | |
4154 */ | |
4155 class AdministratorWebTokenSpec { | 4278 class AdministratorWebTokenSpec { |
4156 /** | 4279 /// Identifies what kind of resource this is. Value: the fixed string |
4157 * Identifies what kind of resource this is. Value: the fixed string | 4280 /// "androidenterprise#administratorWebTokenSpec". |
4158 * "androidenterprise#administratorWebTokenSpec". | |
4159 */ | |
4160 core.String kind; | 4281 core.String kind; |
4161 /** | 4282 |
4162 * The URI of the parent frame hosting the iframe. To prevent XSS, the iframe | 4283 /// The URI of the parent frame hosting the iframe. To prevent XSS, the |
4163 * may not be hosted at other URIs. This URI must be https. | 4284 /// iframe may not be hosted at other URIs. This URI must be https. |
4164 */ | |
4165 core.String parent; | 4285 core.String parent; |
4166 /** | 4286 |
4167 * The list of permissions the admin is granted within the iframe. The admin | 4287 /// The list of permissions the admin is granted within the iframe. The admin |
4168 * will only be allowed to view an iframe if they have all of the permissions | 4288 /// will only be allowed to view an iframe if they have all of the |
4169 * associated with it. The only valid value is "approveApps" that will allow | 4289 /// permissions associated with it. The only valid value is "approveApps" |
4170 * the admin to access the iframe in "approve" mode. | 4290 /// that will allow the admin to access the iframe in "approve" mode. |
4171 */ | |
4172 core.List<core.String> permission; | 4291 core.List<core.String> permission; |
4173 | 4292 |
4174 AdministratorWebTokenSpec(); | 4293 AdministratorWebTokenSpec(); |
4175 | 4294 |
4176 AdministratorWebTokenSpec.fromJson(core.Map _json) { | 4295 AdministratorWebTokenSpec.fromJson(core.Map _json) { |
4177 if (_json.containsKey("kind")) { | 4296 if (_json.containsKey("kind")) { |
4178 kind = _json["kind"]; | 4297 kind = _json["kind"]; |
4179 } | 4298 } |
4180 if (_json.containsKey("parent")) { | 4299 if (_json.containsKey("parent")) { |
4181 parent = _json["parent"]; | 4300 parent = _json["parent"]; |
4182 } | 4301 } |
4183 if (_json.containsKey("permission")) { | 4302 if (_json.containsKey("permission")) { |
4184 permission = _json["permission"]; | 4303 permission = _json["permission"]; |
4185 } | 4304 } |
4186 } | 4305 } |
4187 | 4306 |
4188 core.Map<core.String, core.Object> toJson() { | 4307 core.Map<core.String, core.Object> toJson() { |
4189 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4308 final core.Map<core.String, core.Object> _json = |
| 4309 new core.Map<core.String, core.Object>(); |
4190 if (kind != null) { | 4310 if (kind != null) { |
4191 _json["kind"] = kind; | 4311 _json["kind"] = kind; |
4192 } | 4312 } |
4193 if (parent != null) { | 4313 if (parent != null) { |
4194 _json["parent"] = parent; | 4314 _json["parent"] = parent; |
4195 } | 4315 } |
4196 if (permission != null) { | 4316 if (permission != null) { |
4197 _json["permission"] = permission; | 4317 _json["permission"] = permission; |
4198 } | 4318 } |
4199 return _json; | 4319 return _json; |
4200 } | 4320 } |
4201 } | 4321 } |
4202 | 4322 |
4203 /** The Android Device Policy configuration of an enterprise. */ | 4323 /// The Android Device Policy configuration of an enterprise. |
4204 class AndroidDevicePolicyConfig { | 4324 class AndroidDevicePolicyConfig { |
4205 /** | 4325 /// Identifies what kind of resource this is. Value: the fixed string |
4206 * Identifies what kind of resource this is. Value: the fixed string | 4326 /// "androidenterprise#androidDevicePolicyConfig". |
4207 * "androidenterprise#androidDevicePolicyConfig". | |
4208 */ | |
4209 core.String kind; | 4327 core.String kind; |
4210 /** | 4328 |
4211 * The state of Android Device Policy. "enabled" indicates that Android Device | 4329 /// The state of Android Device Policy. "enabled" indicates that Android |
4212 * Policy is enabled for the enterprise and the EMM is allowed to manage | 4330 /// Device Policy is enabled for the enterprise and the EMM is allowed to |
4213 * devices with Android Device Policy, while "disabled" means that it cannot. | 4331 /// manage devices with Android Device Policy, while "disabled" means that it |
4214 */ | 4332 /// cannot. |
4215 core.String state; | 4333 core.String state; |
4216 | 4334 |
4217 AndroidDevicePolicyConfig(); | 4335 AndroidDevicePolicyConfig(); |
4218 | 4336 |
4219 AndroidDevicePolicyConfig.fromJson(core.Map _json) { | 4337 AndroidDevicePolicyConfig.fromJson(core.Map _json) { |
4220 if (_json.containsKey("kind")) { | 4338 if (_json.containsKey("kind")) { |
4221 kind = _json["kind"]; | 4339 kind = _json["kind"]; |
4222 } | 4340 } |
4223 if (_json.containsKey("state")) { | 4341 if (_json.containsKey("state")) { |
4224 state = _json["state"]; | 4342 state = _json["state"]; |
4225 } | 4343 } |
4226 } | 4344 } |
4227 | 4345 |
4228 core.Map<core.String, core.Object> toJson() { | 4346 core.Map<core.String, core.Object> toJson() { |
4229 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4347 final core.Map<core.String, core.Object> _json = |
| 4348 new core.Map<core.String, core.Object>(); |
4230 if (kind != null) { | 4349 if (kind != null) { |
4231 _json["kind"] = kind; | 4350 _json["kind"] = kind; |
4232 } | 4351 } |
4233 if (state != null) { | 4352 if (state != null) { |
4234 _json["state"] = state; | 4353 _json["state"] = state; |
4235 } | 4354 } |
4236 return _json; | 4355 return _json; |
4237 } | 4356 } |
4238 } | 4357 } |
4239 | 4358 |
4240 /** | 4359 /// Represents the list of app restrictions available to be pre-configured for |
4241 * Represents the list of app restrictions available to be pre-configured for | 4360 /// the product. |
4242 * the product. | |
4243 */ | |
4244 class AppRestrictionsSchema { | 4361 class AppRestrictionsSchema { |
4245 /** | 4362 /// Identifies what kind of resource this is. Value: the fixed string |
4246 * Identifies what kind of resource this is. Value: the fixed string | 4363 /// "androidenterprise#appRestrictionsSchema". |
4247 * "androidenterprise#appRestrictionsSchema". | |
4248 */ | |
4249 core.String kind; | 4364 core.String kind; |
4250 /** The set of restrictions that make up this schema. */ | 4365 |
| 4366 /// The set of restrictions that make up this schema. |
4251 core.List<AppRestrictionsSchemaRestriction> restrictions; | 4367 core.List<AppRestrictionsSchemaRestriction> restrictions; |
4252 | 4368 |
4253 AppRestrictionsSchema(); | 4369 AppRestrictionsSchema(); |
4254 | 4370 |
4255 AppRestrictionsSchema.fromJson(core.Map _json) { | 4371 AppRestrictionsSchema.fromJson(core.Map _json) { |
4256 if (_json.containsKey("kind")) { | 4372 if (_json.containsKey("kind")) { |
4257 kind = _json["kind"]; | 4373 kind = _json["kind"]; |
4258 } | 4374 } |
4259 if (_json.containsKey("restrictions")) { | 4375 if (_json.containsKey("restrictions")) { |
4260 restrictions = _json["restrictions"].map((value) => new AppRestrictionsSch
emaRestriction.fromJson(value)).toList(); | 4376 restrictions = _json["restrictions"] |
| 4377 .map((value) => new AppRestrictionsSchemaRestriction.fromJson(value)) |
| 4378 .toList(); |
4261 } | 4379 } |
4262 } | 4380 } |
4263 | 4381 |
4264 core.Map<core.String, core.Object> toJson() { | 4382 core.Map<core.String, core.Object> toJson() { |
4265 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4383 final core.Map<core.String, core.Object> _json = |
| 4384 new core.Map<core.String, core.Object>(); |
4266 if (kind != null) { | 4385 if (kind != null) { |
4267 _json["kind"] = kind; | 4386 _json["kind"] = kind; |
4268 } | 4387 } |
4269 if (restrictions != null) { | 4388 if (restrictions != null) { |
4270 _json["restrictions"] = restrictions.map((value) => (value).toJson()).toLi
st(); | 4389 _json["restrictions"] = |
| 4390 restrictions.map((value) => (value).toJson()).toList(); |
4271 } | 4391 } |
4272 return _json; | 4392 return _json; |
4273 } | 4393 } |
4274 } | 4394 } |
4275 | 4395 |
4276 /** | 4396 /// An event generated when a new app version is uploaded to Google Play and |
4277 * An event generated when a new app version is uploaded to Google Play and its | 4397 /// its app restrictions schema changed. To fetch the app restrictions schema |
4278 * app restrictions schema changed. To fetch the app restrictions schema for an | 4398 /// for an app, use Products.getAppRestrictionsSchema on the EMM API. |
4279 * app, use Products.getAppRestrictionsSchema on the EMM API. | |
4280 */ | |
4281 class AppRestrictionsSchemaChangeEvent { | 4399 class AppRestrictionsSchemaChangeEvent { |
4282 /** | 4400 /// The id of the product (e.g. "app:com.google.android.gm") for which the |
4283 * The id of the product (e.g. "app:com.google.android.gm") for which the app | 4401 /// app restriction schema changed. This field will always be present. |
4284 * restriction schema changed. This field will always be present. | |
4285 */ | |
4286 core.String productId; | 4402 core.String productId; |
4287 | 4403 |
4288 AppRestrictionsSchemaChangeEvent(); | 4404 AppRestrictionsSchemaChangeEvent(); |
4289 | 4405 |
4290 AppRestrictionsSchemaChangeEvent.fromJson(core.Map _json) { | 4406 AppRestrictionsSchemaChangeEvent.fromJson(core.Map _json) { |
4291 if (_json.containsKey("productId")) { | 4407 if (_json.containsKey("productId")) { |
4292 productId = _json["productId"]; | 4408 productId = _json["productId"]; |
4293 } | 4409 } |
4294 } | 4410 } |
4295 | 4411 |
4296 core.Map<core.String, core.Object> toJson() { | 4412 core.Map<core.String, core.Object> toJson() { |
4297 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4413 final core.Map<core.String, core.Object> _json = |
| 4414 new core.Map<core.String, core.Object>(); |
4298 if (productId != null) { | 4415 if (productId != null) { |
4299 _json["productId"] = productId; | 4416 _json["productId"] = productId; |
4300 } | 4417 } |
4301 return _json; | 4418 return _json; |
4302 } | 4419 } |
4303 } | 4420 } |
4304 | 4421 |
4305 /** | 4422 /// A restriction in the App Restriction Schema represents a piece of |
4306 * A restriction in the App Restriction Schema represents a piece of | 4423 /// configuration that may be pre-applied. |
4307 * configuration that may be pre-applied. | |
4308 */ | |
4309 class AppRestrictionsSchemaRestriction { | 4424 class AppRestrictionsSchemaRestriction { |
4310 /** | 4425 /// The default value of the restriction. bundle and bundleArray restrictions |
4311 * The default value of the restriction. bundle and bundleArray restrictions | 4426 /// never have a default value. |
4312 * never have a default value. | |
4313 */ | |
4314 AppRestrictionsSchemaRestrictionRestrictionValue defaultValue; | 4427 AppRestrictionsSchemaRestrictionRestrictionValue defaultValue; |
4315 /** | 4428 |
4316 * A longer description of the restriction, giving more detail of what it | 4429 /// A longer description of the restriction, giving more detail of what it |
4317 * affects. | 4430 /// affects. |
4318 */ | |
4319 core.String description; | 4431 core.String description; |
4320 /** | 4432 |
4321 * For choice or multiselect restrictions, the list of possible entries' | 4433 /// For choice or multiselect restrictions, the list of possible entries' |
4322 * human-readable names. | 4434 /// human-readable names. |
4323 */ | |
4324 core.List<core.String> entry; | 4435 core.List<core.String> entry; |
4325 /** | 4436 |
4326 * For choice or multiselect restrictions, the list of possible entries' | 4437 /// For choice or multiselect restrictions, the list of possible entries' |
4327 * machine-readable values. These values should be used in the configuration, | 4438 /// machine-readable values. These values should be used in the |
4328 * either as a single string value for a choice restriction or in a | 4439 /// configuration, either as a single string value for a choice restriction |
4329 * stringArray for a multiselect restriction. | 4440 /// or in a stringArray for a multiselect restriction. |
4330 */ | |
4331 core.List<core.String> entryValue; | 4441 core.List<core.String> entryValue; |
4332 /** | 4442 |
4333 * The unique key that the product uses to identify the restriction, e.g. | 4443 /// The unique key that the product uses to identify the restriction, e.g. |
4334 * "com.google.android.gm.fieldname". | 4444 /// "com.google.android.gm.fieldname". |
4335 */ | |
4336 core.String key; | 4445 core.String key; |
4337 /** | 4446 |
4338 * For bundle or bundleArray restrictions, the list of nested restrictions. A | 4447 /// For bundle or bundleArray restrictions, the list of nested restrictions. |
4339 * bundle restriction is always nested within a bundleArray restriction, and a | 4448 /// A bundle restriction is always nested within a bundleArray restriction, |
4340 * bundleArray restriction is at most two levels deep. | 4449 /// and a bundleArray restriction is at most two levels deep. |
4341 */ | |
4342 core.List<AppRestrictionsSchemaRestriction> nestedRestriction; | 4450 core.List<AppRestrictionsSchemaRestriction> nestedRestriction; |
4343 /** The type of the restriction. */ | 4451 |
| 4452 /// The type of the restriction. |
4344 core.String restrictionType; | 4453 core.String restrictionType; |
4345 /** The name of the restriction. */ | 4454 |
| 4455 /// The name of the restriction. |
4346 core.String title; | 4456 core.String title; |
4347 | 4457 |
4348 AppRestrictionsSchemaRestriction(); | 4458 AppRestrictionsSchemaRestriction(); |
4349 | 4459 |
4350 AppRestrictionsSchemaRestriction.fromJson(core.Map _json) { | 4460 AppRestrictionsSchemaRestriction.fromJson(core.Map _json) { |
4351 if (_json.containsKey("defaultValue")) { | 4461 if (_json.containsKey("defaultValue")) { |
4352 defaultValue = new AppRestrictionsSchemaRestrictionRestrictionValue.fromJs
on(_json["defaultValue"]); | 4462 defaultValue = |
| 4463 new AppRestrictionsSchemaRestrictionRestrictionValue.fromJson( |
| 4464 _json["defaultValue"]); |
4353 } | 4465 } |
4354 if (_json.containsKey("description")) { | 4466 if (_json.containsKey("description")) { |
4355 description = _json["description"]; | 4467 description = _json["description"]; |
4356 } | 4468 } |
4357 if (_json.containsKey("entry")) { | 4469 if (_json.containsKey("entry")) { |
4358 entry = _json["entry"]; | 4470 entry = _json["entry"]; |
4359 } | 4471 } |
4360 if (_json.containsKey("entryValue")) { | 4472 if (_json.containsKey("entryValue")) { |
4361 entryValue = _json["entryValue"]; | 4473 entryValue = _json["entryValue"]; |
4362 } | 4474 } |
4363 if (_json.containsKey("key")) { | 4475 if (_json.containsKey("key")) { |
4364 key = _json["key"]; | 4476 key = _json["key"]; |
4365 } | 4477 } |
4366 if (_json.containsKey("nestedRestriction")) { | 4478 if (_json.containsKey("nestedRestriction")) { |
4367 nestedRestriction = _json["nestedRestriction"].map((value) => new AppRestr
ictionsSchemaRestriction.fromJson(value)).toList(); | 4479 nestedRestriction = _json["nestedRestriction"] |
| 4480 .map((value) => new AppRestrictionsSchemaRestriction.fromJson(value)) |
| 4481 .toList(); |
4368 } | 4482 } |
4369 if (_json.containsKey("restrictionType")) { | 4483 if (_json.containsKey("restrictionType")) { |
4370 restrictionType = _json["restrictionType"]; | 4484 restrictionType = _json["restrictionType"]; |
4371 } | 4485 } |
4372 if (_json.containsKey("title")) { | 4486 if (_json.containsKey("title")) { |
4373 title = _json["title"]; | 4487 title = _json["title"]; |
4374 } | 4488 } |
4375 } | 4489 } |
4376 | 4490 |
4377 core.Map<core.String, core.Object> toJson() { | 4491 core.Map<core.String, core.Object> toJson() { |
4378 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4492 final core.Map<core.String, core.Object> _json = |
| 4493 new core.Map<core.String, core.Object>(); |
4379 if (defaultValue != null) { | 4494 if (defaultValue != null) { |
4380 _json["defaultValue"] = (defaultValue).toJson(); | 4495 _json["defaultValue"] = (defaultValue).toJson(); |
4381 } | 4496 } |
4382 if (description != null) { | 4497 if (description != null) { |
4383 _json["description"] = description; | 4498 _json["description"] = description; |
4384 } | 4499 } |
4385 if (entry != null) { | 4500 if (entry != null) { |
4386 _json["entry"] = entry; | 4501 _json["entry"] = entry; |
4387 } | 4502 } |
4388 if (entryValue != null) { | 4503 if (entryValue != null) { |
4389 _json["entryValue"] = entryValue; | 4504 _json["entryValue"] = entryValue; |
4390 } | 4505 } |
4391 if (key != null) { | 4506 if (key != null) { |
4392 _json["key"] = key; | 4507 _json["key"] = key; |
4393 } | 4508 } |
4394 if (nestedRestriction != null) { | 4509 if (nestedRestriction != null) { |
4395 _json["nestedRestriction"] = nestedRestriction.map((value) => (value).toJs
on()).toList(); | 4510 _json["nestedRestriction"] = |
| 4511 nestedRestriction.map((value) => (value).toJson()).toList(); |
4396 } | 4512 } |
4397 if (restrictionType != null) { | 4513 if (restrictionType != null) { |
4398 _json["restrictionType"] = restrictionType; | 4514 _json["restrictionType"] = restrictionType; |
4399 } | 4515 } |
4400 if (title != null) { | 4516 if (title != null) { |
4401 _json["title"] = title; | 4517 _json["title"] = title; |
4402 } | 4518 } |
4403 return _json; | 4519 return _json; |
4404 } | 4520 } |
4405 } | 4521 } |
4406 | 4522 |
4407 /** A typed value for the restriction. */ | 4523 /// A typed value for the restriction. |
4408 class AppRestrictionsSchemaRestrictionRestrictionValue { | 4524 class AppRestrictionsSchemaRestrictionRestrictionValue { |
4409 /** The type of the value being provided. */ | 4525 /// The type of the value being provided. |
4410 core.String type; | 4526 core.String type; |
4411 /** The boolean value - this will only be present if type is bool. */ | 4527 |
| 4528 /// The boolean value - this will only be present if type is bool. |
4412 core.bool valueBool; | 4529 core.bool valueBool; |
4413 /** The integer value - this will only be present if type is integer. */ | 4530 |
| 4531 /// The integer value - this will only be present if type is integer. |
4414 core.int valueInteger; | 4532 core.int valueInteger; |
4415 /** | 4533 |
4416 * The list of string values - this will only be present if type is | 4534 /// The list of string values - this will only be present if type is |
4417 * multiselect. | 4535 /// multiselect. |
4418 */ | |
4419 core.List<core.String> valueMultiselect; | 4536 core.List<core.String> valueMultiselect; |
4420 /** | 4537 |
4421 * The string value - this will be present for types string, choice and | 4538 /// The string value - this will be present for types string, choice and |
4422 * hidden. | 4539 /// hidden. |
4423 */ | |
4424 core.String valueString; | 4540 core.String valueString; |
4425 | 4541 |
4426 AppRestrictionsSchemaRestrictionRestrictionValue(); | 4542 AppRestrictionsSchemaRestrictionRestrictionValue(); |
4427 | 4543 |
4428 AppRestrictionsSchemaRestrictionRestrictionValue.fromJson(core.Map _json) { | 4544 AppRestrictionsSchemaRestrictionRestrictionValue.fromJson(core.Map _json) { |
4429 if (_json.containsKey("type")) { | 4545 if (_json.containsKey("type")) { |
4430 type = _json["type"]; | 4546 type = _json["type"]; |
4431 } | 4547 } |
4432 if (_json.containsKey("valueBool")) { | 4548 if (_json.containsKey("valueBool")) { |
4433 valueBool = _json["valueBool"]; | 4549 valueBool = _json["valueBool"]; |
4434 } | 4550 } |
4435 if (_json.containsKey("valueInteger")) { | 4551 if (_json.containsKey("valueInteger")) { |
4436 valueInteger = _json["valueInteger"]; | 4552 valueInteger = _json["valueInteger"]; |
4437 } | 4553 } |
4438 if (_json.containsKey("valueMultiselect")) { | 4554 if (_json.containsKey("valueMultiselect")) { |
4439 valueMultiselect = _json["valueMultiselect"]; | 4555 valueMultiselect = _json["valueMultiselect"]; |
4440 } | 4556 } |
4441 if (_json.containsKey("valueString")) { | 4557 if (_json.containsKey("valueString")) { |
4442 valueString = _json["valueString"]; | 4558 valueString = _json["valueString"]; |
4443 } | 4559 } |
4444 } | 4560 } |
4445 | 4561 |
4446 core.Map<core.String, core.Object> toJson() { | 4562 core.Map<core.String, core.Object> toJson() { |
4447 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4563 final core.Map<core.String, core.Object> _json = |
| 4564 new core.Map<core.String, core.Object>(); |
4448 if (type != null) { | 4565 if (type != null) { |
4449 _json["type"] = type; | 4566 _json["type"] = type; |
4450 } | 4567 } |
4451 if (valueBool != null) { | 4568 if (valueBool != null) { |
4452 _json["valueBool"] = valueBool; | 4569 _json["valueBool"] = valueBool; |
4453 } | 4570 } |
4454 if (valueInteger != null) { | 4571 if (valueInteger != null) { |
4455 _json["valueInteger"] = valueInteger; | 4572 _json["valueInteger"] = valueInteger; |
4456 } | 4573 } |
4457 if (valueMultiselect != null) { | 4574 if (valueMultiselect != null) { |
4458 _json["valueMultiselect"] = valueMultiselect; | 4575 _json["valueMultiselect"] = valueMultiselect; |
4459 } | 4576 } |
4460 if (valueString != null) { | 4577 if (valueString != null) { |
4461 _json["valueString"] = valueString; | 4578 _json["valueString"] = valueString; |
4462 } | 4579 } |
4463 return _json; | 4580 return _json; |
4464 } | 4581 } |
4465 } | 4582 } |
4466 | 4583 |
4467 /** | 4584 /// An event generated when a new version of an app is uploaded to Google Play. |
4468 * An event generated when a new version of an app is uploaded to Google Play. | 4585 /// Notifications are sent for new public versions only: alpha, beta, or canary |
4469 * Notifications are sent for new public versions only: alpha, beta, or canary | 4586 /// versions do not generate this event. To fetch up-to-date version history |
4470 * versions do not generate this event. To fetch up-to-date version history for | 4587 /// for an app, use Products.Get on the EMM API. |
4471 * an app, use Products.Get on the EMM API. | |
4472 */ | |
4473 class AppUpdateEvent { | 4588 class AppUpdateEvent { |
4474 /** | 4589 /// The id of the product (e.g. "app:com.google.android.gm") that was |
4475 * The id of the product (e.g. "app:com.google.android.gm") that was updated. | 4590 /// updated. This field will always be present. |
4476 * This field will always be present. | |
4477 */ | |
4478 core.String productId; | 4591 core.String productId; |
4479 | 4592 |
4480 AppUpdateEvent(); | 4593 AppUpdateEvent(); |
4481 | 4594 |
4482 AppUpdateEvent.fromJson(core.Map _json) { | 4595 AppUpdateEvent.fromJson(core.Map _json) { |
4483 if (_json.containsKey("productId")) { | 4596 if (_json.containsKey("productId")) { |
4484 productId = _json["productId"]; | 4597 productId = _json["productId"]; |
4485 } | 4598 } |
4486 } | 4599 } |
4487 | 4600 |
4488 core.Map<core.String, core.Object> toJson() { | 4601 core.Map<core.String, core.Object> toJson() { |
4489 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4602 final core.Map<core.String, core.Object> _json = |
| 4603 new core.Map<core.String, core.Object>(); |
4490 if (productId != null) { | 4604 if (productId != null) { |
4491 _json["productId"] = productId; | 4605 _json["productId"] = productId; |
4492 } | 4606 } |
4493 return _json; | 4607 return _json; |
4494 } | 4608 } |
4495 } | 4609 } |
4496 | 4610 |
4497 /** This represents a single version of the app. */ | 4611 /// This represents a single version of the app. |
4498 class AppVersion { | 4612 class AppVersion { |
4499 /** Unique increasing identifier for the app version. */ | 4613 /// Unique increasing identifier for the app version. |
4500 core.int versionCode; | 4614 core.int versionCode; |
4501 /** | 4615 |
4502 * The string used in the Play store by the app developer to identify the | 4616 /// The string used in the Play store by the app developer to identify the |
4503 * version. The string is not necessarily unique or localized (for example, | 4617 /// version. The string is not necessarily unique or localized (for example, |
4504 * the string could be "1.4"). | 4618 /// the string could be "1.4"). |
4505 */ | |
4506 core.String versionString; | 4619 core.String versionString; |
4507 | 4620 |
4508 AppVersion(); | 4621 AppVersion(); |
4509 | 4622 |
4510 AppVersion.fromJson(core.Map _json) { | 4623 AppVersion.fromJson(core.Map _json) { |
4511 if (_json.containsKey("versionCode")) { | 4624 if (_json.containsKey("versionCode")) { |
4512 versionCode = _json["versionCode"]; | 4625 versionCode = _json["versionCode"]; |
4513 } | 4626 } |
4514 if (_json.containsKey("versionString")) { | 4627 if (_json.containsKey("versionString")) { |
4515 versionString = _json["versionString"]; | 4628 versionString = _json["versionString"]; |
4516 } | 4629 } |
4517 } | 4630 } |
4518 | 4631 |
4519 core.Map<core.String, core.Object> toJson() { | 4632 core.Map<core.String, core.Object> toJson() { |
4520 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4633 final core.Map<core.String, core.Object> _json = |
| 4634 new core.Map<core.String, core.Object>(); |
4521 if (versionCode != null) { | 4635 if (versionCode != null) { |
4522 _json["versionCode"] = versionCode; | 4636 _json["versionCode"] = versionCode; |
4523 } | 4637 } |
4524 if (versionString != null) { | 4638 if (versionString != null) { |
4525 _json["versionString"] = versionString; | 4639 _json["versionString"] = versionString; |
4526 } | 4640 } |
4527 return _json; | 4641 return _json; |
4528 } | 4642 } |
4529 } | 4643 } |
4530 | 4644 |
4531 /** Information on an approval URL. */ | 4645 /// Information on an approval URL. |
4532 class ApprovalUrlInfo { | 4646 class ApprovalUrlInfo { |
4533 /** | 4647 /// A URL that displays a product's permissions and that can also be used to |
4534 * A URL that displays a product's permissions and that can also be used to | 4648 /// approve the product with the Products.approve call. |
4535 * approve the product with the Products.approve call. | |
4536 */ | |
4537 core.String approvalUrl; | 4649 core.String approvalUrl; |
4538 /** | 4650 |
4539 * Identifies what kind of resource this is. Value: the fixed string | 4651 /// Identifies what kind of resource this is. Value: the fixed string |
4540 * "androidenterprise#approvalUrlInfo". | 4652 /// "androidenterprise#approvalUrlInfo". |
4541 */ | |
4542 core.String kind; | 4653 core.String kind; |
4543 | 4654 |
4544 ApprovalUrlInfo(); | 4655 ApprovalUrlInfo(); |
4545 | 4656 |
4546 ApprovalUrlInfo.fromJson(core.Map _json) { | 4657 ApprovalUrlInfo.fromJson(core.Map _json) { |
4547 if (_json.containsKey("approvalUrl")) { | 4658 if (_json.containsKey("approvalUrl")) { |
4548 approvalUrl = _json["approvalUrl"]; | 4659 approvalUrl = _json["approvalUrl"]; |
4549 } | 4660 } |
4550 if (_json.containsKey("kind")) { | 4661 if (_json.containsKey("kind")) { |
4551 kind = _json["kind"]; | 4662 kind = _json["kind"]; |
4552 } | 4663 } |
4553 } | 4664 } |
4554 | 4665 |
4555 core.Map<core.String, core.Object> toJson() { | 4666 core.Map<core.String, core.Object> toJson() { |
4556 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4667 final core.Map<core.String, core.Object> _json = |
| 4668 new core.Map<core.String, core.Object>(); |
4557 if (approvalUrl != null) { | 4669 if (approvalUrl != null) { |
4558 _json["approvalUrl"] = approvalUrl; | 4670 _json["approvalUrl"] = approvalUrl; |
4559 } | 4671 } |
4560 if (kind != null) { | 4672 if (kind != null) { |
4561 _json["kind"] = kind; | 4673 _json["kind"] = kind; |
4562 } | 4674 } |
4563 return _json; | 4675 return _json; |
4564 } | 4676 } |
4565 } | 4677 } |
4566 | 4678 |
4567 /** | 4679 /// An AuthenticationToken is used by the EMM's device policy client on a |
4568 * An AuthenticationToken is used by the EMM's device policy client on a device | 4680 /// device to provision the given EMM-managed user on that device. |
4569 * to provision the given EMM-managed user on that device. | |
4570 */ | |
4571 class AuthenticationToken { | 4681 class AuthenticationToken { |
4572 /** | 4682 /// Identifies what kind of resource this is. Value: the fixed string |
4573 * Identifies what kind of resource this is. Value: the fixed string | 4683 /// "androidenterprise#authenticationToken". |
4574 * "androidenterprise#authenticationToken". | |
4575 */ | |
4576 core.String kind; | 4684 core.String kind; |
4577 /** | 4685 |
4578 * The authentication token to be passed to the device policy client on the | 4686 /// The authentication token to be passed to the device policy client on the |
4579 * device where it can be used to provision the account for which this token | 4687 /// device where it can be used to provision the account for which this token |
4580 * was generated. | 4688 /// was generated. |
4581 */ | |
4582 core.String token; | 4689 core.String token; |
4583 | 4690 |
4584 AuthenticationToken(); | 4691 AuthenticationToken(); |
4585 | 4692 |
4586 AuthenticationToken.fromJson(core.Map _json) { | 4693 AuthenticationToken.fromJson(core.Map _json) { |
4587 if (_json.containsKey("kind")) { | 4694 if (_json.containsKey("kind")) { |
4588 kind = _json["kind"]; | 4695 kind = _json["kind"]; |
4589 } | 4696 } |
4590 if (_json.containsKey("token")) { | 4697 if (_json.containsKey("token")) { |
4591 token = _json["token"]; | 4698 token = _json["token"]; |
4592 } | 4699 } |
4593 } | 4700 } |
4594 | 4701 |
4595 core.Map<core.String, core.Object> toJson() { | 4702 core.Map<core.String, core.Object> toJson() { |
4596 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4703 final core.Map<core.String, core.Object> _json = |
| 4704 new core.Map<core.String, core.Object>(); |
4597 if (kind != null) { | 4705 if (kind != null) { |
4598 _json["kind"] = kind; | 4706 _json["kind"] = kind; |
4599 } | 4707 } |
4600 if (token != null) { | 4708 if (token != null) { |
4601 _json["token"] = token; | 4709 _json["token"] = token; |
4602 } | 4710 } |
4603 return _json; | 4711 return _json; |
4604 } | 4712 } |
4605 } | 4713 } |
4606 | 4714 |
4607 /** | 4715 /// A Devices resource represents a mobile device managed by the EMM and |
4608 * A Devices resource represents a mobile device managed by the EMM and | 4716 /// belonging to a specific enterprise user. |
4609 * belonging to a specific enterprise user. | 4717 /// |
4610 * | 4718 /// This collection cannot be modified via the API. It is automatically |
4611 * This collection cannot be modified via the API. It is automatically populated | 4719 /// populated as devices are set up to be managed. |
4612 * as devices are set up to be managed. | |
4613 */ | |
4614 class Device { | 4720 class Device { |
4615 /** | 4721 /// The Google Play Services Android ID for the device encoded as a lowercase |
4616 * The Google Play Services Android ID for the device encoded as a lowercase | 4722 /// hex string. For example, "123456789abcdef0". |
4617 * hex string. For example, "123456789abcdef0". | |
4618 */ | |
4619 core.String androidId; | 4723 core.String androidId; |
4620 /** | 4724 |
4621 * Identifies what kind of resource this is. Value: the fixed string | 4725 /// Identifies what kind of resource this is. Value: the fixed string |
4622 * "androidenterprise#device". | 4726 /// "androidenterprise#device". |
4623 */ | |
4624 core.String kind; | 4727 core.String kind; |
4625 /** | 4728 |
4626 * Identifies the extent to which the device is controlled by a managed Google | 4729 /// Identifies the extent to which the device is controlled by a managed |
4627 * Play EMM in various deployment configurations. | 4730 /// Google Play EMM in various deployment configurations. |
4628 * | 4731 /// |
4629 * Possible values include: | 4732 /// Possible values include: |
4630 * - "managedDevice", a device that has the EMM's device policy controller | 4733 /// - "managedDevice", a device that has the EMM's device policy controller |
4631 * (DPC) as the device owner. | 4734 /// (DPC) as the device owner. |
4632 * - "managedProfile", a device that has a profile managed by the DPC (DPC is | 4735 /// - "managedProfile", a device that has a profile managed by the DPC (DPC |
4633 * profile owner) in addition to a separate, personal profile that is | 4736 /// is profile owner) in addition to a separate, personal profile that is |
4634 * unavailable to the DPC. | 4737 /// unavailable to the DPC. |
4635 * - "containerApp", no longer used (deprecated). | 4738 /// - "containerApp", no longer used (deprecated). |
4636 * - "unmanagedProfile", a device that has been allowed (by the domain's | 4739 /// - "unmanagedProfile", a device that has been allowed (by the domain's |
4637 * admin, using the Admin Console to enable the privilege) to use managed | 4740 /// admin, using the Admin Console to enable the privilege) to use managed |
4638 * Google Play, but the profile is itself not owned by a DPC. | 4741 /// Google Play, but the profile is itself not owned by a DPC. |
4639 */ | |
4640 core.String managementType; | 4742 core.String managementType; |
4641 | 4743 |
4642 Device(); | 4744 Device(); |
4643 | 4745 |
4644 Device.fromJson(core.Map _json) { | 4746 Device.fromJson(core.Map _json) { |
4645 if (_json.containsKey("androidId")) { | 4747 if (_json.containsKey("androidId")) { |
4646 androidId = _json["androidId"]; | 4748 androidId = _json["androidId"]; |
4647 } | 4749 } |
4648 if (_json.containsKey("kind")) { | 4750 if (_json.containsKey("kind")) { |
4649 kind = _json["kind"]; | 4751 kind = _json["kind"]; |
4650 } | 4752 } |
4651 if (_json.containsKey("managementType")) { | 4753 if (_json.containsKey("managementType")) { |
4652 managementType = _json["managementType"]; | 4754 managementType = _json["managementType"]; |
4653 } | 4755 } |
4654 } | 4756 } |
4655 | 4757 |
4656 core.Map<core.String, core.Object> toJson() { | 4758 core.Map<core.String, core.Object> toJson() { |
4657 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4759 final core.Map<core.String, core.Object> _json = |
| 4760 new core.Map<core.String, core.Object>(); |
4658 if (androidId != null) { | 4761 if (androidId != null) { |
4659 _json["androidId"] = androidId; | 4762 _json["androidId"] = androidId; |
4660 } | 4763 } |
4661 if (kind != null) { | 4764 if (kind != null) { |
4662 _json["kind"] = kind; | 4765 _json["kind"] = kind; |
4663 } | 4766 } |
4664 if (managementType != null) { | 4767 if (managementType != null) { |
4665 _json["managementType"] = managementType; | 4768 _json["managementType"] = managementType; |
4666 } | 4769 } |
4667 return _json; | 4770 return _json; |
4668 } | 4771 } |
4669 } | 4772 } |
4670 | 4773 |
4671 /** | 4774 /// The state of a user's device, as accessed by the getState and setState |
4672 * The state of a user's device, as accessed by the getState and setState | 4775 /// methods on device resources. |
4673 * methods on device resources. | |
4674 */ | |
4675 class DeviceState { | 4776 class DeviceState { |
4676 /** | 4777 /// The state of the Google account on the device. "enabled" indicates that |
4677 * The state of the Google account on the device. "enabled" indicates that the | 4778 /// the Google account on the device can be used to access Google services |
4678 * Google account on the device can be used to access Google services | 4779 /// (including Google Play), while "disabled" means that it cannot. A new |
4679 * (including Google Play), while "disabled" means that it cannot. A new | 4780 /// device is initially in the "disabled" state. |
4680 * device is initially in the "disabled" state. | |
4681 */ | |
4682 core.String accountState; | 4781 core.String accountState; |
4683 /** | 4782 |
4684 * Identifies what kind of resource this is. Value: the fixed string | 4783 /// Identifies what kind of resource this is. Value: the fixed string |
4685 * "androidenterprise#deviceState". | 4784 /// "androidenterprise#deviceState". |
4686 */ | |
4687 core.String kind; | 4785 core.String kind; |
4688 | 4786 |
4689 DeviceState(); | 4787 DeviceState(); |
4690 | 4788 |
4691 DeviceState.fromJson(core.Map _json) { | 4789 DeviceState.fromJson(core.Map _json) { |
4692 if (_json.containsKey("accountState")) { | 4790 if (_json.containsKey("accountState")) { |
4693 accountState = _json["accountState"]; | 4791 accountState = _json["accountState"]; |
4694 } | 4792 } |
4695 if (_json.containsKey("kind")) { | 4793 if (_json.containsKey("kind")) { |
4696 kind = _json["kind"]; | 4794 kind = _json["kind"]; |
4697 } | 4795 } |
4698 } | 4796 } |
4699 | 4797 |
4700 core.Map<core.String, core.Object> toJson() { | 4798 core.Map<core.String, core.Object> toJson() { |
4701 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4799 final core.Map<core.String, core.Object> _json = |
| 4800 new core.Map<core.String, core.Object>(); |
4702 if (accountState != null) { | 4801 if (accountState != null) { |
4703 _json["accountState"] = accountState; | 4802 _json["accountState"] = accountState; |
4704 } | 4803 } |
4705 if (kind != null) { | 4804 if (kind != null) { |
4706 _json["kind"] = kind; | 4805 _json["kind"] = kind; |
4707 } | 4806 } |
4708 return _json; | 4807 return _json; |
4709 } | 4808 } |
4710 } | 4809 } |
4711 | 4810 |
4712 /** The device resources for the user. */ | 4811 /// The device resources for the user. |
4713 class DevicesListResponse { | 4812 class DevicesListResponse { |
4714 /** A managed device. */ | 4813 /// A managed device. |
4715 core.List<Device> device; | 4814 core.List<Device> device; |
4716 /** | 4815 |
4717 * Identifies what kind of resource this is. Value: the fixed string | 4816 /// Identifies what kind of resource this is. Value: the fixed string |
4718 * "androidenterprise#devicesListResponse". | 4817 /// "androidenterprise#devicesListResponse". |
4719 */ | |
4720 core.String kind; | 4818 core.String kind; |
4721 | 4819 |
4722 DevicesListResponse(); | 4820 DevicesListResponse(); |
4723 | 4821 |
4724 DevicesListResponse.fromJson(core.Map _json) { | 4822 DevicesListResponse.fromJson(core.Map _json) { |
4725 if (_json.containsKey("device")) { | 4823 if (_json.containsKey("device")) { |
4726 device = _json["device"].map((value) => new Device.fromJson(value)).toList
(); | 4824 device = |
| 4825 _json["device"].map((value) => new Device.fromJson(value)).toList(); |
4727 } | 4826 } |
4728 if (_json.containsKey("kind")) { | 4827 if (_json.containsKey("kind")) { |
4729 kind = _json["kind"]; | 4828 kind = _json["kind"]; |
4730 } | 4829 } |
4731 } | 4830 } |
4732 | 4831 |
4733 core.Map<core.String, core.Object> toJson() { | 4832 core.Map<core.String, core.Object> toJson() { |
4734 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4833 final core.Map<core.String, core.Object> _json = |
| 4834 new core.Map<core.String, core.Object>(); |
4735 if (device != null) { | 4835 if (device != null) { |
4736 _json["device"] = device.map((value) => (value).toJson()).toList(); | 4836 _json["device"] = device.map((value) => (value).toJson()).toList(); |
4737 } | 4837 } |
4738 if (kind != null) { | 4838 if (kind != null) { |
4739 _json["kind"] = kind; | 4839 _json["kind"] = kind; |
4740 } | 4840 } |
4741 return _json; | 4841 return _json; |
4742 } | 4842 } |
4743 } | 4843 } |
4744 | 4844 |
4745 /** | 4845 /// An Enterprises resource represents the binding between an EMM and a |
4746 * An Enterprises resource represents the binding between an EMM and a specific | 4846 /// specific organization. That binding can be instantiated in one of two |
4747 * organization. That binding can be instantiated in one of two different ways | 4847 /// different ways using this API as follows: |
4748 * using this API as follows: | 4848 /// - For Google managed domain customers, the process involves using |
4749 * - For Google managed domain customers, the process involves using | 4849 /// Enterprises.enroll and Enterprises.setAccount (in conjunction with |
4750 * Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts | 4850 /// artifacts obtained from the Admin console and the Google API Console) and |
4751 * obtained from the Admin console and the Google API Console) and submitted to | 4851 /// submitted to the EMM through a more-or-less manual process. |
4752 * the EMM through a more-or-less manual process. | 4852 /// - For managed Google Play Accounts customers, the process involves using |
4753 * - For managed Google Play Accounts customers, the process involves using | 4853 /// Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction |
4754 * Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction | 4854 /// with the managed Google Play sign-up UI (Google-provided mechanism) to |
4755 * with the managed Google Play sign-up UI (Google-provided mechanism) to create | 4855 /// create the binding without manual steps. As an EMM, you can support either |
4756 * the binding without manual steps. As an EMM, you can support either or both | 4856 /// or both approaches in your EMM console. See Create an Enterprise for |
4757 * approaches in your EMM console. See Create an Enterprise for details. | 4857 /// details. |
4758 */ | |
4759 class Enterprise { | 4858 class Enterprise { |
4760 /** | 4859 /// Admins of the enterprise. This is only supported for enterprises created |
4761 * Admins of the enterprise. This is only supported for enterprises created | 4860 /// via the EMM-initiated flow. |
4762 * via the EMM-initiated flow. | |
4763 */ | |
4764 core.List<Administrator> administrator; | 4861 core.List<Administrator> administrator; |
4765 /** The unique ID for the enterprise. */ | 4862 |
| 4863 /// The unique ID for the enterprise. |
4766 core.String id; | 4864 core.String id; |
4767 /** | 4865 |
4768 * Identifies what kind of resource this is. Value: the fixed string | 4866 /// Identifies what kind of resource this is. Value: the fixed string |
4769 * "androidenterprise#enterprise". | 4867 /// "androidenterprise#enterprise". |
4770 */ | |
4771 core.String kind; | 4868 core.String kind; |
4772 /** The name of the enterprise, for example, "Example, Inc". */ | 4869 |
| 4870 /// The name of the enterprise, for example, "Example, Inc". |
4773 core.String name; | 4871 core.String name; |
4774 /** The enterprise's primary domain, such as "example.com". */ | 4872 |
| 4873 /// The enterprise's primary domain, such as "example.com". |
4775 core.String primaryDomain; | 4874 core.String primaryDomain; |
4776 | 4875 |
4777 Enterprise(); | 4876 Enterprise(); |
4778 | 4877 |
4779 Enterprise.fromJson(core.Map _json) { | 4878 Enterprise.fromJson(core.Map _json) { |
4780 if (_json.containsKey("administrator")) { | 4879 if (_json.containsKey("administrator")) { |
4781 administrator = _json["administrator"].map((value) => new Administrator.fr
omJson(value)).toList(); | 4880 administrator = _json["administrator"] |
| 4881 .map((value) => new Administrator.fromJson(value)) |
| 4882 .toList(); |
4782 } | 4883 } |
4783 if (_json.containsKey("id")) { | 4884 if (_json.containsKey("id")) { |
4784 id = _json["id"]; | 4885 id = _json["id"]; |
4785 } | 4886 } |
4786 if (_json.containsKey("kind")) { | 4887 if (_json.containsKey("kind")) { |
4787 kind = _json["kind"]; | 4888 kind = _json["kind"]; |
4788 } | 4889 } |
4789 if (_json.containsKey("name")) { | 4890 if (_json.containsKey("name")) { |
4790 name = _json["name"]; | 4891 name = _json["name"]; |
4791 } | 4892 } |
4792 if (_json.containsKey("primaryDomain")) { | 4893 if (_json.containsKey("primaryDomain")) { |
4793 primaryDomain = _json["primaryDomain"]; | 4894 primaryDomain = _json["primaryDomain"]; |
4794 } | 4895 } |
4795 } | 4896 } |
4796 | 4897 |
4797 core.Map<core.String, core.Object> toJson() { | 4898 core.Map<core.String, core.Object> toJson() { |
4798 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4899 final core.Map<core.String, core.Object> _json = |
| 4900 new core.Map<core.String, core.Object>(); |
4799 if (administrator != null) { | 4901 if (administrator != null) { |
4800 _json["administrator"] = administrator.map((value) => (value).toJson()).to
List(); | 4902 _json["administrator"] = |
| 4903 administrator.map((value) => (value).toJson()).toList(); |
4801 } | 4904 } |
4802 if (id != null) { | 4905 if (id != null) { |
4803 _json["id"] = id; | 4906 _json["id"] = id; |
4804 } | 4907 } |
4805 if (kind != null) { | 4908 if (kind != null) { |
4806 _json["kind"] = kind; | 4909 _json["kind"] = kind; |
4807 } | 4910 } |
4808 if (name != null) { | 4911 if (name != null) { |
4809 _json["name"] = name; | 4912 _json["name"] = name; |
4810 } | 4913 } |
4811 if (primaryDomain != null) { | 4914 if (primaryDomain != null) { |
4812 _json["primaryDomain"] = primaryDomain; | 4915 _json["primaryDomain"] = primaryDomain; |
4813 } | 4916 } |
4814 return _json; | 4917 return _json; |
4815 } | 4918 } |
4816 } | 4919 } |
4817 | 4920 |
4818 /** | 4921 /// A service account that can be used to authenticate as the enterprise to API |
4819 * A service account that can be used to authenticate as the enterprise to API | 4922 /// calls that require such authentication. |
4820 * calls that require such authentication. | |
4821 */ | |
4822 class EnterpriseAccount { | 4923 class EnterpriseAccount { |
4823 /** The email address of the service account. */ | 4924 /// The email address of the service account. |
4824 core.String accountEmail; | 4925 core.String accountEmail; |
4825 /** | 4926 |
4826 * Identifies what kind of resource this is. Value: the fixed string | 4927 /// Identifies what kind of resource this is. Value: the fixed string |
4827 * "androidenterprise#enterpriseAccount". | 4928 /// "androidenterprise#enterpriseAccount". |
4828 */ | |
4829 core.String kind; | 4929 core.String kind; |
4830 | 4930 |
4831 EnterpriseAccount(); | 4931 EnterpriseAccount(); |
4832 | 4932 |
4833 EnterpriseAccount.fromJson(core.Map _json) { | 4933 EnterpriseAccount.fromJson(core.Map _json) { |
4834 if (_json.containsKey("accountEmail")) { | 4934 if (_json.containsKey("accountEmail")) { |
4835 accountEmail = _json["accountEmail"]; | 4935 accountEmail = _json["accountEmail"]; |
4836 } | 4936 } |
4837 if (_json.containsKey("kind")) { | 4937 if (_json.containsKey("kind")) { |
4838 kind = _json["kind"]; | 4938 kind = _json["kind"]; |
4839 } | 4939 } |
4840 } | 4940 } |
4841 | 4941 |
4842 core.Map<core.String, core.Object> toJson() { | 4942 core.Map<core.String, core.Object> toJson() { |
4843 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4943 final core.Map<core.String, core.Object> _json = |
| 4944 new core.Map<core.String, core.Object>(); |
4844 if (accountEmail != null) { | 4945 if (accountEmail != null) { |
4845 _json["accountEmail"] = accountEmail; | 4946 _json["accountEmail"] = accountEmail; |
4846 } | 4947 } |
4847 if (kind != null) { | 4948 if (kind != null) { |
4848 _json["kind"] = kind; | 4949 _json["kind"] = kind; |
4849 } | 4950 } |
4850 return _json; | 4951 return _json; |
4851 } | 4952 } |
4852 } | 4953 } |
4853 | 4954 |
4854 /** The matching enterprise resources. */ | 4955 /// The matching enterprise resources. |
4855 class EnterprisesListResponse { | 4956 class EnterprisesListResponse { |
4856 /** An enterprise. */ | 4957 /// An enterprise. |
4857 core.List<Enterprise> enterprise; | 4958 core.List<Enterprise> enterprise; |
4858 /** | 4959 |
4859 * Identifies what kind of resource this is. Value: the fixed string | 4960 /// Identifies what kind of resource this is. Value: the fixed string |
4860 * "androidenterprise#enterprisesListResponse". | 4961 /// "androidenterprise#enterprisesListResponse". |
4861 */ | |
4862 core.String kind; | 4962 core.String kind; |
4863 | 4963 |
4864 EnterprisesListResponse(); | 4964 EnterprisesListResponse(); |
4865 | 4965 |
4866 EnterprisesListResponse.fromJson(core.Map _json) { | 4966 EnterprisesListResponse.fromJson(core.Map _json) { |
4867 if (_json.containsKey("enterprise")) { | 4967 if (_json.containsKey("enterprise")) { |
4868 enterprise = _json["enterprise"].map((value) => new Enterprise.fromJson(va
lue)).toList(); | 4968 enterprise = _json["enterprise"] |
| 4969 .map((value) => new Enterprise.fromJson(value)) |
| 4970 .toList(); |
4869 } | 4971 } |
4870 if (_json.containsKey("kind")) { | 4972 if (_json.containsKey("kind")) { |
4871 kind = _json["kind"]; | 4973 kind = _json["kind"]; |
4872 } | 4974 } |
4873 } | 4975 } |
4874 | 4976 |
4875 core.Map<core.String, core.Object> toJson() { | 4977 core.Map<core.String, core.Object> toJson() { |
4876 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4978 final core.Map<core.String, core.Object> _json = |
| 4979 new core.Map<core.String, core.Object>(); |
4877 if (enterprise != null) { | 4980 if (enterprise != null) { |
4878 _json["enterprise"] = enterprise.map((value) => (value).toJson()).toList()
; | 4981 _json["enterprise"] = |
| 4982 enterprise.map((value) => (value).toJson()).toList(); |
4879 } | 4983 } |
4880 if (kind != null) { | 4984 if (kind != null) { |
4881 _json["kind"] = kind; | 4985 _json["kind"] = kind; |
4882 } | 4986 } |
4883 return _json; | 4987 return _json; |
4884 } | 4988 } |
4885 } | 4989 } |
4886 | 4990 |
4887 class EnterprisesSendTestPushNotificationResponse { | 4991 class EnterprisesSendTestPushNotificationResponse { |
4888 /** The message ID of the test push notification that was sent. */ | 4992 /// The message ID of the test push notification that was sent. |
4889 core.String messageId; | 4993 core.String messageId; |
4890 /** | 4994 |
4891 * The name of the Cloud Pub/Sub topic to which notifications for this | 4995 /// The name of the Cloud Pub/Sub topic to which notifications for this |
4892 * enterprise's enrolled account will be sent. | 4996 /// enterprise's enrolled account will be sent. |
4893 */ | |
4894 core.String topicName; | 4997 core.String topicName; |
4895 | 4998 |
4896 EnterprisesSendTestPushNotificationResponse(); | 4999 EnterprisesSendTestPushNotificationResponse(); |
4897 | 5000 |
4898 EnterprisesSendTestPushNotificationResponse.fromJson(core.Map _json) { | 5001 EnterprisesSendTestPushNotificationResponse.fromJson(core.Map _json) { |
4899 if (_json.containsKey("messageId")) { | 5002 if (_json.containsKey("messageId")) { |
4900 messageId = _json["messageId"]; | 5003 messageId = _json["messageId"]; |
4901 } | 5004 } |
4902 if (_json.containsKey("topicName")) { | 5005 if (_json.containsKey("topicName")) { |
4903 topicName = _json["topicName"]; | 5006 topicName = _json["topicName"]; |
4904 } | 5007 } |
4905 } | 5008 } |
4906 | 5009 |
4907 core.Map<core.String, core.Object> toJson() { | 5010 core.Map<core.String, core.Object> toJson() { |
4908 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5011 final core.Map<core.String, core.Object> _json = |
| 5012 new core.Map<core.String, core.Object>(); |
4909 if (messageId != null) { | 5013 if (messageId != null) { |
4910 _json["messageId"] = messageId; | 5014 _json["messageId"] = messageId; |
4911 } | 5015 } |
4912 if (topicName != null) { | 5016 if (topicName != null) { |
4913 _json["topicName"] = topicName; | 5017 _json["topicName"] = topicName; |
4914 } | 5018 } |
4915 return _json; | 5019 return _json; |
4916 } | 5020 } |
4917 } | 5021 } |
4918 | 5022 |
4919 /** | 5023 /// The presence of an Entitlements resource indicates that a user has the |
4920 * The presence of an Entitlements resource indicates that a user has the right | 5024 /// right to use a particular app. Entitlements are user specific, not device |
4921 * to use a particular app. Entitlements are user specific, not device specific. | 5025 /// specific. This allows a user with an entitlement to an app to install the |
4922 * This allows a user with an entitlement to an app to install the app on all | 5026 /// app on all their devices. It's also possible for a user to hold an |
4923 * their devices. It's also possible for a user to hold an entitlement to an app | 5027 /// entitlement to an app without installing the app on any device. |
4924 * without installing the app on any device. | 5028 /// |
4925 * | 5029 /// The API can be used to create an entitlement. As an option, you can also |
4926 * The API can be used to create an entitlement. As an option, you can also use | 5030 /// use the API to trigger the installation of an app on all a user's managed |
4927 * the API to trigger the installation of an app on all a user's managed devices | 5031 /// devices at the same time the entitlement is created. |
4928 * at the same time the entitlement is created. | 5032 /// |
4929 * | 5033 /// If the app is free, creating the entitlement also creates a group license |
4930 * If the app is free, creating the entitlement also creates a group license for | 5034 /// for that app. For paid apps, creating the entitlement consumes one license, |
4931 * that app. For paid apps, creating the entitlement consumes one license, and | 5035 /// and that license remains consumed until the entitlement is removed. If the |
4932 * that license remains consumed until the entitlement is removed. If the | 5036 /// enterprise hasn't purchased enough licenses, then no entitlement is created |
4933 * enterprise hasn't purchased enough licenses, then no entitlement is created | 5037 /// and the installation fails. An entitlement is also not created for an app |
4934 * and the installation fails. An entitlement is also not created for an app if | 5038 /// if the app requires permissions that the enterprise hasn't accepted. |
4935 * the app requires permissions that the enterprise hasn't accepted. | 5039 /// |
4936 * | 5040 /// If an entitlement is deleted, the app may be uninstalled from a user's |
4937 * If an entitlement is deleted, the app may be uninstalled from a user's | 5041 /// device. As a best practice, uninstall the app by calling Installs.delete() |
4938 * device. As a best practice, uninstall the app by calling Installs.delete() | 5042 /// before deleting the entitlement. |
4939 * before deleting the entitlement. | 5043 /// |
4940 * | 5044 /// Entitlements for apps that a user pays for on an unmanaged profile have |
4941 * Entitlements for apps that a user pays for on an unmanaged profile have | 5045 /// "userPurchase" as the entitlement reason. These entitlements cannot be |
4942 * "userPurchase" as the entitlement reason. These entitlements cannot be | 5046 /// removed via the API. |
4943 * removed via the API. | |
4944 */ | |
4945 class Entitlement { | 5047 class Entitlement { |
4946 /** | 5048 /// Identifies what kind of resource this is. Value: the fixed string |
4947 * Identifies what kind of resource this is. Value: the fixed string | 5049 /// "androidenterprise#entitlement". |
4948 * "androidenterprise#entitlement". | |
4949 */ | |
4950 core.String kind; | 5050 core.String kind; |
4951 /** | 5051 |
4952 * The ID of the product that the entitlement is for. For example, | 5052 /// The ID of the product that the entitlement is for. For example, |
4953 * "app:com.google.android.gm". | 5053 /// "app:com.google.android.gm". |
4954 */ | |
4955 core.String productId; | 5054 core.String productId; |
4956 /** | 5055 |
4957 * The reason for the entitlement. For example, "free" for free apps. This | 5056 /// The reason for the entitlement. For example, "free" for free apps. This |
4958 * property is temporary: it will be replaced by the acquisition kind field of | 5057 /// property is temporary: it will be replaced by the acquisition kind field |
4959 * group licenses. | 5058 /// of group licenses. |
4960 */ | |
4961 core.String reason; | 5059 core.String reason; |
4962 | 5060 |
4963 Entitlement(); | 5061 Entitlement(); |
4964 | 5062 |
4965 Entitlement.fromJson(core.Map _json) { | 5063 Entitlement.fromJson(core.Map _json) { |
4966 if (_json.containsKey("kind")) { | 5064 if (_json.containsKey("kind")) { |
4967 kind = _json["kind"]; | 5065 kind = _json["kind"]; |
4968 } | 5066 } |
4969 if (_json.containsKey("productId")) { | 5067 if (_json.containsKey("productId")) { |
4970 productId = _json["productId"]; | 5068 productId = _json["productId"]; |
4971 } | 5069 } |
4972 if (_json.containsKey("reason")) { | 5070 if (_json.containsKey("reason")) { |
4973 reason = _json["reason"]; | 5071 reason = _json["reason"]; |
4974 } | 5072 } |
4975 } | 5073 } |
4976 | 5074 |
4977 core.Map<core.String, core.Object> toJson() { | 5075 core.Map<core.String, core.Object> toJson() { |
4978 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5076 final core.Map<core.String, core.Object> _json = |
| 5077 new core.Map<core.String, core.Object>(); |
4979 if (kind != null) { | 5078 if (kind != null) { |
4980 _json["kind"] = kind; | 5079 _json["kind"] = kind; |
4981 } | 5080 } |
4982 if (productId != null) { | 5081 if (productId != null) { |
4983 _json["productId"] = productId; | 5082 _json["productId"] = productId; |
4984 } | 5083 } |
4985 if (reason != null) { | 5084 if (reason != null) { |
4986 _json["reason"] = reason; | 5085 _json["reason"] = reason; |
4987 } | 5086 } |
4988 return _json; | 5087 return _json; |
4989 } | 5088 } |
4990 } | 5089 } |
4991 | 5090 |
4992 /** The entitlement resources for the user. */ | 5091 /// The entitlement resources for the user. |
4993 class EntitlementsListResponse { | 5092 class EntitlementsListResponse { |
4994 /** | 5093 /// An entitlement of a user to a product (e.g. an app). For example, a free |
4995 * An entitlement of a user to a product (e.g. an app). For example, a free | 5094 /// app that they have installed, or a paid app that they have been allocated |
4996 * app that they have installed, or a paid app that they have been allocated a | 5095 /// a license to. |
4997 * license to. | |
4998 */ | |
4999 core.List<Entitlement> entitlement; | 5096 core.List<Entitlement> entitlement; |
5000 /** | 5097 |
5001 * Identifies what kind of resource this is. Value: the fixed string | 5098 /// Identifies what kind of resource this is. Value: the fixed string |
5002 * "androidenterprise#entitlementsListResponse". | 5099 /// "androidenterprise#entitlementsListResponse". |
5003 */ | |
5004 core.String kind; | 5100 core.String kind; |
5005 | 5101 |
5006 EntitlementsListResponse(); | 5102 EntitlementsListResponse(); |
5007 | 5103 |
5008 EntitlementsListResponse.fromJson(core.Map _json) { | 5104 EntitlementsListResponse.fromJson(core.Map _json) { |
5009 if (_json.containsKey("entitlement")) { | 5105 if (_json.containsKey("entitlement")) { |
5010 entitlement = _json["entitlement"].map((value) => new Entitlement.fromJson
(value)).toList(); | 5106 entitlement = _json["entitlement"] |
| 5107 .map((value) => new Entitlement.fromJson(value)) |
| 5108 .toList(); |
5011 } | 5109 } |
5012 if (_json.containsKey("kind")) { | 5110 if (_json.containsKey("kind")) { |
5013 kind = _json["kind"]; | 5111 kind = _json["kind"]; |
5014 } | 5112 } |
5015 } | 5113 } |
5016 | 5114 |
5017 core.Map<core.String, core.Object> toJson() { | 5115 core.Map<core.String, core.Object> toJson() { |
5018 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5116 final core.Map<core.String, core.Object> _json = |
| 5117 new core.Map<core.String, core.Object>(); |
5019 if (entitlement != null) { | 5118 if (entitlement != null) { |
5020 _json["entitlement"] = entitlement.map((value) => (value).toJson()).toList
(); | 5119 _json["entitlement"] = |
| 5120 entitlement.map((value) => (value).toJson()).toList(); |
5021 } | 5121 } |
5022 if (kind != null) { | 5122 if (kind != null) { |
5023 _json["kind"] = kind; | 5123 _json["kind"] = kind; |
5024 } | 5124 } |
5025 return _json; | 5125 return _json; |
5026 } | 5126 } |
5027 } | 5127 } |
5028 | 5128 |
5029 /** | 5129 /// Group license objects allow you to keep track of licenses (called |
5030 * A group license object indicates a product that an enterprise admin has | 5130 /// entitlements) for both free and paid apps. For a free app, a group license |
5031 * approved for use in the enterprise. The product may be free or paid. For free | 5131 /// is created when an enterprise admin first approves the product in Google |
5032 * products, a group license object is created in these cases: if the enterprise | 5132 /// Play or when the first entitlement for the product is created for a user |
5033 * admin approves a product in Google Play, if the product is added to a | 5133 /// via the API. For a paid app, a group license object is only created when an |
5034 * collection, or if an entitlement for the product is created for a user via | 5134 /// enterprise admin purchases the product in Google Play for the first time. |
5035 * the API. For paid products, a group license object is only created as part of | 5135 /// |
5036 * the first bulk purchase of that product in Google Play by the enterprise | 5136 /// Use the API to query group licenses. A Grouplicenses resource includes the |
5037 * admin. | 5137 /// total number of licenses purchased (paid apps only) and the total number of |
5038 * | 5138 /// licenses currently in use. Iyn other words, the total number of |
5039 * The API can be used to query group licenses; the available information | 5139 /// Entitlements that exist for the product. |
5040 * includes the total number of licenses purchased (for paid products) and the | 5140 /// |
5041 * total number of licenses that have been provisioned, that is, the total | 5141 /// Only one group license object is created per product and group license |
5042 * number of user entitlements in existence for the product. | 5142 /// objects are never deleted. If a product is unapproved, its group license |
5043 * | 5143 /// remains. This allows enterprise admins to keep track of any remaining |
5044 * Group license objects are never deleted. If, for example, a free app is added | 5144 /// entitlements for the product. |
5045 * to a collection and then removed, the group license will remain, allowing the | |
5046 * enterprise admin to keep track of any remaining entitlements. An enterprise | |
5047 * admin may indicate they are no longer interested in the group license by | |
5048 * marking it as unapproved in Google Play. | |
5049 */ | |
5050 class GroupLicense { | 5145 class GroupLicense { |
5051 /** | 5146 /// How this group license was acquired. "bulkPurchase" means that this |
5052 * How this group license was acquired. "bulkPurchase" means that this | 5147 /// Grouplicenses resource was created because the enterprise purchased |
5053 * Grouplicenses resource was created because the enterprise purchased | 5148 /// licenses for this product; otherwise, the value is "free" (for free |
5054 * licenses for this product; otherwise, the value is "free" (for free | 5149 /// products). |
5055 * products). | |
5056 */ | |
5057 core.String acquisitionKind; | 5150 core.String acquisitionKind; |
5058 /** | 5151 |
5059 * Whether the product to which this group license relates is currently | 5152 /// Whether the product to which this group license relates is currently |
5060 * approved by the enterprise. Products are approved when a group license is | 5153 /// approved by the enterprise. Products are approved when a group license is |
5061 * first created, but this approval may be revoked by an enterprise admin via | 5154 /// first created, but this approval may be revoked by an enterprise admin |
5062 * Google Play. Unapproved products will not be visible to end users in | 5155 /// via Google Play. Unapproved products will not be visible to end users in |
5063 * collections, and new entitlements to them should not normally be created. | 5156 /// collections, and new entitlements to them should not normally be created. |
5064 */ | |
5065 core.String approval; | 5157 core.String approval; |
5066 /** | 5158 |
5067 * Identifies what kind of resource this is. Value: the fixed string | 5159 /// Identifies what kind of resource this is. Value: the fixed string |
5068 * "androidenterprise#groupLicense". | 5160 /// "androidenterprise#groupLicense". |
5069 */ | |
5070 core.String kind; | 5161 core.String kind; |
5071 /** | 5162 |
5072 * The total number of provisioned licenses for this product. Returned by read | 5163 /// The total number of provisioned licenses for this product. Returned by |
5073 * operations, but ignored in write operations. | 5164 /// read operations, but ignored in write operations. |
5074 */ | |
5075 core.int numProvisioned; | 5165 core.int numProvisioned; |
5076 /** | 5166 |
5077 * The number of purchased licenses (possibly in multiple purchases). If this | 5167 /// The number of purchased licenses (possibly in multiple purchases). If |
5078 * field is omitted, then there is no limit on the number of licenses that can | 5168 /// this field is omitted, then there is no limit on the number of licenses |
5079 * be provisioned (for example, if the acquisition kind is "free"). | 5169 /// that can be provisioned (for example, if the acquisition kind is "free"). |
5080 */ | |
5081 core.int numPurchased; | 5170 core.int numPurchased; |
5082 /** | 5171 |
5083 * The permission approval status of the product. This field is only set if | 5172 /// The permission approval status of the product. This field is only set if |
5084 * the product is approved. Possible states are: | 5173 /// the product is approved. Possible states are: |
5085 * - "currentApproved", the current set of permissions is approved, but | 5174 /// - "currentApproved", the current set of permissions is approved, but |
5086 * additional permissions will require the administrator to reapprove the | 5175 /// additional permissions will require the administrator to reapprove the |
5087 * product (If the product was approved without specifying the approved | 5176 /// product (If the product was approved without specifying the approved |
5088 * permissions setting, then this is the default behavior.), | 5177 /// permissions setting, then this is the default behavior.), |
5089 * - "needsReapproval", the product has unapproved permissions. No additional | 5178 /// - "needsReapproval", the product has unapproved permissions. No |
5090 * product licenses can be assigned until the product is reapproved, | 5179 /// additional product licenses can be assigned until the product is |
5091 * - "allCurrentAndFutureApproved", the current permissions are approved and | 5180 /// reapproved, |
5092 * any future permission updates will be automatically approved without | 5181 /// - "allCurrentAndFutureApproved", the current permissions are approved and |
5093 * administrator review. | 5182 /// any future permission updates will be automatically approved without |
5094 */ | 5183 /// administrator review. |
5095 core.String permissions; | 5184 core.String permissions; |
5096 /** | 5185 |
5097 * The ID of the product that the license is for. For example, | 5186 /// The ID of the product that the license is for. For example, |
5098 * "app:com.google.android.gm". | 5187 /// "app:com.google.android.gm". |
5099 */ | |
5100 core.String productId; | 5188 core.String productId; |
5101 | 5189 |
5102 GroupLicense(); | 5190 GroupLicense(); |
5103 | 5191 |
5104 GroupLicense.fromJson(core.Map _json) { | 5192 GroupLicense.fromJson(core.Map _json) { |
5105 if (_json.containsKey("acquisitionKind")) { | 5193 if (_json.containsKey("acquisitionKind")) { |
5106 acquisitionKind = _json["acquisitionKind"]; | 5194 acquisitionKind = _json["acquisitionKind"]; |
5107 } | 5195 } |
5108 if (_json.containsKey("approval")) { | 5196 if (_json.containsKey("approval")) { |
5109 approval = _json["approval"]; | 5197 approval = _json["approval"]; |
5110 } | 5198 } |
5111 if (_json.containsKey("kind")) { | 5199 if (_json.containsKey("kind")) { |
5112 kind = _json["kind"]; | 5200 kind = _json["kind"]; |
5113 } | 5201 } |
5114 if (_json.containsKey("numProvisioned")) { | 5202 if (_json.containsKey("numProvisioned")) { |
5115 numProvisioned = _json["numProvisioned"]; | 5203 numProvisioned = _json["numProvisioned"]; |
5116 } | 5204 } |
5117 if (_json.containsKey("numPurchased")) { | 5205 if (_json.containsKey("numPurchased")) { |
5118 numPurchased = _json["numPurchased"]; | 5206 numPurchased = _json["numPurchased"]; |
5119 } | 5207 } |
5120 if (_json.containsKey("permissions")) { | 5208 if (_json.containsKey("permissions")) { |
5121 permissions = _json["permissions"]; | 5209 permissions = _json["permissions"]; |
5122 } | 5210 } |
5123 if (_json.containsKey("productId")) { | 5211 if (_json.containsKey("productId")) { |
5124 productId = _json["productId"]; | 5212 productId = _json["productId"]; |
5125 } | 5213 } |
5126 } | 5214 } |
5127 | 5215 |
5128 core.Map<core.String, core.Object> toJson() { | 5216 core.Map<core.String, core.Object> toJson() { |
5129 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5217 final core.Map<core.String, core.Object> _json = |
| 5218 new core.Map<core.String, core.Object>(); |
5130 if (acquisitionKind != null) { | 5219 if (acquisitionKind != null) { |
5131 _json["acquisitionKind"] = acquisitionKind; | 5220 _json["acquisitionKind"] = acquisitionKind; |
5132 } | 5221 } |
5133 if (approval != null) { | 5222 if (approval != null) { |
5134 _json["approval"] = approval; | 5223 _json["approval"] = approval; |
5135 } | 5224 } |
5136 if (kind != null) { | 5225 if (kind != null) { |
5137 _json["kind"] = kind; | 5226 _json["kind"] = kind; |
5138 } | 5227 } |
5139 if (numProvisioned != null) { | 5228 if (numProvisioned != null) { |
5140 _json["numProvisioned"] = numProvisioned; | 5229 _json["numProvisioned"] = numProvisioned; |
5141 } | 5230 } |
5142 if (numPurchased != null) { | 5231 if (numPurchased != null) { |
5143 _json["numPurchased"] = numPurchased; | 5232 _json["numPurchased"] = numPurchased; |
5144 } | 5233 } |
5145 if (permissions != null) { | 5234 if (permissions != null) { |
5146 _json["permissions"] = permissions; | 5235 _json["permissions"] = permissions; |
5147 } | 5236 } |
5148 if (productId != null) { | 5237 if (productId != null) { |
5149 _json["productId"] = productId; | 5238 _json["productId"] = productId; |
5150 } | 5239 } |
5151 return _json; | 5240 return _json; |
5152 } | 5241 } |
5153 } | 5242 } |
5154 | 5243 |
5155 /** The user resources for the group license. */ | 5244 /// The user resources for the group license. |
5156 class GroupLicenseUsersListResponse { | 5245 class GroupLicenseUsersListResponse { |
5157 /** | 5246 /// Identifies what kind of resource this is. Value: the fixed string |
5158 * Identifies what kind of resource this is. Value: the fixed string | 5247 /// "androidenterprise#groupLicenseUsersListResponse". |
5159 * "androidenterprise#groupLicenseUsersListResponse". | |
5160 */ | |
5161 core.String kind; | 5248 core.String kind; |
5162 /** A user of an enterprise. */ | 5249 |
| 5250 /// A user of an enterprise. |
5163 core.List<User> user; | 5251 core.List<User> user; |
5164 | 5252 |
5165 GroupLicenseUsersListResponse(); | 5253 GroupLicenseUsersListResponse(); |
5166 | 5254 |
5167 GroupLicenseUsersListResponse.fromJson(core.Map _json) { | 5255 GroupLicenseUsersListResponse.fromJson(core.Map _json) { |
5168 if (_json.containsKey("kind")) { | 5256 if (_json.containsKey("kind")) { |
5169 kind = _json["kind"]; | 5257 kind = _json["kind"]; |
5170 } | 5258 } |
5171 if (_json.containsKey("user")) { | 5259 if (_json.containsKey("user")) { |
5172 user = _json["user"].map((value) => new User.fromJson(value)).toList(); | 5260 user = _json["user"].map((value) => new User.fromJson(value)).toList(); |
5173 } | 5261 } |
5174 } | 5262 } |
5175 | 5263 |
5176 core.Map<core.String, core.Object> toJson() { | 5264 core.Map<core.String, core.Object> toJson() { |
5177 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5265 final core.Map<core.String, core.Object> _json = |
| 5266 new core.Map<core.String, core.Object>(); |
5178 if (kind != null) { | 5267 if (kind != null) { |
5179 _json["kind"] = kind; | 5268 _json["kind"] = kind; |
5180 } | 5269 } |
5181 if (user != null) { | 5270 if (user != null) { |
5182 _json["user"] = user.map((value) => (value).toJson()).toList(); | 5271 _json["user"] = user.map((value) => (value).toJson()).toList(); |
5183 } | 5272 } |
5184 return _json; | 5273 return _json; |
5185 } | 5274 } |
5186 } | 5275 } |
5187 | 5276 |
5188 /** The grouplicense resources for the enterprise. */ | 5277 /// The grouplicense resources for the enterprise. |
5189 class GroupLicensesListResponse { | 5278 class GroupLicensesListResponse { |
5190 /** A group license for a product approved for use in the enterprise. */ | 5279 /// A group license for a product approved for use in the enterprise. |
5191 core.List<GroupLicense> groupLicense; | 5280 core.List<GroupLicense> groupLicense; |
5192 /** | 5281 |
5193 * Identifies what kind of resource this is. Value: the fixed string | 5282 /// Identifies what kind of resource this is. Value: the fixed string |
5194 * "androidenterprise#groupLicensesListResponse". | 5283 /// "androidenterprise#groupLicensesListResponse". |
5195 */ | |
5196 core.String kind; | 5284 core.String kind; |
5197 | 5285 |
5198 GroupLicensesListResponse(); | 5286 GroupLicensesListResponse(); |
5199 | 5287 |
5200 GroupLicensesListResponse.fromJson(core.Map _json) { | 5288 GroupLicensesListResponse.fromJson(core.Map _json) { |
5201 if (_json.containsKey("groupLicense")) { | 5289 if (_json.containsKey("groupLicense")) { |
5202 groupLicense = _json["groupLicense"].map((value) => new GroupLicense.fromJ
son(value)).toList(); | 5290 groupLicense = _json["groupLicense"] |
| 5291 .map((value) => new GroupLicense.fromJson(value)) |
| 5292 .toList(); |
5203 } | 5293 } |
5204 if (_json.containsKey("kind")) { | 5294 if (_json.containsKey("kind")) { |
5205 kind = _json["kind"]; | 5295 kind = _json["kind"]; |
5206 } | 5296 } |
5207 } | 5297 } |
5208 | 5298 |
5209 core.Map<core.String, core.Object> toJson() { | 5299 core.Map<core.String, core.Object> toJson() { |
5210 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5300 final core.Map<core.String, core.Object> _json = |
| 5301 new core.Map<core.String, core.Object>(); |
5211 if (groupLicense != null) { | 5302 if (groupLicense != null) { |
5212 _json["groupLicense"] = groupLicense.map((value) => (value).toJson()).toLi
st(); | 5303 _json["groupLicense"] = |
| 5304 groupLicense.map((value) => (value).toJson()).toList(); |
5213 } | 5305 } |
5214 if (kind != null) { | 5306 if (kind != null) { |
5215 _json["kind"] = kind; | 5307 _json["kind"] = kind; |
5216 } | 5308 } |
5217 return _json; | 5309 return _json; |
5218 } | 5310 } |
5219 } | 5311 } |
5220 | 5312 |
5221 /** | 5313 /// The existence of an Installs resource indicates that an app is installed on |
5222 * The existence of an Installs resource indicates that an app is installed on a | 5314 /// a particular device (or that an install is pending). |
5223 * particular device (or that an install is pending). | 5315 /// |
5224 * | 5316 /// The API can be used to create an install resource using the update method. |
5225 * The API can be used to create an install resource using the update method. | 5317 /// This triggers the actual install of the app on the device. If the user does |
5226 * This triggers the actual install of the app on the device. If the user does | 5318 /// not already have an entitlement for the app, then an attempt is made to |
5227 * not already have an entitlement for the app, then an attempt is made to | 5319 /// create one. If this fails (for example, because the app is not free and |
5228 * create one. If this fails (for example, because the app is not free and there | 5320 /// there is no available license), then the creation of the install fails. |
5229 * is no available license), then the creation of the install fails. | 5321 /// |
5230 * | 5322 /// The API can also be used to update an installed app. If the update method |
5231 * The API can also be used to update an installed app. If the update method is | 5323 /// is used on an existing install, then the app will be updated to the latest |
5232 * used on an existing install, then the app will be updated to the latest | 5324 /// available version. |
5233 * available version. | 5325 /// |
5234 * | 5326 /// Note that it is not possible to force the installation of a specific |
5235 * Note that it is not possible to force the installation of a specific version | 5327 /// version of an app: the version code is read-only. |
5236 * of an app: the version code is read-only. | 5328 /// |
5237 * | 5329 /// If a user installs an app themselves (as permitted by the enterprise), then |
5238 * If a user installs an app themselves (as permitted by the enterprise), then | 5330 /// again an install resource and possibly an entitlement resource are |
5239 * again an install resource and possibly an entitlement resource are | 5331 /// automatically created. |
5240 * automatically created. | 5332 /// |
5241 * | 5333 /// The API can also be used to delete an install resource, which triggers the |
5242 * The API can also be used to delete an install resource, which triggers the | 5334 /// removal of the app from the device. Note that deleting an install does not |
5243 * removal of the app from the device. Note that deleting an install does not | 5335 /// automatically remove the corresponding entitlement, even if there are no |
5244 * automatically remove the corresponding entitlement, even if there are no | 5336 /// remaining installs. The install resource will also be deleted if the user |
5245 * remaining installs. The install resource will also be deleted if the user | 5337 /// uninstalls the app themselves. |
5246 * uninstalls the app themselves. | |
5247 */ | |
5248 class Install { | 5338 class Install { |
5249 /** | 5339 /// Install state. The state "installPending" means that an install request |
5250 * Install state. The state "installPending" means that an install request has | 5340 /// has recently been made and download to the device is in progress. The |
5251 * recently been made and download to the device is in progress. The state | 5341 /// state "installed" means that the app has been installed. This field is |
5252 * "installed" means that the app has been installed. This field is read-only. | 5342 /// read-only. |
5253 */ | |
5254 core.String installState; | 5343 core.String installState; |
5255 /** | 5344 |
5256 * Identifies what kind of resource this is. Value: the fixed string | 5345 /// Identifies what kind of resource this is. Value: the fixed string |
5257 * "androidenterprise#install". | 5346 /// "androidenterprise#install". |
5258 */ | |
5259 core.String kind; | 5347 core.String kind; |
5260 /** | 5348 |
5261 * The ID of the product that the install is for. For example, | 5349 /// The ID of the product that the install is for. For example, |
5262 * "app:com.google.android.gm". | 5350 /// "app:com.google.android.gm". |
5263 */ | |
5264 core.String productId; | 5351 core.String productId; |
5265 /** | 5352 |
5266 * The version of the installed product. Guaranteed to be set only if the | 5353 /// The version of the installed product. Guaranteed to be set only if the |
5267 * install state is "installed". | 5354 /// install state is "installed". |
5268 */ | |
5269 core.int versionCode; | 5355 core.int versionCode; |
5270 | 5356 |
5271 Install(); | 5357 Install(); |
5272 | 5358 |
5273 Install.fromJson(core.Map _json) { | 5359 Install.fromJson(core.Map _json) { |
5274 if (_json.containsKey("installState")) { | 5360 if (_json.containsKey("installState")) { |
5275 installState = _json["installState"]; | 5361 installState = _json["installState"]; |
5276 } | 5362 } |
5277 if (_json.containsKey("kind")) { | 5363 if (_json.containsKey("kind")) { |
5278 kind = _json["kind"]; | 5364 kind = _json["kind"]; |
5279 } | 5365 } |
5280 if (_json.containsKey("productId")) { | 5366 if (_json.containsKey("productId")) { |
5281 productId = _json["productId"]; | 5367 productId = _json["productId"]; |
5282 } | 5368 } |
5283 if (_json.containsKey("versionCode")) { | 5369 if (_json.containsKey("versionCode")) { |
5284 versionCode = _json["versionCode"]; | 5370 versionCode = _json["versionCode"]; |
5285 } | 5371 } |
5286 } | 5372 } |
5287 | 5373 |
5288 core.Map<core.String, core.Object> toJson() { | 5374 core.Map<core.String, core.Object> toJson() { |
5289 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5375 final core.Map<core.String, core.Object> _json = |
| 5376 new core.Map<core.String, core.Object>(); |
5290 if (installState != null) { | 5377 if (installState != null) { |
5291 _json["installState"] = installState; | 5378 _json["installState"] = installState; |
5292 } | 5379 } |
5293 if (kind != null) { | 5380 if (kind != null) { |
5294 _json["kind"] = kind; | 5381 _json["kind"] = kind; |
5295 } | 5382 } |
5296 if (productId != null) { | 5383 if (productId != null) { |
5297 _json["productId"] = productId; | 5384 _json["productId"] = productId; |
5298 } | 5385 } |
5299 if (versionCode != null) { | 5386 if (versionCode != null) { |
5300 _json["versionCode"] = versionCode; | 5387 _json["versionCode"] = versionCode; |
5301 } | 5388 } |
5302 return _json; | 5389 return _json; |
5303 } | 5390 } |
5304 } | 5391 } |
5305 | 5392 |
5306 /** An event generated when an app installation failed on a device */ | 5393 /// An event generated when an app installation failed on a device |
5307 class InstallFailureEvent { | 5394 class InstallFailureEvent { |
5308 /** The Android ID of the device. This field will always be present. */ | 5395 /// The Android ID of the device. This field will always be present. |
5309 core.String deviceId; | 5396 core.String deviceId; |
5310 /** Additional details on the failure if applicable. */ | 5397 |
| 5398 /// Additional details on the failure if applicable. |
5311 core.String failureDetails; | 5399 core.String failureDetails; |
5312 /** | 5400 |
5313 * The reason for the installation failure. This field will always be present. | 5401 /// The reason for the installation failure. This field will always be |
5314 */ | 5402 /// present. |
5315 core.String failureReason; | 5403 core.String failureReason; |
5316 /** | 5404 |
5317 * The id of the product (e.g. "app:com.google.android.gm") for which the | 5405 /// The id of the product (e.g. "app:com.google.android.gm") for which the |
5318 * install failure event occured. This field will always be present. | 5406 /// install failure event occured. This field will always be present. |
5319 */ | |
5320 core.String productId; | 5407 core.String productId; |
5321 /** The ID of the user. This field will always be present. */ | 5408 |
| 5409 /// The ID of the user. This field will always be present. |
5322 core.String userId; | 5410 core.String userId; |
5323 | 5411 |
5324 InstallFailureEvent(); | 5412 InstallFailureEvent(); |
5325 | 5413 |
5326 InstallFailureEvent.fromJson(core.Map _json) { | 5414 InstallFailureEvent.fromJson(core.Map _json) { |
5327 if (_json.containsKey("deviceId")) { | 5415 if (_json.containsKey("deviceId")) { |
5328 deviceId = _json["deviceId"]; | 5416 deviceId = _json["deviceId"]; |
5329 } | 5417 } |
5330 if (_json.containsKey("failureDetails")) { | 5418 if (_json.containsKey("failureDetails")) { |
5331 failureDetails = _json["failureDetails"]; | 5419 failureDetails = _json["failureDetails"]; |
5332 } | 5420 } |
5333 if (_json.containsKey("failureReason")) { | 5421 if (_json.containsKey("failureReason")) { |
5334 failureReason = _json["failureReason"]; | 5422 failureReason = _json["failureReason"]; |
5335 } | 5423 } |
5336 if (_json.containsKey("productId")) { | 5424 if (_json.containsKey("productId")) { |
5337 productId = _json["productId"]; | 5425 productId = _json["productId"]; |
5338 } | 5426 } |
5339 if (_json.containsKey("userId")) { | 5427 if (_json.containsKey("userId")) { |
5340 userId = _json["userId"]; | 5428 userId = _json["userId"]; |
5341 } | 5429 } |
5342 } | 5430 } |
5343 | 5431 |
5344 core.Map<core.String, core.Object> toJson() { | 5432 core.Map<core.String, core.Object> toJson() { |
5345 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5433 final core.Map<core.String, core.Object> _json = |
| 5434 new core.Map<core.String, core.Object>(); |
5346 if (deviceId != null) { | 5435 if (deviceId != null) { |
5347 _json["deviceId"] = deviceId; | 5436 _json["deviceId"] = deviceId; |
5348 } | 5437 } |
5349 if (failureDetails != null) { | 5438 if (failureDetails != null) { |
5350 _json["failureDetails"] = failureDetails; | 5439 _json["failureDetails"] = failureDetails; |
5351 } | 5440 } |
5352 if (failureReason != null) { | 5441 if (failureReason != null) { |
5353 _json["failureReason"] = failureReason; | 5442 _json["failureReason"] = failureReason; |
5354 } | 5443 } |
5355 if (productId != null) { | 5444 if (productId != null) { |
5356 _json["productId"] = productId; | 5445 _json["productId"] = productId; |
5357 } | 5446 } |
5358 if (userId != null) { | 5447 if (userId != null) { |
5359 _json["userId"] = userId; | 5448 _json["userId"] = userId; |
5360 } | 5449 } |
5361 return _json; | 5450 return _json; |
5362 } | 5451 } |
5363 } | 5452 } |
5364 | 5453 |
5365 /** The install resources for the device. */ | 5454 /// The install resources for the device. |
5366 class InstallsListResponse { | 5455 class InstallsListResponse { |
5367 /** | 5456 /// An installation of an app for a user on a specific device. The existence |
5368 * An installation of an app for a user on a specific device. The existence of | 5457 /// of an install implies that the user must have an entitlement to the app. |
5369 * an install implies that the user must have an entitlement to the app. | |
5370 */ | |
5371 core.List<Install> install; | 5458 core.List<Install> install; |
5372 /** | 5459 |
5373 * Identifies what kind of resource this is. Value: the fixed string | 5460 /// Identifies what kind of resource this is. Value: the fixed string |
5374 * "androidenterprise#installsListResponse". | 5461 /// "androidenterprise#installsListResponse". |
5375 */ | |
5376 core.String kind; | 5462 core.String kind; |
5377 | 5463 |
5378 InstallsListResponse(); | 5464 InstallsListResponse(); |
5379 | 5465 |
5380 InstallsListResponse.fromJson(core.Map _json) { | 5466 InstallsListResponse.fromJson(core.Map _json) { |
5381 if (_json.containsKey("install")) { | 5467 if (_json.containsKey("install")) { |
5382 install = _json["install"].map((value) => new Install.fromJson(value)).toL
ist(); | 5468 install = |
| 5469 _json["install"].map((value) => new Install.fromJson(value)).toList(); |
5383 } | 5470 } |
5384 if (_json.containsKey("kind")) { | 5471 if (_json.containsKey("kind")) { |
5385 kind = _json["kind"]; | 5472 kind = _json["kind"]; |
5386 } | 5473 } |
5387 } | 5474 } |
5388 | 5475 |
5389 core.Map<core.String, core.Object> toJson() { | 5476 core.Map<core.String, core.Object> toJson() { |
5390 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5477 final core.Map<core.String, core.Object> _json = |
| 5478 new core.Map<core.String, core.Object>(); |
5391 if (install != null) { | 5479 if (install != null) { |
5392 _json["install"] = install.map((value) => (value).toJson()).toList(); | 5480 _json["install"] = install.map((value) => (value).toJson()).toList(); |
5393 } | 5481 } |
5394 if (kind != null) { | 5482 if (kind != null) { |
5395 _json["kind"] = kind; | 5483 _json["kind"] = kind; |
5396 } | 5484 } |
5397 return _json; | 5485 return _json; |
5398 } | 5486 } |
5399 } | 5487 } |
5400 | 5488 |
5401 /** A localized string with its locale. */ | 5489 /// A localized string with its locale. |
5402 class LocalizedText { | 5490 class LocalizedText { |
5403 /** The BCP47 tag for a locale. (e.g. "en-US", "de"). */ | 5491 /// The BCP47 tag for a locale. (e.g. "en-US", "de"). |
5404 core.String locale; | 5492 core.String locale; |
5405 /** The text localized in the associated locale. */ | 5493 |
| 5494 /// The text localized in the associated locale. |
5406 core.String text; | 5495 core.String text; |
5407 | 5496 |
5408 LocalizedText(); | 5497 LocalizedText(); |
5409 | 5498 |
5410 LocalizedText.fromJson(core.Map _json) { | 5499 LocalizedText.fromJson(core.Map _json) { |
5411 if (_json.containsKey("locale")) { | 5500 if (_json.containsKey("locale")) { |
5412 locale = _json["locale"]; | 5501 locale = _json["locale"]; |
5413 } | 5502 } |
5414 if (_json.containsKey("text")) { | 5503 if (_json.containsKey("text")) { |
5415 text = _json["text"]; | 5504 text = _json["text"]; |
5416 } | 5505 } |
5417 } | 5506 } |
5418 | 5507 |
5419 core.Map<core.String, core.Object> toJson() { | 5508 core.Map<core.String, core.Object> toJson() { |
5420 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5509 final core.Map<core.String, core.Object> _json = |
| 5510 new core.Map<core.String, core.Object>(); |
5421 if (locale != null) { | 5511 if (locale != null) { |
5422 _json["locale"] = locale; | 5512 _json["locale"] = locale; |
5423 } | 5513 } |
5424 if (text != null) { | 5514 if (text != null) { |
5425 _json["text"] = text; | 5515 _json["text"] = text; |
5426 } | 5516 } |
5427 return _json; | 5517 return _json; |
5428 } | 5518 } |
5429 } | 5519 } |
5430 | 5520 |
5431 /** | 5521 /// A managed configuration resource contains the set of managed properties |
5432 * A managed configuration resource contains the set of managed properties that | 5522 /// that have been configured for an Android app. The app's developer would |
5433 * have been configured for an Android app. The app's developer would have | 5523 /// have defined configurable properties in the managed configurations schema. |
5434 * defined configurable properties in the managed configurations schema. | |
5435 */ | |
5436 class ManagedConfiguration { | 5524 class ManagedConfiguration { |
5437 /** | 5525 /// Identifies what kind of resource this is. Value: the fixed string |
5438 * Identifies what kind of resource this is. Value: the fixed string | 5526 /// "androidenterprise#managedConfiguration". |
5439 * "androidenterprise#managedConfiguration". | |
5440 */ | |
5441 core.String kind; | 5527 core.String kind; |
5442 /** The set of managed properties for this configuration. */ | 5528 |
| 5529 /// The set of managed properties for this configuration. |
5443 core.List<ManagedProperty> managedProperty; | 5530 core.List<ManagedProperty> managedProperty; |
5444 /** | 5531 |
5445 * The ID of the product that the managed configuration is for, e.g. | 5532 /// The ID of the product that the managed configuration is for, e.g. |
5446 * "app:com.google.android.gm". | 5533 /// "app:com.google.android.gm". |
5447 */ | |
5448 core.String productId; | 5534 core.String productId; |
5449 | 5535 |
5450 ManagedConfiguration(); | 5536 ManagedConfiguration(); |
5451 | 5537 |
5452 ManagedConfiguration.fromJson(core.Map _json) { | 5538 ManagedConfiguration.fromJson(core.Map _json) { |
5453 if (_json.containsKey("kind")) { | 5539 if (_json.containsKey("kind")) { |
5454 kind = _json["kind"]; | 5540 kind = _json["kind"]; |
5455 } | 5541 } |
5456 if (_json.containsKey("managedProperty")) { | 5542 if (_json.containsKey("managedProperty")) { |
5457 managedProperty = _json["managedProperty"].map((value) => new ManagedPrope
rty.fromJson(value)).toList(); | 5543 managedProperty = _json["managedProperty"] |
| 5544 .map((value) => new ManagedProperty.fromJson(value)) |
| 5545 .toList(); |
5458 } | 5546 } |
5459 if (_json.containsKey("productId")) { | 5547 if (_json.containsKey("productId")) { |
5460 productId = _json["productId"]; | 5548 productId = _json["productId"]; |
5461 } | 5549 } |
5462 } | 5550 } |
5463 | 5551 |
5464 core.Map<core.String, core.Object> toJson() { | 5552 core.Map<core.String, core.Object> toJson() { |
5465 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5553 final core.Map<core.String, core.Object> _json = |
| 5554 new core.Map<core.String, core.Object>(); |
5466 if (kind != null) { | 5555 if (kind != null) { |
5467 _json["kind"] = kind; | 5556 _json["kind"] = kind; |
5468 } | 5557 } |
5469 if (managedProperty != null) { | 5558 if (managedProperty != null) { |
5470 _json["managedProperty"] = managedProperty.map((value) => (value).toJson()
).toList(); | 5559 _json["managedProperty"] = |
| 5560 managedProperty.map((value) => (value).toJson()).toList(); |
5471 } | 5561 } |
5472 if (productId != null) { | 5562 if (productId != null) { |
5473 _json["productId"] = productId; | 5563 _json["productId"] = productId; |
5474 } | 5564 } |
5475 return _json; | 5565 return _json; |
5476 } | 5566 } |
5477 } | 5567 } |
5478 | 5568 |
5479 /** The managed configuration resources for the device. */ | 5569 /// The managed configuration resources for the device. |
5480 class ManagedConfigurationsForDeviceListResponse { | 5570 class ManagedConfigurationsForDeviceListResponse { |
5481 /** | 5571 /// Identifies what kind of resource this is. Value: the fixed string |
5482 * Identifies what kind of resource this is. Value: the fixed string | 5572 /// "androidenterprise#managedConfigurationsForDeviceListResponse". |
5483 * "androidenterprise#managedConfigurationsForDeviceListResponse". | |
5484 */ | |
5485 core.String kind; | 5573 core.String kind; |
5486 /** A managed configuration for an app on a specific device. */ | 5574 |
| 5575 /// A managed configuration for an app on a specific device. |
5487 core.List<ManagedConfiguration> managedConfigurationForDevice; | 5576 core.List<ManagedConfiguration> managedConfigurationForDevice; |
5488 | 5577 |
5489 ManagedConfigurationsForDeviceListResponse(); | 5578 ManagedConfigurationsForDeviceListResponse(); |
5490 | 5579 |
5491 ManagedConfigurationsForDeviceListResponse.fromJson(core.Map _json) { | 5580 ManagedConfigurationsForDeviceListResponse.fromJson(core.Map _json) { |
5492 if (_json.containsKey("kind")) { | 5581 if (_json.containsKey("kind")) { |
5493 kind = _json["kind"]; | 5582 kind = _json["kind"]; |
5494 } | 5583 } |
5495 if (_json.containsKey("managedConfigurationForDevice")) { | 5584 if (_json.containsKey("managedConfigurationForDevice")) { |
5496 managedConfigurationForDevice = _json["managedConfigurationForDevice"].map
((value) => new ManagedConfiguration.fromJson(value)).toList(); | 5585 managedConfigurationForDevice = _json["managedConfigurationForDevice"] |
| 5586 .map((value) => new ManagedConfiguration.fromJson(value)) |
| 5587 .toList(); |
5497 } | 5588 } |
5498 } | 5589 } |
5499 | 5590 |
5500 core.Map<core.String, core.Object> toJson() { | 5591 core.Map<core.String, core.Object> toJson() { |
5501 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5592 final core.Map<core.String, core.Object> _json = |
| 5593 new core.Map<core.String, core.Object>(); |
5502 if (kind != null) { | 5594 if (kind != null) { |
5503 _json["kind"] = kind; | 5595 _json["kind"] = kind; |
5504 } | 5596 } |
5505 if (managedConfigurationForDevice != null) { | 5597 if (managedConfigurationForDevice != null) { |
5506 _json["managedConfigurationForDevice"] = managedConfigurationForDevice.map
((value) => (value).toJson()).toList(); | 5598 _json["managedConfigurationForDevice"] = managedConfigurationForDevice |
| 5599 .map((value) => (value).toJson()) |
| 5600 .toList(); |
5507 } | 5601 } |
5508 return _json; | 5602 return _json; |
5509 } | 5603 } |
5510 } | 5604 } |
5511 | 5605 |
5512 /** The managed configuration resources for the user. */ | 5606 /// The managed configuration resources for the user. |
5513 class ManagedConfigurationsForUserListResponse { | 5607 class ManagedConfigurationsForUserListResponse { |
5514 /** | 5608 /// Identifies what kind of resource this is. Value: the fixed string |
5515 * Identifies what kind of resource this is. Value: the fixed string | 5609 /// "androidenterprise#managedConfigurationsForUserListResponse". |
5516 * "androidenterprise#managedConfigurationsForUserListResponse". | |
5517 */ | |
5518 core.String kind; | 5610 core.String kind; |
5519 /** A managed configuration for an app for a specific user. */ | 5611 |
| 5612 /// A managed configuration for an app for a specific user. |
5520 core.List<ManagedConfiguration> managedConfigurationForUser; | 5613 core.List<ManagedConfiguration> managedConfigurationForUser; |
5521 | 5614 |
5522 ManagedConfigurationsForUserListResponse(); | 5615 ManagedConfigurationsForUserListResponse(); |
5523 | 5616 |
5524 ManagedConfigurationsForUserListResponse.fromJson(core.Map _json) { | 5617 ManagedConfigurationsForUserListResponse.fromJson(core.Map _json) { |
5525 if (_json.containsKey("kind")) { | 5618 if (_json.containsKey("kind")) { |
5526 kind = _json["kind"]; | 5619 kind = _json["kind"]; |
5527 } | 5620 } |
5528 if (_json.containsKey("managedConfigurationForUser")) { | 5621 if (_json.containsKey("managedConfigurationForUser")) { |
5529 managedConfigurationForUser = _json["managedConfigurationForUser"].map((va
lue) => new ManagedConfiguration.fromJson(value)).toList(); | 5622 managedConfigurationForUser = _json["managedConfigurationForUser"] |
| 5623 .map((value) => new ManagedConfiguration.fromJson(value)) |
| 5624 .toList(); |
5530 } | 5625 } |
5531 } | 5626 } |
5532 | 5627 |
5533 core.Map<core.String, core.Object> toJson() { | 5628 core.Map<core.String, core.Object> toJson() { |
5534 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5629 final core.Map<core.String, core.Object> _json = |
| 5630 new core.Map<core.String, core.Object>(); |
5535 if (kind != null) { | 5631 if (kind != null) { |
5536 _json["kind"] = kind; | 5632 _json["kind"] = kind; |
5537 } | 5633 } |
5538 if (managedConfigurationForUser != null) { | 5634 if (managedConfigurationForUser != null) { |
5539 _json["managedConfigurationForUser"] = managedConfigurationForUser.map((va
lue) => (value).toJson()).toList(); | 5635 _json["managedConfigurationForUser"] = |
| 5636 managedConfigurationForUser.map((value) => (value).toJson()).toList(); |
5540 } | 5637 } |
5541 return _json; | 5638 return _json; |
5542 } | 5639 } |
5543 } | 5640 } |
5544 | 5641 |
5545 /** | 5642 /// A managed property of a managed configuration. The property must match one |
5546 * A managed property of a managed configuration. The property must match one of | 5643 /// of the properties in the app restrictions schema of the product. Exactly |
5547 * the properties in the app restrictions schema of the product. Exactly one of | 5644 /// one of the value fields must be populated, and it must match the property's |
5548 * the value fields must be populated, and it must match the property's type in | 5645 /// type in the app restrictions schema. |
5549 * the app restrictions schema. | |
5550 */ | |
5551 class ManagedProperty { | 5646 class ManagedProperty { |
5552 /** The unique key that identifies the property. */ | 5647 /// The unique key that identifies the property. |
5553 core.String key; | 5648 core.String key; |
5554 /** | 5649 |
5555 * The boolean value - this will only be present if type of the property is | 5650 /// The boolean value - this will only be present if type of the property is |
5556 * bool. | 5651 /// bool. |
5557 */ | |
5558 core.bool valueBool; | 5652 core.bool valueBool; |
5559 /** | 5653 |
5560 * The bundle of managed properties - this will only be present if type of the | 5654 /// The bundle of managed properties - this will only be present if type of |
5561 * property is bundle. | 5655 /// the property is bundle. |
5562 */ | |
5563 ManagedPropertyBundle valueBundle; | 5656 ManagedPropertyBundle valueBundle; |
5564 /** | 5657 |
5565 * The list of bundles of properties - this will only be present if type of | 5658 /// The list of bundles of properties - this will only be present if type of |
5566 * the property is bundle_array. | 5659 /// the property is bundle_array. |
5567 */ | |
5568 core.List<ManagedPropertyBundle> valueBundleArray; | 5660 core.List<ManagedPropertyBundle> valueBundleArray; |
5569 /** | 5661 |
5570 * The integer value - this will only be present if type of the property is | 5662 /// The integer value - this will only be present if type of the property is |
5571 * integer. | 5663 /// integer. |
5572 */ | |
5573 core.int valueInteger; | 5664 core.int valueInteger; |
5574 /** | 5665 |
5575 * The string value - this will only be present if type of the property is | 5666 /// The string value - this will only be present if type of the property is |
5576 * string, choice or hidden. | 5667 /// string, choice or hidden. |
5577 */ | |
5578 core.String valueString; | 5668 core.String valueString; |
5579 /** | 5669 |
5580 * The list of string values - this will only be present if type of the | 5670 /// The list of string values - this will only be present if type of the |
5581 * property is multiselect. | 5671 /// property is multiselect. |
5582 */ | |
5583 core.List<core.String> valueStringArray; | 5672 core.List<core.String> valueStringArray; |
5584 | 5673 |
5585 ManagedProperty(); | 5674 ManagedProperty(); |
5586 | 5675 |
5587 ManagedProperty.fromJson(core.Map _json) { | 5676 ManagedProperty.fromJson(core.Map _json) { |
5588 if (_json.containsKey("key")) { | 5677 if (_json.containsKey("key")) { |
5589 key = _json["key"]; | 5678 key = _json["key"]; |
5590 } | 5679 } |
5591 if (_json.containsKey("valueBool")) { | 5680 if (_json.containsKey("valueBool")) { |
5592 valueBool = _json["valueBool"]; | 5681 valueBool = _json["valueBool"]; |
5593 } | 5682 } |
5594 if (_json.containsKey("valueBundle")) { | 5683 if (_json.containsKey("valueBundle")) { |
5595 valueBundle = new ManagedPropertyBundle.fromJson(_json["valueBundle"]); | 5684 valueBundle = new ManagedPropertyBundle.fromJson(_json["valueBundle"]); |
5596 } | 5685 } |
5597 if (_json.containsKey("valueBundleArray")) { | 5686 if (_json.containsKey("valueBundleArray")) { |
5598 valueBundleArray = _json["valueBundleArray"].map((value) => new ManagedPro
pertyBundle.fromJson(value)).toList(); | 5687 valueBundleArray = _json["valueBundleArray"] |
| 5688 .map((value) => new ManagedPropertyBundle.fromJson(value)) |
| 5689 .toList(); |
5599 } | 5690 } |
5600 if (_json.containsKey("valueInteger")) { | 5691 if (_json.containsKey("valueInteger")) { |
5601 valueInteger = _json["valueInteger"]; | 5692 valueInteger = _json["valueInteger"]; |
5602 } | 5693 } |
5603 if (_json.containsKey("valueString")) { | 5694 if (_json.containsKey("valueString")) { |
5604 valueString = _json["valueString"]; | 5695 valueString = _json["valueString"]; |
5605 } | 5696 } |
5606 if (_json.containsKey("valueStringArray")) { | 5697 if (_json.containsKey("valueStringArray")) { |
5607 valueStringArray = _json["valueStringArray"]; | 5698 valueStringArray = _json["valueStringArray"]; |
5608 } | 5699 } |
5609 } | 5700 } |
5610 | 5701 |
5611 core.Map<core.String, core.Object> toJson() { | 5702 core.Map<core.String, core.Object> toJson() { |
5612 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5703 final core.Map<core.String, core.Object> _json = |
| 5704 new core.Map<core.String, core.Object>(); |
5613 if (key != null) { | 5705 if (key != null) { |
5614 _json["key"] = key; | 5706 _json["key"] = key; |
5615 } | 5707 } |
5616 if (valueBool != null) { | 5708 if (valueBool != null) { |
5617 _json["valueBool"] = valueBool; | 5709 _json["valueBool"] = valueBool; |
5618 } | 5710 } |
5619 if (valueBundle != null) { | 5711 if (valueBundle != null) { |
5620 _json["valueBundle"] = (valueBundle).toJson(); | 5712 _json["valueBundle"] = (valueBundle).toJson(); |
5621 } | 5713 } |
5622 if (valueBundleArray != null) { | 5714 if (valueBundleArray != null) { |
5623 _json["valueBundleArray"] = valueBundleArray.map((value) => (value).toJson
()).toList(); | 5715 _json["valueBundleArray"] = |
| 5716 valueBundleArray.map((value) => (value).toJson()).toList(); |
5624 } | 5717 } |
5625 if (valueInteger != null) { | 5718 if (valueInteger != null) { |
5626 _json["valueInteger"] = valueInteger; | 5719 _json["valueInteger"] = valueInteger; |
5627 } | 5720 } |
5628 if (valueString != null) { | 5721 if (valueString != null) { |
5629 _json["valueString"] = valueString; | 5722 _json["valueString"] = valueString; |
5630 } | 5723 } |
5631 if (valueStringArray != null) { | 5724 if (valueStringArray != null) { |
5632 _json["valueStringArray"] = valueStringArray; | 5725 _json["valueStringArray"] = valueStringArray; |
5633 } | 5726 } |
5634 return _json; | 5727 return _json; |
5635 } | 5728 } |
5636 } | 5729 } |
5637 | 5730 |
5638 /** A bundle of managed properties. */ | 5731 /// A bundle of managed properties. |
5639 class ManagedPropertyBundle { | 5732 class ManagedPropertyBundle { |
5640 /** The list of managed properties. */ | 5733 /// The list of managed properties. |
5641 core.List<ManagedProperty> managedProperty; | 5734 core.List<ManagedProperty> managedProperty; |
5642 | 5735 |
5643 ManagedPropertyBundle(); | 5736 ManagedPropertyBundle(); |
5644 | 5737 |
5645 ManagedPropertyBundle.fromJson(core.Map _json) { | 5738 ManagedPropertyBundle.fromJson(core.Map _json) { |
5646 if (_json.containsKey("managedProperty")) { | 5739 if (_json.containsKey("managedProperty")) { |
5647 managedProperty = _json["managedProperty"].map((value) => new ManagedPrope
rty.fromJson(value)).toList(); | 5740 managedProperty = _json["managedProperty"] |
| 5741 .map((value) => new ManagedProperty.fromJson(value)) |
| 5742 .toList(); |
5648 } | 5743 } |
5649 } | 5744 } |
5650 | 5745 |
5651 core.Map<core.String, core.Object> toJson() { | 5746 core.Map<core.String, core.Object> toJson() { |
5652 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5747 final core.Map<core.String, core.Object> _json = |
| 5748 new core.Map<core.String, core.Object>(); |
5653 if (managedProperty != null) { | 5749 if (managedProperty != null) { |
5654 _json["managedProperty"] = managedProperty.map((value) => (value).toJson()
).toList(); | 5750 _json["managedProperty"] = |
| 5751 managedProperty.map((value) => (value).toJson()).toList(); |
5655 } | 5752 } |
5656 return _json; | 5753 return _json; |
5657 } | 5754 } |
5658 } | 5755 } |
5659 | 5756 |
5660 /** An event generated when a new device is ready to be managed. */ | 5757 /// An event generated when a new device is ready to be managed. |
5661 class NewDeviceEvent { | 5758 class NewDeviceEvent { |
5662 /** The Android ID of the device. This field will always be present. */ | 5759 /// The Android ID of the device. This field will always be present. |
5663 core.String deviceId; | 5760 core.String deviceId; |
5664 /** | 5761 |
5665 * Identifies the extent to which the device is controlled by an Android EMM | 5762 /// Identifies the extent to which the device is controlled by an Android EMM |
5666 * in various deployment configurations. | 5763 /// in various deployment configurations. |
5667 * | 5764 /// |
5668 * Possible values include: | 5765 /// Possible values include: |
5669 * - "managedDevice", a device where the DPC is set as device owner, | 5766 /// - "managedDevice", a device where the DPC is set as device owner, |
5670 * - "managedProfile", a device where the DPC is set as profile owner. | 5767 /// - "managedProfile", a device where the DPC is set as profile owner. |
5671 */ | |
5672 core.String managementType; | 5768 core.String managementType; |
5673 /** The ID of the user. This field will always be present. */ | 5769 |
| 5770 /// The ID of the user. This field will always be present. |
5674 core.String userId; | 5771 core.String userId; |
5675 | 5772 |
5676 NewDeviceEvent(); | 5773 NewDeviceEvent(); |
5677 | 5774 |
5678 NewDeviceEvent.fromJson(core.Map _json) { | 5775 NewDeviceEvent.fromJson(core.Map _json) { |
5679 if (_json.containsKey("deviceId")) { | 5776 if (_json.containsKey("deviceId")) { |
5680 deviceId = _json["deviceId"]; | 5777 deviceId = _json["deviceId"]; |
5681 } | 5778 } |
5682 if (_json.containsKey("managementType")) { | 5779 if (_json.containsKey("managementType")) { |
5683 managementType = _json["managementType"]; | 5780 managementType = _json["managementType"]; |
5684 } | 5781 } |
5685 if (_json.containsKey("userId")) { | 5782 if (_json.containsKey("userId")) { |
5686 userId = _json["userId"]; | 5783 userId = _json["userId"]; |
5687 } | 5784 } |
5688 } | 5785 } |
5689 | 5786 |
5690 core.Map<core.String, core.Object> toJson() { | 5787 core.Map<core.String, core.Object> toJson() { |
5691 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5788 final core.Map<core.String, core.Object> _json = |
| 5789 new core.Map<core.String, core.Object>(); |
5692 if (deviceId != null) { | 5790 if (deviceId != null) { |
5693 _json["deviceId"] = deviceId; | 5791 _json["deviceId"] = deviceId; |
5694 } | 5792 } |
5695 if (managementType != null) { | 5793 if (managementType != null) { |
5696 _json["managementType"] = managementType; | 5794 _json["managementType"] = managementType; |
5697 } | 5795 } |
5698 if (userId != null) { | 5796 if (userId != null) { |
5699 _json["userId"] = userId; | 5797 _json["userId"] = userId; |
5700 } | 5798 } |
5701 return _json; | 5799 return _json; |
5702 } | 5800 } |
5703 } | 5801 } |
5704 | 5802 |
5705 /** An event generated when new permissions are added to an app. */ | 5803 /// An event generated when new permissions are added to an app. |
5706 class NewPermissionsEvent { | 5804 class NewPermissionsEvent { |
5707 /** | 5805 /// The set of permissions that the enterprise admin has already approved for |
5708 * The set of permissions that the enterprise admin has already approved for | 5806 /// this application. Use Permissions.Get on the EMM API to retrieve details |
5709 * this application. Use Permissions.Get on the EMM API to retrieve details | 5807 /// about these permissions. |
5710 * about these permissions. | |
5711 */ | |
5712 core.List<core.String> approvedPermissions; | 5808 core.List<core.String> approvedPermissions; |
5713 /** | 5809 |
5714 * The id of the product (e.g. "app:com.google.android.gm") for which new | 5810 /// The id of the product (e.g. "app:com.google.android.gm") for which new |
5715 * permissions were added. This field will always be present. | 5811 /// permissions were added. This field will always be present. |
5716 */ | |
5717 core.String productId; | 5812 core.String productId; |
5718 /** | 5813 |
5719 * The set of permissions that the app is currently requesting. Use | 5814 /// The set of permissions that the app is currently requesting. Use |
5720 * Permissions.Get on the EMM API to retrieve details about these permissions. | 5815 /// Permissions.Get on the EMM API to retrieve details about these |
5721 */ | 5816 /// permissions. |
5722 core.List<core.String> requestedPermissions; | 5817 core.List<core.String> requestedPermissions; |
5723 | 5818 |
5724 NewPermissionsEvent(); | 5819 NewPermissionsEvent(); |
5725 | 5820 |
5726 NewPermissionsEvent.fromJson(core.Map _json) { | 5821 NewPermissionsEvent.fromJson(core.Map _json) { |
5727 if (_json.containsKey("approvedPermissions")) { | 5822 if (_json.containsKey("approvedPermissions")) { |
5728 approvedPermissions = _json["approvedPermissions"]; | 5823 approvedPermissions = _json["approvedPermissions"]; |
5729 } | 5824 } |
5730 if (_json.containsKey("productId")) { | 5825 if (_json.containsKey("productId")) { |
5731 productId = _json["productId"]; | 5826 productId = _json["productId"]; |
5732 } | 5827 } |
5733 if (_json.containsKey("requestedPermissions")) { | 5828 if (_json.containsKey("requestedPermissions")) { |
5734 requestedPermissions = _json["requestedPermissions"]; | 5829 requestedPermissions = _json["requestedPermissions"]; |
5735 } | 5830 } |
5736 } | 5831 } |
5737 | 5832 |
5738 core.Map<core.String, core.Object> toJson() { | 5833 core.Map<core.String, core.Object> toJson() { |
5739 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5834 final core.Map<core.String, core.Object> _json = |
| 5835 new core.Map<core.String, core.Object>(); |
5740 if (approvedPermissions != null) { | 5836 if (approvedPermissions != null) { |
5741 _json["approvedPermissions"] = approvedPermissions; | 5837 _json["approvedPermissions"] = approvedPermissions; |
5742 } | 5838 } |
5743 if (productId != null) { | 5839 if (productId != null) { |
5744 _json["productId"] = productId; | 5840 _json["productId"] = productId; |
5745 } | 5841 } |
5746 if (requestedPermissions != null) { | 5842 if (requestedPermissions != null) { |
5747 _json["requestedPermissions"] = requestedPermissions; | 5843 _json["requestedPermissions"] = requestedPermissions; |
5748 } | 5844 } |
5749 return _json; | 5845 return _json; |
5750 } | 5846 } |
5751 } | 5847 } |
5752 | 5848 |
5753 /** A notification of one event relating to an enterprise. */ | 5849 /// A notification of one event relating to an enterprise. |
5754 class Notification { | 5850 class Notification { |
5755 /** Notifications about new app restrictions schema changes. */ | 5851 /// Notifications about new app restrictions schema changes. |
5756 AppRestrictionsSchemaChangeEvent appRestrictionsSchemaChangeEvent; | 5852 AppRestrictionsSchemaChangeEvent appRestrictionsSchemaChangeEvent; |
5757 /** Notifications about app updates. */ | 5853 |
| 5854 /// Notifications about app updates. |
5758 AppUpdateEvent appUpdateEvent; | 5855 AppUpdateEvent appUpdateEvent; |
5759 /** | 5856 |
5760 * The ID of the enterprise for which the notification is sent. This will | 5857 /// The ID of the enterprise for which the notification is sent. This will |
5761 * always be present. | 5858 /// always be present. |
5762 */ | |
5763 core.String enterpriseId; | 5859 core.String enterpriseId; |
5764 /** Notifications about an app installation failure. */ | 5860 |
| 5861 /// Notifications about an app installation failure. |
5765 InstallFailureEvent installFailureEvent; | 5862 InstallFailureEvent installFailureEvent; |
5766 /** Notifications about new devices. */ | 5863 |
| 5864 /// Notifications about new devices. |
5767 NewDeviceEvent newDeviceEvent; | 5865 NewDeviceEvent newDeviceEvent; |
5768 /** Notifications about new app permissions. */ | 5866 |
| 5867 /// Notifications about new app permissions. |
5769 NewPermissionsEvent newPermissionsEvent; | 5868 NewPermissionsEvent newPermissionsEvent; |
5770 /** Type of the notification. */ | 5869 |
| 5870 /// Type of the notification. |
5771 core.String notificationType; | 5871 core.String notificationType; |
5772 /** Notifications about changes to a product's approval status. */ | 5872 |
| 5873 /// Notifications about changes to a product's approval status. |
5773 ProductApprovalEvent productApprovalEvent; | 5874 ProductApprovalEvent productApprovalEvent; |
5774 /** Notifications about product availability changes. */ | 5875 |
| 5876 /// Notifications about product availability changes. |
5775 ProductAvailabilityChangeEvent productAvailabilityChangeEvent; | 5877 ProductAvailabilityChangeEvent productAvailabilityChangeEvent; |
5776 /** | 5878 |
5777 * The time when the notification was published in milliseconds since | 5879 /// The time when the notification was published in milliseconds since |
5778 * 1970-01-01T00:00:00Z. This will always be present. | 5880 /// 1970-01-01T00:00:00Z. This will always be present. |
5779 */ | |
5780 core.String timestampMillis; | 5881 core.String timestampMillis; |
5781 | 5882 |
5782 Notification(); | 5883 Notification(); |
5783 | 5884 |
5784 Notification.fromJson(core.Map _json) { | 5885 Notification.fromJson(core.Map _json) { |
5785 if (_json.containsKey("appRestrictionsSchemaChangeEvent")) { | 5886 if (_json.containsKey("appRestrictionsSchemaChangeEvent")) { |
5786 appRestrictionsSchemaChangeEvent = new AppRestrictionsSchemaChangeEvent.fr
omJson(_json["appRestrictionsSchemaChangeEvent"]); | 5887 appRestrictionsSchemaChangeEvent = |
| 5888 new AppRestrictionsSchemaChangeEvent.fromJson( |
| 5889 _json["appRestrictionsSchemaChangeEvent"]); |
5787 } | 5890 } |
5788 if (_json.containsKey("appUpdateEvent")) { | 5891 if (_json.containsKey("appUpdateEvent")) { |
5789 appUpdateEvent = new AppUpdateEvent.fromJson(_json["appUpdateEvent"]); | 5892 appUpdateEvent = new AppUpdateEvent.fromJson(_json["appUpdateEvent"]); |
5790 } | 5893 } |
5791 if (_json.containsKey("enterpriseId")) { | 5894 if (_json.containsKey("enterpriseId")) { |
5792 enterpriseId = _json["enterpriseId"]; | 5895 enterpriseId = _json["enterpriseId"]; |
5793 } | 5896 } |
5794 if (_json.containsKey("installFailureEvent")) { | 5897 if (_json.containsKey("installFailureEvent")) { |
5795 installFailureEvent = new InstallFailureEvent.fromJson(_json["installFailu
reEvent"]); | 5898 installFailureEvent = |
| 5899 new InstallFailureEvent.fromJson(_json["installFailureEvent"]); |
5796 } | 5900 } |
5797 if (_json.containsKey("newDeviceEvent")) { | 5901 if (_json.containsKey("newDeviceEvent")) { |
5798 newDeviceEvent = new NewDeviceEvent.fromJson(_json["newDeviceEvent"]); | 5902 newDeviceEvent = new NewDeviceEvent.fromJson(_json["newDeviceEvent"]); |
5799 } | 5903 } |
5800 if (_json.containsKey("newPermissionsEvent")) { | 5904 if (_json.containsKey("newPermissionsEvent")) { |
5801 newPermissionsEvent = new NewPermissionsEvent.fromJson(_json["newPermissio
nsEvent"]); | 5905 newPermissionsEvent = |
| 5906 new NewPermissionsEvent.fromJson(_json["newPermissionsEvent"]); |
5802 } | 5907 } |
5803 if (_json.containsKey("notificationType")) { | 5908 if (_json.containsKey("notificationType")) { |
5804 notificationType = _json["notificationType"]; | 5909 notificationType = _json["notificationType"]; |
5805 } | 5910 } |
5806 if (_json.containsKey("productApprovalEvent")) { | 5911 if (_json.containsKey("productApprovalEvent")) { |
5807 productApprovalEvent = new ProductApprovalEvent.fromJson(_json["productApp
rovalEvent"]); | 5912 productApprovalEvent = |
| 5913 new ProductApprovalEvent.fromJson(_json["productApprovalEvent"]); |
5808 } | 5914 } |
5809 if (_json.containsKey("productAvailabilityChangeEvent")) { | 5915 if (_json.containsKey("productAvailabilityChangeEvent")) { |
5810 productAvailabilityChangeEvent = new ProductAvailabilityChangeEvent.fromJs
on(_json["productAvailabilityChangeEvent"]); | 5916 productAvailabilityChangeEvent = |
| 5917 new ProductAvailabilityChangeEvent.fromJson( |
| 5918 _json["productAvailabilityChangeEvent"]); |
5811 } | 5919 } |
5812 if (_json.containsKey("timestampMillis")) { | 5920 if (_json.containsKey("timestampMillis")) { |
5813 timestampMillis = _json["timestampMillis"]; | 5921 timestampMillis = _json["timestampMillis"]; |
5814 } | 5922 } |
5815 } | 5923 } |
5816 | 5924 |
5817 core.Map<core.String, core.Object> toJson() { | 5925 core.Map<core.String, core.Object> toJson() { |
5818 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5926 final core.Map<core.String, core.Object> _json = |
| 5927 new core.Map<core.String, core.Object>(); |
5819 if (appRestrictionsSchemaChangeEvent != null) { | 5928 if (appRestrictionsSchemaChangeEvent != null) { |
5820 _json["appRestrictionsSchemaChangeEvent"] = (appRestrictionsSchemaChangeEv
ent).toJson(); | 5929 _json["appRestrictionsSchemaChangeEvent"] = |
| 5930 (appRestrictionsSchemaChangeEvent).toJson(); |
5821 } | 5931 } |
5822 if (appUpdateEvent != null) { | 5932 if (appUpdateEvent != null) { |
5823 _json["appUpdateEvent"] = (appUpdateEvent).toJson(); | 5933 _json["appUpdateEvent"] = (appUpdateEvent).toJson(); |
5824 } | 5934 } |
5825 if (enterpriseId != null) { | 5935 if (enterpriseId != null) { |
5826 _json["enterpriseId"] = enterpriseId; | 5936 _json["enterpriseId"] = enterpriseId; |
5827 } | 5937 } |
5828 if (installFailureEvent != null) { | 5938 if (installFailureEvent != null) { |
5829 _json["installFailureEvent"] = (installFailureEvent).toJson(); | 5939 _json["installFailureEvent"] = (installFailureEvent).toJson(); |
5830 } | 5940 } |
5831 if (newDeviceEvent != null) { | 5941 if (newDeviceEvent != null) { |
5832 _json["newDeviceEvent"] = (newDeviceEvent).toJson(); | 5942 _json["newDeviceEvent"] = (newDeviceEvent).toJson(); |
5833 } | 5943 } |
5834 if (newPermissionsEvent != null) { | 5944 if (newPermissionsEvent != null) { |
5835 _json["newPermissionsEvent"] = (newPermissionsEvent).toJson(); | 5945 _json["newPermissionsEvent"] = (newPermissionsEvent).toJson(); |
5836 } | 5946 } |
5837 if (notificationType != null) { | 5947 if (notificationType != null) { |
5838 _json["notificationType"] = notificationType; | 5948 _json["notificationType"] = notificationType; |
5839 } | 5949 } |
5840 if (productApprovalEvent != null) { | 5950 if (productApprovalEvent != null) { |
5841 _json["productApprovalEvent"] = (productApprovalEvent).toJson(); | 5951 _json["productApprovalEvent"] = (productApprovalEvent).toJson(); |
5842 } | 5952 } |
5843 if (productAvailabilityChangeEvent != null) { | 5953 if (productAvailabilityChangeEvent != null) { |
5844 _json["productAvailabilityChangeEvent"] = (productAvailabilityChangeEvent)
.toJson(); | 5954 _json["productAvailabilityChangeEvent"] = |
| 5955 (productAvailabilityChangeEvent).toJson(); |
5845 } | 5956 } |
5846 if (timestampMillis != null) { | 5957 if (timestampMillis != null) { |
5847 _json["timestampMillis"] = timestampMillis; | 5958 _json["timestampMillis"] = timestampMillis; |
5848 } | 5959 } |
5849 return _json; | 5960 return _json; |
5850 } | 5961 } |
5851 } | 5962 } |
5852 | 5963 |
5853 /** | 5964 /// A resource returned by the PullNotificationSet API, which contains a |
5854 * A resource returned by the PullNotificationSet API, which contains a | 5965 /// collection of notifications for enterprises associated with the service |
5855 * collection of notifications for enterprises associated with the service | 5966 /// account authenticated for the request. |
5856 * account authenticated for the request. | |
5857 */ | |
5858 class NotificationSet { | 5967 class NotificationSet { |
5859 /** | 5968 /// Identifies what kind of resource this is. Value: the fixed string |
5860 * Identifies what kind of resource this is. Value: the fixed string | 5969 /// "androidenterprise#notificationSet". |
5861 * "androidenterprise#notificationSet". | |
5862 */ | |
5863 core.String kind; | 5970 core.String kind; |
5864 /** The notifications received, or empty if no notifications are present. */ | 5971 |
| 5972 /// The notifications received, or empty if no notifications are present. |
5865 core.List<Notification> notification; | 5973 core.List<Notification> notification; |
5866 /** | 5974 |
5867 * The notification set ID, required to mark the notification as received with | 5975 /// The notification set ID, required to mark the notification as received |
5868 * the Enterprises.AcknowledgeNotification API. This will be omitted if no | 5976 /// with the Enterprises.AcknowledgeNotification API. This will be omitted if |
5869 * notifications are present. | 5977 /// no notifications are present. |
5870 */ | |
5871 core.String notificationSetId; | 5978 core.String notificationSetId; |
5872 | 5979 |
5873 NotificationSet(); | 5980 NotificationSet(); |
5874 | 5981 |
5875 NotificationSet.fromJson(core.Map _json) { | 5982 NotificationSet.fromJson(core.Map _json) { |
5876 if (_json.containsKey("kind")) { | 5983 if (_json.containsKey("kind")) { |
5877 kind = _json["kind"]; | 5984 kind = _json["kind"]; |
5878 } | 5985 } |
5879 if (_json.containsKey("notification")) { | 5986 if (_json.containsKey("notification")) { |
5880 notification = _json["notification"].map((value) => new Notification.fromJ
son(value)).toList(); | 5987 notification = _json["notification"] |
| 5988 .map((value) => new Notification.fromJson(value)) |
| 5989 .toList(); |
5881 } | 5990 } |
5882 if (_json.containsKey("notificationSetId")) { | 5991 if (_json.containsKey("notificationSetId")) { |
5883 notificationSetId = _json["notificationSetId"]; | 5992 notificationSetId = _json["notificationSetId"]; |
5884 } | 5993 } |
5885 } | 5994 } |
5886 | 5995 |
5887 core.Map<core.String, core.Object> toJson() { | 5996 core.Map<core.String, core.Object> toJson() { |
5888 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5997 final core.Map<core.String, core.Object> _json = |
| 5998 new core.Map<core.String, core.Object>(); |
5889 if (kind != null) { | 5999 if (kind != null) { |
5890 _json["kind"] = kind; | 6000 _json["kind"] = kind; |
5891 } | 6001 } |
5892 if (notification != null) { | 6002 if (notification != null) { |
5893 _json["notification"] = notification.map((value) => (value).toJson()).toLi
st(); | 6003 _json["notification"] = |
| 6004 notification.map((value) => (value).toJson()).toList(); |
5894 } | 6005 } |
5895 if (notificationSetId != null) { | 6006 if (notificationSetId != null) { |
5896 _json["notificationSetId"] = notificationSetId; | 6007 _json["notificationSetId"] = notificationSetId; |
5897 } | 6008 } |
5898 return _json; | 6009 return _json; |
5899 } | 6010 } |
5900 } | 6011 } |
5901 | 6012 |
5902 class PageInfo { | 6013 class PageInfo { |
5903 core.int resultPerPage; | 6014 core.int resultPerPage; |
5904 core.int startIndex; | 6015 core.int startIndex; |
5905 core.int totalResults; | 6016 core.int totalResults; |
5906 | 6017 |
5907 PageInfo(); | 6018 PageInfo(); |
5908 | 6019 |
5909 PageInfo.fromJson(core.Map _json) { | 6020 PageInfo.fromJson(core.Map _json) { |
5910 if (_json.containsKey("resultPerPage")) { | 6021 if (_json.containsKey("resultPerPage")) { |
5911 resultPerPage = _json["resultPerPage"]; | 6022 resultPerPage = _json["resultPerPage"]; |
5912 } | 6023 } |
5913 if (_json.containsKey("startIndex")) { | 6024 if (_json.containsKey("startIndex")) { |
5914 startIndex = _json["startIndex"]; | 6025 startIndex = _json["startIndex"]; |
5915 } | 6026 } |
5916 if (_json.containsKey("totalResults")) { | 6027 if (_json.containsKey("totalResults")) { |
5917 totalResults = _json["totalResults"]; | 6028 totalResults = _json["totalResults"]; |
5918 } | 6029 } |
5919 } | 6030 } |
5920 | 6031 |
5921 core.Map<core.String, core.Object> toJson() { | 6032 core.Map<core.String, core.Object> toJson() { |
5922 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6033 final core.Map<core.String, core.Object> _json = |
| 6034 new core.Map<core.String, core.Object>(); |
5923 if (resultPerPage != null) { | 6035 if (resultPerPage != null) { |
5924 _json["resultPerPage"] = resultPerPage; | 6036 _json["resultPerPage"] = resultPerPage; |
5925 } | 6037 } |
5926 if (startIndex != null) { | 6038 if (startIndex != null) { |
5927 _json["startIndex"] = startIndex; | 6039 _json["startIndex"] = startIndex; |
5928 } | 6040 } |
5929 if (totalResults != null) { | 6041 if (totalResults != null) { |
5930 _json["totalResults"] = totalResults; | 6042 _json["totalResults"] = totalResults; |
5931 } | 6043 } |
5932 return _json; | 6044 return _json; |
5933 } | 6045 } |
5934 } | 6046 } |
5935 | 6047 |
5936 /** | 6048 /// A Permissions resource represents some extra capability, to be granted to |
5937 * A Permissions resource represents some extra capability, to be granted to an | 6049 /// an Android app, which requires explicit consent. An enterprise admin must |
5938 * Android app, which requires explicit consent. An enterprise admin must | 6050 /// consent to these permissions on behalf of their users before an entitlement |
5939 * consent to these permissions on behalf of their users before an entitlement | 6051 /// for the app can be created. |
5940 * for the app can be created. | 6052 /// |
5941 * | 6053 /// The permissions collection is read-only. The information provided for each |
5942 * The permissions collection is read-only. The information provided for each | 6054 /// permission (localized name and description) is intended to be used in the |
5943 * permission (localized name and description) is intended to be used in the MDM | 6055 /// MDM user interface when obtaining consent from the enterprise. |
5944 * user interface when obtaining consent from the enterprise. | |
5945 */ | |
5946 class Permission { | 6056 class Permission { |
5947 /** | 6057 /// A longer description of the Permissions resource, giving more details of |
5948 * A longer description of the Permissions resource, giving more details of | 6058 /// what it affects. |
5949 * what it affects. | |
5950 */ | |
5951 core.String description; | 6059 core.String description; |
5952 /** | 6060 |
5953 * Identifies what kind of resource this is. Value: the fixed string | 6061 /// Identifies what kind of resource this is. Value: the fixed string |
5954 * "androidenterprise#permission". | 6062 /// "androidenterprise#permission". |
5955 */ | |
5956 core.String kind; | 6063 core.String kind; |
5957 /** The name of the permission. */ | 6064 |
| 6065 /// The name of the permission. |
5958 core.String name; | 6066 core.String name; |
5959 /** An opaque string uniquely identifying the permission. */ | 6067 |
| 6068 /// An opaque string uniquely identifying the permission. |
5960 core.String permissionId; | 6069 core.String permissionId; |
5961 | 6070 |
5962 Permission(); | 6071 Permission(); |
5963 | 6072 |
5964 Permission.fromJson(core.Map _json) { | 6073 Permission.fromJson(core.Map _json) { |
5965 if (_json.containsKey("description")) { | 6074 if (_json.containsKey("description")) { |
5966 description = _json["description"]; | 6075 description = _json["description"]; |
5967 } | 6076 } |
5968 if (_json.containsKey("kind")) { | 6077 if (_json.containsKey("kind")) { |
5969 kind = _json["kind"]; | 6078 kind = _json["kind"]; |
5970 } | 6079 } |
5971 if (_json.containsKey("name")) { | 6080 if (_json.containsKey("name")) { |
5972 name = _json["name"]; | 6081 name = _json["name"]; |
5973 } | 6082 } |
5974 if (_json.containsKey("permissionId")) { | 6083 if (_json.containsKey("permissionId")) { |
5975 permissionId = _json["permissionId"]; | 6084 permissionId = _json["permissionId"]; |
5976 } | 6085 } |
5977 } | 6086 } |
5978 | 6087 |
5979 core.Map<core.String, core.Object> toJson() { | 6088 core.Map<core.String, core.Object> toJson() { |
5980 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6089 final core.Map<core.String, core.Object> _json = |
| 6090 new core.Map<core.String, core.Object>(); |
5981 if (description != null) { | 6091 if (description != null) { |
5982 _json["description"] = description; | 6092 _json["description"] = description; |
5983 } | 6093 } |
5984 if (kind != null) { | 6094 if (kind != null) { |
5985 _json["kind"] = kind; | 6095 _json["kind"] = kind; |
5986 } | 6096 } |
5987 if (name != null) { | 6097 if (name != null) { |
5988 _json["name"] = name; | 6098 _json["name"] = name; |
5989 } | 6099 } |
5990 if (permissionId != null) { | 6100 if (permissionId != null) { |
5991 _json["permissionId"] = permissionId; | 6101 _json["permissionId"] = permissionId; |
5992 } | 6102 } |
5993 return _json; | 6103 return _json; |
5994 } | 6104 } |
5995 } | 6105 } |
5996 | 6106 |
5997 /** | 6107 /// A Products resource represents an app in the Google Play store that is |
5998 * A Products resource represents an app in the Google Play store that is | 6108 /// available to at least some users in the enterprise. (Some apps are |
5999 * available to at least some users in the enterprise. (Some apps are restricted | 6109 /// restricted to a single enterprise, and no information about them is made |
6000 * to a single enterprise, and no information about them is made available | 6110 /// available outside that enterprise.) |
6001 * outside that enterprise.) | 6111 /// |
6002 * | 6112 /// The information provided for each product (localized name, icon, link to |
6003 * The information provided for each product (localized name, icon, link to the | 6113 /// the full Google Play details page) is intended to allow a basic |
6004 * full Google Play details page) is intended to allow a basic representation of | 6114 /// representation of the product within an EMM user interface. |
6005 * the product within an EMM user interface. | |
6006 */ | |
6007 class Product { | 6115 class Product { |
6008 /** | 6116 /// App versions currently available for this product. |
6009 * App versions currently available for this product. The returned list | |
6010 * contains only public versions. Alpha and beta versions are not included. | |
6011 */ | |
6012 core.List<AppVersion> appVersion; | 6117 core.List<AppVersion> appVersion; |
6013 /** | 6118 |
6014 * The name of the author of the product (for example, the app developer). | 6119 /// The name of the author of the product (for example, the app developer). |
6015 */ | |
6016 core.String authorName; | 6120 core.String authorName; |
6017 /** A link to the (consumer) Google Play details page for the product. */ | 6121 |
| 6122 /// A link to the (consumer) Google Play details page for the product. |
6018 core.String detailsUrl; | 6123 core.String detailsUrl; |
6019 /** | 6124 |
6020 * How and to whom the package is made available. The value publicGoogleHosted | 6125 /// How and to whom the package is made available. The value |
6021 * means that the package is available through the Play store and not | 6126 /// publicGoogleHosted means that the package is available through the Play |
6022 * restricted to a specific enterprise. The value privateGoogleHosted means | 6127 /// store and not restricted to a specific enterprise. The value |
6023 * that the package is a private app (restricted to an enterprise) but hosted | 6128 /// privateGoogleHosted means that the package is a private app (restricted |
6024 * by Google. The value privateSelfHosted means that the package is a private | 6129 /// to an enterprise) but hosted by Google. The value privateSelfHosted means |
6025 * app (restricted to an enterprise) and is privately hosted. | 6130 /// that the package is a private app (restricted to an enterprise) and is |
6026 */ | 6131 /// privately hosted. |
6027 core.String distributionChannel; | 6132 core.String distributionChannel; |
6028 /** | 6133 |
6029 * A link to an image that can be used as an icon for the product. This image | 6134 /// A link to an image that can be used as an icon for the product. This |
6030 * is suitable for use at up to 512px x 512px. | 6135 /// image is suitable for use at up to 512px x 512px. |
6031 */ | |
6032 core.String iconUrl; | 6136 core.String iconUrl; |
6033 /** | 6137 |
6034 * Identifies what kind of resource this is. Value: the fixed string | 6138 /// Identifies what kind of resource this is. Value: the fixed string |
6035 * "androidenterprise#product". | 6139 /// "androidenterprise#product". |
6036 */ | |
6037 core.String kind; | 6140 core.String kind; |
6038 /** | 6141 |
6039 * A string of the form app:<package name>. For example, | 6142 /// A string of the form app:<package name>. For example, |
6040 * app:com.google.android.gm represents the Gmail app. | 6143 /// app:com.google.android.gm represents the Gmail app. |
6041 */ | |
6042 core.String productId; | 6144 core.String productId; |
6043 /** | 6145 |
6044 * Whether this product is free, free with in-app purchases, or paid. If the | 6146 /// Whether this product is free, free with in-app purchases, or paid. If the |
6045 * pricing is unknown, this means the product is not generally available | 6147 /// pricing is unknown, this means the product is not generally available |
6046 * anymore (even though it might still be available to people who own it). | 6148 /// anymore (even though it might still be available to people who own it). |
6047 */ | |
6048 core.String productPricing; | 6149 core.String productPricing; |
6049 /** Deprecated. */ | 6150 |
| 6151 /// Deprecated. |
6050 core.bool requiresContainerApp; | 6152 core.bool requiresContainerApp; |
6051 /** | 6153 |
6052 * A link to a smaller image that can be used as an icon for the product. This | 6154 /// The certificate used to sign this product. |
6053 * image is suitable for use at up to 128px x 128px. | 6155 ProductSigningCertificate signingCertificate; |
6054 */ | 6156 |
| 6157 /// A link to a smaller image that can be used as an icon for the product. |
| 6158 /// This image is suitable for use at up to 128px x 128px. |
6055 core.String smallIconUrl; | 6159 core.String smallIconUrl; |
6056 /** The name of the product. */ | 6160 |
| 6161 /// The name of the product. |
6057 core.String title; | 6162 core.String title; |
6058 /** | 6163 |
6059 * A link to the managed Google Play details page for the product, for use by | 6164 /// A link to the managed Google Play details page for the product, for use |
6060 * an Enterprise admin. | 6165 /// by an Enterprise admin. |
6061 */ | |
6062 core.String workDetailsUrl; | 6166 core.String workDetailsUrl; |
6063 | 6167 |
6064 Product(); | 6168 Product(); |
6065 | 6169 |
6066 Product.fromJson(core.Map _json) { | 6170 Product.fromJson(core.Map _json) { |
6067 if (_json.containsKey("appVersion")) { | 6171 if (_json.containsKey("appVersion")) { |
6068 appVersion = _json["appVersion"].map((value) => new AppVersion.fromJson(va
lue)).toList(); | 6172 appVersion = _json["appVersion"] |
| 6173 .map((value) => new AppVersion.fromJson(value)) |
| 6174 .toList(); |
6069 } | 6175 } |
6070 if (_json.containsKey("authorName")) { | 6176 if (_json.containsKey("authorName")) { |
6071 authorName = _json["authorName"]; | 6177 authorName = _json["authorName"]; |
6072 } | 6178 } |
6073 if (_json.containsKey("detailsUrl")) { | 6179 if (_json.containsKey("detailsUrl")) { |
6074 detailsUrl = _json["detailsUrl"]; | 6180 detailsUrl = _json["detailsUrl"]; |
6075 } | 6181 } |
6076 if (_json.containsKey("distributionChannel")) { | 6182 if (_json.containsKey("distributionChannel")) { |
6077 distributionChannel = _json["distributionChannel"]; | 6183 distributionChannel = _json["distributionChannel"]; |
6078 } | 6184 } |
6079 if (_json.containsKey("iconUrl")) { | 6185 if (_json.containsKey("iconUrl")) { |
6080 iconUrl = _json["iconUrl"]; | 6186 iconUrl = _json["iconUrl"]; |
6081 } | 6187 } |
6082 if (_json.containsKey("kind")) { | 6188 if (_json.containsKey("kind")) { |
6083 kind = _json["kind"]; | 6189 kind = _json["kind"]; |
6084 } | 6190 } |
6085 if (_json.containsKey("productId")) { | 6191 if (_json.containsKey("productId")) { |
6086 productId = _json["productId"]; | 6192 productId = _json["productId"]; |
6087 } | 6193 } |
6088 if (_json.containsKey("productPricing")) { | 6194 if (_json.containsKey("productPricing")) { |
6089 productPricing = _json["productPricing"]; | 6195 productPricing = _json["productPricing"]; |
6090 } | 6196 } |
6091 if (_json.containsKey("requiresContainerApp")) { | 6197 if (_json.containsKey("requiresContainerApp")) { |
6092 requiresContainerApp = _json["requiresContainerApp"]; | 6198 requiresContainerApp = _json["requiresContainerApp"]; |
6093 } | 6199 } |
| 6200 if (_json.containsKey("signingCertificate")) { |
| 6201 signingCertificate = |
| 6202 new ProductSigningCertificate.fromJson(_json["signingCertificate"]); |
| 6203 } |
6094 if (_json.containsKey("smallIconUrl")) { | 6204 if (_json.containsKey("smallIconUrl")) { |
6095 smallIconUrl = _json["smallIconUrl"]; | 6205 smallIconUrl = _json["smallIconUrl"]; |
6096 } | 6206 } |
6097 if (_json.containsKey("title")) { | 6207 if (_json.containsKey("title")) { |
6098 title = _json["title"]; | 6208 title = _json["title"]; |
6099 } | 6209 } |
6100 if (_json.containsKey("workDetailsUrl")) { | 6210 if (_json.containsKey("workDetailsUrl")) { |
6101 workDetailsUrl = _json["workDetailsUrl"]; | 6211 workDetailsUrl = _json["workDetailsUrl"]; |
6102 } | 6212 } |
6103 } | 6213 } |
6104 | 6214 |
6105 core.Map<core.String, core.Object> toJson() { | 6215 core.Map<core.String, core.Object> toJson() { |
6106 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6216 final core.Map<core.String, core.Object> _json = |
| 6217 new core.Map<core.String, core.Object>(); |
6107 if (appVersion != null) { | 6218 if (appVersion != null) { |
6108 _json["appVersion"] = appVersion.map((value) => (value).toJson()).toList()
; | 6219 _json["appVersion"] = |
| 6220 appVersion.map((value) => (value).toJson()).toList(); |
6109 } | 6221 } |
6110 if (authorName != null) { | 6222 if (authorName != null) { |
6111 _json["authorName"] = authorName; | 6223 _json["authorName"] = authorName; |
6112 } | 6224 } |
6113 if (detailsUrl != null) { | 6225 if (detailsUrl != null) { |
6114 _json["detailsUrl"] = detailsUrl; | 6226 _json["detailsUrl"] = detailsUrl; |
6115 } | 6227 } |
6116 if (distributionChannel != null) { | 6228 if (distributionChannel != null) { |
6117 _json["distributionChannel"] = distributionChannel; | 6229 _json["distributionChannel"] = distributionChannel; |
6118 } | 6230 } |
6119 if (iconUrl != null) { | 6231 if (iconUrl != null) { |
6120 _json["iconUrl"] = iconUrl; | 6232 _json["iconUrl"] = iconUrl; |
6121 } | 6233 } |
6122 if (kind != null) { | 6234 if (kind != null) { |
6123 _json["kind"] = kind; | 6235 _json["kind"] = kind; |
6124 } | 6236 } |
6125 if (productId != null) { | 6237 if (productId != null) { |
6126 _json["productId"] = productId; | 6238 _json["productId"] = productId; |
6127 } | 6239 } |
6128 if (productPricing != null) { | 6240 if (productPricing != null) { |
6129 _json["productPricing"] = productPricing; | 6241 _json["productPricing"] = productPricing; |
6130 } | 6242 } |
6131 if (requiresContainerApp != null) { | 6243 if (requiresContainerApp != null) { |
6132 _json["requiresContainerApp"] = requiresContainerApp; | 6244 _json["requiresContainerApp"] = requiresContainerApp; |
6133 } | 6245 } |
| 6246 if (signingCertificate != null) { |
| 6247 _json["signingCertificate"] = (signingCertificate).toJson(); |
| 6248 } |
6134 if (smallIconUrl != null) { | 6249 if (smallIconUrl != null) { |
6135 _json["smallIconUrl"] = smallIconUrl; | 6250 _json["smallIconUrl"] = smallIconUrl; |
6136 } | 6251 } |
6137 if (title != null) { | 6252 if (title != null) { |
6138 _json["title"] = title; | 6253 _json["title"] = title; |
6139 } | 6254 } |
6140 if (workDetailsUrl != null) { | 6255 if (workDetailsUrl != null) { |
6141 _json["workDetailsUrl"] = workDetailsUrl; | 6256 _json["workDetailsUrl"] = workDetailsUrl; |
6142 } | 6257 } |
6143 return _json; | 6258 return _json; |
6144 } | 6259 } |
6145 } | 6260 } |
6146 | 6261 |
6147 /** An event generated when a product's approval status is changed. */ | 6262 /// An event generated when a product's approval status is changed. |
6148 class ProductApprovalEvent { | 6263 class ProductApprovalEvent { |
6149 /** | 6264 /// Whether the product was approved or unapproved. This field will always be |
6150 * Whether the product was approved or unapproved. This field will always be | 6265 /// present. |
6151 * present. | |
6152 */ | |
6153 core.String approved; | 6266 core.String approved; |
6154 /** | 6267 |
6155 * The id of the product (e.g. "app:com.google.android.gm") for which the | 6268 /// The id of the product (e.g. "app:com.google.android.gm") for which the |
6156 * approval status has changed. This field will always be present. | 6269 /// approval status has changed. This field will always be present. |
6157 */ | |
6158 core.String productId; | 6270 core.String productId; |
6159 | 6271 |
6160 ProductApprovalEvent(); | 6272 ProductApprovalEvent(); |
6161 | 6273 |
6162 ProductApprovalEvent.fromJson(core.Map _json) { | 6274 ProductApprovalEvent.fromJson(core.Map _json) { |
6163 if (_json.containsKey("approved")) { | 6275 if (_json.containsKey("approved")) { |
6164 approved = _json["approved"]; | 6276 approved = _json["approved"]; |
6165 } | 6277 } |
6166 if (_json.containsKey("productId")) { | 6278 if (_json.containsKey("productId")) { |
6167 productId = _json["productId"]; | 6279 productId = _json["productId"]; |
6168 } | 6280 } |
6169 } | 6281 } |
6170 | 6282 |
6171 core.Map<core.String, core.Object> toJson() { | 6283 core.Map<core.String, core.Object> toJson() { |
6172 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6284 final core.Map<core.String, core.Object> _json = |
| 6285 new core.Map<core.String, core.Object>(); |
6173 if (approved != null) { | 6286 if (approved != null) { |
6174 _json["approved"] = approved; | 6287 _json["approved"] = approved; |
6175 } | 6288 } |
6176 if (productId != null) { | 6289 if (productId != null) { |
6177 _json["productId"] = productId; | 6290 _json["productId"] = productId; |
6178 } | 6291 } |
6179 return _json; | 6292 return _json; |
6180 } | 6293 } |
6181 } | 6294 } |
6182 | 6295 |
6183 /** An event generated whenever a product's availability changes. */ | 6296 /// An event generated whenever a product's availability changes. |
6184 class ProductAvailabilityChangeEvent { | 6297 class ProductAvailabilityChangeEvent { |
6185 /** The new state of the product. This field will always be present. */ | 6298 /// The new state of the product. This field will always be present. |
6186 core.String availabilityStatus; | 6299 core.String availabilityStatus; |
6187 /** | 6300 |
6188 * The id of the product (e.g. "app:com.google.android.gm") for which the | 6301 /// The id of the product (e.g. "app:com.google.android.gm") for which the |
6189 * product availability changed. This field will always be present. | 6302 /// product availability changed. This field will always be present. |
6190 */ | |
6191 core.String productId; | 6303 core.String productId; |
6192 | 6304 |
6193 ProductAvailabilityChangeEvent(); | 6305 ProductAvailabilityChangeEvent(); |
6194 | 6306 |
6195 ProductAvailabilityChangeEvent.fromJson(core.Map _json) { | 6307 ProductAvailabilityChangeEvent.fromJson(core.Map _json) { |
6196 if (_json.containsKey("availabilityStatus")) { | 6308 if (_json.containsKey("availabilityStatus")) { |
6197 availabilityStatus = _json["availabilityStatus"]; | 6309 availabilityStatus = _json["availabilityStatus"]; |
6198 } | 6310 } |
6199 if (_json.containsKey("productId")) { | 6311 if (_json.containsKey("productId")) { |
6200 productId = _json["productId"]; | 6312 productId = _json["productId"]; |
6201 } | 6313 } |
6202 } | 6314 } |
6203 | 6315 |
6204 core.Map<core.String, core.Object> toJson() { | 6316 core.Map<core.String, core.Object> toJson() { |
6205 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6317 final core.Map<core.String, core.Object> _json = |
| 6318 new core.Map<core.String, core.Object>(); |
6206 if (availabilityStatus != null) { | 6319 if (availabilityStatus != null) { |
6207 _json["availabilityStatus"] = availabilityStatus; | 6320 _json["availabilityStatus"] = availabilityStatus; |
6208 } | 6321 } |
6209 if (productId != null) { | 6322 if (productId != null) { |
6210 _json["productId"] = productId; | 6323 _json["productId"] = productId; |
6211 } | 6324 } |
6212 return _json; | 6325 return _json; |
6213 } | 6326 } |
6214 } | 6327 } |
6215 | 6328 |
6216 /** | 6329 /// A product permissions resource represents the set of permissions required |
6217 * A product permissions resource represents the set of permissions required by | 6330 /// by a specific app and whether or not they have been accepted by an |
6218 * a specific app and whether or not they have been accepted by an enterprise | 6331 /// enterprise admin. |
6219 * admin. | 6332 /// |
6220 * | 6333 /// The API can be used to read the set of permissions, and also to update the |
6221 * The API can be used to read the set of permissions, and also to update the | 6334 /// set to indicate that permissions have been accepted. |
6222 * set to indicate that permissions have been accepted. | |
6223 */ | |
6224 class ProductPermission { | 6335 class ProductPermission { |
6225 /** An opaque string uniquely identifying the permission. */ | 6336 /// An opaque string uniquely identifying the permission. |
6226 core.String permissionId; | 6337 core.String permissionId; |
6227 /** Whether the permission has been accepted or not. */ | 6338 |
| 6339 /// Whether the permission has been accepted or not. |
6228 core.String state; | 6340 core.String state; |
6229 | 6341 |
6230 ProductPermission(); | 6342 ProductPermission(); |
6231 | 6343 |
6232 ProductPermission.fromJson(core.Map _json) { | 6344 ProductPermission.fromJson(core.Map _json) { |
6233 if (_json.containsKey("permissionId")) { | 6345 if (_json.containsKey("permissionId")) { |
6234 permissionId = _json["permissionId"]; | 6346 permissionId = _json["permissionId"]; |
6235 } | 6347 } |
6236 if (_json.containsKey("state")) { | 6348 if (_json.containsKey("state")) { |
6237 state = _json["state"]; | 6349 state = _json["state"]; |
6238 } | 6350 } |
6239 } | 6351 } |
6240 | 6352 |
6241 core.Map<core.String, core.Object> toJson() { | 6353 core.Map<core.String, core.Object> toJson() { |
6242 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6354 final core.Map<core.String, core.Object> _json = |
| 6355 new core.Map<core.String, core.Object>(); |
6243 if (permissionId != null) { | 6356 if (permissionId != null) { |
6244 _json["permissionId"] = permissionId; | 6357 _json["permissionId"] = permissionId; |
6245 } | 6358 } |
6246 if (state != null) { | 6359 if (state != null) { |
6247 _json["state"] = state; | 6360 _json["state"] = state; |
6248 } | 6361 } |
6249 return _json; | 6362 return _json; |
6250 } | 6363 } |
6251 } | 6364 } |
6252 | 6365 |
6253 /** | 6366 /// Information about the permissions required by a specific app and whether |
6254 * Information about the permissions required by a specific app and whether they | 6367 /// they have been accepted by the enterprise. |
6255 * have been accepted by the enterprise. | |
6256 */ | |
6257 class ProductPermissions { | 6368 class ProductPermissions { |
6258 /** | 6369 /// Identifies what kind of resource this is. Value: the fixed string |
6259 * Identifies what kind of resource this is. Value: the fixed string | 6370 /// "androidenterprise#productPermissions". |
6260 * "androidenterprise#productPermissions". | |
6261 */ | |
6262 core.String kind; | 6371 core.String kind; |
6263 /** The permissions required by the app. */ | 6372 |
| 6373 /// The permissions required by the app. |
6264 core.List<ProductPermission> permission; | 6374 core.List<ProductPermission> permission; |
6265 /** | 6375 |
6266 * The ID of the app that the permissions relate to, e.g. | 6376 /// The ID of the app that the permissions relate to, e.g. |
6267 * "app:com.google.android.gm". | 6377 /// "app:com.google.android.gm". |
6268 */ | |
6269 core.String productId; | 6378 core.String productId; |
6270 | 6379 |
6271 ProductPermissions(); | 6380 ProductPermissions(); |
6272 | 6381 |
6273 ProductPermissions.fromJson(core.Map _json) { | 6382 ProductPermissions.fromJson(core.Map _json) { |
6274 if (_json.containsKey("kind")) { | 6383 if (_json.containsKey("kind")) { |
6275 kind = _json["kind"]; | 6384 kind = _json["kind"]; |
6276 } | 6385 } |
6277 if (_json.containsKey("permission")) { | 6386 if (_json.containsKey("permission")) { |
6278 permission = _json["permission"].map((value) => new ProductPermission.from
Json(value)).toList(); | 6387 permission = _json["permission"] |
| 6388 .map((value) => new ProductPermission.fromJson(value)) |
| 6389 .toList(); |
6279 } | 6390 } |
6280 if (_json.containsKey("productId")) { | 6391 if (_json.containsKey("productId")) { |
6281 productId = _json["productId"]; | 6392 productId = _json["productId"]; |
6282 } | 6393 } |
6283 } | 6394 } |
6284 | 6395 |
6285 core.Map<core.String, core.Object> toJson() { | 6396 core.Map<core.String, core.Object> toJson() { |
6286 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6397 final core.Map<core.String, core.Object> _json = |
| 6398 new core.Map<core.String, core.Object>(); |
6287 if (kind != null) { | 6399 if (kind != null) { |
6288 _json["kind"] = kind; | 6400 _json["kind"] = kind; |
6289 } | 6401 } |
6290 if (permission != null) { | 6402 if (permission != null) { |
6291 _json["permission"] = permission.map((value) => (value).toJson()).toList()
; | 6403 _json["permission"] = |
| 6404 permission.map((value) => (value).toJson()).toList(); |
6292 } | 6405 } |
6293 if (productId != null) { | 6406 if (productId != null) { |
6294 _json["productId"] = productId; | 6407 _json["productId"] = productId; |
6295 } | 6408 } |
6296 return _json; | 6409 return _json; |
6297 } | 6410 } |
6298 } | 6411 } |
6299 | 6412 |
6300 /** A set of products. */ | 6413 /// A set of products. |
6301 class ProductSet { | 6414 class ProductSet { |
6302 /** | 6415 /// Identifies what kind of resource this is. Value: the fixed string |
6303 * Identifies what kind of resource this is. Value: the fixed string | 6416 /// "androidenterprise#productSet". |
6304 * "androidenterprise#productSet". | |
6305 */ | |
6306 core.String kind; | 6417 core.String kind; |
6307 /** The list of product IDs making up the set of products. */ | 6418 |
| 6419 /// The list of product IDs making up the set of products. |
6308 core.List<core.String> productId; | 6420 core.List<core.String> productId; |
6309 /** | 6421 |
6310 * The interpretation of this product set. "unknown" should never be sent and | 6422 /// The interpretation of this product set. "unknown" should never be sent |
6311 * is ignored if received. "whitelist" means that the user is entitled to | 6423 /// and is ignored if received. "whitelist" means that the user is entitled |
6312 * access the product set. "includeAll" means that all products are | 6424 /// to access the product set. "includeAll" means that all products are |
6313 * accessible, including products that are approved, products with revoked | 6425 /// accessible, including products that are approved, products with revoked |
6314 * approval, and products that have never been approved. "allApproved" means | 6426 /// approval, and products that have never been approved. "allApproved" means |
6315 * that the user is entitled to access all products that are approved for the | 6427 /// that the user is entitled to access all products that are approved for |
6316 * enterprise. If the value is "allApproved" or "includeAll", the productId | 6428 /// the enterprise. If the value is "allApproved" or "includeAll", the |
6317 * field is ignored. If no value is provided, it is interpreted as "whitelist" | 6429 /// productId field is ignored. If no value is provided, it is interpreted as |
6318 * for backwards compatibility. Further "allApproved" or "includeAll" does not | 6430 /// "whitelist" for backwards compatibility. Further "allApproved" or |
6319 * enable automatic visibility of "alpha" or "beta" tracks for Android app. | 6431 /// "includeAll" does not enable automatic visibility of "alpha" or "beta" |
6320 * Use ProductVisibility to enable "alpha" or "beta" tracks per user. | 6432 /// tracks for Android app. Use ProductVisibility to enable "alpha" or "beta" |
6321 */ | 6433 /// tracks per user. |
6322 core.String productSetBehavior; | 6434 core.String productSetBehavior; |
6323 | 6435 |
6324 ProductSet(); | 6436 ProductSet(); |
6325 | 6437 |
6326 ProductSet.fromJson(core.Map _json) { | 6438 ProductSet.fromJson(core.Map _json) { |
6327 if (_json.containsKey("kind")) { | 6439 if (_json.containsKey("kind")) { |
6328 kind = _json["kind"]; | 6440 kind = _json["kind"]; |
6329 } | 6441 } |
6330 if (_json.containsKey("productId")) { | 6442 if (_json.containsKey("productId")) { |
6331 productId = _json["productId"]; | 6443 productId = _json["productId"]; |
6332 } | 6444 } |
6333 if (_json.containsKey("productSetBehavior")) { | 6445 if (_json.containsKey("productSetBehavior")) { |
6334 productSetBehavior = _json["productSetBehavior"]; | 6446 productSetBehavior = _json["productSetBehavior"]; |
6335 } | 6447 } |
6336 } | 6448 } |
6337 | 6449 |
6338 core.Map<core.String, core.Object> toJson() { | 6450 core.Map<core.String, core.Object> toJson() { |
6339 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6451 final core.Map<core.String, core.Object> _json = |
| 6452 new core.Map<core.String, core.Object>(); |
6340 if (kind != null) { | 6453 if (kind != null) { |
6341 _json["kind"] = kind; | 6454 _json["kind"] = kind; |
6342 } | 6455 } |
6343 if (productId != null) { | 6456 if (productId != null) { |
6344 _json["productId"] = productId; | 6457 _json["productId"] = productId; |
6345 } | 6458 } |
6346 if (productSetBehavior != null) { | 6459 if (productSetBehavior != null) { |
6347 _json["productSetBehavior"] = productSetBehavior; | 6460 _json["productSetBehavior"] = productSetBehavior; |
6348 } | 6461 } |
6349 return _json; | 6462 return _json; |
6350 } | 6463 } |
6351 } | 6464 } |
6352 | 6465 |
| 6466 class ProductSigningCertificate { |
| 6467 /// The base64 urlsafe encoded SHA1 hash of the certificate. (This field is |
| 6468 /// deprecated in favor of SHA2-256. It should not be used and may be removed |
| 6469 /// at any time.) |
| 6470 core.String certificateHashSha1; |
| 6471 |
| 6472 /// The base64 urlsafe encoded SHA2-256 hash of the certificate. |
| 6473 core.String certificateHashSha256; |
| 6474 |
| 6475 ProductSigningCertificate(); |
| 6476 |
| 6477 ProductSigningCertificate.fromJson(core.Map _json) { |
| 6478 if (_json.containsKey("certificateHashSha1")) { |
| 6479 certificateHashSha1 = _json["certificateHashSha1"]; |
| 6480 } |
| 6481 if (_json.containsKey("certificateHashSha256")) { |
| 6482 certificateHashSha256 = _json["certificateHashSha256"]; |
| 6483 } |
| 6484 } |
| 6485 |
| 6486 core.Map<core.String, core.Object> toJson() { |
| 6487 final core.Map<core.String, core.Object> _json = |
| 6488 new core.Map<core.String, core.Object>(); |
| 6489 if (certificateHashSha1 != null) { |
| 6490 _json["certificateHashSha1"] = certificateHashSha1; |
| 6491 } |
| 6492 if (certificateHashSha256 != null) { |
| 6493 _json["certificateHashSha256"] = certificateHashSha256; |
| 6494 } |
| 6495 return _json; |
| 6496 } |
| 6497 } |
| 6498 |
6353 class ProductsApproveRequest { | 6499 class ProductsApproveRequest { |
6354 /** | 6500 /// The approval URL that was shown to the user. Only the permissions shown |
6355 * The approval URL that was shown to the user. Only the permissions shown to | 6501 /// to the user with that URL will be accepted, which may not be the |
6356 * the user with that URL will be accepted, which may not be the product's | 6502 /// product's entire set of permissions. For example, the URL may only |
6357 * entire set of permissions. For example, the URL may only display new | 6503 /// display new permissions from an update after the product was approved, or |
6358 * permissions from an update after the product was approved, or not include | 6504 /// not include new permissions if the product was updated since the URL was |
6359 * new permissions if the product was updated since the URL was generated. | 6505 /// generated. |
6360 */ | |
6361 ApprovalUrlInfo approvalUrlInfo; | 6506 ApprovalUrlInfo approvalUrlInfo; |
6362 /** | 6507 |
6363 * Sets how new permission requests for the product are handled. | 6508 /// Sets how new permission requests for the product are handled. |
6364 * "allPermissions" automatically approves all current and future permissions | 6509 /// "allPermissions" automatically approves all current and future |
6365 * for the product. "currentPermissionsOnly" approves the current set of | 6510 /// permissions for the product. "currentPermissionsOnly" approves the |
6366 * permissions for the product, but any future permissions added through | 6511 /// current set of permissions for the product, but any future permissions |
6367 * updates will require manual reapproval. If not specified, only the current | 6512 /// added through updates will require manual reapproval. If not specified, |
6368 * set of permissions will be approved. | 6513 /// only the current set of permissions will be approved. |
6369 */ | |
6370 core.String approvedPermissions; | 6514 core.String approvedPermissions; |
6371 | 6515 |
6372 ProductsApproveRequest(); | 6516 ProductsApproveRequest(); |
6373 | 6517 |
6374 ProductsApproveRequest.fromJson(core.Map _json) { | 6518 ProductsApproveRequest.fromJson(core.Map _json) { |
6375 if (_json.containsKey("approvalUrlInfo")) { | 6519 if (_json.containsKey("approvalUrlInfo")) { |
6376 approvalUrlInfo = new ApprovalUrlInfo.fromJson(_json["approvalUrlInfo"]); | 6520 approvalUrlInfo = new ApprovalUrlInfo.fromJson(_json["approvalUrlInfo"]); |
6377 } | 6521 } |
6378 if (_json.containsKey("approvedPermissions")) { | 6522 if (_json.containsKey("approvedPermissions")) { |
6379 approvedPermissions = _json["approvedPermissions"]; | 6523 approvedPermissions = _json["approvedPermissions"]; |
6380 } | 6524 } |
6381 } | 6525 } |
6382 | 6526 |
6383 core.Map<core.String, core.Object> toJson() { | 6527 core.Map<core.String, core.Object> toJson() { |
6384 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6528 final core.Map<core.String, core.Object> _json = |
| 6529 new core.Map<core.String, core.Object>(); |
6385 if (approvalUrlInfo != null) { | 6530 if (approvalUrlInfo != null) { |
6386 _json["approvalUrlInfo"] = (approvalUrlInfo).toJson(); | 6531 _json["approvalUrlInfo"] = (approvalUrlInfo).toJson(); |
6387 } | 6532 } |
6388 if (approvedPermissions != null) { | 6533 if (approvedPermissions != null) { |
6389 _json["approvedPermissions"] = approvedPermissions; | 6534 _json["approvedPermissions"] = approvedPermissions; |
6390 } | 6535 } |
6391 return _json; | 6536 return _json; |
6392 } | 6537 } |
6393 } | 6538 } |
6394 | 6539 |
6395 class ProductsGenerateApprovalUrlResponse { | 6540 class ProductsGenerateApprovalUrlResponse { |
6396 /** | 6541 /// A URL that can be rendered in an iframe to display the permissions (if |
6397 * A URL that can be rendered in an iframe to display the permissions (if any) | 6542 /// any) of a product. This URL can be used to approve the product only once |
6398 * of a product. This URL can be used to approve the product only once and | 6543 /// and only within 24 hours of being generated, using the Products.approve |
6399 * only within 24 hours of being generated, using the Products.approve call. | 6544 /// call. If the product is currently unapproved and has no permissions, this |
6400 * If the product is currently unapproved and has no permissions, this URL | 6545 /// URL will point to an empty page. If the product is currently approved, a |
6401 * will point to an empty page. If the product is currently approved, a URL | 6546 /// URL will only be generated if that product has added permissions since it |
6402 * will only be generated if that product has added permissions since it was | 6547 /// was last approved, and the URL will only display those new permissions |
6403 * last approved, and the URL will only display those new permissions that | 6548 /// that have not yet been accepted. |
6404 * have not yet been accepted. | |
6405 */ | |
6406 core.String url; | 6549 core.String url; |
6407 | 6550 |
6408 ProductsGenerateApprovalUrlResponse(); | 6551 ProductsGenerateApprovalUrlResponse(); |
6409 | 6552 |
6410 ProductsGenerateApprovalUrlResponse.fromJson(core.Map _json) { | 6553 ProductsGenerateApprovalUrlResponse.fromJson(core.Map _json) { |
6411 if (_json.containsKey("url")) { | 6554 if (_json.containsKey("url")) { |
6412 url = _json["url"]; | 6555 url = _json["url"]; |
6413 } | 6556 } |
6414 } | 6557 } |
6415 | 6558 |
6416 core.Map<core.String, core.Object> toJson() { | 6559 core.Map<core.String, core.Object> toJson() { |
6417 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6560 final core.Map<core.String, core.Object> _json = |
| 6561 new core.Map<core.String, core.Object>(); |
6418 if (url != null) { | 6562 if (url != null) { |
6419 _json["url"] = url; | 6563 _json["url"] = url; |
6420 } | 6564 } |
6421 return _json; | 6565 return _json; |
6422 } | 6566 } |
6423 } | 6567 } |
6424 | 6568 |
6425 /** The matching products. */ | 6569 /// The matching products. |
6426 class ProductsListResponse { | 6570 class ProductsListResponse { |
6427 /** | 6571 /// Identifies what kind of resource this is. Value: the fixed string |
6428 * Identifies what kind of resource this is. Value: the fixed string | 6572 /// "androidenterprise#productsListResponse". |
6429 * "androidenterprise#productsListResponse". | |
6430 */ | |
6431 core.String kind; | 6573 core.String kind; |
6432 /** General pagination information. */ | 6574 |
| 6575 /// General pagination information. |
6433 PageInfo pageInfo; | 6576 PageInfo pageInfo; |
6434 /** | 6577 |
6435 * Information about a product (e.g. an app) in the Google Play store, for | 6578 /// Information about a product (e.g. an app) in the Google Play store, for |
6436 * display to an enterprise admin. | 6579 /// display to an enterprise admin. |
6437 */ | |
6438 core.List<Product> product; | 6580 core.List<Product> product; |
6439 /** Pagination information for token pagination. */ | 6581 |
| 6582 /// Pagination information for token pagination. |
6440 TokenPagination tokenPagination; | 6583 TokenPagination tokenPagination; |
6441 | 6584 |
6442 ProductsListResponse(); | 6585 ProductsListResponse(); |
6443 | 6586 |
6444 ProductsListResponse.fromJson(core.Map _json) { | 6587 ProductsListResponse.fromJson(core.Map _json) { |
6445 if (_json.containsKey("kind")) { | 6588 if (_json.containsKey("kind")) { |
6446 kind = _json["kind"]; | 6589 kind = _json["kind"]; |
6447 } | 6590 } |
6448 if (_json.containsKey("pageInfo")) { | 6591 if (_json.containsKey("pageInfo")) { |
6449 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); | 6592 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
6450 } | 6593 } |
6451 if (_json.containsKey("product")) { | 6594 if (_json.containsKey("product")) { |
6452 product = _json["product"].map((value) => new Product.fromJson(value)).toL
ist(); | 6595 product = |
| 6596 _json["product"].map((value) => new Product.fromJson(value)).toList(); |
6453 } | 6597 } |
6454 if (_json.containsKey("tokenPagination")) { | 6598 if (_json.containsKey("tokenPagination")) { |
6455 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); | 6599 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
6456 } | 6600 } |
6457 } | 6601 } |
6458 | 6602 |
6459 core.Map<core.String, core.Object> toJson() { | 6603 core.Map<core.String, core.Object> toJson() { |
6460 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6604 final core.Map<core.String, core.Object> _json = |
| 6605 new core.Map<core.String, core.Object>(); |
6461 if (kind != null) { | 6606 if (kind != null) { |
6462 _json["kind"] = kind; | 6607 _json["kind"] = kind; |
6463 } | 6608 } |
6464 if (pageInfo != null) { | 6609 if (pageInfo != null) { |
6465 _json["pageInfo"] = (pageInfo).toJson(); | 6610 _json["pageInfo"] = (pageInfo).toJson(); |
6466 } | 6611 } |
6467 if (product != null) { | 6612 if (product != null) { |
6468 _json["product"] = product.map((value) => (value).toJson()).toList(); | 6613 _json["product"] = product.map((value) => (value).toJson()).toList(); |
6469 } | 6614 } |
6470 if (tokenPagination != null) { | 6615 if (tokenPagination != null) { |
6471 _json["tokenPagination"] = (tokenPagination).toJson(); | 6616 _json["tokenPagination"] = (tokenPagination).toJson(); |
6472 } | 6617 } |
6473 return _json; | 6618 return _json; |
6474 } | 6619 } |
6475 } | 6620 } |
6476 | 6621 |
6477 /** | 6622 /// A service account identity, including the name and credentials that can be |
6478 * A service account identity, including the name and credentials that can be | 6623 /// used to authenticate as the service account. |
6479 * used to authenticate as the service account. | |
6480 */ | |
6481 class ServiceAccount { | 6624 class ServiceAccount { |
6482 /** Credentials that can be used to authenticate as this ServiceAccount. */ | 6625 /// Credentials that can be used to authenticate as this ServiceAccount. |
6483 ServiceAccountKey key; | 6626 ServiceAccountKey key; |
6484 /** | 6627 |
6485 * Identifies what kind of resource this is. Value: the fixed string | 6628 /// Identifies what kind of resource this is. Value: the fixed string |
6486 * "androidenterprise#serviceAccount". | 6629 /// "androidenterprise#serviceAccount". |
6487 */ | |
6488 core.String kind; | 6630 core.String kind; |
6489 /** | 6631 |
6490 * The account name of the service account, in the form of an email address. | 6632 /// The account name of the service account, in the form of an email address. |
6491 * Assigned by the server. | 6633 /// Assigned by the server. |
6492 */ | |
6493 core.String name; | 6634 core.String name; |
6494 | 6635 |
6495 ServiceAccount(); | 6636 ServiceAccount(); |
6496 | 6637 |
6497 ServiceAccount.fromJson(core.Map _json) { | 6638 ServiceAccount.fromJson(core.Map _json) { |
6498 if (_json.containsKey("key")) { | 6639 if (_json.containsKey("key")) { |
6499 key = new ServiceAccountKey.fromJson(_json["key"]); | 6640 key = new ServiceAccountKey.fromJson(_json["key"]); |
6500 } | 6641 } |
6501 if (_json.containsKey("kind")) { | 6642 if (_json.containsKey("kind")) { |
6502 kind = _json["kind"]; | 6643 kind = _json["kind"]; |
6503 } | 6644 } |
6504 if (_json.containsKey("name")) { | 6645 if (_json.containsKey("name")) { |
6505 name = _json["name"]; | 6646 name = _json["name"]; |
6506 } | 6647 } |
6507 } | 6648 } |
6508 | 6649 |
6509 core.Map<core.String, core.Object> toJson() { | 6650 core.Map<core.String, core.Object> toJson() { |
6510 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6651 final core.Map<core.String, core.Object> _json = |
| 6652 new core.Map<core.String, core.Object>(); |
6511 if (key != null) { | 6653 if (key != null) { |
6512 _json["key"] = (key).toJson(); | 6654 _json["key"] = (key).toJson(); |
6513 } | 6655 } |
6514 if (kind != null) { | 6656 if (kind != null) { |
6515 _json["kind"] = kind; | 6657 _json["kind"] = kind; |
6516 } | 6658 } |
6517 if (name != null) { | 6659 if (name != null) { |
6518 _json["name"] = name; | 6660 _json["name"] = name; |
6519 } | 6661 } |
6520 return _json; | 6662 return _json; |
6521 } | 6663 } |
6522 } | 6664 } |
6523 | 6665 |
6524 /** Credentials that can be used to authenticate as a service account. */ | 6666 /// Credentials that can be used to authenticate as a service account. |
6525 class ServiceAccountKey { | 6667 class ServiceAccountKey { |
6526 /** | 6668 /// The body of the private key credentials file, in string format. This is |
6527 * The body of the private key credentials file, in string format. This is | 6669 /// only populated when the ServiceAccountKey is created, and is not stored |
6528 * only populated when the ServiceAccountKey is created, and is not stored by | 6670 /// by Google. |
6529 * Google. | |
6530 */ | |
6531 core.String data; | 6671 core.String data; |
6532 /** | 6672 |
6533 * An opaque, unique identifier for this ServiceAccountKey. Assigned by the | 6673 /// An opaque, unique identifier for this ServiceAccountKey. Assigned by the |
6534 * server. | 6674 /// server. |
6535 */ | |
6536 core.String id; | 6675 core.String id; |
6537 /** | 6676 |
6538 * Identifies what kind of resource this is. Value: the fixed string | 6677 /// Identifies what kind of resource this is. Value: the fixed string |
6539 * "androidenterprise#serviceAccountKey". | 6678 /// "androidenterprise#serviceAccountKey". |
6540 */ | |
6541 core.String kind; | 6679 core.String kind; |
6542 /** | 6680 |
6543 * Public key data for the credentials file. This is an X.509 cert. If you are | 6681 /// Public key data for the credentials file. This is an X.509 cert. If you |
6544 * using the googleCredentials key type, this is identical to the cert that | 6682 /// are using the googleCredentials key type, this is identical to the cert |
6545 * can be retrieved by using the X.509 cert url inside of the credentials | 6683 /// that can be retrieved by using the X.509 cert url inside of the |
6546 * file. | 6684 /// credentials file. |
6547 */ | |
6548 core.String publicData; | 6685 core.String publicData; |
6549 /** The file format of the generated key data. */ | 6686 |
| 6687 /// The file format of the generated key data. |
6550 core.String type; | 6688 core.String type; |
6551 | 6689 |
6552 ServiceAccountKey(); | 6690 ServiceAccountKey(); |
6553 | 6691 |
6554 ServiceAccountKey.fromJson(core.Map _json) { | 6692 ServiceAccountKey.fromJson(core.Map _json) { |
6555 if (_json.containsKey("data")) { | 6693 if (_json.containsKey("data")) { |
6556 data = _json["data"]; | 6694 data = _json["data"]; |
6557 } | 6695 } |
6558 if (_json.containsKey("id")) { | 6696 if (_json.containsKey("id")) { |
6559 id = _json["id"]; | 6697 id = _json["id"]; |
6560 } | 6698 } |
6561 if (_json.containsKey("kind")) { | 6699 if (_json.containsKey("kind")) { |
6562 kind = _json["kind"]; | 6700 kind = _json["kind"]; |
6563 } | 6701 } |
6564 if (_json.containsKey("publicData")) { | 6702 if (_json.containsKey("publicData")) { |
6565 publicData = _json["publicData"]; | 6703 publicData = _json["publicData"]; |
6566 } | 6704 } |
6567 if (_json.containsKey("type")) { | 6705 if (_json.containsKey("type")) { |
6568 type = _json["type"]; | 6706 type = _json["type"]; |
6569 } | 6707 } |
6570 } | 6708 } |
6571 | 6709 |
6572 core.Map<core.String, core.Object> toJson() { | 6710 core.Map<core.String, core.Object> toJson() { |
6573 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6711 final core.Map<core.String, core.Object> _json = |
| 6712 new core.Map<core.String, core.Object>(); |
6574 if (data != null) { | 6713 if (data != null) { |
6575 _json["data"] = data; | 6714 _json["data"] = data; |
6576 } | 6715 } |
6577 if (id != null) { | 6716 if (id != null) { |
6578 _json["id"] = id; | 6717 _json["id"] = id; |
6579 } | 6718 } |
6580 if (kind != null) { | 6719 if (kind != null) { |
6581 _json["kind"] = kind; | 6720 _json["kind"] = kind; |
6582 } | 6721 } |
6583 if (publicData != null) { | 6722 if (publicData != null) { |
6584 _json["publicData"] = publicData; | 6723 _json["publicData"] = publicData; |
6585 } | 6724 } |
6586 if (type != null) { | 6725 if (type != null) { |
6587 _json["type"] = type; | 6726 _json["type"] = type; |
6588 } | 6727 } |
6589 return _json; | 6728 return _json; |
6590 } | 6729 } |
6591 } | 6730 } |
6592 | 6731 |
6593 class ServiceAccountKeysListResponse { | 6732 class ServiceAccountKeysListResponse { |
6594 /** The service account credentials. */ | 6733 /// The service account credentials. |
6595 core.List<ServiceAccountKey> serviceAccountKey; | 6734 core.List<ServiceAccountKey> serviceAccountKey; |
6596 | 6735 |
6597 ServiceAccountKeysListResponse(); | 6736 ServiceAccountKeysListResponse(); |
6598 | 6737 |
6599 ServiceAccountKeysListResponse.fromJson(core.Map _json) { | 6738 ServiceAccountKeysListResponse.fromJson(core.Map _json) { |
6600 if (_json.containsKey("serviceAccountKey")) { | 6739 if (_json.containsKey("serviceAccountKey")) { |
6601 serviceAccountKey = _json["serviceAccountKey"].map((value) => new ServiceA
ccountKey.fromJson(value)).toList(); | 6740 serviceAccountKey = _json["serviceAccountKey"] |
| 6741 .map((value) => new ServiceAccountKey.fromJson(value)) |
| 6742 .toList(); |
6602 } | 6743 } |
6603 } | 6744 } |
6604 | 6745 |
6605 core.Map<core.String, core.Object> toJson() { | 6746 core.Map<core.String, core.Object> toJson() { |
6606 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6747 final core.Map<core.String, core.Object> _json = |
| 6748 new core.Map<core.String, core.Object>(); |
6607 if (serviceAccountKey != null) { | 6749 if (serviceAccountKey != null) { |
6608 _json["serviceAccountKey"] = serviceAccountKey.map((value) => (value).toJs
on()).toList(); | 6750 _json["serviceAccountKey"] = |
| 6751 serviceAccountKey.map((value) => (value).toJson()).toList(); |
6609 } | 6752 } |
6610 return _json; | 6753 return _json; |
6611 } | 6754 } |
6612 } | 6755 } |
6613 | 6756 |
6614 /** | 6757 /// A resource returned by the GenerateSignupUrl API, which contains the Signup |
6615 * A resource returned by the GenerateSignupUrl API, which contains the Signup | 6758 /// URL and Completion Token. |
6616 * URL and Completion Token. | |
6617 */ | |
6618 class SignupInfo { | 6759 class SignupInfo { |
6619 /** | 6760 /// An opaque token that will be required, along with the Enterprise Token, |
6620 * An opaque token that will be required, along with the Enterprise Token, for | 6761 /// for obtaining the enterprise resource from CompleteSignup. |
6621 * obtaining the enterprise resource from CompleteSignup. | |
6622 */ | |
6623 core.String completionToken; | 6762 core.String completionToken; |
6624 /** | 6763 |
6625 * Identifies what kind of resource this is. Value: the fixed string | 6764 /// Identifies what kind of resource this is. Value: the fixed string |
6626 * "androidenterprise#signupInfo". | 6765 /// "androidenterprise#signupInfo". |
6627 */ | |
6628 core.String kind; | 6766 core.String kind; |
6629 /** | 6767 |
6630 * A URL under which the Admin can sign up for an enterprise. The page pointed | 6768 /// A URL under which the Admin can sign up for an enterprise. The page |
6631 * to cannot be rendered in an iframe. | 6769 /// pointed to cannot be rendered in an iframe. |
6632 */ | |
6633 core.String url; | 6770 core.String url; |
6634 | 6771 |
6635 SignupInfo(); | 6772 SignupInfo(); |
6636 | 6773 |
6637 SignupInfo.fromJson(core.Map _json) { | 6774 SignupInfo.fromJson(core.Map _json) { |
6638 if (_json.containsKey("completionToken")) { | 6775 if (_json.containsKey("completionToken")) { |
6639 completionToken = _json["completionToken"]; | 6776 completionToken = _json["completionToken"]; |
6640 } | 6777 } |
6641 if (_json.containsKey("kind")) { | 6778 if (_json.containsKey("kind")) { |
6642 kind = _json["kind"]; | 6779 kind = _json["kind"]; |
6643 } | 6780 } |
6644 if (_json.containsKey("url")) { | 6781 if (_json.containsKey("url")) { |
6645 url = _json["url"]; | 6782 url = _json["url"]; |
6646 } | 6783 } |
6647 } | 6784 } |
6648 | 6785 |
6649 core.Map<core.String, core.Object> toJson() { | 6786 core.Map<core.String, core.Object> toJson() { |
6650 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6787 final core.Map<core.String, core.Object> _json = |
| 6788 new core.Map<core.String, core.Object>(); |
6651 if (completionToken != null) { | 6789 if (completionToken != null) { |
6652 _json["completionToken"] = completionToken; | 6790 _json["completionToken"] = completionToken; |
6653 } | 6791 } |
6654 if (kind != null) { | 6792 if (kind != null) { |
6655 _json["kind"] = kind; | 6793 _json["kind"] = kind; |
6656 } | 6794 } |
6657 if (url != null) { | 6795 if (url != null) { |
6658 _json["url"] = url; | 6796 _json["url"] = url; |
6659 } | 6797 } |
6660 return _json; | 6798 return _json; |
6661 } | 6799 } |
6662 } | 6800 } |
6663 | 6801 |
6664 /** | 6802 /// Definition of a managed Google Play store cluster, a list of products |
6665 * Definition of a managed Google Play store cluster, a list of products | 6803 /// displayed as part of a store page. |
6666 * displayed as part of a store page. | |
6667 */ | |
6668 class StoreCluster { | 6804 class StoreCluster { |
6669 /** | 6805 /// Unique ID of this cluster. Assigned by the server. Immutable once |
6670 * Unique ID of this cluster. Assigned by the server. Immutable once assigned. | 6806 /// assigned. |
6671 */ | |
6672 core.String id; | 6807 core.String id; |
6673 /** | 6808 |
6674 * Identifies what kind of resource this is. Value: the fixed string | 6809 /// Identifies what kind of resource this is. Value: the fixed string |
6675 * "androidenterprise#storeCluster". | 6810 /// "androidenterprise#storeCluster". |
6676 */ | |
6677 core.String kind; | 6811 core.String kind; |
6678 /** | 6812 |
6679 * Ordered list of localized strings giving the name of this page. The text | 6813 /// Ordered list of localized strings giving the name of this page. The text |
6680 * displayed is the one that best matches the user locale, or the first entry | 6814 /// displayed is the one that best matches the user locale, or the first |
6681 * if there is no good match. There needs to be at least one entry. | 6815 /// entry if there is no good match. There needs to be at least one entry. |
6682 */ | |
6683 core.List<LocalizedText> name; | 6816 core.List<LocalizedText> name; |
6684 /** | 6817 |
6685 * String (US-ASCII only) used to determine order of this cluster within the | 6818 /// String (US-ASCII only) used to determine order of this cluster within the |
6686 * parent page's elements. Page elements are sorted in lexicographic order of | 6819 /// parent page's elements. Page elements are sorted in lexicographic order |
6687 * this field. Duplicated values are allowed, but ordering between elements | 6820 /// of this field. Duplicated values are allowed, but ordering between |
6688 * with duplicate order is undefined. | 6821 /// elements with duplicate order is undefined. |
6689 * | 6822 /// |
6690 * The value of this field is never visible to a user, it is used solely for | 6823 /// The value of this field is never visible to a user, it is used solely for |
6691 * the purpose of defining an ordering. Maximum length is 256 characters. | 6824 /// the purpose of defining an ordering. Maximum length is 256 characters. |
6692 */ | |
6693 core.String orderInPage; | 6825 core.String orderInPage; |
6694 /** | 6826 |
6695 * List of products in the order they are displayed in the cluster. There | 6827 /// List of products in the order they are displayed in the cluster. There |
6696 * should not be duplicates within a cluster. | 6828 /// should not be duplicates within a cluster. |
6697 */ | |
6698 core.List<core.String> productId; | 6829 core.List<core.String> productId; |
6699 | 6830 |
6700 StoreCluster(); | 6831 StoreCluster(); |
6701 | 6832 |
6702 StoreCluster.fromJson(core.Map _json) { | 6833 StoreCluster.fromJson(core.Map _json) { |
6703 if (_json.containsKey("id")) { | 6834 if (_json.containsKey("id")) { |
6704 id = _json["id"]; | 6835 id = _json["id"]; |
6705 } | 6836 } |
6706 if (_json.containsKey("kind")) { | 6837 if (_json.containsKey("kind")) { |
6707 kind = _json["kind"]; | 6838 kind = _json["kind"]; |
6708 } | 6839 } |
6709 if (_json.containsKey("name")) { | 6840 if (_json.containsKey("name")) { |
6710 name = _json["name"].map((value) => new LocalizedText.fromJson(value)).toL
ist(); | 6841 name = _json["name"] |
| 6842 .map((value) => new LocalizedText.fromJson(value)) |
| 6843 .toList(); |
6711 } | 6844 } |
6712 if (_json.containsKey("orderInPage")) { | 6845 if (_json.containsKey("orderInPage")) { |
6713 orderInPage = _json["orderInPage"]; | 6846 orderInPage = _json["orderInPage"]; |
6714 } | 6847 } |
6715 if (_json.containsKey("productId")) { | 6848 if (_json.containsKey("productId")) { |
6716 productId = _json["productId"]; | 6849 productId = _json["productId"]; |
6717 } | 6850 } |
6718 } | 6851 } |
6719 | 6852 |
6720 core.Map<core.String, core.Object> toJson() { | 6853 core.Map<core.String, core.Object> toJson() { |
6721 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6854 final core.Map<core.String, core.Object> _json = |
| 6855 new core.Map<core.String, core.Object>(); |
6722 if (id != null) { | 6856 if (id != null) { |
6723 _json["id"] = id; | 6857 _json["id"] = id; |
6724 } | 6858 } |
6725 if (kind != null) { | 6859 if (kind != null) { |
6726 _json["kind"] = kind; | 6860 _json["kind"] = kind; |
6727 } | 6861 } |
6728 if (name != null) { | 6862 if (name != null) { |
6729 _json["name"] = name.map((value) => (value).toJson()).toList(); | 6863 _json["name"] = name.map((value) => (value).toJson()).toList(); |
6730 } | 6864 } |
6731 if (orderInPage != null) { | 6865 if (orderInPage != null) { |
6732 _json["orderInPage"] = orderInPage; | 6866 _json["orderInPage"] = orderInPage; |
6733 } | 6867 } |
6734 if (productId != null) { | 6868 if (productId != null) { |
6735 _json["productId"] = productId; | 6869 _json["productId"] = productId; |
6736 } | 6870 } |
6737 return _json; | 6871 return _json; |
6738 } | 6872 } |
6739 } | 6873 } |
6740 | 6874 |
6741 /** | 6875 /// General setting for the managed Google Play store layout, currently only |
6742 * General setting for the managed Google Play store layout, currently only | 6876 /// specifying the page to display the first time the store is opened. |
6743 * specifying the page to display the first time the store is opened. | |
6744 */ | |
6745 class StoreLayout { | 6877 class StoreLayout { |
6746 /** | 6878 /// The ID of the store page to be used as the homepage. The homepage is the |
6747 * The ID of the store page to be used as the homepage. The homepage is the | 6879 /// first page shown in the managed Google Play Store. |
6748 * first page shown in the managed Google Play Store. | 6880 /// |
6749 * | 6881 /// Not specifying a homepage is equivalent to setting the store layout type |
6750 * Not specifying a homepage is equivalent to setting the store layout type to | 6882 /// to "basic". |
6751 * "basic". | |
6752 */ | |
6753 core.String homepageId; | 6883 core.String homepageId; |
6754 /** | 6884 |
6755 * Identifies what kind of resource this is. Value: the fixed string | 6885 /// Identifies what kind of resource this is. Value: the fixed string |
6756 * "androidenterprise#storeLayout". | 6886 /// "androidenterprise#storeLayout". |
6757 */ | |
6758 core.String kind; | 6887 core.String kind; |
6759 /** | 6888 |
6760 * The store layout type. By default, this value is set to "basic" if the | 6889 /// The store layout type. By default, this value is set to "basic" if the |
6761 * homepageId field is not set, and to "custom" otherwise. If set to "basic", | 6890 /// homepageId field is not set, and to "custom" otherwise. If set to |
6762 * the layout will consist of all approved apps that have been whitelisted for | 6891 /// "basic", the layout will consist of all approved apps that have been |
6763 * the user. | 6892 /// whitelisted for the user. |
6764 */ | |
6765 core.String storeLayoutType; | 6893 core.String storeLayoutType; |
6766 | 6894 |
6767 StoreLayout(); | 6895 StoreLayout(); |
6768 | 6896 |
6769 StoreLayout.fromJson(core.Map _json) { | 6897 StoreLayout.fromJson(core.Map _json) { |
6770 if (_json.containsKey("homepageId")) { | 6898 if (_json.containsKey("homepageId")) { |
6771 homepageId = _json["homepageId"]; | 6899 homepageId = _json["homepageId"]; |
6772 } | 6900 } |
6773 if (_json.containsKey("kind")) { | 6901 if (_json.containsKey("kind")) { |
6774 kind = _json["kind"]; | 6902 kind = _json["kind"]; |
6775 } | 6903 } |
6776 if (_json.containsKey("storeLayoutType")) { | 6904 if (_json.containsKey("storeLayoutType")) { |
6777 storeLayoutType = _json["storeLayoutType"]; | 6905 storeLayoutType = _json["storeLayoutType"]; |
6778 } | 6906 } |
6779 } | 6907 } |
6780 | 6908 |
6781 core.Map<core.String, core.Object> toJson() { | 6909 core.Map<core.String, core.Object> toJson() { |
6782 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6910 final core.Map<core.String, core.Object> _json = |
| 6911 new core.Map<core.String, core.Object>(); |
6783 if (homepageId != null) { | 6912 if (homepageId != null) { |
6784 _json["homepageId"] = homepageId; | 6913 _json["homepageId"] = homepageId; |
6785 } | 6914 } |
6786 if (kind != null) { | 6915 if (kind != null) { |
6787 _json["kind"] = kind; | 6916 _json["kind"] = kind; |
6788 } | 6917 } |
6789 if (storeLayoutType != null) { | 6918 if (storeLayoutType != null) { |
6790 _json["storeLayoutType"] = storeLayoutType; | 6919 _json["storeLayoutType"] = storeLayoutType; |
6791 } | 6920 } |
6792 return _json; | 6921 return _json; |
6793 } | 6922 } |
6794 } | 6923 } |
6795 | 6924 |
6796 /** The store page resources for the enterprise. */ | 6925 /// The store page resources for the enterprise. |
6797 class StoreLayoutClustersListResponse { | 6926 class StoreLayoutClustersListResponse { |
6798 /** A store cluster of an enterprise. */ | 6927 /// A store cluster of an enterprise. |
6799 core.List<StoreCluster> cluster; | 6928 core.List<StoreCluster> cluster; |
6800 /** | 6929 |
6801 * Identifies what kind of resource this is. Value: the fixed string | 6930 /// Identifies what kind of resource this is. Value: the fixed string |
6802 * "androidenterprise#storeLayoutClustersListResponse". | 6931 /// "androidenterprise#storeLayoutClustersListResponse". |
6803 */ | |
6804 core.String kind; | 6932 core.String kind; |
6805 | 6933 |
6806 StoreLayoutClustersListResponse(); | 6934 StoreLayoutClustersListResponse(); |
6807 | 6935 |
6808 StoreLayoutClustersListResponse.fromJson(core.Map _json) { | 6936 StoreLayoutClustersListResponse.fromJson(core.Map _json) { |
6809 if (_json.containsKey("cluster")) { | 6937 if (_json.containsKey("cluster")) { |
6810 cluster = _json["cluster"].map((value) => new StoreCluster.fromJson(value)
).toList(); | 6938 cluster = _json["cluster"] |
| 6939 .map((value) => new StoreCluster.fromJson(value)) |
| 6940 .toList(); |
6811 } | 6941 } |
6812 if (_json.containsKey("kind")) { | 6942 if (_json.containsKey("kind")) { |
6813 kind = _json["kind"]; | 6943 kind = _json["kind"]; |
6814 } | 6944 } |
6815 } | 6945 } |
6816 | 6946 |
6817 core.Map<core.String, core.Object> toJson() { | 6947 core.Map<core.String, core.Object> toJson() { |
6818 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6948 final core.Map<core.String, core.Object> _json = |
| 6949 new core.Map<core.String, core.Object>(); |
6819 if (cluster != null) { | 6950 if (cluster != null) { |
6820 _json["cluster"] = cluster.map((value) => (value).toJson()).toList(); | 6951 _json["cluster"] = cluster.map((value) => (value).toJson()).toList(); |
6821 } | 6952 } |
6822 if (kind != null) { | 6953 if (kind != null) { |
6823 _json["kind"] = kind; | 6954 _json["kind"] = kind; |
6824 } | 6955 } |
6825 return _json; | 6956 return _json; |
6826 } | 6957 } |
6827 } | 6958 } |
6828 | 6959 |
6829 /** The store page resources for the enterprise. */ | 6960 /// The store page resources for the enterprise. |
6830 class StoreLayoutPagesListResponse { | 6961 class StoreLayoutPagesListResponse { |
6831 /** | 6962 /// Identifies what kind of resource this is. Value: the fixed string |
6832 * Identifies what kind of resource this is. Value: the fixed string | 6963 /// "androidenterprise#storeLayoutPagesListResponse". |
6833 * "androidenterprise#storeLayoutPagesListResponse". | |
6834 */ | |
6835 core.String kind; | 6964 core.String kind; |
6836 /** A store page of an enterprise. */ | 6965 |
| 6966 /// A store page of an enterprise. |
6837 core.List<StorePage> page; | 6967 core.List<StorePage> page; |
6838 | 6968 |
6839 StoreLayoutPagesListResponse(); | 6969 StoreLayoutPagesListResponse(); |
6840 | 6970 |
6841 StoreLayoutPagesListResponse.fromJson(core.Map _json) { | 6971 StoreLayoutPagesListResponse.fromJson(core.Map _json) { |
6842 if (_json.containsKey("kind")) { | 6972 if (_json.containsKey("kind")) { |
6843 kind = _json["kind"]; | 6973 kind = _json["kind"]; |
6844 } | 6974 } |
6845 if (_json.containsKey("page")) { | 6975 if (_json.containsKey("page")) { |
6846 page = _json["page"].map((value) => new StorePage.fromJson(value)).toList(
); | 6976 page = |
| 6977 _json["page"].map((value) => new StorePage.fromJson(value)).toList(); |
6847 } | 6978 } |
6848 } | 6979 } |
6849 | 6980 |
6850 core.Map<core.String, core.Object> toJson() { | 6981 core.Map<core.String, core.Object> toJson() { |
6851 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6982 final core.Map<core.String, core.Object> _json = |
| 6983 new core.Map<core.String, core.Object>(); |
6852 if (kind != null) { | 6984 if (kind != null) { |
6853 _json["kind"] = kind; | 6985 _json["kind"] = kind; |
6854 } | 6986 } |
6855 if (page != null) { | 6987 if (page != null) { |
6856 _json["page"] = page.map((value) => (value).toJson()).toList(); | 6988 _json["page"] = page.map((value) => (value).toJson()).toList(); |
6857 } | 6989 } |
6858 return _json; | 6990 return _json; |
6859 } | 6991 } |
6860 } | 6992 } |
6861 | 6993 |
6862 /** | 6994 /// Definition of a managed Google Play store page, made of a localized name |
6863 * Definition of a managed Google Play store page, made of a localized name and | 6995 /// and links to other pages. A page also contains clusters defined as a |
6864 * links to other pages. A page also contains clusters defined as a | 6996 /// subcollection. |
6865 * subcollection. | |
6866 */ | |
6867 class StorePage { | 6997 class StorePage { |
6868 /** | 6998 /// Unique ID of this page. Assigned by the server. Immutable once assigned. |
6869 * Unique ID of this page. Assigned by the server. Immutable once assigned. | |
6870 */ | |
6871 core.String id; | 6999 core.String id; |
6872 /** | 7000 |
6873 * Identifies what kind of resource this is. Value: the fixed string | 7001 /// Identifies what kind of resource this is. Value: the fixed string |
6874 * "androidenterprise#storePage". | 7002 /// "androidenterprise#storePage". |
6875 */ | |
6876 core.String kind; | 7003 core.String kind; |
6877 /** | 7004 |
6878 * Ordered list of pages a user should be able to reach from this page. The | 7005 /// Ordered list of pages a user should be able to reach from this page. The |
6879 * pages must exist, must not be this page, and once a link is created the | 7006 /// pages must exist, must not be this page, and once a link is created the |
6880 * page linked to cannot be deleted until all links to it are removed. It is | 7007 /// page linked to cannot be deleted until all links to it are removed. It is |
6881 * recommended that the basic pages are created first, before adding the links | 7008 /// recommended that the basic pages are created first, before adding the |
6882 * between pages. | 7009 /// links between pages. |
6883 * | 7010 /// |
6884 * No attempt is made to verify that all pages are reachable from the | 7011 /// No attempt is made to verify that all pages are reachable from the |
6885 * homepage. | 7012 /// homepage. |
6886 */ | |
6887 core.List<core.String> link; | 7013 core.List<core.String> link; |
6888 /** | 7014 |
6889 * Ordered list of localized strings giving the name of this page. The text | 7015 /// Ordered list of localized strings giving the name of this page. The text |
6890 * displayed is the one that best matches the user locale, or the first entry | 7016 /// displayed is the one that best matches the user locale, or the first |
6891 * if there is no good match. There needs to be at least one entry. | 7017 /// entry if there is no good match. There needs to be at least one entry. |
6892 */ | |
6893 core.List<LocalizedText> name; | 7018 core.List<LocalizedText> name; |
6894 | 7019 |
6895 StorePage(); | 7020 StorePage(); |
6896 | 7021 |
6897 StorePage.fromJson(core.Map _json) { | 7022 StorePage.fromJson(core.Map _json) { |
6898 if (_json.containsKey("id")) { | 7023 if (_json.containsKey("id")) { |
6899 id = _json["id"]; | 7024 id = _json["id"]; |
6900 } | 7025 } |
6901 if (_json.containsKey("kind")) { | 7026 if (_json.containsKey("kind")) { |
6902 kind = _json["kind"]; | 7027 kind = _json["kind"]; |
6903 } | 7028 } |
6904 if (_json.containsKey("link")) { | 7029 if (_json.containsKey("link")) { |
6905 link = _json["link"]; | 7030 link = _json["link"]; |
6906 } | 7031 } |
6907 if (_json.containsKey("name")) { | 7032 if (_json.containsKey("name")) { |
6908 name = _json["name"].map((value) => new LocalizedText.fromJson(value)).toL
ist(); | 7033 name = _json["name"] |
| 7034 .map((value) => new LocalizedText.fromJson(value)) |
| 7035 .toList(); |
6909 } | 7036 } |
6910 } | 7037 } |
6911 | 7038 |
6912 core.Map<core.String, core.Object> toJson() { | 7039 core.Map<core.String, core.Object> toJson() { |
6913 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7040 final core.Map<core.String, core.Object> _json = |
| 7041 new core.Map<core.String, core.Object>(); |
6914 if (id != null) { | 7042 if (id != null) { |
6915 _json["id"] = id; | 7043 _json["id"] = id; |
6916 } | 7044 } |
6917 if (kind != null) { | 7045 if (kind != null) { |
6918 _json["kind"] = kind; | 7046 _json["kind"] = kind; |
6919 } | 7047 } |
6920 if (link != null) { | 7048 if (link != null) { |
6921 _json["link"] = link; | 7049 _json["link"] = link; |
6922 } | 7050 } |
6923 if (name != null) { | 7051 if (name != null) { |
(...skipping 12 matching lines...) Expand all Loading... |
6936 TokenPagination.fromJson(core.Map _json) { | 7064 TokenPagination.fromJson(core.Map _json) { |
6937 if (_json.containsKey("nextPageToken")) { | 7065 if (_json.containsKey("nextPageToken")) { |
6938 nextPageToken = _json["nextPageToken"]; | 7066 nextPageToken = _json["nextPageToken"]; |
6939 } | 7067 } |
6940 if (_json.containsKey("previousPageToken")) { | 7068 if (_json.containsKey("previousPageToken")) { |
6941 previousPageToken = _json["previousPageToken"]; | 7069 previousPageToken = _json["previousPageToken"]; |
6942 } | 7070 } |
6943 } | 7071 } |
6944 | 7072 |
6945 core.Map<core.String, core.Object> toJson() { | 7073 core.Map<core.String, core.Object> toJson() { |
6946 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7074 final core.Map<core.String, core.Object> _json = |
| 7075 new core.Map<core.String, core.Object>(); |
6947 if (nextPageToken != null) { | 7076 if (nextPageToken != null) { |
6948 _json["nextPageToken"] = nextPageToken; | 7077 _json["nextPageToken"] = nextPageToken; |
6949 } | 7078 } |
6950 if (previousPageToken != null) { | 7079 if (previousPageToken != null) { |
6951 _json["previousPageToken"] = previousPageToken; | 7080 _json["previousPageToken"] = previousPageToken; |
6952 } | 7081 } |
6953 return _json; | 7082 return _json; |
6954 } | 7083 } |
6955 } | 7084 } |
6956 | 7085 |
6957 /** | 7086 /// A Users resource represents an account associated with an enterprise. The |
6958 * A Users resource represents an account associated with an enterprise. The | 7087 /// account may be specific to a device or to an individual user (who can then |
6959 * account may be specific to a device or to an individual user (who can then | 7088 /// use the account across multiple devices). The account may provide access to |
6960 * use the account across multiple devices). The account may provide access to | 7089 /// managed Google Play only, or to other Google services, depending on the |
6961 * managed Google Play only, or to other Google services, depending on the | 7090 /// identity model: |
6962 * identity model: | 7091 /// - The Google managed domain identity model requires synchronization to |
6963 * - The Google managed domain identity model requires synchronization to Google | 7092 /// Google account sources (via primaryEmail). |
6964 * account sources (via primaryEmail). | 7093 /// - The managed Google Play Accounts identity model provides a dynamic means |
6965 * - The managed Google Play Accounts identity model provides a dynamic means | 7094 /// for enterprises to create user or device accounts as needed. These accounts |
6966 * for enterprises to create user or device accounts as needed. These accounts | 7095 /// provide access to managed Google Play. |
6967 * provide access to managed Google Play. | |
6968 */ | |
6969 class User { | 7096 class User { |
6970 /** | 7097 /// A unique identifier you create for this user, such as "user342" or |
6971 * A unique identifier you create for this user, such as "user342" or | 7098 /// "asset#44418". Do not use personally identifiable information (PII) for |
6972 * "asset#44418". Do not use personally identifiable information (PII) for | 7099 /// this property. Must always be set for EMM-managed users. Not set for |
6973 * this property. Must always be set for EMM-managed users. Not set for | 7100 /// Google-managed users. |
6974 * Google-managed users. | |
6975 */ | |
6976 core.String accountIdentifier; | 7101 core.String accountIdentifier; |
6977 /** | 7102 |
6978 * The type of account that this user represents. A userAccount can be | 7103 /// The type of account that this user represents. A userAccount can be |
6979 * installed on multiple devices, but a deviceAccount is specific to a single | 7104 /// installed on multiple devices, but a deviceAccount is specific to a |
6980 * device. An EMM-managed user (emmManaged) can be either type (userAccount, | 7105 /// single device. An EMM-managed user (emmManaged) can be either type |
6981 * deviceAccount), but a Google-managed user (googleManaged) is always a | 7106 /// (userAccount, deviceAccount), but a Google-managed user (googleManaged) |
6982 * userAccount. | 7107 /// is always a userAccount. |
6983 */ | |
6984 core.String accountType; | 7108 core.String accountType; |
6985 /** | 7109 |
6986 * The name that will appear in user interfaces. Setting this property is | 7110 /// The name that will appear in user interfaces. Setting this property is |
6987 * optional when creating EMM-managed users. If you do set this property, use | 7111 /// optional when creating EMM-managed users. If you do set this property, |
6988 * something generic about the organization (such as "Example, Inc.") or your | 7112 /// use something generic about the organization (such as "Example, Inc.") or |
6989 * name (as EMM). Not used for Google-managed user accounts. | 7113 /// your name (as EMM). Not used for Google-managed user accounts. |
6990 */ | |
6991 core.String displayName; | 7114 core.String displayName; |
6992 /** The unique ID for the user. */ | 7115 |
| 7116 /// The unique ID for the user. |
6993 core.String id; | 7117 core.String id; |
6994 /** | 7118 |
6995 * Identifies what kind of resource this is. Value: the fixed string | 7119 /// Identifies what kind of resource this is. Value: the fixed string |
6996 * "androidenterprise#user". | 7120 /// "androidenterprise#user". |
6997 */ | |
6998 core.String kind; | 7121 core.String kind; |
6999 /** | 7122 |
7000 * The entity that manages the user. With googleManaged users, the source of | 7123 /// The entity that manages the user. With googleManaged users, the source of |
7001 * truth is Google so EMMs have to make sure a Google Account exists for the | 7124 /// truth is Google so EMMs have to make sure a Google Account exists for the |
7002 * user. With emmManaged users, the EMM is in charge. | 7125 /// user. With emmManaged users, the EMM is in charge. |
7003 */ | |
7004 core.String managementType; | 7126 core.String managementType; |
7005 /** | 7127 |
7006 * The user's primary email address, for example, "jsmith@example.com". Will | 7128 /// The user's primary email address, for example, "jsmith@example.com". Will |
7007 * always be set for Google managed users and not set for EMM managed users. | 7129 /// always be set for Google managed users and not set for EMM managed users. |
7008 */ | |
7009 core.String primaryEmail; | 7130 core.String primaryEmail; |
7010 | 7131 |
7011 User(); | 7132 User(); |
7012 | 7133 |
7013 User.fromJson(core.Map _json) { | 7134 User.fromJson(core.Map _json) { |
7014 if (_json.containsKey("accountIdentifier")) { | 7135 if (_json.containsKey("accountIdentifier")) { |
7015 accountIdentifier = _json["accountIdentifier"]; | 7136 accountIdentifier = _json["accountIdentifier"]; |
7016 } | 7137 } |
7017 if (_json.containsKey("accountType")) { | 7138 if (_json.containsKey("accountType")) { |
7018 accountType = _json["accountType"]; | 7139 accountType = _json["accountType"]; |
7019 } | 7140 } |
7020 if (_json.containsKey("displayName")) { | 7141 if (_json.containsKey("displayName")) { |
7021 displayName = _json["displayName"]; | 7142 displayName = _json["displayName"]; |
7022 } | 7143 } |
7023 if (_json.containsKey("id")) { | 7144 if (_json.containsKey("id")) { |
7024 id = _json["id"]; | 7145 id = _json["id"]; |
7025 } | 7146 } |
7026 if (_json.containsKey("kind")) { | 7147 if (_json.containsKey("kind")) { |
7027 kind = _json["kind"]; | 7148 kind = _json["kind"]; |
7028 } | 7149 } |
7029 if (_json.containsKey("managementType")) { | 7150 if (_json.containsKey("managementType")) { |
7030 managementType = _json["managementType"]; | 7151 managementType = _json["managementType"]; |
7031 } | 7152 } |
7032 if (_json.containsKey("primaryEmail")) { | 7153 if (_json.containsKey("primaryEmail")) { |
7033 primaryEmail = _json["primaryEmail"]; | 7154 primaryEmail = _json["primaryEmail"]; |
7034 } | 7155 } |
7035 } | 7156 } |
7036 | 7157 |
7037 core.Map<core.String, core.Object> toJson() { | 7158 core.Map<core.String, core.Object> toJson() { |
7038 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7159 final core.Map<core.String, core.Object> _json = |
| 7160 new core.Map<core.String, core.Object>(); |
7039 if (accountIdentifier != null) { | 7161 if (accountIdentifier != null) { |
7040 _json["accountIdentifier"] = accountIdentifier; | 7162 _json["accountIdentifier"] = accountIdentifier; |
7041 } | 7163 } |
7042 if (accountType != null) { | 7164 if (accountType != null) { |
7043 _json["accountType"] = accountType; | 7165 _json["accountType"] = accountType; |
7044 } | 7166 } |
7045 if (displayName != null) { | 7167 if (displayName != null) { |
7046 _json["displayName"] = displayName; | 7168 _json["displayName"] = displayName; |
7047 } | 7169 } |
7048 if (id != null) { | 7170 if (id != null) { |
7049 _json["id"] = id; | 7171 _json["id"] = id; |
7050 } | 7172 } |
7051 if (kind != null) { | 7173 if (kind != null) { |
7052 _json["kind"] = kind; | 7174 _json["kind"] = kind; |
7053 } | 7175 } |
7054 if (managementType != null) { | 7176 if (managementType != null) { |
7055 _json["managementType"] = managementType; | 7177 _json["managementType"] = managementType; |
7056 } | 7178 } |
7057 if (primaryEmail != null) { | 7179 if (primaryEmail != null) { |
7058 _json["primaryEmail"] = primaryEmail; | 7180 _json["primaryEmail"] = primaryEmail; |
7059 } | 7181 } |
7060 return _json; | 7182 return _json; |
7061 } | 7183 } |
7062 } | 7184 } |
7063 | 7185 |
7064 /** | 7186 /// A UserToken is used by a user when setting up a managed device or profile |
7065 * A UserToken is used by a user when setting up a managed device or profile | 7187 /// with their managed Google Play account on a device. When the user enters |
7066 * with their managed Google Play account on a device. When the user enters | 7188 /// their email address and token (activation code) the appropriate EMM app can |
7067 * their email address and token (activation code) the appropriate EMM app can | 7189 /// be automatically downloaded. |
7068 * be automatically downloaded. | |
7069 */ | |
7070 class UserToken { | 7190 class UserToken { |
7071 /** | 7191 /// Identifies what kind of resource this is. Value: the fixed string |
7072 * Identifies what kind of resource this is. Value: the fixed string | 7192 /// "androidenterprise#userToken". |
7073 * "androidenterprise#userToken". | |
7074 */ | |
7075 core.String kind; | 7193 core.String kind; |
7076 /** | 7194 |
7077 * The token (activation code) to be entered by the user. This consists of a | 7195 /// The token (activation code) to be entered by the user. This consists of a |
7078 * sequence of decimal digits. Note that the leading digit may be 0. | 7196 /// sequence of decimal digits. Note that the leading digit may be 0. |
7079 */ | |
7080 core.String token; | 7197 core.String token; |
7081 /** The unique ID for the user. */ | 7198 |
| 7199 /// The unique ID for the user. |
7082 core.String userId; | 7200 core.String userId; |
7083 | 7201 |
7084 UserToken(); | 7202 UserToken(); |
7085 | 7203 |
7086 UserToken.fromJson(core.Map _json) { | 7204 UserToken.fromJson(core.Map _json) { |
7087 if (_json.containsKey("kind")) { | 7205 if (_json.containsKey("kind")) { |
7088 kind = _json["kind"]; | 7206 kind = _json["kind"]; |
7089 } | 7207 } |
7090 if (_json.containsKey("token")) { | 7208 if (_json.containsKey("token")) { |
7091 token = _json["token"]; | 7209 token = _json["token"]; |
7092 } | 7210 } |
7093 if (_json.containsKey("userId")) { | 7211 if (_json.containsKey("userId")) { |
7094 userId = _json["userId"]; | 7212 userId = _json["userId"]; |
7095 } | 7213 } |
7096 } | 7214 } |
7097 | 7215 |
7098 core.Map<core.String, core.Object> toJson() { | 7216 core.Map<core.String, core.Object> toJson() { |
7099 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7217 final core.Map<core.String, core.Object> _json = |
| 7218 new core.Map<core.String, core.Object>(); |
7100 if (kind != null) { | 7219 if (kind != null) { |
7101 _json["kind"] = kind; | 7220 _json["kind"] = kind; |
7102 } | 7221 } |
7103 if (token != null) { | 7222 if (token != null) { |
7104 _json["token"] = token; | 7223 _json["token"] = token; |
7105 } | 7224 } |
7106 if (userId != null) { | 7225 if (userId != null) { |
7107 _json["userId"] = userId; | 7226 _json["userId"] = userId; |
7108 } | 7227 } |
7109 return _json; | 7228 return _json; |
7110 } | 7229 } |
7111 } | 7230 } |
7112 | 7231 |
7113 /** The matching user resources. */ | 7232 /// The matching user resources. |
7114 class UsersListResponse { | 7233 class UsersListResponse { |
7115 /** | 7234 /// Identifies what kind of resource this is. Value: the fixed string |
7116 * Identifies what kind of resource this is. Value: the fixed string | 7235 /// "androidenterprise#usersListResponse". |
7117 * "androidenterprise#usersListResponse". | |
7118 */ | |
7119 core.String kind; | 7236 core.String kind; |
7120 /** A user of an enterprise. */ | 7237 |
| 7238 /// A user of an enterprise. |
7121 core.List<User> user; | 7239 core.List<User> user; |
7122 | 7240 |
7123 UsersListResponse(); | 7241 UsersListResponse(); |
7124 | 7242 |
7125 UsersListResponse.fromJson(core.Map _json) { | 7243 UsersListResponse.fromJson(core.Map _json) { |
7126 if (_json.containsKey("kind")) { | 7244 if (_json.containsKey("kind")) { |
7127 kind = _json["kind"]; | 7245 kind = _json["kind"]; |
7128 } | 7246 } |
7129 if (_json.containsKey("user")) { | 7247 if (_json.containsKey("user")) { |
7130 user = _json["user"].map((value) => new User.fromJson(value)).toList(); | 7248 user = _json["user"].map((value) => new User.fromJson(value)).toList(); |
7131 } | 7249 } |
7132 } | 7250 } |
7133 | 7251 |
7134 core.Map<core.String, core.Object> toJson() { | 7252 core.Map<core.String, core.Object> toJson() { |
7135 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7253 final core.Map<core.String, core.Object> _json = |
| 7254 new core.Map<core.String, core.Object>(); |
7136 if (kind != null) { | 7255 if (kind != null) { |
7137 _json["kind"] = kind; | 7256 _json["kind"] = kind; |
7138 } | 7257 } |
7139 if (user != null) { | 7258 if (user != null) { |
7140 _json["user"] = user.map((value) => (value).toJson()).toList(); | 7259 _json["user"] = user.map((value) => (value).toJson()).toList(); |
7141 } | 7260 } |
7142 return _json; | 7261 return _json; |
7143 } | 7262 } |
7144 } | 7263 } |
OLD | NEW |