All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphManagedDevice Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure Authorization Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt

There is a newer version: 2.44.0
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.authorization.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * managedDevice
 * 
 * Devices that are managed or pre-enrolled through Intune.
 */
@Fluent
public final class MicrosoftGraphManagedDevice extends MicrosoftGraphEntity {
    /*
     * Code that allows the Activation Lock on a device to be bypassed.
     */
    private String activationLockBypassCode;

    /*
     * Android security patch level
     */
    private String androidSecurityPatchLevel;

    /*
     * The unique identifier for the Azure Active Directory device. Read only.
     */
    private String azureADDeviceId;

    /*
     * Whether the device is Azure Active Directory registered.
     */
    private Boolean azureADRegistered;

    /*
     * The DateTime when device compliance grace period expires
     */
    private OffsetDateTime complianceGracePeriodExpirationDateTime;

    /*
     * complianceState
     */
    private MicrosoftGraphComplianceState complianceState;

    /*
     * configuration Manager client enabled features
     */
    private MicrosoftGraphConfigurationManagerClientEnabledFeatures configurationManagerClientEnabledFeatures;

    /*
     * List of ComplexType deviceActionResult objects.
     */
    private List deviceActionResults;

    /*
     * Device category display name
     */
    private String deviceCategoryDisplayName;

    /*
     * deviceEnrollmentType
     */
    private MicrosoftGraphDeviceEnrollmentType deviceEnrollmentType;

    /*
     * deviceHealthAttestationState
     */
    private MicrosoftGraphDeviceHealthAttestationState deviceHealthAttestationState;

    /*
     * Name of the device
     */
    private String deviceName;

    /*
     * deviceRegistrationState
     */
    private MicrosoftGraphDeviceRegistrationState deviceRegistrationState;

    /*
     * Whether the device is Exchange ActiveSync activated.
     */
    private Boolean easActivated;

    /*
     * Exchange ActivationSync activation time of the device.
     */
    private OffsetDateTime easActivationDateTime;

    /*
     * Exchange ActiveSync Id of the device.
     */
    private String easDeviceId;

    /*
     * Email(s) for the user associated with the device
     */
    private String emailAddress;

    /*
     * Enrollment time of the device.
     */
    private OffsetDateTime enrolledDateTime;

    /*
     * deviceManagementExchangeAccessState
     */
    private MicrosoftGraphDeviceManagementExchangeAccessState exchangeAccessState;

    /*
     * deviceManagementExchangeAccessStateReason
     */
    private MicrosoftGraphDeviceManagementExchangeAccessStateReason exchangeAccessStateReason;

    /*
     * Last time the device contacted Exchange.
     */
    private OffsetDateTime exchangeLastSuccessfulSyncDateTime;

    /*
     * Free Storage in Bytes
     */
    private Long freeStorageSpaceInBytes;

    /*
     * IMEI
     */
    private String imei;

    /*
     * Device encryption status
     */
    private Boolean isEncrypted;

    /*
     * Device supervised status
     */
    private Boolean isSupervised;

    /*
     * whether the device is jail broken or rooted.
     */
    private String jailBroken;

    /*
     * The date and time that the device last completed a successful sync with Intune.
     */
    private OffsetDateTime lastSyncDateTime;

    /*
     * Automatically generated name to identify a device. Can be overwritten to a user friendly name.
     */
    private String managedDeviceName;

    /*
     * managedDeviceOwnerType
     */
    private MicrosoftGraphManagedDeviceOwnerType managedDeviceOwnerType;

    /*
     * managementAgentType
     */
    private MicrosoftGraphManagementAgentType managementAgent;

    /*
     * Manufacturer of the device
     */
    private String manufacturer;

    /*
     * MEID
     */
    private String meid;

    /*
     * Model of the device
     */
    private String model;

    /*
     * Operating system of the device. Windows, iOS, etc.
     */
    private String operatingSystem;

    /*
     * Operating system version of the device.
     */
    private String osVersion;

    /*
     * managedDevicePartnerReportedHealthState
     */
    private MicrosoftGraphManagedDevicePartnerReportedHealthState partnerReportedThreatState;

    /*
     * Phone number of the device
     */
    private String phoneNumber;

    /*
     * An error string that identifies issues when creating Remote Assistance session objects.
     */
    private String remoteAssistanceSessionErrorDetails;

    /*
     * Url that allows a Remote Assistance session to be established with the device.
     */
    private String remoteAssistanceSessionUrl;

    /*
     * SerialNumber
     */
    private String serialNumber;

    /*
     * Subscriber Carrier
     */
    private String subscriberCarrier;

    /*
     * Total Storage in Bytes
     */
    private Long totalStorageSpaceInBytes;

    /*
     * User display name
     */
    private String userDisplayName;

    /*
     * Unique Identifier for the user associated with the device
     */
    private String userId;

    /*
     * Device user principal name
     */
    private String userPrincipalName;

    /*
     * Wi-Fi MAC
     */
    private String wiFiMacAddress;

    /*
     * Device compliance policy states for this device.
     */
    private List deviceCompliancePolicyStates;

    /*
     * Device configuration states for this device.
     */
    private List deviceConfigurationStates;

    /*
     * Device categories provides a way to organize your devices. Using device categories, company administrators can
     * define their own categories that make sense to their company. These categories can then be applied to a device in
     * the Intune Azure console or selected by a user during device enrollment. You can filter reports and create
     * dynamic Azure Active Directory device groups based on device categories.
     */
    private MicrosoftGraphDeviceCategory deviceCategory;

    /*
     * Devices that are managed or pre-enrolled through Intune
     */
    private Map additionalProperties;

    /**
     * Creates an instance of MicrosoftGraphManagedDevice class.
     */
    public MicrosoftGraphManagedDevice() {
    }

    /**
     * Get the activationLockBypassCode property: Code that allows the Activation Lock on a device to be bypassed.
     * 
     * @return the activationLockBypassCode value.
     */
    public String activationLockBypassCode() {
        return this.activationLockBypassCode;
    }

    /**
     * Set the activationLockBypassCode property: Code that allows the Activation Lock on a device to be bypassed.
     * 
     * @param activationLockBypassCode the activationLockBypassCode value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withActivationLockBypassCode(String activationLockBypassCode) {
        this.activationLockBypassCode = activationLockBypassCode;
        return this;
    }

    /**
     * Get the androidSecurityPatchLevel property: Android security patch level.
     * 
     * @return the androidSecurityPatchLevel value.
     */
    public String androidSecurityPatchLevel() {
        return this.androidSecurityPatchLevel;
    }

    /**
     * Set the androidSecurityPatchLevel property: Android security patch level.
     * 
     * @param androidSecurityPatchLevel the androidSecurityPatchLevel value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withAndroidSecurityPatchLevel(String androidSecurityPatchLevel) {
        this.androidSecurityPatchLevel = androidSecurityPatchLevel;
        return this;
    }

    /**
     * Get the azureADDeviceId property: The unique identifier for the Azure Active Directory device. Read only.
     * 
     * @return the azureADDeviceId value.
     */
    public String azureADDeviceId() {
        return this.azureADDeviceId;
    }

    /**
     * Set the azureADDeviceId property: The unique identifier for the Azure Active Directory device. Read only.
     * 
     * @param azureADDeviceId the azureADDeviceId value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withAzureADDeviceId(String azureADDeviceId) {
        this.azureADDeviceId = azureADDeviceId;
        return this;
    }

    /**
     * Get the azureADRegistered property: Whether the device is Azure Active Directory registered.
     * 
     * @return the azureADRegistered value.
     */
    public Boolean azureADRegistered() {
        return this.azureADRegistered;
    }

    /**
     * Set the azureADRegistered property: Whether the device is Azure Active Directory registered.
     * 
     * @param azureADRegistered the azureADRegistered value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withAzureADRegistered(Boolean azureADRegistered) {
        this.azureADRegistered = azureADRegistered;
        return this;
    }

    /**
     * Get the complianceGracePeriodExpirationDateTime property: The DateTime when device compliance grace period
     * expires.
     * 
     * @return the complianceGracePeriodExpirationDateTime value.
     */
    public OffsetDateTime complianceGracePeriodExpirationDateTime() {
        return this.complianceGracePeriodExpirationDateTime;
    }

    /**
     * Set the complianceGracePeriodExpirationDateTime property: The DateTime when device compliance grace period
     * expires.
     * 
     * @param complianceGracePeriodExpirationDateTime the complianceGracePeriodExpirationDateTime value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice
        withComplianceGracePeriodExpirationDateTime(OffsetDateTime complianceGracePeriodExpirationDateTime) {
        this.complianceGracePeriodExpirationDateTime = complianceGracePeriodExpirationDateTime;
        return this;
    }

    /**
     * Get the complianceState property: complianceState.
     * 
     * @return the complianceState value.
     */
    public MicrosoftGraphComplianceState complianceState() {
        return this.complianceState;
    }

    /**
     * Set the complianceState property: complianceState.
     * 
     * @param complianceState the complianceState value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withComplianceState(MicrosoftGraphComplianceState complianceState) {
        this.complianceState = complianceState;
        return this;
    }

    /**
     * Get the configurationManagerClientEnabledFeatures property: configuration Manager client enabled features.
     * 
     * @return the configurationManagerClientEnabledFeatures value.
     */
    public MicrosoftGraphConfigurationManagerClientEnabledFeatures configurationManagerClientEnabledFeatures() {
        return this.configurationManagerClientEnabledFeatures;
    }

    /**
     * Set the configurationManagerClientEnabledFeatures property: configuration Manager client enabled features.
     * 
     * @param configurationManagerClientEnabledFeatures the configurationManagerClientEnabledFeatures value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withConfigurationManagerClientEnabledFeatures(
        MicrosoftGraphConfigurationManagerClientEnabledFeatures configurationManagerClientEnabledFeatures) {
        this.configurationManagerClientEnabledFeatures = configurationManagerClientEnabledFeatures;
        return this;
    }

    /**
     * Get the deviceActionResults property: List of ComplexType deviceActionResult objects.
     * 
     * @return the deviceActionResults value.
     */
    public List deviceActionResults() {
        return this.deviceActionResults;
    }

    /**
     * Set the deviceActionResults property: List of ComplexType deviceActionResult objects.
     * 
     * @param deviceActionResults the deviceActionResults value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice
        withDeviceActionResults(List deviceActionResults) {
        this.deviceActionResults = deviceActionResults;
        return this;
    }

    /**
     * Get the deviceCategoryDisplayName property: Device category display name.
     * 
     * @return the deviceCategoryDisplayName value.
     */
    public String deviceCategoryDisplayName() {
        return this.deviceCategoryDisplayName;
    }

    /**
     * Set the deviceCategoryDisplayName property: Device category display name.
     * 
     * @param deviceCategoryDisplayName the deviceCategoryDisplayName value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withDeviceCategoryDisplayName(String deviceCategoryDisplayName) {
        this.deviceCategoryDisplayName = deviceCategoryDisplayName;
        return this;
    }

    /**
     * Get the deviceEnrollmentType property: deviceEnrollmentType.
     * 
     * @return the deviceEnrollmentType value.
     */
    public MicrosoftGraphDeviceEnrollmentType deviceEnrollmentType() {
        return this.deviceEnrollmentType;
    }

    /**
     * Set the deviceEnrollmentType property: deviceEnrollmentType.
     * 
     * @param deviceEnrollmentType the deviceEnrollmentType value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice
        withDeviceEnrollmentType(MicrosoftGraphDeviceEnrollmentType deviceEnrollmentType) {
        this.deviceEnrollmentType = deviceEnrollmentType;
        return this;
    }

    /**
     * Get the deviceHealthAttestationState property: deviceHealthAttestationState.
     * 
     * @return the deviceHealthAttestationState value.
     */
    public MicrosoftGraphDeviceHealthAttestationState deviceHealthAttestationState() {
        return this.deviceHealthAttestationState;
    }

    /**
     * Set the deviceHealthAttestationState property: deviceHealthAttestationState.
     * 
     * @param deviceHealthAttestationState the deviceHealthAttestationState value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice
        withDeviceHealthAttestationState(MicrosoftGraphDeviceHealthAttestationState deviceHealthAttestationState) {
        this.deviceHealthAttestationState = deviceHealthAttestationState;
        return this;
    }

    /**
     * Get the deviceName property: Name of the device.
     * 
     * @return the deviceName value.
     */
    public String deviceName() {
        return this.deviceName;
    }

    /**
     * Set the deviceName property: Name of the device.
     * 
     * @param deviceName the deviceName value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withDeviceName(String deviceName) {
        this.deviceName = deviceName;
        return this;
    }

    /**
     * Get the deviceRegistrationState property: deviceRegistrationState.
     * 
     * @return the deviceRegistrationState value.
     */
    public MicrosoftGraphDeviceRegistrationState deviceRegistrationState() {
        return this.deviceRegistrationState;
    }

    /**
     * Set the deviceRegistrationState property: deviceRegistrationState.
     * 
     * @param deviceRegistrationState the deviceRegistrationState value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice
        withDeviceRegistrationState(MicrosoftGraphDeviceRegistrationState deviceRegistrationState) {
        this.deviceRegistrationState = deviceRegistrationState;
        return this;
    }

    /**
     * Get the easActivated property: Whether the device is Exchange ActiveSync activated.
     * 
     * @return the easActivated value.
     */
    public Boolean easActivated() {
        return this.easActivated;
    }

    /**
     * Set the easActivated property: Whether the device is Exchange ActiveSync activated.
     * 
     * @param easActivated the easActivated value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withEasActivated(Boolean easActivated) {
        this.easActivated = easActivated;
        return this;
    }

    /**
     * Get the easActivationDateTime property: Exchange ActivationSync activation time of the device.
     * 
     * @return the easActivationDateTime value.
     */
    public OffsetDateTime easActivationDateTime() {
        return this.easActivationDateTime;
    }

    /**
     * Set the easActivationDateTime property: Exchange ActivationSync activation time of the device.
     * 
     * @param easActivationDateTime the easActivationDateTime value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withEasActivationDateTime(OffsetDateTime easActivationDateTime) {
        this.easActivationDateTime = easActivationDateTime;
        return this;
    }

    /**
     * Get the easDeviceId property: Exchange ActiveSync Id of the device.
     * 
     * @return the easDeviceId value.
     */
    public String easDeviceId() {
        return this.easDeviceId;
    }

    /**
     * Set the easDeviceId property: Exchange ActiveSync Id of the device.
     * 
     * @param easDeviceId the easDeviceId value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withEasDeviceId(String easDeviceId) {
        this.easDeviceId = easDeviceId;
        return this;
    }

    /**
     * Get the emailAddress property: Email(s) for the user associated with the device.
     * 
     * @return the emailAddress value.
     */
    public String emailAddress() {
        return this.emailAddress;
    }

    /**
     * Set the emailAddress property: Email(s) for the user associated with the device.
     * 
     * @param emailAddress the emailAddress value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withEmailAddress(String emailAddress) {
        this.emailAddress = emailAddress;
        return this;
    }

    /**
     * Get the enrolledDateTime property: Enrollment time of the device.
     * 
     * @return the enrolledDateTime value.
     */
    public OffsetDateTime enrolledDateTime() {
        return this.enrolledDateTime;
    }

    /**
     * Set the enrolledDateTime property: Enrollment time of the device.
     * 
     * @param enrolledDateTime the enrolledDateTime value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withEnrolledDateTime(OffsetDateTime enrolledDateTime) {
        this.enrolledDateTime = enrolledDateTime;
        return this;
    }

    /**
     * Get the exchangeAccessState property: deviceManagementExchangeAccessState.
     * 
     * @return the exchangeAccessState value.
     */
    public MicrosoftGraphDeviceManagementExchangeAccessState exchangeAccessState() {
        return this.exchangeAccessState;
    }

    /**
     * Set the exchangeAccessState property: deviceManagementExchangeAccessState.
     * 
     * @param exchangeAccessState the exchangeAccessState value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice
        withExchangeAccessState(MicrosoftGraphDeviceManagementExchangeAccessState exchangeAccessState) {
        this.exchangeAccessState = exchangeAccessState;
        return this;
    }

    /**
     * Get the exchangeAccessStateReason property: deviceManagementExchangeAccessStateReason.
     * 
     * @return the exchangeAccessStateReason value.
     */
    public MicrosoftGraphDeviceManagementExchangeAccessStateReason exchangeAccessStateReason() {
        return this.exchangeAccessStateReason;
    }

    /**
     * Set the exchangeAccessStateReason property: deviceManagementExchangeAccessStateReason.
     * 
     * @param exchangeAccessStateReason the exchangeAccessStateReason value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withExchangeAccessStateReason(
        MicrosoftGraphDeviceManagementExchangeAccessStateReason exchangeAccessStateReason) {
        this.exchangeAccessStateReason = exchangeAccessStateReason;
        return this;
    }

    /**
     * Get the exchangeLastSuccessfulSyncDateTime property: Last time the device contacted Exchange.
     * 
     * @return the exchangeLastSuccessfulSyncDateTime value.
     */
    public OffsetDateTime exchangeLastSuccessfulSyncDateTime() {
        return this.exchangeLastSuccessfulSyncDateTime;
    }

    /**
     * Set the exchangeLastSuccessfulSyncDateTime property: Last time the device contacted Exchange.
     * 
     * @param exchangeLastSuccessfulSyncDateTime the exchangeLastSuccessfulSyncDateTime value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice
        withExchangeLastSuccessfulSyncDateTime(OffsetDateTime exchangeLastSuccessfulSyncDateTime) {
        this.exchangeLastSuccessfulSyncDateTime = exchangeLastSuccessfulSyncDateTime;
        return this;
    }

    /**
     * Get the freeStorageSpaceInBytes property: Free Storage in Bytes.
     * 
     * @return the freeStorageSpaceInBytes value.
     */
    public Long freeStorageSpaceInBytes() {
        return this.freeStorageSpaceInBytes;
    }

    /**
     * Set the freeStorageSpaceInBytes property: Free Storage in Bytes.
     * 
     * @param freeStorageSpaceInBytes the freeStorageSpaceInBytes value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withFreeStorageSpaceInBytes(Long freeStorageSpaceInBytes) {
        this.freeStorageSpaceInBytes = freeStorageSpaceInBytes;
        return this;
    }

    /**
     * Get the imei property: IMEI.
     * 
     * @return the imei value.
     */
    public String imei() {
        return this.imei;
    }

    /**
     * Set the imei property: IMEI.
     * 
     * @param imei the imei value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withImei(String imei) {
        this.imei = imei;
        return this;
    }

    /**
     * Get the isEncrypted property: Device encryption status.
     * 
     * @return the isEncrypted value.
     */
    public Boolean isEncrypted() {
        return this.isEncrypted;
    }

    /**
     * Set the isEncrypted property: Device encryption status.
     * 
     * @param isEncrypted the isEncrypted value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withIsEncrypted(Boolean isEncrypted) {
        this.isEncrypted = isEncrypted;
        return this;
    }

    /**
     * Get the isSupervised property: Device supervised status.
     * 
     * @return the isSupervised value.
     */
    public Boolean isSupervised() {
        return this.isSupervised;
    }

    /**
     * Set the isSupervised property: Device supervised status.
     * 
     * @param isSupervised the isSupervised value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withIsSupervised(Boolean isSupervised) {
        this.isSupervised = isSupervised;
        return this;
    }

    /**
     * Get the jailBroken property: whether the device is jail broken or rooted.
     * 
     * @return the jailBroken value.
     */
    public String jailBroken() {
        return this.jailBroken;
    }

    /**
     * Set the jailBroken property: whether the device is jail broken or rooted.
     * 
     * @param jailBroken the jailBroken value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withJailBroken(String jailBroken) {
        this.jailBroken = jailBroken;
        return this;
    }

    /**
     * Get the lastSyncDateTime property: The date and time that the device last completed a successful sync with
     * Intune.
     * 
     * @return the lastSyncDateTime value.
     */
    public OffsetDateTime lastSyncDateTime() {
        return this.lastSyncDateTime;
    }

    /**
     * Set the lastSyncDateTime property: The date and time that the device last completed a successful sync with
     * Intune.
     * 
     * @param lastSyncDateTime the lastSyncDateTime value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withLastSyncDateTime(OffsetDateTime lastSyncDateTime) {
        this.lastSyncDateTime = lastSyncDateTime;
        return this;
    }

    /**
     * Get the managedDeviceName property: Automatically generated name to identify a device. Can be overwritten to a
     * user friendly name.
     * 
     * @return the managedDeviceName value.
     */
    public String managedDeviceName() {
        return this.managedDeviceName;
    }

    /**
     * Set the managedDeviceName property: Automatically generated name to identify a device. Can be overwritten to a
     * user friendly name.
     * 
     * @param managedDeviceName the managedDeviceName value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withManagedDeviceName(String managedDeviceName) {
        this.managedDeviceName = managedDeviceName;
        return this;
    }

    /**
     * Get the managedDeviceOwnerType property: managedDeviceOwnerType.
     * 
     * @return the managedDeviceOwnerType value.
     */
    public MicrosoftGraphManagedDeviceOwnerType managedDeviceOwnerType() {
        return this.managedDeviceOwnerType;
    }

    /**
     * Set the managedDeviceOwnerType property: managedDeviceOwnerType.
     * 
     * @param managedDeviceOwnerType the managedDeviceOwnerType value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice
        withManagedDeviceOwnerType(MicrosoftGraphManagedDeviceOwnerType managedDeviceOwnerType) {
        this.managedDeviceOwnerType = managedDeviceOwnerType;
        return this;
    }

    /**
     * Get the managementAgent property: managementAgentType.
     * 
     * @return the managementAgent value.
     */
    public MicrosoftGraphManagementAgentType managementAgent() {
        return this.managementAgent;
    }

    /**
     * Set the managementAgent property: managementAgentType.
     * 
     * @param managementAgent the managementAgent value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withManagementAgent(MicrosoftGraphManagementAgentType managementAgent) {
        this.managementAgent = managementAgent;
        return this;
    }

    /**
     * Get the manufacturer property: Manufacturer of the device.
     * 
     * @return the manufacturer value.
     */
    public String manufacturer() {
        return this.manufacturer;
    }

    /**
     * Set the manufacturer property: Manufacturer of the device.
     * 
     * @param manufacturer the manufacturer value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
        return this;
    }

    /**
     * Get the meid property: MEID.
     * 
     * @return the meid value.
     */
    public String meid() {
        return this.meid;
    }

    /**
     * Set the meid property: MEID.
     * 
     * @param meid the meid value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withMeid(String meid) {
        this.meid = meid;
        return this;
    }

    /**
     * Get the model property: Model of the device.
     * 
     * @return the model value.
     */
    public String model() {
        return this.model;
    }

    /**
     * Set the model property: Model of the device.
     * 
     * @param model the model value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withModel(String model) {
        this.model = model;
        return this;
    }

    /**
     * Get the operatingSystem property: Operating system of the device. Windows, iOS, etc.
     * 
     * @return the operatingSystem value.
     */
    public String operatingSystem() {
        return this.operatingSystem;
    }

    /**
     * Set the operatingSystem property: Operating system of the device. Windows, iOS, etc.
     * 
     * @param operatingSystem the operatingSystem value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withOperatingSystem(String operatingSystem) {
        this.operatingSystem = operatingSystem;
        return this;
    }

    /**
     * Get the osVersion property: Operating system version of the device.
     * 
     * @return the osVersion value.
     */
    public String osVersion() {
        return this.osVersion;
    }

    /**
     * Set the osVersion property: Operating system version of the device.
     * 
     * @param osVersion the osVersion value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withOsVersion(String osVersion) {
        this.osVersion = osVersion;
        return this;
    }

    /**
     * Get the partnerReportedThreatState property: managedDevicePartnerReportedHealthState.
     * 
     * @return the partnerReportedThreatState value.
     */
    public MicrosoftGraphManagedDevicePartnerReportedHealthState partnerReportedThreatState() {
        return this.partnerReportedThreatState;
    }

    /**
     * Set the partnerReportedThreatState property: managedDevicePartnerReportedHealthState.
     * 
     * @param partnerReportedThreatState the partnerReportedThreatState value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withPartnerReportedThreatState(
        MicrosoftGraphManagedDevicePartnerReportedHealthState partnerReportedThreatState) {
        this.partnerReportedThreatState = partnerReportedThreatState;
        return this;
    }

    /**
     * Get the phoneNumber property: Phone number of the device.
     * 
     * @return the phoneNumber value.
     */
    public String phoneNumber() {
        return this.phoneNumber;
    }

    /**
     * Set the phoneNumber property: Phone number of the device.
     * 
     * @param phoneNumber the phoneNumber value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
        return this;
    }

    /**
     * Get the remoteAssistanceSessionErrorDetails property: An error string that identifies issues when creating Remote
     * Assistance session objects.
     * 
     * @return the remoteAssistanceSessionErrorDetails value.
     */
    public String remoteAssistanceSessionErrorDetails() {
        return this.remoteAssistanceSessionErrorDetails;
    }

    /**
     * Set the remoteAssistanceSessionErrorDetails property: An error string that identifies issues when creating Remote
     * Assistance session objects.
     * 
     * @param remoteAssistanceSessionErrorDetails the remoteAssistanceSessionErrorDetails value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice
        withRemoteAssistanceSessionErrorDetails(String remoteAssistanceSessionErrorDetails) {
        this.remoteAssistanceSessionErrorDetails = remoteAssistanceSessionErrorDetails;
        return this;
    }

    /**
     * Get the remoteAssistanceSessionUrl property: Url that allows a Remote Assistance session to be established with
     * the device.
     * 
     * @return the remoteAssistanceSessionUrl value.
     */
    public String remoteAssistanceSessionUrl() {
        return this.remoteAssistanceSessionUrl;
    }

    /**
     * Set the remoteAssistanceSessionUrl property: Url that allows a Remote Assistance session to be established with
     * the device.
     * 
     * @param remoteAssistanceSessionUrl the remoteAssistanceSessionUrl value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withRemoteAssistanceSessionUrl(String remoteAssistanceSessionUrl) {
        this.remoteAssistanceSessionUrl = remoteAssistanceSessionUrl;
        return this;
    }

    /**
     * Get the serialNumber property: SerialNumber.
     * 
     * @return the serialNumber value.
     */
    public String serialNumber() {
        return this.serialNumber;
    }

    /**
     * Set the serialNumber property: SerialNumber.
     * 
     * @param serialNumber the serialNumber value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
        return this;
    }

    /**
     * Get the subscriberCarrier property: Subscriber Carrier.
     * 
     * @return the subscriberCarrier value.
     */
    public String subscriberCarrier() {
        return this.subscriberCarrier;
    }

    /**
     * Set the subscriberCarrier property: Subscriber Carrier.
     * 
     * @param subscriberCarrier the subscriberCarrier value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withSubscriberCarrier(String subscriberCarrier) {
        this.subscriberCarrier = subscriberCarrier;
        return this;
    }

    /**
     * Get the totalStorageSpaceInBytes property: Total Storage in Bytes.
     * 
     * @return the totalStorageSpaceInBytes value.
     */
    public Long totalStorageSpaceInBytes() {
        return this.totalStorageSpaceInBytes;
    }

    /**
     * Set the totalStorageSpaceInBytes property: Total Storage in Bytes.
     * 
     * @param totalStorageSpaceInBytes the totalStorageSpaceInBytes value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withTotalStorageSpaceInBytes(Long totalStorageSpaceInBytes) {
        this.totalStorageSpaceInBytes = totalStorageSpaceInBytes;
        return this;
    }

    /**
     * Get the userDisplayName property: User display name.
     * 
     * @return the userDisplayName value.
     */
    public String userDisplayName() {
        return this.userDisplayName;
    }

    /**
     * Set the userDisplayName property: User display name.
     * 
     * @param userDisplayName the userDisplayName value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withUserDisplayName(String userDisplayName) {
        this.userDisplayName = userDisplayName;
        return this;
    }

    /**
     * Get the userId property: Unique Identifier for the user associated with the device.
     * 
     * @return the userId value.
     */
    public String userId() {
        return this.userId;
    }

    /**
     * Set the userId property: Unique Identifier for the user associated with the device.
     * 
     * @param userId the userId value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withUserId(String userId) {
        this.userId = userId;
        return this;
    }

    /**
     * Get the userPrincipalName property: Device user principal name.
     * 
     * @return the userPrincipalName value.
     */
    public String userPrincipalName() {
        return this.userPrincipalName;
    }

    /**
     * Set the userPrincipalName property: Device user principal name.
     * 
     * @param userPrincipalName the userPrincipalName value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withUserPrincipalName(String userPrincipalName) {
        this.userPrincipalName = userPrincipalName;
        return this;
    }

    /**
     * Get the wiFiMacAddress property: Wi-Fi MAC.
     * 
     * @return the wiFiMacAddress value.
     */
    public String wiFiMacAddress() {
        return this.wiFiMacAddress;
    }

    /**
     * Set the wiFiMacAddress property: Wi-Fi MAC.
     * 
     * @param wiFiMacAddress the wiFiMacAddress value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withWiFiMacAddress(String wiFiMacAddress) {
        this.wiFiMacAddress = wiFiMacAddress;
        return this;
    }

    /**
     * Get the deviceCompliancePolicyStates property: Device compliance policy states for this device.
     * 
     * @return the deviceCompliancePolicyStates value.
     */
    public List deviceCompliancePolicyStates() {
        return this.deviceCompliancePolicyStates;
    }

    /**
     * Set the deviceCompliancePolicyStates property: Device compliance policy states for this device.
     * 
     * @param deviceCompliancePolicyStates the deviceCompliancePolicyStates value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice
        withDeviceCompliancePolicyStates(List deviceCompliancePolicyStates) {
        this.deviceCompliancePolicyStates = deviceCompliancePolicyStates;
        return this;
    }

    /**
     * Get the deviceConfigurationStates property: Device configuration states for this device.
     * 
     * @return the deviceConfigurationStates value.
     */
    public List deviceConfigurationStates() {
        return this.deviceConfigurationStates;
    }

    /**
     * Set the deviceConfigurationStates property: Device configuration states for this device.
     * 
     * @param deviceConfigurationStates the deviceConfigurationStates value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice
        withDeviceConfigurationStates(List deviceConfigurationStates) {
        this.deviceConfigurationStates = deviceConfigurationStates;
        return this;
    }

    /**
     * Get the deviceCategory property: Device categories provides a way to organize your devices. Using device
     * categories, company administrators can define their own categories that make sense to their company. These
     * categories can then be applied to a device in the Intune Azure console or selected by a user during device
     * enrollment. You can filter reports and create dynamic Azure Active Directory device groups based on device
     * categories.
     * 
     * @return the deviceCategory value.
     */
    public MicrosoftGraphDeviceCategory deviceCategory() {
        return this.deviceCategory;
    }

    /**
     * Set the deviceCategory property: Device categories provides a way to organize your devices. Using device
     * categories, company administrators can define their own categories that make sense to their company. These
     * categories can then be applied to a device in the Intune Azure console or selected by a user during device
     * enrollment. You can filter reports and create dynamic Azure Active Directory device groups based on device
     * categories.
     * 
     * @param deviceCategory the deviceCategory value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withDeviceCategory(MicrosoftGraphDeviceCategory deviceCategory) {
        this.deviceCategory = deviceCategory;
        return this;
    }

    /**
     * Get the additionalProperties property: Devices that are managed or pre-enrolled through Intune.
     * 
     * @return the additionalProperties value.
     */
    public Map additionalProperties() {
        return this.additionalProperties;
    }

    /**
     * Set the additionalProperties property: Devices that are managed or pre-enrolled through Intune.
     * 
     * @param additionalProperties the additionalProperties value to set.
     * @return the MicrosoftGraphManagedDevice object itself.
     */
    public MicrosoftGraphManagedDevice withAdditionalProperties(Map additionalProperties) {
        this.additionalProperties = additionalProperties;
        return this;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public MicrosoftGraphManagedDevice withId(String id) {
        super.withId(id);
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (configurationManagerClientEnabledFeatures() != null) {
            configurationManagerClientEnabledFeatures().validate();
        }
        if (deviceActionResults() != null) {
            deviceActionResults().forEach(e -> e.validate());
        }
        if (deviceHealthAttestationState() != null) {
            deviceHealthAttestationState().validate();
        }
        if (deviceCompliancePolicyStates() != null) {
            deviceCompliancePolicyStates().forEach(e -> e.validate());
        }
        if (deviceConfigurationStates() != null) {
            deviceConfigurationStates().forEach(e -> e.validate());
        }
        if (deviceCategory() != null) {
            deviceCategory().validate();
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
        jsonWriter.writeStartObject();
        jsonWriter.writeStringField("id", id());
        jsonWriter.writeStringField("activationLockBypassCode", this.activationLockBypassCode);
        jsonWriter.writeStringField("androidSecurityPatchLevel", this.androidSecurityPatchLevel);
        jsonWriter.writeStringField("azureADDeviceId", this.azureADDeviceId);
        jsonWriter.writeBooleanField("azureADRegistered", this.azureADRegistered);
        jsonWriter.writeStringField("complianceGracePeriodExpirationDateTime",
            this.complianceGracePeriodExpirationDateTime == null
                ? null
                : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.complianceGracePeriodExpirationDateTime));
        jsonWriter.writeStringField("complianceState",
            this.complianceState == null ? null : this.complianceState.toString());
        jsonWriter.writeJsonField("configurationManagerClientEnabledFeatures",
            this.configurationManagerClientEnabledFeatures);
        jsonWriter.writeArrayField("deviceActionResults", this.deviceActionResults,
            (writer, element) -> writer.writeJson(element));
        jsonWriter.writeStringField("deviceCategoryDisplayName", this.deviceCategoryDisplayName);
        jsonWriter.writeStringField("deviceEnrollmentType",
            this.deviceEnrollmentType == null ? null : this.deviceEnrollmentType.toString());
        jsonWriter.writeJsonField("deviceHealthAttestationState", this.deviceHealthAttestationState);
        jsonWriter.writeStringField("deviceName", this.deviceName);
        jsonWriter.writeStringField("deviceRegistrationState",
            this.deviceRegistrationState == null ? null : this.deviceRegistrationState.toString());
        jsonWriter.writeBooleanField("easActivated", this.easActivated);
        jsonWriter.writeStringField("easActivationDateTime",
            this.easActivationDateTime == null
                ? null
                : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.easActivationDateTime));
        jsonWriter.writeStringField("easDeviceId", this.easDeviceId);
        jsonWriter.writeStringField("emailAddress", this.emailAddress);
        jsonWriter.writeStringField("enrolledDateTime",
            this.enrolledDateTime == null
                ? null
                : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.enrolledDateTime));
        jsonWriter.writeStringField("exchangeAccessState",
            this.exchangeAccessState == null ? null : this.exchangeAccessState.toString());
        jsonWriter.writeStringField("exchangeAccessStateReason",
            this.exchangeAccessStateReason == null ? null : this.exchangeAccessStateReason.toString());
        jsonWriter.writeStringField("exchangeLastSuccessfulSyncDateTime",
            this.exchangeLastSuccessfulSyncDateTime == null
                ? null
                : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.exchangeLastSuccessfulSyncDateTime));
        jsonWriter.writeNumberField("freeStorageSpaceInBytes", this.freeStorageSpaceInBytes);
        jsonWriter.writeStringField("imei", this.imei);
        jsonWriter.writeBooleanField("isEncrypted", this.isEncrypted);
        jsonWriter.writeBooleanField("isSupervised", this.isSupervised);
        jsonWriter.writeStringField("jailBroken", this.jailBroken);
        jsonWriter.writeStringField("lastSyncDateTime",
            this.lastSyncDateTime == null
                ? null
                : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSyncDateTime));
        jsonWriter.writeStringField("managedDeviceName", this.managedDeviceName);
        jsonWriter.writeStringField("managedDeviceOwnerType",
            this.managedDeviceOwnerType == null ? null : this.managedDeviceOwnerType.toString());
        jsonWriter.writeStringField("managementAgent",
            this.managementAgent == null ? null : this.managementAgent.toString());
        jsonWriter.writeStringField("manufacturer", this.manufacturer);
        jsonWriter.writeStringField("meid", this.meid);
        jsonWriter.writeStringField("model", this.model);
        jsonWriter.writeStringField("operatingSystem", this.operatingSystem);
        jsonWriter.writeStringField("osVersion", this.osVersion);
        jsonWriter.writeStringField("partnerReportedThreatState",
            this.partnerReportedThreatState == null ? null : this.partnerReportedThreatState.toString());
        jsonWriter.writeStringField("phoneNumber", this.phoneNumber);
        jsonWriter.writeStringField("remoteAssistanceSessionErrorDetails", this.remoteAssistanceSessionErrorDetails);
        jsonWriter.writeStringField("remoteAssistanceSessionUrl", this.remoteAssistanceSessionUrl);
        jsonWriter.writeStringField("serialNumber", this.serialNumber);
        jsonWriter.writeStringField("subscriberCarrier", this.subscriberCarrier);
        jsonWriter.writeNumberField("totalStorageSpaceInBytes", this.totalStorageSpaceInBytes);
        jsonWriter.writeStringField("userDisplayName", this.userDisplayName);
        jsonWriter.writeStringField("userId", this.userId);
        jsonWriter.writeStringField("userPrincipalName", this.userPrincipalName);
        jsonWriter.writeStringField("wiFiMacAddress", this.wiFiMacAddress);
        jsonWriter.writeArrayField("deviceCompliancePolicyStates", this.deviceCompliancePolicyStates,
            (writer, element) -> writer.writeJson(element));
        jsonWriter.writeArrayField("deviceConfigurationStates", this.deviceConfigurationStates,
            (writer, element) -> writer.writeJson(element));
        jsonWriter.writeJsonField("deviceCategory", this.deviceCategory);
        if (additionalProperties != null) {
            for (Map.Entry additionalProperty : additionalProperties.entrySet()) {
                jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue());
            }
        }
        return jsonWriter.writeEndObject();
    }

    /**
     * Reads an instance of MicrosoftGraphManagedDevice from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of MicrosoftGraphManagedDevice if the JsonReader was pointing to an instance of it, or null
     * if it was pointing to JSON null.
     * @throws IOException If an error occurs while reading the MicrosoftGraphManagedDevice.
     */
    public static MicrosoftGraphManagedDevice fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            MicrosoftGraphManagedDevice deserializedMicrosoftGraphManagedDevice = new MicrosoftGraphManagedDevice();
            Map additionalProperties = null;
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("id".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.withId(reader.getString());
                } else if ("activationLockBypassCode".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.activationLockBypassCode = reader.getString();
                } else if ("androidSecurityPatchLevel".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.androidSecurityPatchLevel = reader.getString();
                } else if ("azureADDeviceId".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.azureADDeviceId = reader.getString();
                } else if ("azureADRegistered".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.azureADRegistered
                        = reader.getNullable(JsonReader::getBoolean);
                } else if ("complianceGracePeriodExpirationDateTime".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.complianceGracePeriodExpirationDateTime = reader
                        .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
                } else if ("complianceState".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.complianceState
                        = MicrosoftGraphComplianceState.fromString(reader.getString());
                } else if ("configurationManagerClientEnabledFeatures".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.configurationManagerClientEnabledFeatures
                        = MicrosoftGraphConfigurationManagerClientEnabledFeatures.fromJson(reader);
                } else if ("deviceActionResults".equals(fieldName)) {
                    List deviceActionResults
                        = reader.readArray(reader1 -> MicrosoftGraphDeviceActionResult.fromJson(reader1));
                    deserializedMicrosoftGraphManagedDevice.deviceActionResults = deviceActionResults;
                } else if ("deviceCategoryDisplayName".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.deviceCategoryDisplayName = reader.getString();
                } else if ("deviceEnrollmentType".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.deviceEnrollmentType
                        = MicrosoftGraphDeviceEnrollmentType.fromString(reader.getString());
                } else if ("deviceHealthAttestationState".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.deviceHealthAttestationState
                        = MicrosoftGraphDeviceHealthAttestationState.fromJson(reader);
                } else if ("deviceName".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.deviceName = reader.getString();
                } else if ("deviceRegistrationState".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.deviceRegistrationState
                        = MicrosoftGraphDeviceRegistrationState.fromString(reader.getString());
                } else if ("easActivated".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.easActivated = reader.getNullable(JsonReader::getBoolean);
                } else if ("easActivationDateTime".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.easActivationDateTime = reader
                        .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
                } else if ("easDeviceId".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.easDeviceId = reader.getString();
                } else if ("emailAddress".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.emailAddress = reader.getString();
                } else if ("enrolledDateTime".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.enrolledDateTime = reader
                        .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
                } else if ("exchangeAccessState".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.exchangeAccessState
                        = MicrosoftGraphDeviceManagementExchangeAccessState.fromString(reader.getString());
                } else if ("exchangeAccessStateReason".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.exchangeAccessStateReason
                        = MicrosoftGraphDeviceManagementExchangeAccessStateReason.fromString(reader.getString());
                } else if ("exchangeLastSuccessfulSyncDateTime".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.exchangeLastSuccessfulSyncDateTime = reader
                        .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
                } else if ("freeStorageSpaceInBytes".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.freeStorageSpaceInBytes
                        = reader.getNullable(JsonReader::getLong);
                } else if ("imei".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.imei = reader.getString();
                } else if ("isEncrypted".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.isEncrypted = reader.getNullable(JsonReader::getBoolean);
                } else if ("isSupervised".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.isSupervised = reader.getNullable(JsonReader::getBoolean);
                } else if ("jailBroken".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.jailBroken = reader.getString();
                } else if ("lastSyncDateTime".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.lastSyncDateTime = reader
                        .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
                } else if ("managedDeviceName".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.managedDeviceName = reader.getString();
                } else if ("managedDeviceOwnerType".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.managedDeviceOwnerType
                        = MicrosoftGraphManagedDeviceOwnerType.fromString(reader.getString());
                } else if ("managementAgent".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.managementAgent
                        = MicrosoftGraphManagementAgentType.fromString(reader.getString());
                } else if ("manufacturer".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.manufacturer = reader.getString();
                } else if ("meid".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.meid = reader.getString();
                } else if ("model".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.model = reader.getString();
                } else if ("operatingSystem".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.operatingSystem = reader.getString();
                } else if ("osVersion".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.osVersion = reader.getString();
                } else if ("partnerReportedThreatState".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.partnerReportedThreatState
                        = MicrosoftGraphManagedDevicePartnerReportedHealthState.fromString(reader.getString());
                } else if ("phoneNumber".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.phoneNumber = reader.getString();
                } else if ("remoteAssistanceSessionErrorDetails".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.remoteAssistanceSessionErrorDetails = reader.getString();
                } else if ("remoteAssistanceSessionUrl".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.remoteAssistanceSessionUrl = reader.getString();
                } else if ("serialNumber".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.serialNumber = reader.getString();
                } else if ("subscriberCarrier".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.subscriberCarrier = reader.getString();
                } else if ("totalStorageSpaceInBytes".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.totalStorageSpaceInBytes
                        = reader.getNullable(JsonReader::getLong);
                } else if ("userDisplayName".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.userDisplayName = reader.getString();
                } else if ("userId".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.userId = reader.getString();
                } else if ("userPrincipalName".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.userPrincipalName = reader.getString();
                } else if ("wiFiMacAddress".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.wiFiMacAddress = reader.getString();
                } else if ("deviceCompliancePolicyStates".equals(fieldName)) {
                    List deviceCompliancePolicyStates
                        = reader.readArray(reader1 -> MicrosoftGraphDeviceCompliancePolicyState.fromJson(reader1));
                    deserializedMicrosoftGraphManagedDevice.deviceCompliancePolicyStates = deviceCompliancePolicyStates;
                } else if ("deviceConfigurationStates".equals(fieldName)) {
                    List deviceConfigurationStates
                        = reader.readArray(reader1 -> MicrosoftGraphDeviceConfigurationState.fromJson(reader1));
                    deserializedMicrosoftGraphManagedDevice.deviceConfigurationStates = deviceConfigurationStates;
                } else if ("deviceCategory".equals(fieldName)) {
                    deserializedMicrosoftGraphManagedDevice.deviceCategory
                        = MicrosoftGraphDeviceCategory.fromJson(reader);
                } else {
                    if (additionalProperties == null) {
                        additionalProperties = new LinkedHashMap<>();
                    }

                    additionalProperties.put(fieldName, reader.readUntyped());
                }
            }
            deserializedMicrosoftGraphManagedDevice.additionalProperties = additionalProperties;

            return deserializedMicrosoftGraphManagedDevice;
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy