![JAR search and dependency download from the Maven repository](/logo.png)
com.microsoft.graph.generated.models.RiskyUser 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;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class RiskyUser extends Entity implements Parsable {
/**
* Instantiates a new {@link RiskyUser} and sets the default values.
*/
public RiskyUser() {
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 RiskyUser}
*/
@jakarta.annotation.Nonnull
public static RiskyUser createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
final ParseNode mappingValueNode = parseNode.getChildNode("@odata.type");
if (mappingValueNode != null) {
final String mappingValue = mappingValueNode.getStringValue();
switch (mappingValue) {
case "#microsoft.graph.riskyUserHistoryItem": return new RiskyUserHistoryItem();
}
}
return new RiskyUser();
}
/**
* 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("history", (n) -> { this.setHistory(n.getCollectionOfObjectValues(RiskyUserHistoryItem::createFromDiscriminatorValue)); });
deserializerMap.put("isDeleted", (n) -> { this.setIsDeleted(n.getBooleanValue()); });
deserializerMap.put("isProcessing", (n) -> { this.setIsProcessing(n.getBooleanValue()); });
deserializerMap.put("riskDetail", (n) -> { this.setRiskDetail(n.getEnumValue(RiskDetail::forValue)); });
deserializerMap.put("riskLastUpdatedDateTime", (n) -> { this.setRiskLastUpdatedDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("riskLevel", (n) -> { this.setRiskLevel(n.getEnumValue(RiskLevel::forValue)); });
deserializerMap.put("riskState", (n) -> { this.setRiskState(n.getEnumValue(RiskState::forValue)); });
deserializerMap.put("userDisplayName", (n) -> { this.setUserDisplayName(n.getStringValue()); });
deserializerMap.put("userPrincipalName", (n) -> { this.setUserPrincipalName(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the history property value. The activity related to user risk level change
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getHistory() {
return this.backingStore.get("history");
}
/**
* Gets the isDeleted property value. Indicates whether the user is deleted. Possible values are: true, false.
* @return a {@link Boolean}
*/
@jakarta.annotation.Nullable
public Boolean getIsDeleted() {
return this.backingStore.get("isDeleted");
}
/**
* Gets the isProcessing property value. Indicates whether the backend is processing a user's risky state.
* @return a {@link Boolean}
*/
@jakarta.annotation.Nullable
public Boolean getIsProcessing() {
return this.backingStore.get("isProcessing");
}
/**
* Gets the riskDetail property value. The possible values are none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal, m365DAdminDismissedDetection, userChangedPasswordOnPremises, adminDismissedRiskForSignIn, adminConfirmedAccountSafe. You must use the Prefer: include-unknown-enum-members request header to get the following value or values in this evolvable enum: adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal, m365DAdminDismissedDetection, userChangedPasswordOnPremises, adminDismissedRiskForSignIn, adminConfirmedAccountSafe.
* @return a {@link RiskDetail}
*/
@jakarta.annotation.Nullable
public RiskDetail getRiskDetail() {
return this.backingStore.get("riskDetail");
}
/**
* Gets the riskLastUpdatedDateTime property value. The date and time that the risky user was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getRiskLastUpdatedDateTime() {
return this.backingStore.get("riskLastUpdatedDateTime");
}
/**
* Gets the riskLevel property value. Level of the detected risky user. Possible values are: low, medium, high, hidden, none, unknownFutureValue.
* @return a {@link RiskLevel}
*/
@jakarta.annotation.Nullable
public RiskLevel getRiskLevel() {
return this.backingStore.get("riskLevel");
}
/**
* Gets the riskState property value. State of the user's risk. Possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue.
* @return a {@link RiskState}
*/
@jakarta.annotation.Nullable
public RiskState getRiskState() {
return this.backingStore.get("riskState");
}
/**
* Gets the userDisplayName property value. Risky user display name.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getUserDisplayName() {
return this.backingStore.get("userDisplayName");
}
/**
* Gets the userPrincipalName property value. Risky user principal name.
* @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.writeCollectionOfObjectValues("history", this.getHistory());
writer.writeBooleanValue("isDeleted", this.getIsDeleted());
writer.writeBooleanValue("isProcessing", this.getIsProcessing());
writer.writeEnumValue("riskDetail", this.getRiskDetail());
writer.writeOffsetDateTimeValue("riskLastUpdatedDateTime", this.getRiskLastUpdatedDateTime());
writer.writeEnumValue("riskLevel", this.getRiskLevel());
writer.writeEnumValue("riskState", this.getRiskState());
writer.writeStringValue("userDisplayName", this.getUserDisplayName());
writer.writeStringValue("userPrincipalName", this.getUserPrincipalName());
}
/**
* Sets the history property value. The activity related to user risk level change
* @param value Value to set for the history property.
*/
public void setHistory(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("history", value);
}
/**
* Sets the isDeleted property value. Indicates whether the user is deleted. Possible values are: true, false.
* @param value Value to set for the isDeleted property.
*/
public void setIsDeleted(@jakarta.annotation.Nullable final Boolean value) {
this.backingStore.set("isDeleted", value);
}
/**
* Sets the isProcessing property value. Indicates whether the backend is processing a user's risky state.
* @param value Value to set for the isProcessing property.
*/
public void setIsProcessing(@jakarta.annotation.Nullable final Boolean value) {
this.backingStore.set("isProcessing", value);
}
/**
* Sets the riskDetail property value. The possible values are none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal, m365DAdminDismissedDetection, userChangedPasswordOnPremises, adminDismissedRiskForSignIn, adminConfirmedAccountSafe. You must use the Prefer: include-unknown-enum-members request header to get the following value or values in this evolvable enum: adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal, m365DAdminDismissedDetection, userChangedPasswordOnPremises, adminDismissedRiskForSignIn, adminConfirmedAccountSafe.
* @param value Value to set for the riskDetail property.
*/
public void setRiskDetail(@jakarta.annotation.Nullable final RiskDetail value) {
this.backingStore.set("riskDetail", value);
}
/**
* Sets the riskLastUpdatedDateTime property value. The date and time that the risky user was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
* @param value Value to set for the riskLastUpdatedDateTime property.
*/
public void setRiskLastUpdatedDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("riskLastUpdatedDateTime", value);
}
/**
* Sets the riskLevel property value. Level of the detected risky user. Possible values are: low, medium, high, hidden, none, unknownFutureValue.
* @param value Value to set for the riskLevel property.
*/
public void setRiskLevel(@jakarta.annotation.Nullable final RiskLevel value) {
this.backingStore.set("riskLevel", value);
}
/**
* Sets the riskState property value. State of the user's risk. Possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue.
* @param value Value to set for the riskState property.
*/
public void setRiskState(@jakarta.annotation.Nullable final RiskState value) {
this.backingStore.set("riskState", value);
}
/**
* Sets the userDisplayName property value. Risky user display name.
* @param value Value to set for the userDisplayName property.
*/
public void setUserDisplayName(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("userDisplayName", value);
}
/**
* Sets the userPrincipalName property value. Risky user principal name.
* @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