in sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/models/MicrosoftGraphGroupInner.java [2057:2270]
public static MicrosoftGraphGroupInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
MicrosoftGraphGroupInner deserializedMicrosoftGraphGroupInner = new MicrosoftGraphGroupInner();
Map<String, Object> additionalProperties = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("id".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.withId(reader.getString());
} else if ("deletedDateTime".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.withDeletedDateTime(reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())));
} else if ("assignedLabels".equals(fieldName)) {
List<MicrosoftGraphAssignedLabel> assignedLabels
= reader.readArray(reader1 -> MicrosoftGraphAssignedLabel.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.assignedLabels = assignedLabels;
} else if ("assignedLicenses".equals(fieldName)) {
List<MicrosoftGraphAssignedLicense> assignedLicenses
= reader.readArray(reader1 -> MicrosoftGraphAssignedLicense.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.assignedLicenses = assignedLicenses;
} else if ("classification".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.classification = reader.getString();
} else if ("createdDateTime".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.createdDateTime = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("description".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.description = reader.getString();
} else if ("displayName".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.displayName = reader.getString();
} else if ("expirationDateTime".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.expirationDateTime = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("groupTypes".equals(fieldName)) {
List<String> groupTypes = reader.readArray(reader1 -> reader1.getString());
deserializedMicrosoftGraphGroupInner.groupTypes = groupTypes;
} else if ("hasMembersWithLicenseErrors".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.hasMembersWithLicenseErrors
= reader.getNullable(JsonReader::getBoolean);
} else if ("licenseProcessingState".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.licenseProcessingState
= MicrosoftGraphLicenseProcessingState.fromJson(reader);
} else if ("mail".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.mail = reader.getString();
} else if ("mailEnabled".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.mailEnabled = reader.getNullable(JsonReader::getBoolean);
} else if ("mailNickname".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.mailNickname = reader.getString();
} else if ("membershipRule".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.membershipRule = reader.getString();
} else if ("membershipRuleProcessingState".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.membershipRuleProcessingState = reader.getString();
} else if ("onPremisesDomainName".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.onPremisesDomainName = reader.getString();
} else if ("onPremisesLastSyncDateTime".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.onPremisesLastSyncDateTime = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("onPremisesNetBiosName".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.onPremisesNetBiosName = reader.getString();
} else if ("onPremisesProvisioningErrors".equals(fieldName)) {
List<MicrosoftGraphOnPremisesProvisioningError> onPremisesProvisioningErrors
= reader.readArray(reader1 -> MicrosoftGraphOnPremisesProvisioningError.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.onPremisesProvisioningErrors = onPremisesProvisioningErrors;
} else if ("onPremisesSamAccountName".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.onPremisesSamAccountName = reader.getString();
} else if ("onPremisesSecurityIdentifier".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.onPremisesSecurityIdentifier = reader.getString();
} else if ("onPremisesSyncEnabled".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.onPremisesSyncEnabled
= reader.getNullable(JsonReader::getBoolean);
} else if ("preferredDataLocation".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.preferredDataLocation = reader.getString();
} else if ("preferredLanguage".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.preferredLanguage = reader.getString();
} else if ("proxyAddresses".equals(fieldName)) {
List<String> proxyAddresses = reader.readArray(reader1 -> reader1.getString());
deserializedMicrosoftGraphGroupInner.proxyAddresses = proxyAddresses;
} else if ("renewedDateTime".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.renewedDateTime = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("securityEnabled".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.securityEnabled = reader.getNullable(JsonReader::getBoolean);
} else if ("securityIdentifier".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.securityIdentifier = reader.getString();
} else if ("theme".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.theme = reader.getString();
} else if ("visibility".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.visibility = reader.getString();
} else if ("allowExternalSenders".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.allowExternalSenders
= reader.getNullable(JsonReader::getBoolean);
} else if ("autoSubscribeNewMembers".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.autoSubscribeNewMembers
= reader.getNullable(JsonReader::getBoolean);
} else if ("hideFromAddressLists".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.hideFromAddressLists
= reader.getNullable(JsonReader::getBoolean);
} else if ("hideFromOutlookClients".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.hideFromOutlookClients
= reader.getNullable(JsonReader::getBoolean);
} else if ("isSubscribedByMail".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.isSubscribedByMail
= reader.getNullable(JsonReader::getBoolean);
} else if ("unseenCount".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.unseenCount = reader.getNullable(JsonReader::getInt);
} else if ("isArchived".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.isArchived = reader.getNullable(JsonReader::getBoolean);
} else if ("appRoleAssignments".equals(fieldName)) {
List<MicrosoftGraphAppRoleAssignment> appRoleAssignments
= reader.readArray(reader1 -> MicrosoftGraphAppRoleAssignment.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.appRoleAssignments = appRoleAssignments;
} else if ("createdOnBehalfOf".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.createdOnBehalfOf
= MicrosoftGraphDirectoryObjectInner.fromJson(reader);
} else if ("memberOf".equals(fieldName)) {
List<MicrosoftGraphDirectoryObjectInner> memberOf
= reader.readArray(reader1 -> MicrosoftGraphDirectoryObjectInner.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.memberOf = memberOf;
} else if ("members".equals(fieldName)) {
List<MicrosoftGraphDirectoryObjectInner> members
= reader.readArray(reader1 -> MicrosoftGraphDirectoryObjectInner.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.members = members;
} else if ("membersWithLicenseErrors".equals(fieldName)) {
List<MicrosoftGraphDirectoryObjectInner> membersWithLicenseErrors
= reader.readArray(reader1 -> MicrosoftGraphDirectoryObjectInner.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.membersWithLicenseErrors = membersWithLicenseErrors;
} else if ("owners".equals(fieldName)) {
List<MicrosoftGraphDirectoryObjectInner> owners
= reader.readArray(reader1 -> MicrosoftGraphDirectoryObjectInner.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.owners = owners;
} else if ("permissionGrants".equals(fieldName)) {
List<MicrosoftGraphResourceSpecificPermissionGrant> permissionGrants
= reader.readArray(reader1 -> MicrosoftGraphResourceSpecificPermissionGrant.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.permissionGrants = permissionGrants;
} else if ("settings".equals(fieldName)) {
List<MicrosoftGraphGroupSetting> settings
= reader.readArray(reader1 -> MicrosoftGraphGroupSetting.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.settings = settings;
} else if ("transitiveMemberOf".equals(fieldName)) {
List<MicrosoftGraphDirectoryObjectInner> transitiveMemberOf
= reader.readArray(reader1 -> MicrosoftGraphDirectoryObjectInner.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.transitiveMemberOf = transitiveMemberOf;
} else if ("transitiveMembers".equals(fieldName)) {
List<MicrosoftGraphDirectoryObjectInner> transitiveMembers
= reader.readArray(reader1 -> MicrosoftGraphDirectoryObjectInner.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.transitiveMembers = transitiveMembers;
} else if ("acceptedSenders".equals(fieldName)) {
List<MicrosoftGraphDirectoryObjectInner> acceptedSenders
= reader.readArray(reader1 -> MicrosoftGraphDirectoryObjectInner.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.acceptedSenders = acceptedSenders;
} else if ("calendar".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.calendar = MicrosoftGraphCalendar.fromJson(reader);
} else if ("calendarView".equals(fieldName)) {
List<MicrosoftGraphEvent> calendarView
= reader.readArray(reader1 -> MicrosoftGraphEvent.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.calendarView = calendarView;
} else if ("conversations".equals(fieldName)) {
List<MicrosoftGraphConversation> conversations
= reader.readArray(reader1 -> MicrosoftGraphConversation.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.conversations = conversations;
} else if ("events".equals(fieldName)) {
List<MicrosoftGraphEvent> events
= reader.readArray(reader1 -> MicrosoftGraphEvent.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.events = events;
} else if ("photo".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.photo = MicrosoftGraphProfilePhoto.fromJson(reader);
} else if ("photos".equals(fieldName)) {
List<MicrosoftGraphProfilePhoto> photos
= reader.readArray(reader1 -> MicrosoftGraphProfilePhoto.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.photos = photos;
} else if ("rejectedSenders".equals(fieldName)) {
List<MicrosoftGraphDirectoryObjectInner> rejectedSenders
= reader.readArray(reader1 -> MicrosoftGraphDirectoryObjectInner.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.rejectedSenders = rejectedSenders;
} else if ("threads".equals(fieldName)) {
List<MicrosoftGraphConversationThread> threads
= reader.readArray(reader1 -> MicrosoftGraphConversationThread.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.threads = threads;
} else if ("drive".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.drive = MicrosoftGraphDrive.fromJson(reader);
} else if ("drives".equals(fieldName)) {
List<MicrosoftGraphDrive> drives
= reader.readArray(reader1 -> MicrosoftGraphDrive.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.drives = drives;
} else if ("sites".equals(fieldName)) {
List<MicrosoftGraphSite> sites = reader.readArray(reader1 -> MicrosoftGraphSite.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.sites = sites;
} else if ("extensions".equals(fieldName)) {
List<MicrosoftGraphExtension> extensions
= reader.readArray(reader1 -> MicrosoftGraphExtension.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.extensions = extensions;
} else if ("groupLifecyclePolicies".equals(fieldName)) {
List<MicrosoftGraphGroupLifecyclePolicy> groupLifecyclePolicies
= reader.readArray(reader1 -> MicrosoftGraphGroupLifecyclePolicy.fromJson(reader1));
deserializedMicrosoftGraphGroupInner.groupLifecyclePolicies = groupLifecyclePolicies;
} else if ("planner".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.planner = MicrosoftGraphPlannerGroup.fromJson(reader);
} else if ("onenote".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.onenote = MicrosoftGraphOnenote.fromJson(reader);
} else if ("team".equals(fieldName)) {
deserializedMicrosoftGraphGroupInner.team = MicrosoftGraphTeamInner.fromJson(reader);
} else {
if (additionalProperties == null) {
additionalProperties = new LinkedHashMap<>();
}
additionalProperties.put(fieldName, reader.readUntyped());
}
}
deserializedMicrosoftGraphGroupInner.additionalProperties = additionalProperties;
return deserializedMicrosoftGraphGroupInner;
});
}