forked from microsoftgraph/msgraph-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseDeviceAppManagement.java
More file actions
452 lines (393 loc) · 23.2 KB
/
Copy pathBaseDeviceAppManagement.java
File metadata and controls
452 lines (393 loc) · 23.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.models.generated;
import com.microsoft.graph.concurrency.*;
import com.microsoft.graph.core.*;
import com.microsoft.graph.http.*;
import com.microsoft.graph.options.*;
import com.microsoft.graph.serializer.*;
import java.util.Arrays;
import java.util.EnumSet;
import com.microsoft.graph.models.extensions.MobileApp;
import com.microsoft.graph.models.extensions.MobileAppCategory;
import com.microsoft.graph.models.extensions.ManagedDeviceMobileAppConfiguration;
import com.microsoft.graph.models.extensions.VppToken;
import com.microsoft.graph.models.extensions.ManagedAppPolicy;
import com.microsoft.graph.models.extensions.IosManagedAppProtection;
import com.microsoft.graph.models.extensions.AndroidManagedAppProtection;
import com.microsoft.graph.models.extensions.DefaultManagedAppProtection;
import com.microsoft.graph.models.extensions.TargetedManagedAppConfiguration;
import com.microsoft.graph.models.extensions.MdmWindowsInformationProtectionPolicy;
import com.microsoft.graph.models.extensions.WindowsInformationProtectionPolicy;
import com.microsoft.graph.models.extensions.ManagedAppRegistration;
import com.microsoft.graph.models.extensions.ManagedAppStatus;
import com.microsoft.graph.models.extensions.ManagedEBook;
import com.microsoft.graph.models.extensions.Entity;
import com.microsoft.graph.requests.generated.BaseMobileAppCollectionResponse;
import com.microsoft.graph.requests.extensions.MobileAppCollectionPage;
import com.microsoft.graph.requests.generated.BaseMobileAppCategoryCollectionResponse;
import com.microsoft.graph.requests.extensions.MobileAppCategoryCollectionPage;
import com.microsoft.graph.requests.generated.BaseManagedDeviceMobileAppConfigurationCollectionResponse;
import com.microsoft.graph.requests.extensions.ManagedDeviceMobileAppConfigurationCollectionPage;
import com.microsoft.graph.requests.generated.BaseVppTokenCollectionResponse;
import com.microsoft.graph.requests.extensions.VppTokenCollectionPage;
import com.microsoft.graph.requests.generated.BaseManagedAppPolicyCollectionResponse;
import com.microsoft.graph.requests.extensions.ManagedAppPolicyCollectionPage;
import com.microsoft.graph.requests.generated.BaseIosManagedAppProtectionCollectionResponse;
import com.microsoft.graph.requests.extensions.IosManagedAppProtectionCollectionPage;
import com.microsoft.graph.requests.generated.BaseAndroidManagedAppProtectionCollectionResponse;
import com.microsoft.graph.requests.extensions.AndroidManagedAppProtectionCollectionPage;
import com.microsoft.graph.requests.generated.BaseDefaultManagedAppProtectionCollectionResponse;
import com.microsoft.graph.requests.extensions.DefaultManagedAppProtectionCollectionPage;
import com.microsoft.graph.requests.generated.BaseTargetedManagedAppConfigurationCollectionResponse;
import com.microsoft.graph.requests.extensions.TargetedManagedAppConfigurationCollectionPage;
import com.microsoft.graph.requests.generated.BaseMdmWindowsInformationProtectionPolicyCollectionResponse;
import com.microsoft.graph.requests.extensions.MdmWindowsInformationProtectionPolicyCollectionPage;
import com.microsoft.graph.requests.generated.BaseWindowsInformationProtectionPolicyCollectionResponse;
import com.microsoft.graph.requests.extensions.WindowsInformationProtectionPolicyCollectionPage;
import com.microsoft.graph.requests.generated.BaseManagedAppRegistrationCollectionResponse;
import com.microsoft.graph.requests.extensions.ManagedAppRegistrationCollectionPage;
import com.microsoft.graph.requests.generated.BaseManagedAppStatusCollectionResponse;
import com.microsoft.graph.requests.extensions.ManagedAppStatusCollectionPage;
import com.microsoft.graph.requests.generated.BaseManagedEBookCollectionResponse;
import com.microsoft.graph.requests.extensions.ManagedEBookCollectionPage;
import com.google.gson.JsonObject;
import com.google.gson.JsonElement;
import com.google.gson.annotations.*;
import java.util.HashMap;
import java.util.Map;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The class for the Base Device App Management.
*/
public class BaseDeviceAppManagement extends Entity implements IJsonBackedObject {
/**
* The Microsoft Store For Business Last Successful Sync Date Time.
* The last time the apps from the Microsoft Store for Business were synced successfully for the account.
*/
@SerializedName("microsoftStoreForBusinessLastSuccessfulSyncDateTime")
@Expose
public java.util.Calendar microsoftStoreForBusinessLastSuccessfulSyncDateTime;
/**
* The Is Enabled For Microsoft Store For Business.
* Whether the account is enabled for syncing applications from the Microsoft Store for Business.
*/
@SerializedName("isEnabledForMicrosoftStoreForBusiness")
@Expose
public Boolean isEnabledForMicrosoftStoreForBusiness;
/**
* The Microsoft Store For Business Language.
* The locale information used to sync applications from the Microsoft Store for Business. Cultures that are specific to a country/region. The names of these cultures follow RFC 4646 (Windows Vista and later). The format is -<country/regioncode2>, where is a lowercase two-letter code derived from ISO 639-1 and <country/regioncode2> is an uppercase two-letter code derived from ISO 3166. For example, en-US for English (United States) is a specific culture.
*/
@SerializedName("microsoftStoreForBusinessLanguage")
@Expose
public String microsoftStoreForBusinessLanguage;
/**
* The Microsoft Store For Business Last Completed Application Sync Time.
* The last time an application sync from the Microsoft Store for Business was completed.
*/
@SerializedName("microsoftStoreForBusinessLastCompletedApplicationSyncTime")
@Expose
public java.util.Calendar microsoftStoreForBusinessLastCompletedApplicationSyncTime;
/**
* The Mobile Apps.
* The mobile apps.
*/
public MobileAppCollectionPage mobileApps;
/**
* The Mobile App Categories.
* The mobile app categories.
*/
public MobileAppCategoryCollectionPage mobileAppCategories;
/**
* The Mobile App Configurations.
* The Managed Device Mobile Application Configurations.
*/
public ManagedDeviceMobileAppConfigurationCollectionPage mobileAppConfigurations;
/**
* The Vpp Tokens.
* List of Vpp tokens for this organization.
*/
public VppTokenCollectionPage vppTokens;
/**
* The Managed App Policies.
* Managed app policies.
*/
public ManagedAppPolicyCollectionPage managedAppPolicies;
/**
* The Ios Managed App Protections.
*
*/
public IosManagedAppProtectionCollectionPage iosManagedAppProtections;
/**
* The Android Managed App Protections.
* Android managed app policies.
*/
public AndroidManagedAppProtectionCollectionPage androidManagedAppProtections;
/**
* The Default Managed App Protections.
* Default managed app policies.
*/
public DefaultManagedAppProtectionCollectionPage defaultManagedAppProtections;
/**
* The Targeted Managed App Configurations.
* Targeted managed app configurations.
*/
public TargetedManagedAppConfigurationCollectionPage targetedManagedAppConfigurations;
/**
* The Mdm Windows Information Protection Policies.
* Windows information protection for apps running on devices which are MDM enrolled.
*/
public MdmWindowsInformationProtectionPolicyCollectionPage mdmWindowsInformationProtectionPolicies;
/**
* The Windows Information Protection Policies.
* Windows information protection for apps running on devices which are not MDM enrolled.
*/
public WindowsInformationProtectionPolicyCollectionPage windowsInformationProtectionPolicies;
/**
* The Managed App Registrations.
* The managed app registrations.
*/
public ManagedAppRegistrationCollectionPage managedAppRegistrations;
/**
* The Managed App Statuses.
* The managed app statuses.
*/
public ManagedAppStatusCollectionPage managedAppStatuses;
/**
* The Managed EBooks.
* The Managed eBook.
*/
public ManagedEBookCollectionPage managedEBooks;
/**
* The raw representation of this class
*/
private JsonObject rawObject;
/**
* The serializer
*/
private ISerializer serializer;
/**
* Gets the raw representation of this class
*
* @return the raw representation of this class
*/
public JsonObject getRawObject() {
return rawObject;
}
/**
* Gets serializer
*
* @return the serializer
*/
protected ISerializer getSerializer() {
return serializer;
}
/**
* Sets the raw JSON object
*
* @param serializer the serializer
* @param json the JSON object to set this object to
*/
public void setRawObject(final ISerializer serializer, final JsonObject json) {
this.serializer = serializer;
rawObject = json;
if (json.has("mobileApps")) {
final BaseMobileAppCollectionResponse response = new BaseMobileAppCollectionResponse();
if (json.has("mobileApps@odata.nextLink")) {
response.nextLink = json.get("mobileApps@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("mobileApps").toString(), JsonObject[].class);
final MobileApp[] array = new MobileApp[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), MobileApp.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
mobileApps = new MobileAppCollectionPage(response, null);
}
if (json.has("mobileAppCategories")) {
final BaseMobileAppCategoryCollectionResponse response = new BaseMobileAppCategoryCollectionResponse();
if (json.has("mobileAppCategories@odata.nextLink")) {
response.nextLink = json.get("mobileAppCategories@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("mobileAppCategories").toString(), JsonObject[].class);
final MobileAppCategory[] array = new MobileAppCategory[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), MobileAppCategory.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
mobileAppCategories = new MobileAppCategoryCollectionPage(response, null);
}
if (json.has("mobileAppConfigurations")) {
final BaseManagedDeviceMobileAppConfigurationCollectionResponse response = new BaseManagedDeviceMobileAppConfigurationCollectionResponse();
if (json.has("mobileAppConfigurations@odata.nextLink")) {
response.nextLink = json.get("mobileAppConfigurations@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("mobileAppConfigurations").toString(), JsonObject[].class);
final ManagedDeviceMobileAppConfiguration[] array = new ManagedDeviceMobileAppConfiguration[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), ManagedDeviceMobileAppConfiguration.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
mobileAppConfigurations = new ManagedDeviceMobileAppConfigurationCollectionPage(response, null);
}
if (json.has("vppTokens")) {
final BaseVppTokenCollectionResponse response = new BaseVppTokenCollectionResponse();
if (json.has("vppTokens@odata.nextLink")) {
response.nextLink = json.get("vppTokens@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("vppTokens").toString(), JsonObject[].class);
final VppToken[] array = new VppToken[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), VppToken.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
vppTokens = new VppTokenCollectionPage(response, null);
}
if (json.has("managedAppPolicies")) {
final BaseManagedAppPolicyCollectionResponse response = new BaseManagedAppPolicyCollectionResponse();
if (json.has("managedAppPolicies@odata.nextLink")) {
response.nextLink = json.get("managedAppPolicies@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("managedAppPolicies").toString(), JsonObject[].class);
final ManagedAppPolicy[] array = new ManagedAppPolicy[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), ManagedAppPolicy.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
managedAppPolicies = new ManagedAppPolicyCollectionPage(response, null);
}
if (json.has("iosManagedAppProtections")) {
final BaseIosManagedAppProtectionCollectionResponse response = new BaseIosManagedAppProtectionCollectionResponse();
if (json.has("iosManagedAppProtections@odata.nextLink")) {
response.nextLink = json.get("iosManagedAppProtections@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("iosManagedAppProtections").toString(), JsonObject[].class);
final IosManagedAppProtection[] array = new IosManagedAppProtection[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), IosManagedAppProtection.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
iosManagedAppProtections = new IosManagedAppProtectionCollectionPage(response, null);
}
if (json.has("androidManagedAppProtections")) {
final BaseAndroidManagedAppProtectionCollectionResponse response = new BaseAndroidManagedAppProtectionCollectionResponse();
if (json.has("androidManagedAppProtections@odata.nextLink")) {
response.nextLink = json.get("androidManagedAppProtections@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("androidManagedAppProtections").toString(), JsonObject[].class);
final AndroidManagedAppProtection[] array = new AndroidManagedAppProtection[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), AndroidManagedAppProtection.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
androidManagedAppProtections = new AndroidManagedAppProtectionCollectionPage(response, null);
}
if (json.has("defaultManagedAppProtections")) {
final BaseDefaultManagedAppProtectionCollectionResponse response = new BaseDefaultManagedAppProtectionCollectionResponse();
if (json.has("defaultManagedAppProtections@odata.nextLink")) {
response.nextLink = json.get("defaultManagedAppProtections@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("defaultManagedAppProtections").toString(), JsonObject[].class);
final DefaultManagedAppProtection[] array = new DefaultManagedAppProtection[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), DefaultManagedAppProtection.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
defaultManagedAppProtections = new DefaultManagedAppProtectionCollectionPage(response, null);
}
if (json.has("targetedManagedAppConfigurations")) {
final BaseTargetedManagedAppConfigurationCollectionResponse response = new BaseTargetedManagedAppConfigurationCollectionResponse();
if (json.has("targetedManagedAppConfigurations@odata.nextLink")) {
response.nextLink = json.get("targetedManagedAppConfigurations@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("targetedManagedAppConfigurations").toString(), JsonObject[].class);
final TargetedManagedAppConfiguration[] array = new TargetedManagedAppConfiguration[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), TargetedManagedAppConfiguration.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
targetedManagedAppConfigurations = new TargetedManagedAppConfigurationCollectionPage(response, null);
}
if (json.has("mdmWindowsInformationProtectionPolicies")) {
final BaseMdmWindowsInformationProtectionPolicyCollectionResponse response = new BaseMdmWindowsInformationProtectionPolicyCollectionResponse();
if (json.has("mdmWindowsInformationProtectionPolicies@odata.nextLink")) {
response.nextLink = json.get("mdmWindowsInformationProtectionPolicies@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("mdmWindowsInformationProtectionPolicies").toString(), JsonObject[].class);
final MdmWindowsInformationProtectionPolicy[] array = new MdmWindowsInformationProtectionPolicy[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), MdmWindowsInformationProtectionPolicy.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
mdmWindowsInformationProtectionPolicies = new MdmWindowsInformationProtectionPolicyCollectionPage(response, null);
}
if (json.has("windowsInformationProtectionPolicies")) {
final BaseWindowsInformationProtectionPolicyCollectionResponse response = new BaseWindowsInformationProtectionPolicyCollectionResponse();
if (json.has("windowsInformationProtectionPolicies@odata.nextLink")) {
response.nextLink = json.get("windowsInformationProtectionPolicies@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("windowsInformationProtectionPolicies").toString(), JsonObject[].class);
final WindowsInformationProtectionPolicy[] array = new WindowsInformationProtectionPolicy[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), WindowsInformationProtectionPolicy.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
windowsInformationProtectionPolicies = new WindowsInformationProtectionPolicyCollectionPage(response, null);
}
if (json.has("managedAppRegistrations")) {
final BaseManagedAppRegistrationCollectionResponse response = new BaseManagedAppRegistrationCollectionResponse();
if (json.has("managedAppRegistrations@odata.nextLink")) {
response.nextLink = json.get("managedAppRegistrations@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("managedAppRegistrations").toString(), JsonObject[].class);
final ManagedAppRegistration[] array = new ManagedAppRegistration[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), ManagedAppRegistration.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
managedAppRegistrations = new ManagedAppRegistrationCollectionPage(response, null);
}
if (json.has("managedAppStatuses")) {
final BaseManagedAppStatusCollectionResponse response = new BaseManagedAppStatusCollectionResponse();
if (json.has("managedAppStatuses@odata.nextLink")) {
response.nextLink = json.get("managedAppStatuses@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("managedAppStatuses").toString(), JsonObject[].class);
final ManagedAppStatus[] array = new ManagedAppStatus[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), ManagedAppStatus.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
managedAppStatuses = new ManagedAppStatusCollectionPage(response, null);
}
if (json.has("managedEBooks")) {
final BaseManagedEBookCollectionResponse response = new BaseManagedEBookCollectionResponse();
if (json.has("managedEBooks@odata.nextLink")) {
response.nextLink = json.get("managedEBooks@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("managedEBooks").toString(), JsonObject[].class);
final ManagedEBook[] array = new ManagedEBook[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), ManagedEBook.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
managedEBooks = new ManagedEBookCollectionPage(response, null);
}
}
}