/** * The TaskV2 model module. * @module Ntnx/TaskV2 * @version 4.3.1 * @class TaskV2 */ declare class TaskV2 { /** * Constructs a TaskV2 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/TaskV2} obj Optional instance to populate. * @param callFromChild {Boolean} Flag to recognise calling instance * @return {module:Ntnx/TaskV2} The populated TaskV2 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 of a task. * @return {string} */ getExtId(): string; /** * Sets A globally unique identifier of a task. * @param {string} extId A globally unique identifier of a task. */ setExtId(extId: string): void; extId: string; /** * Returns A globally unique identifier of MSP task. * @return {string} */ getMspUuid(): string; /** * Sets A globally unique identifier of MSP task. * @param {string} mspUuid A globally unique identifier of MSP task. */ setMspUuid(mspUuid: string): void; mspUuid: string; /** * Returns The operation name being tracked by the task. * @return {string} */ getOperation(): string; /** * Sets The operation name being tracked by the task. * @param {string} operation The operation name being tracked by the task. */ setOperation(operation: string): void; operation: string; /** * Returns Description of the operation being tracked by the task. * @return {string} */ getOperationDescription(): string; /** * Sets Description of the operation being tracked by the task. * @param {string} operationDescription Description of the operation being 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 {string} */ getCreatedTime(): string; /** * Sets UTC date and time in RFC-3339 format when the task was created. * @param {string} createdTime UTC date and time in RFC-3339 format when the task was created. */ setCreatedTime(createdTime: string): void; createdTime: string; /** * Returns UTC date and time in RFC-3339 format when the task was started. * @return {string} */ getStartedTime(): string; /** * Sets UTC date and time in RFC-3339 format when the task was started. * @param {string} startedTime UTC date and time in RFC-3339 format when the task was started. */ setStartedTime(startedTime: string): void; startedTime: string; /** * Returns UTC date and time in RFC-3339 format when the task was completed. * @return {string} */ getCompletedTime(): string; /** * Sets UTC date and time in RFC-3339 format when the task was completed. * @param {string} completedTime UTC date and time in RFC-3339 format when the task was completed. */ setCompletedTime(completedTime: string): void; completedTime: string; /** * @return {TaskStatus} */ getStatus(): TaskStatus; /** * @param {TaskStatus} status */ setStatus(status: TaskStatus): void; status: string; /** * @return {string} */ getName(): string; /** * @param {string} name */ setName(name: string): void; name: string; /** * @return {string} */ getType(): string; /** * @param {string} type */ setType(type: string): void; type: 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. * @return {TaskReferenceInternal[]} */ getSubTasks(): TaskReferenceInternal[]; /** * Sets Reference to tasks spawned as children of the current task. * @param {TaskReferenceInternal[]} subTasks Reference to tasks spawned as children of the current task. */ 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 Signifies if the task can be cancelled. * @return {boolean} */ getIsCancelable(): boolean; /** * Sets Signifies if the task can be cancelled. * @param {boolean} isCancelable Signifies if the task can be cancelled. */ setIsCancelable(isCancelable: boolean): void; isCancelable: boolean; /** * @return {OwnerReference} */ getOwnedBy(): OwnerReference; /** * @param {OwnerReference} ownedBy */ setOwnedBy(ownedBy: OwnerReference): void; ownedBy: OwnerReference; /** * Returns Additional details on the task to aid the user with further actions post completion of the task. * @return {KVPair[]} */ getCompletionDetails(): KVPair[]; /** * Sets Additional details on the task to aid the user with further actions post completion of the task. * @param {KVPair[]} completionDetails Additional details on the task to aid the user with further actions post completion of the task. */ setCompletionDetails(completionDetails: KVPair[]): void; completionDetails: KVPair[]; /** * Returns Error details explaining a task failure. These would be populated only in the case of task failures. * @return {AppMessage[]} */ getErrorMessages(): AppMessage[]; /** * Sets Error details explaining a task failure. These would be populated only in the case of task failures. * @param {AppMessage[]} errorMessages Error details explaining a task failure. These would be populated only in the case of task failures. */ setErrorMessages(errorMessages: AppMessage[]): void; errorMessages: AppMessage[]; /** * Returns Provides an error message in the absence of a well-defined error message for the tasks created through legacy APIs. * @return {string} */ getLegacyErrorMessage(): string; /** * Sets Provides an error message in the absence of a well-defined error message for the tasks created through legacy APIs. * @param {string} legacyErrorMessage Provides an error message in the absence of a well-defined error message for the tasks created through legacy APIs. */ setLegacyErrorMessage(legacyErrorMessage: string): void; legacyErrorMessage: string; /** * Returns Warning messages to alert the user of issues which did not directly cause task failure. 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 task failure. These can be populated for any task. * @param {AppMessage[]} warnings Warning messages to alert the user of issues which did not directly cause task failure. 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 {string} */ getLastUpdatedTime(): string; /** * Sets UTC date and time in RFC-3339 format when the task was last updated. * @param {string} lastUpdatedTime UTC date and time in RFC-3339 format when the task was last updated. */ setLastUpdatedTime(lastUpdatedTime: string): void; lastUpdatedTime: string; /** * 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[]; 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; } declare namespace TaskV2 { namespace TypeEnum { const SERVICE: string; const APPLICATION: string; const CLUSTER: string; } /** * * */ type TypeEnum = string; } export default TaskV2; 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 ValidationError from "../../../validation/ValidationError";