All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.batch.protocol.models.SubtaskState Maven / Gradle / Ivy

There is a newer version: 11.2.0
Show newest version
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.azure.batch.protocol.models;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * Defines values for SubtaskState.
 */
public enum SubtaskState {
    /** The Task has been assigned to a Compute Node, but is waiting for a required Job Preparation Task to complete on the Compute Node. If the Job Preparation Task succeeds, the Task will move to running. If the Job Preparation Task fails, the Task will return to active and will be eligible to be assigned to a different Compute Node. */
    PREPARING("preparing"),

    /** The Task is running on a Compute Node. This includes task-level preparation such as downloading resource files or deploying Packages specified on the Task - it does not necessarily mean that the Task command line has started executing. */
    RUNNING("running"),

    /** The Task is no longer eligible to run, usually because the Task has finished successfully, or the Task has finished unsuccessfully and has exhausted its retry limit. A Task is also marked as completed if an error occurred launching the Task, or when the Task has been terminated. */
    COMPLETED("completed");

    /** The actual serialized value for a SubtaskState instance. */
    private String value;

    SubtaskState(String value) {
        this.value = value;
    }

    /**
     * Parses a serialized value to a SubtaskState instance.
     *
     * @param value the serialized value to parse.
     * @return the parsed SubtaskState object, or null if unable to parse.
     */
    @JsonCreator
    public static SubtaskState fromString(String value) {
        SubtaskState[] items = SubtaskState.values();
        for (SubtaskState item : items) {
            if (item.toString().equalsIgnoreCase(value)) {
                return item;
            }
        }
        return null;
    }

    @JsonValue
    @Override
    public String toString() {
        return this.value;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy