com.microsoft.graph.beta.generated.models.JobResponseBase 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;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class JobResponseBase extends Entity implements Parsable {
/**
* Instantiates a new {@link JobResponseBase} and sets the default values.
*/
public JobResponseBase() {
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 JobResponseBase}
*/
@jakarta.annotation.Nonnull
public static JobResponseBase 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.classificationJobResponse": return new ClassificationJobResponse();
case "#microsoft.graph.dlpEvaluatePoliciesJobResponse": return new DlpEvaluatePoliciesJobResponse();
case "#microsoft.graph.evaluateLabelJobResponse": return new EvaluateLabelJobResponse();
}
}
return new JobResponseBase();
}
/**
* Gets the creationDateTime property value. The creationDateTime property
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getCreationDateTime() {
return this.backingStore.get("creationDateTime");
}
/**
* Gets the endDateTime property value. The endDateTime property
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getEndDateTime() {
return this.backingStore.get("endDateTime");
}
/**
* Gets the error property value. The error property
* @return a {@link ClassificationError}
*/
@jakarta.annotation.Nullable
public ClassificationError getError() {
return this.backingStore.get("error");
}
/**
* 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("creationDateTime", (n) -> { this.setCreationDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("endDateTime", (n) -> { this.setEndDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("error", (n) -> { this.setError(n.getObjectValue(ClassificationError::createFromDiscriminatorValue)); });
deserializerMap.put("startDateTime", (n) -> { this.setStartDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("status", (n) -> { this.setStatus(n.getStringValue()); });
deserializerMap.put("tenantId", (n) -> { this.setTenantId(n.getStringValue()); });
deserializerMap.put("type", (n) -> { this.setType(n.getStringValue()); });
deserializerMap.put("userId", (n) -> { this.setUserId(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the startDateTime property value. The startDateTime property
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getStartDateTime() {
return this.backingStore.get("startDateTime");
}
/**
* Gets the status property value. The status property
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getStatus() {
return this.backingStore.get("status");
}
/**
* Gets the tenantId property value. The tenantId property
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getTenantId() {
return this.backingStore.get("tenantId");
}
/**
* Gets the type property value. The type property
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getType() {
return this.backingStore.get("type");
}
/**
* Gets the userId property value. The userId property
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getUserId() {
return this.backingStore.get("userId");
}
/**
* 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.writeOffsetDateTimeValue("creationDateTime", this.getCreationDateTime());
writer.writeOffsetDateTimeValue("endDateTime", this.getEndDateTime());
writer.writeObjectValue("error", this.getError());
writer.writeOffsetDateTimeValue("startDateTime", this.getStartDateTime());
writer.writeStringValue("status", this.getStatus());
writer.writeStringValue("tenantId", this.getTenantId());
writer.writeStringValue("type", this.getType());
writer.writeStringValue("userId", this.getUserId());
}
/**
* Sets the creationDateTime property value. The creationDateTime property
* @param value Value to set for the creationDateTime property.
*/
public void setCreationDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("creationDateTime", value);
}
/**
* Sets the endDateTime property value. The endDateTime property
* @param value Value to set for the endDateTime property.
*/
public void setEndDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("endDateTime", value);
}
/**
* Sets the error property value. The error property
* @param value Value to set for the error property.
*/
public void setError(@jakarta.annotation.Nullable final ClassificationError value) {
this.backingStore.set("error", value);
}
/**
* Sets the startDateTime property value. The startDateTime property
* @param value Value to set for the startDateTime property.
*/
public void setStartDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("startDateTime", value);
}
/**
* Sets the status property value. The status property
* @param value Value to set for the status property.
*/
public void setStatus(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("status", value);
}
/**
* Sets the tenantId property value. The tenantId property
* @param value Value to set for the tenantId property.
*/
public void setTenantId(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("tenantId", value);
}
/**
* Sets the type property value. The type property
* @param value Value to set for the type property.
*/
public void setType(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("type", value);
}
/**
* Sets the userId property value. The userId property
* @param value Value to set for the userId property.
*/
public void setUserId(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("userId", value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy