com.microsoft.graph.beta.generated.models.DeviceManagementIntentUserState Maven / Gradle / Ivy
package com.microsoft.graph.beta.models;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* Entity that represents user state for an intent
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class DeviceManagementIntentUserState extends Entity implements Parsable {
/**
* Instantiates a new {@link DeviceManagementIntentUserState} and sets the default values.
*/
public DeviceManagementIntentUserState() {
super();
}
/**
* 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 DeviceManagementIntentUserState}
*/
@jakarta.annotation.Nonnull
public static DeviceManagementIntentUserState createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new DeviceManagementIntentUserState();
}
/**
* Gets the deviceCount property value. Count of Devices that belongs to a user for an intent
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getDeviceCount() {
return this.backingStore.get("deviceCount");
}
/**
* The deserialization information for the current model
* @return a {@link Map>}
*/
@jakarta.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(super.getFieldDeserializers());
deserializerMap.put("deviceCount", (n) -> { this.setDeviceCount(n.getIntegerValue()); });
deserializerMap.put("lastReportedDateTime", (n) -> { this.setLastReportedDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("state", (n) -> { this.setState(n.getEnumValue(ComplianceStatus::forValue)); });
deserializerMap.put("userName", (n) -> { this.setUserName(n.getStringValue()); });
deserializerMap.put("userPrincipalName", (n) -> { this.setUserPrincipalName(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the lastReportedDateTime property value. Last modified date time of an intent report
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getLastReportedDateTime() {
return this.backingStore.get("lastReportedDateTime");
}
/**
* Gets the state property value. The state property
* @return a {@link ComplianceStatus}
*/
@jakarta.annotation.Nullable
public ComplianceStatus getState() {
return this.backingStore.get("state");
}
/**
* Gets the userName property value. The user name that is being reported on a device
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getUserName() {
return this.backingStore.get("userName");
}
/**
* Gets the userPrincipalName property value. The user principal name that is being reported on a device
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getUserPrincipalName() {
return this.backingStore.get("userPrincipalName");
}
/**
* 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);
super.serialize(writer);
writer.writeIntegerValue("deviceCount", this.getDeviceCount());
writer.writeOffsetDateTimeValue("lastReportedDateTime", this.getLastReportedDateTime());
writer.writeEnumValue("state", this.getState());
writer.writeStringValue("userName", this.getUserName());
writer.writeStringValue("userPrincipalName", this.getUserPrincipalName());
}
/**
* Sets the deviceCount property value. Count of Devices that belongs to a user for an intent
* @param value Value to set for the deviceCount property.
*/
public void setDeviceCount(@jakarta.annotation.Nullable final Integer value) {
this.backingStore.set("deviceCount", value);
}
/**
* Sets the lastReportedDateTime property value. Last modified date time of an intent report
* @param value Value to set for the lastReportedDateTime property.
*/
public void setLastReportedDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("lastReportedDateTime", value);
}
/**
* Sets the state property value. The state property
* @param value Value to set for the state property.
*/
public void setState(@jakarta.annotation.Nullable final ComplianceStatus value) {
this.backingStore.set("state", value);
}
/**
* Sets the userName property value. The user name that is being reported on a device
* @param value Value to set for the userName property.
*/
public void setUserName(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("userName", value);
}
/**
* Sets the userPrincipalName property value. The user principal name that is being reported on a device
* @param value Value to set for the userPrincipalName property.
*/
public void setUserPrincipalName(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("userPrincipalName", value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy