View Javadoc
1   // Copyright (c) Microsoft Corporation. All rights reserved.
2   // Licensed under the MIT License.
3   // Code generated by Microsoft (R) AutoRest Code Generator
4   
5   package com.microsoft.azure.batch.protocol.models;
6   
7   import com.fasterxml.jackson.annotation.JsonCreator;
8   import com.fasterxml.jackson.annotation.JsonValue;
9   
10  /**
11   * Defines values for OnTaskFailure.
12   */
13  public enum OnTaskFailure {
14      /** Do nothing. The job remains active unless terminated or disabled by some other means. */
15      NO_ACTION("noaction"),
16  
17      /** Take the action associated with the task exit condition in the task's exitConditions collection. (This may still result in no action being taken, if that is what the task specifies.). */
18      PERFORM_EXIT_OPTIONS_JOB_ACTION("performexitoptionsjobaction");
19  
20      /** The actual serialized value for a OnTaskFailure instance. */
21      private String value;
22  
23      OnTaskFailure(String value) {
24          this.value = value;
25      }
26  
27      /**
28       * Parses a serialized value to a OnTaskFailure instance.
29       *
30       * @param value the serialized value to parse.
31       * @return the parsed OnTaskFailure object, or null if unable to parse.
32       */
33      @JsonCreator
34      public static OnTaskFailure fromString(String value) {
35          OnTaskFailure[] items = OnTaskFailure.values();
36          for (OnTaskFailure item : items) {
37              if (item.toString().equalsIgnoreCase(value)) {
38                  return item;
39              }
40          }
41          return null;
42      }
43  
44      @JsonValue
45      @Override
46      public String toString() {
47          return this.value;
48      }
49  }