com.microsoft.graph.generated.models.PrintTaskDefinition 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.util.HashMap;
import java.util.Map;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class PrintTaskDefinition extends Entity implements Parsable {
/**
* Instantiates a new {@link PrintTaskDefinition} and sets the default values.
*/
public PrintTaskDefinition() {
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 PrintTaskDefinition}
*/
@jakarta.annotation.Nonnull
public static PrintTaskDefinition createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new PrintTaskDefinition();
}
/**
* Gets the createdBy property value. The createdBy property
* @return a {@link AppIdentity}
*/
@jakarta.annotation.Nullable
public AppIdentity getCreatedBy() {
return this.backingStore.get("createdBy");
}
/**
* Gets the displayName property value. The name of the printTaskDefinition.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDisplayName() {
return this.backingStore.get("displayName");
}
/**
* 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("createdBy", (n) -> { this.setCreatedBy(n.getObjectValue(AppIdentity::createFromDiscriminatorValue)); });
deserializerMap.put("displayName", (n) -> { this.setDisplayName(n.getStringValue()); });
deserializerMap.put("tasks", (n) -> { this.setTasks(n.getCollectionOfObjectValues(PrintTask::createFromDiscriminatorValue)); });
return deserializerMap;
}
/**
* Gets the tasks property value. A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only.
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getTasks() {
return this.backingStore.get("tasks");
}
/**
* 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.writeObjectValue("createdBy", this.getCreatedBy());
writer.writeStringValue("displayName", this.getDisplayName());
writer.writeCollectionOfObjectValues("tasks", this.getTasks());
}
/**
* Sets the createdBy property value. The createdBy property
* @param value Value to set for the createdBy property.
*/
public void setCreatedBy(@jakarta.annotation.Nullable final AppIdentity value) {
this.backingStore.set("createdBy", value);
}
/**
* Sets the displayName property value. The name of the printTaskDefinition.
* @param value Value to set for the displayName property.
*/
public void setDisplayName(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("displayName", value);
}
/**
* Sets the tasks property value. A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only.
* @param value Value to set for the tasks property.
*/
public void setTasks(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("tasks", value);
}
}