Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Generated file ..
*
* Product version: 4.0.3-alpha-2
*
* Part of the Nutanix Prism Versioned APIs
*
* (c) 2023 Nutanix Inc. All rights reserved
*
*/
package com.nutanix.dp1.pri.prism.v4.config;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.AccessLevel;
import com.nutanix.devplatform.models.PrettyModeViews.*;
import com.fasterxml.jackson.annotation.JsonView;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.nutanix.dp1.pri.deserializers.PriObjectTypeTypedObject;
import javax.validation.constraints.*;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.nutanix.dp1.pri.deserializers.PriDeserializerUtils.*;
/**
* The task object tracking an asynchronous operation.
*/
@Data
@lombok.extern.slf4j.Slf4j
public class Task implements java.io.Serializable, PriObjectTypeTypedObject {
public Task() {
this.$objectType = this.initialize$objectType();
this.$reserved = new java.util.LinkedHashMap<>();
this.$reserved.put("$fqObjectType", this.initialize$fqObjectType());
this.$unknownFields = new java.util.LinkedHashMap<>();
}
@lombok.Builder(builderMethodName = "TaskBuilder")
public Task(String extId, String operation, String operationDescription, com.nutanix.dp1.pri.prism.v4.config.TaskReferenceInternal parentTask, java.time.OffsetDateTime createdTime, java.time.OffsetDateTime startedTime, java.time.OffsetDateTime completedTime, com.nutanix.dp1.pri.prism.v4.config.TaskStatus status, Integer progressPercentage, java.util.List entitiesAffected, java.util.List subTasks, java.util.List subSteps, Boolean isCancelable, com.nutanix.dp1.pri.prism.v4.config.OwnerReference ownedBy, java.util.List completionDetails, java.util.List errorMessages, String legacyErrorMessage, java.util.List warnings, java.time.OffsetDateTime lastUpdatedTime, java.util.List clusterExtIds) {
this.$objectType = this.initialize$objectType();
this.$reserved = new java.util.LinkedHashMap<>();
this.$reserved.put("$fqObjectType", this.initialize$fqObjectType());
this.$unknownFields = new java.util.LinkedHashMap<>();
this.setExtId(extId);
this.setOperation(operation);
this.setOperationDescription(operationDescription);
this.setParentTask(parentTask);
this.setCreatedTime(createdTime);
this.setStartedTime(startedTime);
this.setCompletedTime(completedTime);
this.setStatus(status);
this.setProgressPercentage(progressPercentage);
this.setEntitiesAffected(entitiesAffected);
this.setSubTasks(subTasks);
this.setSubSteps(subSteps);
this.setIsCancelable(isCancelable);
this.setOwnedBy(ownedBy);
this.setCompletionDetails(completionDetails);
this.setErrorMessages(errorMessages);
this.setLegacyErrorMessage(legacyErrorMessage);
this.setWarnings(warnings);
this.setLastUpdatedTime(lastUpdatedTime);
this.setClusterExtIds(clusterExtIds);
}
protected String initialize$objectType() {
return "prism.v4.config.Task";
}
protected String initialize$fqObjectType() {
return "prism.v4.r0.a2.config.Task";
}
@JsonAnySetter
private void setUndeserializedFields(String name, String value) {
$unknownFields.put(name, value);
}
@javax.validation.constraints.Pattern(regexp="^[a-zA-Z0-9/+]*={0,2}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}")
private String extId = null;
/**
* A globally unique identifier of a task.
*/
public void setExtId(String extId) {
if (this.extId == null) {
this.extId = extId;
}
else {
log.warn("Read-only property extId already contains a non-null value and cannot be set again");
}
}
private String operation = null;
/**
* The operation name being tracked by the task.
*/
public void setOperation(String operation) {
if (this.operation == null) {
this.operation = operation;
}
else {
log.warn("Read-only property operation already contains a non-null value and cannot be set again");
}
}
private String operationDescription = null;
/**
* Description of the operation being tracked by the task.
*/
public void setOperationDescription(String operationDescription) {
if (this.operationDescription == null) {
this.operationDescription = operationDescription;
}
else {
log.warn("Read-only property operationDescription already contains a non-null value and cannot be set again");
}
}
private OffsetDateTime createdTime = null;
/**
* UTC date and time in RFC-3339 format when the task was created.
*/
public void setCreatedTime(OffsetDateTime createdTime) {
if (this.createdTime == null) {
this.createdTime = createdTime;
}
else {
log.warn("Read-only property createdTime already contains a non-null value and cannot be set again");
}
}
private OffsetDateTime startedTime = null;
/**
* UTC date and time in RFC-3339 format when the task was started.
*/
public void setStartedTime(OffsetDateTime startedTime) {
if (this.startedTime == null) {
this.startedTime = startedTime;
}
else {
log.warn("Read-only property startedTime already contains a non-null value and cannot be set again");
}
}
private OffsetDateTime completedTime = null;
/**
* UTC date and time in RFC-3339 format when the task was completed.
*/
public void setCompletedTime(OffsetDateTime completedTime) {
if (this.completedTime == null) {
this.completedTime = completedTime;
}
else {
log.warn("Read-only property completedTime already contains a non-null value and cannot be set again");
}
}
@javax.validation.constraints.Max(value = 100)
@javax.validation.constraints.Min(value = 0)
private Integer progressPercentage = null;
/**
* Task progress expressed as a percentage.
*/
public void setProgressPercentage(Integer progressPercentage) {
if (this.progressPercentage == null) {
this.progressPercentage = progressPercentage;
}
else {
log.warn("Read-only property progressPercentage already contains a non-null value and cannot be set again");
}
}
@javax.validation.constraints.Size(min = 0, max = 1000)
private List entitiesAffected = null;
/**
* Reference to entities associated with the task.
*/
public void setEntitiesAffected(List entitiesAffected) {
if (this.entitiesAffected == null) {
this.entitiesAffected = entitiesAffected;
}
else {
log.warn("Read-only property entitiesAffected already contains a non-null value and cannot be set again");
}
}
@javax.validation.constraints.Size(min = 0, max = 1000)
private List subTasks = null;
/**
* Reference to tasks spawned as children of the current task.
*/
public void setSubTasks(List subTasks) {
if (this.subTasks == null) {
this.subTasks = subTasks;
}
else {
log.warn("Read-only property subTasks already contains a non-null value and cannot be set again");
}
}
@javax.validation.constraints.Size(min = 0, max = 100)
private List subSteps = null;
/**
* List of steps completed as part of the task.
*/
public void setSubSteps(List subSteps) {
if (this.subSteps == null) {
this.subSteps = subSteps;
}
else {
log.warn("Read-only property subSteps already contains a non-null value and cannot be set again");
}
}
private Boolean isCancelable = null;
/**
* Signifies if the task can be cancelled.
*/
public void setIsCancelable(Boolean isCancelable) {
if (this.isCancelable == null) {
this.isCancelable = isCancelable;
}
else {
log.warn("Read-only property isCancelable already contains a non-null value and cannot be set again");
}
}
@javax.validation.constraints.Size(min = 0, max = 100)
private List completionDetails = null;
/**
* Additional details on the task to aid the user with further actions post completion of the task.
*/
public void setCompletionDetails(List completionDetails) {
if (this.completionDetails == null) {
this.completionDetails = completionDetails;
}
else {
log.warn("Read-only property completionDetails already contains a non-null value and cannot be set again");
}
}
@javax.validation.constraints.Size(min = 0, max = 100)
private List errorMessages = null;
/**
* Error details explaining a task failure. These would be populated only in the case of task failures.
*/
public void setErrorMessages(List errorMessages) {
if (this.errorMessages == null) {
this.errorMessages = errorMessages;
}
else {
log.warn("Read-only property errorMessages already contains a non-null value and cannot be set again");
}
}
private String legacyErrorMessage = null;
/**
* Provides an error message in the absence of a well-defined error message for the tasks created through legacy APIs.
*/
public void setLegacyErrorMessage(String legacyErrorMessage) {
if (this.legacyErrorMessage == null) {
this.legacyErrorMessage = legacyErrorMessage;
}
else {
log.warn("Read-only property legacyErrorMessage already contains a non-null value and cannot be set again");
}
}
@javax.validation.constraints.Size(min = 0, max = 100)
private List warnings = null;
/**
* Warning messages to alert the user of issues which did not directly cause task failure. These can be populated for any task.
*/
public void setWarnings(List warnings) {
if (this.warnings == null) {
this.warnings = warnings;
}
else {
log.warn("Read-only property warnings already contains a non-null value and cannot be set again");
}
}
private OffsetDateTime lastUpdatedTime = null;
/**
* UTC date and time in RFC-3339 format when the task was last updated.
*/
public void setLastUpdatedTime(OffsetDateTime lastUpdatedTime) {
if (this.lastUpdatedTime == null) {
this.lastUpdatedTime = lastUpdatedTime;
}
else {
log.warn("Read-only property lastUpdatedTime already contains a non-null value and cannot be set again");
}
}
@javax.validation.constraints.Size(min = 0, max = 1000)
private List clusterExtIds = null;
/**
* List of globally unique identifiers for clusters associated with the task or any of its subtasks.
*/
public void setClusterExtIds(List clusterExtIds) {
if (this.clusterExtIds == null) {
this.clusterExtIds = clusterExtIds;
}
else {
log.warn("Read-only property clusterExtIds already contains a non-null value and cannot be set again");
}
}
/**
*
*/
@JsonProperty("parentTask")
public com.nutanix.dp1.pri.prism.v4.config.TaskReferenceInternal parentTask = null;
/**
*
*/
@JsonProperty("status")
public com.nutanix.dp1.pri.prism.v4.config.TaskStatus status = null;
/**
*
*/
@JsonProperty("ownedBy")
public com.nutanix.dp1.pri.prism.v4.config.OwnerReference ownedBy = null;
@Getter
@JsonView({StandardView.class})
protected final Map $reserved;
@Getter
@JsonView({StandardView.class})
protected final String $objectType;
@Getter
@JsonView({StandardView.class})
protected final Map $unknownFields;
}