/** * The Task model module. * @module Ntnx/Task * @version 4.4.2 * @class Task */ export default class Task { /** * Constructs a Task from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from data to obj if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:Ntnx/Task} obj Optional instance to populate. * @param callFromChild {Boolean} Flag to recognise calling instance * @return {module:Ntnx/Task} The populated Task instance. */ static constructFromObject(data: any, obj?: any, callFromChild?: boolean): any; /** * Converts a given snake_case string to camelCase. * @param {string} snakeStr - The input string in snake_case format. * @returns {string} - The converted string in camelCase format. */ static snakeToCamel(snakeStr: string): string; $objectType: string; /** @type {object} */ $reserved: object; /** @type {object} */ $unknownFields: object; /** * Returns A globally unique identifier for a task. * @return {string} */ getExtId(): string; /** * Sets A globally unique identifier for a task. * @param {string} extId A globally unique identifier for a task. */ setExtId(extId: string): void; extId: string; /** * Returns The name of the operation being tracked by the task. * @return {string} */ getOperation(): string; /** * Sets The name of the operation being tracked by the task. * @param {string} operation The name of the operation being tracked by the task. */ setOperation(operation: string): void; operation: string; /** * Returns Description of the operation tracked by the task. * @return {string} */ getOperationDescription(): string; /** * Sets Description of the operation tracked by the task. * @param {string} operationDescription Description of the operation tracked by the task. */ setOperationDescription(operationDescription: string): void; operationDescription: string; /** * @return {TaskReferenceInternal} */ getParentTask(): TaskReferenceInternal; /** * @param {TaskReferenceInternal} parentTask */ setParentTask(parentTask: TaskReferenceInternal): void; parentTask: TaskReferenceInternal; /** * Returns UTC date and time in RFC-3339 format when the task was created. * @return {Date} */ getCreatedTime(): Date; /** * Sets UTC date and time in RFC-3339 format when the task was created. * @param {Date} createdTime UTC date and time in RFC-3339 format when the task was created. */ setCreatedTime(createdTime: Date): void; createdTime: Date; /** * Returns UTC date and time in RFC-3339 format when the task was started. * @return {Date} */ getStartedTime(): Date; /** * Sets UTC date and time in RFC-3339 format when the task was started. * @param {Date} startedTime UTC date and time in RFC-3339 format when the task was started. */ setStartedTime(startedTime: Date): void; startedTime: Date; /** * Returns UTC date and time in RFC-3339 format when the task was completed. * @return {Date} */ getCompletedTime(): Date; /** * Sets UTC date and time in RFC-3339 format when the task was completed. * @param {Date} completedTime UTC date and time in RFC-3339 format when the task was completed. */ setCompletedTime(completedTime: Date): void; completedTime: Date; /** * @return {TaskStatus} */ getStatus(): TaskStatus; /** * @param {TaskStatus} status */ setStatus(status: TaskStatus): void; status: string; /** * Returns Task progress expressed as a percentage. * minimum: 0 * maximum: 100 * @return {Number} */ getProgressPercentage(): number; /** * Sets Task progress expressed as a percentage. * @param {Number} progressPercentage Task progress expressed as a percentage. */ setProgressPercentage(progressPercentage: number): void; progressPercentage: number; /** * Returns Reference to entities associated with the task. * @return {EntityReference[]} */ getEntitiesAffected(): EntityReference[]; /** * Sets Reference to entities associated with the task. * @param {EntityReference[]} entitiesAffected Reference to entities associated with the task. */ setEntitiesAffected(entitiesAffected: EntityReference[]): void; entitiesAffected: EntityReference[]; /** * Returns Reference to tasks spawned as children of the current task. The Task Get API operation response would contain a limited number of subtask references. To retrieve the full list of subtasks for a task, use the parent task filter in the Task List API operation. * @return {TaskReferenceInternal[]} */ getSubTasks(): TaskReferenceInternal[]; /** * Sets Reference to tasks spawned as children of the current task. The Task Get API operation response would contain a limited number of subtask references. To retrieve the full list of subtasks for a task, use the parent task filter in the Task List API operation. * @param {TaskReferenceInternal[]} subTasks Reference to tasks spawned as children of the current task. The Task Get API operation response would contain a limited number of subtask references. To retrieve the full list of subtasks for a task, use the parent task filter in the Task List API operation. */ setSubTasks(subTasks: TaskReferenceInternal[]): void; subTasks: TaskReferenceInternal[]; /** * Returns List of steps completed as part of the task. * @return {TaskStep[]} */ getSubSteps(): TaskStep[]; /** * Sets List of steps completed as part of the task. * @param {TaskStep[]} subSteps List of steps completed as part of the task. */ setSubSteps(subSteps: TaskStep[]): void; subSteps: TaskStep[]; /** * Returns Indicates whether the task can be canceled. * @return {boolean} */ getIsCancelable(): boolean; /** * Sets Indicates whether the task can be canceled. * @param {boolean} isCancelable Indicates whether the task can be canceled. */ setIsCancelable(isCancelable: boolean): void; isCancelable: boolean; /** * @return {OwnerReference} */ getOwnedBy(): OwnerReference; /** * @param {OwnerReference} ownedBy */ setOwnedBy(ownedBy: OwnerReference): void; ownedBy: OwnerReference; /** * Returns Additional details about the task to help the user take further action after the task is completed. * @return {KVPair[]} */ getCompletionDetails(): KVPair[]; /** * Sets Additional details about the task to help the user take further action after the task is completed. * @param {KVPair[]} completionDetails Additional details about the task to help the user take further action after the task is completed. */ setCompletionDetails(completionDetails: KVPair[]): void; completionDetails: KVPair[]; /** * Returns Error details that explain a task failure. These would only be populated if a task failed. * @return {AppMessage[]} */ getErrorMessages(): AppMessage[]; /** * Sets Error details that explain a task failure. These would only be populated if a task failed. * @param {AppMessage[]} errorMessages Error details that explain a task failure. These would only be populated if a task failed. */ setErrorMessages(errorMessages: AppMessage[]): void; errorMessages: AppMessage[]; /** * Returns Provides an error message in the absence of a well-defined error message for tasks created by legacy APIs. * @return {string} */ getLegacyErrorMessage(): string; /** * Sets Provides an error message in the absence of a well-defined error message for tasks created by legacy APIs. * @param {string} legacyErrorMessage Provides an error message in the absence of a well-defined error message for tasks created by legacy APIs. */ setLegacyErrorMessage(legacyErrorMessage: string): void; legacyErrorMessage: string; /** * Returns Warning messages to alert the user of issues which did not directly cause the task to fail.. These can be populated for any task. * @return {AppMessage[]} */ getWarnings(): AppMessage[]; /** * Sets Warning messages to alert the user of issues which did not directly cause the task to fail.. These can be populated for any task. * @param {AppMessage[]} warnings Warning messages to alert the user of issues which did not directly cause the task to fail.. These can be populated for any task. */ setWarnings(warnings: AppMessage[]): void; warnings: AppMessage[]; /** * Returns UTC date and time in RFC-3339 format when the task was last updated. * @return {Date} */ getLastUpdatedTime(): Date; /** * Sets UTC date and time in RFC-3339 format when the task was last updated. * @param {Date} lastUpdatedTime UTC date and time in RFC-3339 format when the task was last updated. */ setLastUpdatedTime(lastUpdatedTime: Date): void; lastUpdatedTime: Date; /** * Returns List of globally unique identifiers for clusters associated with the task or any of its subtasks. * @return {string[]} */ getClusterExtIds(): string[]; /** * Sets List of globally unique identifiers for clusters associated with the task or any of its subtasks. * @param {string[]} clusterExtIds List of globally unique identifiers for clusters associated with the task or any of its subtasks. */ setClusterExtIds(clusterExtIds: string[]): void; clusterExtIds: string[]; /** * @return {TaskReferenceInternal} */ getRootTask(): TaskReferenceInternal; /** * @param {TaskReferenceInternal} rootTask */ setRootTask(rootTask: TaskReferenceInternal): void; rootTask: TaskReferenceInternal; /** * Returns Indicates whether or not the task is a background task. * @return {boolean} */ getIsBackgroundTask(): boolean; /** * Sets Indicates whether or not the task is a background task. * @param {boolean} isBackgroundTask Indicates whether or not the task is a background task. */ setIsBackgroundTask(isBackgroundTask: boolean): void; isBackgroundTask: boolean; /** * Returns Number of tasks spawned as children of the current task. * @return {Number} */ getNumberOfSubtasks(): number; /** * Sets Number of tasks spawned as children of the current task. * @param {Number} numberOfSubtasks Number of tasks spawned as children of the current task. */ setNumberOfSubtasks(numberOfSubtasks: number): void; numberOfSubtasks: number; /** * Returns Number of entities associated with the task. * @return {Number} */ getNumberOfEntitiesAffected(): number; /** * Sets Number of entities associated with the task. * @param {Number} numberOfEntitiesAffected Number of entities associated with the task. */ setNumberOfEntitiesAffected(numberOfEntitiesAffected: number): void; numberOfEntitiesAffected: number; /** * Returns Reference to resources associated with the task. * @return {ResourceLink[]} */ getResourceLinks(): ResourceLink[]; /** * Sets Reference to resources associated with the task. * @param {ResourceLink[]} resourceLinks Reference to resources associated with the task. */ setResourceLinks(resourceLinks: ResourceLink[]): void; resourceLinks: ResourceLink[]; /** * Returns Name of the application to which the task belongs. * @return {string} */ getAppName(): string; /** * Sets Name of the application to which the task belongs. * @param {string} appName Name of the application to which the task belongs. */ setAppName(appName: string): void; appName: string; /** * @return {TaskBatchSummary} */ getBatchSummary(): TaskBatchSummary; /** * @param {TaskBatchSummary} batchSummary */ setBatchSummary(batchSummary: TaskBatchSummary): void; batchSummary: TaskBatchSummary; /** * Returns A globally unique identifier of the project to which the task belongs. * @return {string} */ getProjectExtId(): string; /** * Sets A globally unique identifier of the project to which the task belongs. * @param {string} projectExtId A globally unique identifier of the project to which the task belongs. */ setProjectExtId(projectExtId: string): void; projectExtId: string; get$Reserved(): any; get$ObjectType(): string; get$UnknownFields(): any; toJson(forMutation: any): any; validate(scope: any, properties: any, ...args: any[]): Promise; validateProperty(scope: any, property: any): ValidationError; #private; } import TaskReferenceInternal from "./TaskReferenceInternal"; import TaskStatus from "./TaskStatus"; import EntityReference from "./EntityReference"; import TaskStep from "./TaskStep"; import OwnerReference from "./OwnerReference"; import KVPair from "../../../common/v1/config/KVPair"; import AppMessage from "../error/AppMessage"; import ResourceLink from "./ResourceLink"; import TaskBatchSummary from "./TaskBatchSummary"; import ValidationError from "../../../validation/ValidationError";