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 java.util.List;
8   import com.fasterxml.jackson.annotation.JsonProperty;
9   
10  /**
11   * An error encountered by the Batch service when scheduling a job.
12   */
13  public class JobSchedulingError {
14      /**
15       * The category of the job scheduling error.
16       * Possible values include: 'userError', 'serverError'.
17       */
18      @JsonProperty(value = "category", required = true)
19      private ErrorCategory category;
20  
21      /**
22       * An identifier for the job scheduling error. Codes are invariant and are
23       * intended to be consumed programmatically.
24       */
25      @JsonProperty(value = "code")
26      private String code;
27  
28      /**
29       * A message describing the job scheduling error, intended to be suitable
30       * for display in a user interface.
31       */
32      @JsonProperty(value = "message")
33      private String message;
34  
35      /**
36       * A list of additional error details related to the scheduling error.
37       */
38      @JsonProperty(value = "details")
39      private List<NameValuePair> details;
40  
41      /**
42       * Get possible values include: 'userError', 'serverError'.
43       *
44       * @return the category value
45       */
46      public ErrorCategory category() {
47          return this.category;
48      }
49  
50      /**
51       * Set possible values include: 'userError', 'serverError'.
52       *
53       * @param category the category value to set
54       * @return the JobSchedulingError object itself.
55       */
56      public JobSchedulingError withCategory(ErrorCategory category) {
57          this.category = category;
58          return this;
59      }
60  
61      /**
62       * Get the code value.
63       *
64       * @return the code value
65       */
66      public String code() {
67          return this.code;
68      }
69  
70      /**
71       * Set the code value.
72       *
73       * @param code the code value to set
74       * @return the JobSchedulingError object itself.
75       */
76      public JobSchedulingError withCode(String code) {
77          this.code = code;
78          return this;
79      }
80  
81      /**
82       * Get the message value.
83       *
84       * @return the message value
85       */
86      public String message() {
87          return this.message;
88      }
89  
90      /**
91       * Set the message value.
92       *
93       * @param message the message value to set
94       * @return the JobSchedulingError object itself.
95       */
96      public JobSchedulingError withMessage(String message) {
97          this.message = message;
98          return this;
99      }
100 
101     /**
102      * Get the details value.
103      *
104      * @return the details value
105      */
106     public List<NameValuePair> details() {
107         return this.details;
108     }
109 
110     /**
111      * Set the details value.
112      *
113      * @param details the details value to set
114      * @return the JobSchedulingError object itself.
115      */
116     public JobSchedulingError withDetails(List<NameValuePair> details) {
117         this.details = details;
118         return this;
119     }
120 
121 }