com.microsoft.graph.generated.models.DeviceExchangeAccessStateSummary Maven / Gradle / Ivy
package com.microsoft.graph.models;
import com.microsoft.kiota.serialization.AdditionalDataHolder;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import com.microsoft.kiota.store.BackedModel;
import com.microsoft.kiota.store.BackingStore;
import com.microsoft.kiota.store.BackingStoreFactorySingleton;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* Device Exchange Access State summary
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class DeviceExchangeAccessStateSummary implements AdditionalDataHolder, BackedModel, Parsable {
/**
* Stores model information.
*/
@jakarta.annotation.Nonnull
protected BackingStore backingStore;
/**
* Instantiates a new {@link DeviceExchangeAccessStateSummary} and sets the default values.
*/
public DeviceExchangeAccessStateSummary() {
this.backingStore = BackingStoreFactorySingleton.instance.createBackingStore();
this.setAdditionalData(new HashMap<>());
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a {@link DeviceExchangeAccessStateSummary}
*/
@jakarta.annotation.Nonnull
public static DeviceExchangeAccessStateSummary createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new DeviceExchangeAccessStateSummary();
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a {@link Map}
*/
@jakarta.annotation.Nonnull
public Map getAdditionalData() {
Map value = this.backingStore.get("additionalData");
if(value == null) {
value = new HashMap<>();
this.setAdditionalData(value);
}
return value;
}
/**
* Gets the allowedDeviceCount property value. Total count of devices with Exchange Access State: Allowed.
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getAllowedDeviceCount() {
return this.backingStore.get("allowedDeviceCount");
}
/**
* Gets the backingStore property value. Stores model information.
* @return a {@link BackingStore}
*/
@jakarta.annotation.Nonnull
public BackingStore getBackingStore() {
return this.backingStore;
}
/**
* Gets the blockedDeviceCount property value. Total count of devices with Exchange Access State: Blocked.
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getBlockedDeviceCount() {
return this.backingStore.get("blockedDeviceCount");
}
/**
* The deserialization information for the current model
* @return a {@link Map>}
*/
@jakarta.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(6);
deserializerMap.put("allowedDeviceCount", (n) -> { this.setAllowedDeviceCount(n.getIntegerValue()); });
deserializerMap.put("blockedDeviceCount", (n) -> { this.setBlockedDeviceCount(n.getIntegerValue()); });
deserializerMap.put("@odata.type", (n) -> { this.setOdataType(n.getStringValue()); });
deserializerMap.put("quarantinedDeviceCount", (n) -> { this.setQuarantinedDeviceCount(n.getIntegerValue()); });
deserializerMap.put("unavailableDeviceCount", (n) -> { this.setUnavailableDeviceCount(n.getIntegerValue()); });
deserializerMap.put("unknownDeviceCount", (n) -> { this.setUnknownDeviceCount(n.getIntegerValue()); });
return deserializerMap;
}
/**
* Gets the @odata.type property value. The OdataType property
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getOdataType() {
return this.backingStore.get("odataType");
}
/**
* Gets the quarantinedDeviceCount property value. Total count of devices with Exchange Access State: Quarantined.
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getQuarantinedDeviceCount() {
return this.backingStore.get("quarantinedDeviceCount");
}
/**
* Gets the unavailableDeviceCount property value. Total count of devices for which no Exchange Access State could be found.
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getUnavailableDeviceCount() {
return this.backingStore.get("unavailableDeviceCount");
}
/**
* Gets the unknownDeviceCount property value. Total count of devices with Exchange Access State: Unknown.
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getUnknownDeviceCount() {
return this.backingStore.get("unknownDeviceCount");
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeIntegerValue("allowedDeviceCount", this.getAllowedDeviceCount());
writer.writeIntegerValue("blockedDeviceCount", this.getBlockedDeviceCount());
writer.writeStringValue("@odata.type", this.getOdataType());
writer.writeIntegerValue("quarantinedDeviceCount", this.getQuarantinedDeviceCount());
writer.writeIntegerValue("unavailableDeviceCount", this.getUnavailableDeviceCount());
writer.writeIntegerValue("unknownDeviceCount", this.getUnknownDeviceCount());
writer.writeAdditionalData(this.getAdditionalData());
}
/**
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param value Value to set for the AdditionalData property.
*/
public void setAdditionalData(@jakarta.annotation.Nullable final Map value) {
this.backingStore.set("additionalData", value);
}
/**
* Sets the allowedDeviceCount property value. Total count of devices with Exchange Access State: Allowed.
* @param value Value to set for the allowedDeviceCount property.
*/
public void setAllowedDeviceCount(@jakarta.annotation.Nullable final Integer value) {
this.backingStore.set("allowedDeviceCount", value);
}
/**
* Sets the backingStore property value. Stores model information.
* @param value Value to set for the backingStore property.
*/
public void setBackingStore(@jakarta.annotation.Nonnull final BackingStore value) {
Objects.requireNonNull(value);
this.backingStore = value;
}
/**
* Sets the blockedDeviceCount property value. Total count of devices with Exchange Access State: Blocked.
* @param value Value to set for the blockedDeviceCount property.
*/
public void setBlockedDeviceCount(@jakarta.annotation.Nullable final Integer value) {
this.backingStore.set("blockedDeviceCount", value);
}
/**
* Sets the @odata.type property value. The OdataType property
* @param value Value to set for the @odata.type property.
*/
public void setOdataType(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("odataType", value);
}
/**
* Sets the quarantinedDeviceCount property value. Total count of devices with Exchange Access State: Quarantined.
* @param value Value to set for the quarantinedDeviceCount property.
*/
public void setQuarantinedDeviceCount(@jakarta.annotation.Nullable final Integer value) {
this.backingStore.set("quarantinedDeviceCount", value);
}
/**
* Sets the unavailableDeviceCount property value. Total count of devices for which no Exchange Access State could be found.
* @param value Value to set for the unavailableDeviceCount property.
*/
public void setUnavailableDeviceCount(@jakarta.annotation.Nullable final Integer value) {
this.backingStore.set("unavailableDeviceCount", value);
}
/**
* Sets the unknownDeviceCount property value. Total count of devices with Exchange Access State: Unknown.
* @param value Value to set for the unknownDeviceCount property.
*/
public void setUnknownDeviceCount(@jakarta.annotation.Nullable final Integer value) {
this.backingStore.set("unknownDeviceCount", value);
}
}