com.microsoft.graph.beta.generated.models.AlertHistoryState Maven / Gradle / Ivy
package com.microsoft.graph.beta.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.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class AlertHistoryState implements AdditionalDataHolder, BackedModel, Parsable {
/**
* Stores model information.
*/
@jakarta.annotation.Nonnull
protected BackingStore backingStore;
/**
* Instantiates a new {@link AlertHistoryState} and sets the default values.
*/
public AlertHistoryState() {
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 AlertHistoryState}
*/
@jakarta.annotation.Nonnull
public static AlertHistoryState createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new AlertHistoryState();
}
/**
* 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 appId property value. The Application ID of the calling application that submitted an update (PATCH) to the alert. The appId should be extracted from the auth token and not entered manually by the calling application.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getAppId() {
return this.backingStore.get("appId");
}
/**
* Gets the assignedTo property value. UPN of user the alert was assigned to (note: alert.assignedTo only stores the last value/UPN).
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getAssignedTo() {
return this.backingStore.get("assignedTo");
}
/**
* Gets the backingStore property value. Stores model information.
* @return a {@link BackingStore}
*/
@jakarta.annotation.Nonnull
public BackingStore getBackingStore() {
return this.backingStore;
}
/**
* Gets the comments property value. Comment entered by signed-in user.
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getComments() {
return this.backingStore.get("comments");
}
/**
* Gets the feedback property value. Analyst feedback on the alert in this update. Possible values are: unknown, truePositive, falsePositive, benignPositive.
* @return a {@link AlertFeedback}
*/
@jakarta.annotation.Nullable
public AlertFeedback getFeedback() {
return this.backingStore.get("feedback");
}
/**
* The deserialization information for the current model
* @return a {@link Map>}
*/
@jakarta.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(8);
deserializerMap.put("appId", (n) -> { this.setAppId(n.getStringValue()); });
deserializerMap.put("assignedTo", (n) -> { this.setAssignedTo(n.getStringValue()); });
deserializerMap.put("comments", (n) -> { this.setComments(n.getCollectionOfPrimitiveValues(String.class)); });
deserializerMap.put("feedback", (n) -> { this.setFeedback(n.getEnumValue(AlertFeedback::forValue)); });
deserializerMap.put("@odata.type", (n) -> { this.setOdataType(n.getStringValue()); });
deserializerMap.put("status", (n) -> { this.setStatus(n.getEnumValue(AlertStatus::forValue)); });
deserializerMap.put("updatedDateTime", (n) -> { this.setUpdatedDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("user", (n) -> { this.setUser(n.getStringValue()); });
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 status property value. Alert status value (if updated). Possible values are: unknown, newAlert, inProgress, resolved, dismissed.
* @return a {@link AlertStatus}
*/
@jakarta.annotation.Nullable
public AlertStatus getStatus() {
return this.backingStore.get("status");
}
/**
* Gets the updatedDateTime property value. Date and time of the alert update. The Timestamp 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 getUpdatedDateTime() {
return this.backingStore.get("updatedDateTime");
}
/**
* Gets the user property value. UPN of the signed-in user that updated the alert (taken from the bearer token - if in user/delegated auth mode).
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getUser() {
return this.backingStore.get("user");
}
/**
* 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.writeStringValue("appId", this.getAppId());
writer.writeStringValue("assignedTo", this.getAssignedTo());
writer.writeCollectionOfPrimitiveValues("comments", this.getComments());
writer.writeEnumValue("feedback", this.getFeedback());
writer.writeStringValue("@odata.type", this.getOdataType());
writer.writeEnumValue("status", this.getStatus());
writer.writeOffsetDateTimeValue("updatedDateTime", this.getUpdatedDateTime());
writer.writeStringValue("user", this.getUser());
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 appId property value. The Application ID of the calling application that submitted an update (PATCH) to the alert. The appId should be extracted from the auth token and not entered manually by the calling application.
* @param value Value to set for the appId property.
*/
public void setAppId(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("appId", value);
}
/**
* Sets the assignedTo property value. UPN of user the alert was assigned to (note: alert.assignedTo only stores the last value/UPN).
* @param value Value to set for the assignedTo property.
*/
public void setAssignedTo(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("assignedTo", 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 comments property value. Comment entered by signed-in user.
* @param value Value to set for the comments property.
*/
public void setComments(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("comments", value);
}
/**
* Sets the feedback property value. Analyst feedback on the alert in this update. Possible values are: unknown, truePositive, falsePositive, benignPositive.
* @param value Value to set for the feedback property.
*/
public void setFeedback(@jakarta.annotation.Nullable final AlertFeedback value) {
this.backingStore.set("feedback", 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 status property value. Alert status value (if updated). Possible values are: unknown, newAlert, inProgress, resolved, dismissed.
* @param value Value to set for the status property.
*/
public void setStatus(@jakarta.annotation.Nullable final AlertStatus value) {
this.backingStore.set("status", value);
}
/**
* Sets the updatedDateTime property value. Date and time of the alert update. The Timestamp 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 updatedDateTime property.
*/
public void setUpdatedDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("updatedDateTime", value);
}
/**
* Sets the user property value. UPN of the signed-in user that updated the alert (taken from the bearer token - if in user/delegated auth mode).
* @param value Value to set for the user property.
*/
public void setUser(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("user", value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy