com.microsoft.graph.generated.models.DeviceInstallState Maven / Gradle / Ivy
package com.microsoft.graph.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;
/**
* Contains properties for the installation state for a device.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class DeviceInstallState extends Entity implements Parsable {
/**
* Instantiates a new {@link DeviceInstallState} and sets the default values.
*/
public DeviceInstallState() {
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 DeviceInstallState}
*/
@jakarta.annotation.Nonnull
public static DeviceInstallState createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new DeviceInstallState();
}
/**
* Gets the deviceId property value. Device Id.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDeviceId() {
return this.backingStore.get("deviceId");
}
/**
* Gets the deviceName property value. Device name.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDeviceName() {
return this.backingStore.get("deviceName");
}
/**
* Gets the errorCode property value. The error code for install failures.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getErrorCode() {
return this.backingStore.get("errorCode");
}
/**
* 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("deviceId", (n) -> { this.setDeviceId(n.getStringValue()); });
deserializerMap.put("deviceName", (n) -> { this.setDeviceName(n.getStringValue()); });
deserializerMap.put("errorCode", (n) -> { this.setErrorCode(n.getStringValue()); });
deserializerMap.put("installState", (n) -> { this.setInstallState(n.getEnumValue(InstallState::forValue)); });
deserializerMap.put("lastSyncDateTime", (n) -> { this.setLastSyncDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("osDescription", (n) -> { this.setOsDescription(n.getStringValue()); });
deserializerMap.put("osVersion", (n) -> { this.setOsVersion(n.getStringValue()); });
deserializerMap.put("userName", (n) -> { this.setUserName(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the installState property value. Possible values for install state.
* @return a {@link InstallState}
*/
@jakarta.annotation.Nullable
public InstallState getInstallState() {
return this.backingStore.get("installState");
}
/**
* Gets the lastSyncDateTime property value. Last sync date and time.
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getLastSyncDateTime() {
return this.backingStore.get("lastSyncDateTime");
}
/**
* Gets the osDescription property value. OS Description.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getOsDescription() {
return this.backingStore.get("osDescription");
}
/**
* Gets the osVersion property value. OS Version.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getOsVersion() {
return this.backingStore.get("osVersion");
}
/**
* Gets the userName property value. Device User Name.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getUserName() {
return this.backingStore.get("userName");
}
/**
* 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.writeStringValue("deviceId", this.getDeviceId());
writer.writeStringValue("deviceName", this.getDeviceName());
writer.writeStringValue("errorCode", this.getErrorCode());
writer.writeEnumValue("installState", this.getInstallState());
writer.writeOffsetDateTimeValue("lastSyncDateTime", this.getLastSyncDateTime());
writer.writeStringValue("osDescription", this.getOsDescription());
writer.writeStringValue("osVersion", this.getOsVersion());
writer.writeStringValue("userName", this.getUserName());
}
/**
* Sets the deviceId property value. Device Id.
* @param value Value to set for the deviceId property.
*/
public void setDeviceId(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("deviceId", value);
}
/**
* Sets the deviceName property value. Device name.
* @param value Value to set for the deviceName property.
*/
public void setDeviceName(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("deviceName", value);
}
/**
* Sets the errorCode property value. The error code for install failures.
* @param value Value to set for the errorCode property.
*/
public void setErrorCode(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("errorCode", value);
}
/**
* Sets the installState property value. Possible values for install state.
* @param value Value to set for the installState property.
*/
public void setInstallState(@jakarta.annotation.Nullable final InstallState value) {
this.backingStore.set("installState", value);
}
/**
* Sets the lastSyncDateTime property value. Last sync date and time.
* @param value Value to set for the lastSyncDateTime property.
*/
public void setLastSyncDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("lastSyncDateTime", value);
}
/**
* Sets the osDescription property value. OS Description.
* @param value Value to set for the osDescription property.
*/
public void setOsDescription(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("osDescription", value);
}
/**
* Sets the osVersion property value. OS Version.
* @param value Value to set for the osVersion property.
*/
public void setOsVersion(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("osVersion", value);
}
/**
* Sets the userName property value. Device User Name.
* @param value Value to set for the userName property.
*/
public void setUserName(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("userName", value);
}
}