forked from microsoftgraph/msgraph-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplication.java
More file actions
419 lines (364 loc) · 17 KB
/
Copy pathApplication.java
File metadata and controls
419 lines (364 loc) · 17 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
// ------------------------------------------------------------------------------
// 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.extensions;
import com.microsoft.graph.serializer.ISerializer;
import com.microsoft.graph.serializer.IJsonBackedObject;
import com.microsoft.graph.serializer.AdditionalDataManager;
import java.util.Arrays;
import java.util.EnumSet;
import com.microsoft.graph.models.extensions.AddIn;
import com.microsoft.graph.models.extensions.ApiApplication;
import com.microsoft.graph.models.extensions.AppRole;
import com.microsoft.graph.models.extensions.InformationalUrl;
import com.microsoft.graph.models.extensions.KeyCredential;
import com.microsoft.graph.models.extensions.OptionalClaims;
import com.microsoft.graph.models.extensions.ParentalControlSettings;
import com.microsoft.graph.models.extensions.PasswordCredential;
import com.microsoft.graph.models.extensions.PublicClientApplication;
import com.microsoft.graph.models.extensions.RequiredResourceAccess;
import com.microsoft.graph.models.extensions.WebApplication;
import com.microsoft.graph.models.extensions.DirectoryObject;
import com.microsoft.graph.models.extensions.ExtensionProperty;
import com.microsoft.graph.models.extensions.HomeRealmDiscoveryPolicy;
import com.microsoft.graph.models.extensions.TokenIssuancePolicy;
import com.microsoft.graph.models.extensions.TokenLifetimePolicy;
import com.microsoft.graph.requests.extensions.ExtensionPropertyCollectionResponse;
import com.microsoft.graph.requests.extensions.ExtensionPropertyCollectionPage;
import com.microsoft.graph.requests.extensions.HomeRealmDiscoveryPolicyCollectionResponse;
import com.microsoft.graph.requests.extensions.HomeRealmDiscoveryPolicyCollectionPage;
import com.microsoft.graph.requests.extensions.DirectoryObjectCollectionResponse;
import com.microsoft.graph.requests.extensions.DirectoryObjectCollectionPage;
import com.microsoft.graph.requests.extensions.TokenIssuancePolicyCollectionResponse;
import com.microsoft.graph.requests.extensions.TokenIssuancePolicyCollectionPage;
import com.microsoft.graph.requests.extensions.TokenLifetimePolicyCollectionResponse;
import com.microsoft.graph.requests.extensions.TokenLifetimePolicyCollectionPage;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The class for the Application.
*/
public class Application extends DirectoryObject implements IJsonBackedObject {
/**
* The Add Ins.
* Defines custom behavior that a consuming service can use to call an app in specific contexts. For example, applications that can render file streams may set the addIns property for its 'FileHandler' functionality. This will let services like Microsoft 365 call the application in the context of a document the user is working on.
*/
@SerializedName("addIns")
@Expose
public java.util.List<AddIn> addIns;
/**
* The Api.
* Specifies settings for an application that implements a web API.
*/
@SerializedName("api")
@Expose
public ApiApplication api;
/**
* The App Id.
* The unique identifier for the application that is assigned to an application by Azure AD. Not nullable. Read-only.
*/
@SerializedName("appId")
@Expose
public String appId;
/**
* The Application Template Id.
*
*/
@SerializedName("applicationTemplateId")
@Expose
public String applicationTemplateId;
/**
* The App Roles.
* The collection of roles the application declares. With app role assignments, these roles can be assigned to users, groups, or other applications' service principals. Not nullable.
*/
@SerializedName("appRoles")
@Expose
public java.util.List<AppRole> appRoles;
/**
* The Created Date Time.
* The date and time the application was registered. Read-only.
*/
@SerializedName("createdDateTime")
@Expose
public java.util.Calendar createdDateTime;
/**
* The Description.
*
*/
@SerializedName("description")
@Expose
public String description;
/**
* The Display Name.
* The display name for the application.
*/
@SerializedName("displayName")
@Expose
public String displayName;
/**
* The Group Membership Claims.
* Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. To set this attribute, use one of the following valid string values:NoneSecurityGroup: For security groups and Azure AD rolesAll: This will get all of the security groups, distribution groups, and Azure AD directory roles that the signed-in user is a member of
*/
@SerializedName("groupMembershipClaims")
@Expose
public String groupMembershipClaims;
/**
* The Identifier Uris.
* The URIs that identify the application within its Azure AD tenant, or within a verified custom domain if the application is multi-tenant. For more information see Application Objects and Service Principal Objects. The any operator is required for filter expressions on multi-valued properties. Not nullable.
*/
@SerializedName("identifierUris")
@Expose
public java.util.List<String> identifierUris;
/**
* The Info.
* Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more info, see How to: Add Terms of service and privacy statement for registered Azure AD apps.
*/
@SerializedName("info")
@Expose
public InformationalUrl info;
/**
* The Is Device Only Auth Supported.
*
*/
@SerializedName("isDeviceOnlyAuthSupported")
@Expose
public Boolean isDeviceOnlyAuthSupported;
/**
* The Is Fallback Public Client.
* Specifies the fallback application type as public client, such as an installed application running on a mobile device. The default value is false which means the fallback application type is confidential client such as web app. There are certain scenarios where Azure AD cannot determine the client application type (e.g. ROPC flow where it is configured without specifying a redirect URI). In those cases Azure AD will interpret the application type based on the value of this property.
*/
@SerializedName("isFallbackPublicClient")
@Expose
public Boolean isFallbackPublicClient;
/**
* The Key Credentials.
* The collection of key credentials associated with the application Not nullable.
*/
@SerializedName("keyCredentials")
@Expose
public java.util.List<KeyCredential> keyCredentials;
/**
* The Notes.
*
*/
@SerializedName("notes")
@Expose
public String notes;
/**
* The Oauth2Require Post Response.
*
*/
@SerializedName("oauth2RequirePostResponse")
@Expose
public Boolean oauth2RequirePostResponse;
/**
* The Optional Claims.
* Application developers can configure optional claims in their Azure AD apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. See provide optional claims to your Azure AD app for more information.
*/
@SerializedName("optionalClaims")
@Expose
public OptionalClaims optionalClaims;
/**
* The Parental Control Settings.
* Specifies parental control settings for an application.
*/
@SerializedName("parentalControlSettings")
@Expose
public ParentalControlSettings parentalControlSettings;
/**
* The Password Credentials.
* The collection of password credentials associated with the application. Not nullable.
*/
@SerializedName("passwordCredentials")
@Expose
public java.util.List<PasswordCredential> passwordCredentials;
/**
* The Public Client.
* Specifies settings for installed clients such as desktop or mobile devices.
*/
@SerializedName("publicClient")
@Expose
public PublicClientApplication publicClient;
/**
* The Publisher Domain.
* The verified publisher domain for the application. Read-only.
*/
@SerializedName("publisherDomain")
@Expose
public String publisherDomain;
/**
* The Required Resource Access.
* Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. This pre-configuration of required resource access drives the consent experience. Not nullable.
*/
@SerializedName("requiredResourceAccess")
@Expose
public java.util.List<RequiredResourceAccess> requiredResourceAccess;
/**
* The Sign In Audience.
* Specifies what Microsoft accounts are supported for the current application. Supported values are:AzureADMyOrg: Users with a Microsoft work or school account in my organization’s Azure AD tenant (i.e. single tenant)AzureADMultipleOrgs: Users with a Microsoft work or school account in any organization’s Azure AD tenant (i.e. multi-tenant) AzureADandPersonalMicrosoftAccount: Users with a personal Microsoft account, or a work or school account in any organization’s Azure AD tenant
*/
@SerializedName("signInAudience")
@Expose
public String signInAudience;
/**
* The Tags.
* Custom strings that can be used to categorize and identify the application. Not nullable.
*/
@SerializedName("tags")
@Expose
public java.util.List<String> tags;
/**
* The Token Encryption Key Id.
* Specifies the keyId of a public key from the keyCredentials collection. When configured, Azure AD encrypts all the tokens it emits by using the key this property points to. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user.
*/
@SerializedName("tokenEncryptionKeyId")
@Expose
public java.util.UUID tokenEncryptionKeyId;
/**
* The Web.
* Specifies settings for a web application.
*/
@SerializedName("web")
@Expose
public WebApplication web;
/**
* The Created On Behalf Of.
* Read-only.
*/
@SerializedName("createdOnBehalfOf")
@Expose
public DirectoryObject createdOnBehalfOf;
/**
* The Extension Properties.
* Read-only. Nullable.
*/
@SerializedName("extensionProperties")
@Expose
public ExtensionPropertyCollectionPage extensionProperties;
/**
* The Home Realm Discovery Policies.
*
*/
public HomeRealmDiscoveryPolicyCollectionPage homeRealmDiscoveryPolicies;
/**
* The Owners.
* Directory objects that are owners of the application. The owners are a set of non-admin users who are allowed to modify this object. Requires version 2013-11-08 or newer. Read-only. Nullable.
*/
public DirectoryObjectCollectionPage owners;
/**
* The Token Issuance Policies.
*
*/
public TokenIssuancePolicyCollectionPage tokenIssuancePolicies;
/**
* The Token Lifetime Policies.
*
*/
public TokenLifetimePolicyCollectionPage tokenLifetimePolicies;
/**
* 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("extensionProperties")) {
final ExtensionPropertyCollectionResponse response = new ExtensionPropertyCollectionResponse();
if (json.has("extensionProperties@odata.nextLink")) {
response.nextLink = json.get("extensionProperties@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("extensionProperties").toString(), JsonObject[].class);
final ExtensionProperty[] array = new ExtensionProperty[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), ExtensionProperty.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
extensionProperties = new ExtensionPropertyCollectionPage(response, null);
}
if (json.has("homeRealmDiscoveryPolicies")) {
final HomeRealmDiscoveryPolicyCollectionResponse response = new HomeRealmDiscoveryPolicyCollectionResponse();
if (json.has("homeRealmDiscoveryPolicies@odata.nextLink")) {
response.nextLink = json.get("homeRealmDiscoveryPolicies@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("homeRealmDiscoveryPolicies").toString(), JsonObject[].class);
final HomeRealmDiscoveryPolicy[] array = new HomeRealmDiscoveryPolicy[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), HomeRealmDiscoveryPolicy.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
homeRealmDiscoveryPolicies = new HomeRealmDiscoveryPolicyCollectionPage(response, null);
}
if (json.has("owners")) {
final DirectoryObjectCollectionResponse response = new DirectoryObjectCollectionResponse();
if (json.has("owners@odata.nextLink")) {
response.nextLink = json.get("owners@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("owners").toString(), JsonObject[].class);
final DirectoryObject[] array = new DirectoryObject[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), DirectoryObject.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
owners = new DirectoryObjectCollectionPage(response, null);
}
if (json.has("tokenIssuancePolicies")) {
final TokenIssuancePolicyCollectionResponse response = new TokenIssuancePolicyCollectionResponse();
if (json.has("tokenIssuancePolicies@odata.nextLink")) {
response.nextLink = json.get("tokenIssuancePolicies@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("tokenIssuancePolicies").toString(), JsonObject[].class);
final TokenIssuancePolicy[] array = new TokenIssuancePolicy[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), TokenIssuancePolicy.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
tokenIssuancePolicies = new TokenIssuancePolicyCollectionPage(response, null);
}
if (json.has("tokenLifetimePolicies")) {
final TokenLifetimePolicyCollectionResponse response = new TokenLifetimePolicyCollectionResponse();
if (json.has("tokenLifetimePolicies@odata.nextLink")) {
response.nextLink = json.get("tokenLifetimePolicies@odata.nextLink").getAsString();
}
final JsonObject[] sourceArray = serializer.deserializeObject(json.get("tokenLifetimePolicies").toString(), JsonObject[].class);
final TokenLifetimePolicy[] array = new TokenLifetimePolicy[sourceArray.length];
for (int i = 0; i < sourceArray.length; i++) {
array[i] = serializer.deserializeObject(sourceArray[i].toString(), TokenLifetimePolicy.class);
array[i].setRawObject(serializer, sourceArray[i]);
}
response.value = Arrays.asList(array);
tokenLifetimePolicies = new TokenLifetimePolicyCollectionPage(response, null);
}
}
}