• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/aiplatform/v1/job_state.proto
18 
19 package com.google.cloud.aiplatform.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Describes the state of a job.
26  * </pre>
27  *
28  * Protobuf enum {@code google.cloud.aiplatform.v1.JobState}
29  */
30 public enum JobState implements com.google.protobuf.ProtocolMessageEnum {
31   /**
32    *
33    *
34    * <pre>
35    * The job state is unspecified.
36    * </pre>
37    *
38    * <code>JOB_STATE_UNSPECIFIED = 0;</code>
39    */
40   JOB_STATE_UNSPECIFIED(0),
41   /**
42    *
43    *
44    * <pre>
45    * The job has been just created or resumed and processing has not yet begun.
46    * </pre>
47    *
48    * <code>JOB_STATE_QUEUED = 1;</code>
49    */
50   JOB_STATE_QUEUED(1),
51   /**
52    *
53    *
54    * <pre>
55    * The service is preparing to run the job.
56    * </pre>
57    *
58    * <code>JOB_STATE_PENDING = 2;</code>
59    */
60   JOB_STATE_PENDING(2),
61   /**
62    *
63    *
64    * <pre>
65    * The job is in progress.
66    * </pre>
67    *
68    * <code>JOB_STATE_RUNNING = 3;</code>
69    */
70   JOB_STATE_RUNNING(3),
71   /**
72    *
73    *
74    * <pre>
75    * The job completed successfully.
76    * </pre>
77    *
78    * <code>JOB_STATE_SUCCEEDED = 4;</code>
79    */
80   JOB_STATE_SUCCEEDED(4),
81   /**
82    *
83    *
84    * <pre>
85    * The job failed.
86    * </pre>
87    *
88    * <code>JOB_STATE_FAILED = 5;</code>
89    */
90   JOB_STATE_FAILED(5),
91   /**
92    *
93    *
94    * <pre>
95    * The job is being cancelled. From this state the job may only go to
96    * either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
97    * </pre>
98    *
99    * <code>JOB_STATE_CANCELLING = 6;</code>
100    */
101   JOB_STATE_CANCELLING(6),
102   /**
103    *
104    *
105    * <pre>
106    * The job has been cancelled.
107    * </pre>
108    *
109    * <code>JOB_STATE_CANCELLED = 7;</code>
110    */
111   JOB_STATE_CANCELLED(7),
112   /**
113    *
114    *
115    * <pre>
116    * The job has been stopped, and can be resumed.
117    * </pre>
118    *
119    * <code>JOB_STATE_PAUSED = 8;</code>
120    */
121   JOB_STATE_PAUSED(8),
122   /**
123    *
124    *
125    * <pre>
126    * The job has expired.
127    * </pre>
128    *
129    * <code>JOB_STATE_EXPIRED = 9;</code>
130    */
131   JOB_STATE_EXPIRED(9),
132   /**
133    *
134    *
135    * <pre>
136    * The job is being updated. Only jobs in the `RUNNING` state can be updated.
137    * After updating, the job goes back to the `RUNNING` state.
138    * </pre>
139    *
140    * <code>JOB_STATE_UPDATING = 10;</code>
141    */
142   JOB_STATE_UPDATING(10),
143   UNRECOGNIZED(-1),
144   ;
145 
146   /**
147    *
148    *
149    * <pre>
150    * The job state is unspecified.
151    * </pre>
152    *
153    * <code>JOB_STATE_UNSPECIFIED = 0;</code>
154    */
155   public static final int JOB_STATE_UNSPECIFIED_VALUE = 0;
156   /**
157    *
158    *
159    * <pre>
160    * The job has been just created or resumed and processing has not yet begun.
161    * </pre>
162    *
163    * <code>JOB_STATE_QUEUED = 1;</code>
164    */
165   public static final int JOB_STATE_QUEUED_VALUE = 1;
166   /**
167    *
168    *
169    * <pre>
170    * The service is preparing to run the job.
171    * </pre>
172    *
173    * <code>JOB_STATE_PENDING = 2;</code>
174    */
175   public static final int JOB_STATE_PENDING_VALUE = 2;
176   /**
177    *
178    *
179    * <pre>
180    * The job is in progress.
181    * </pre>
182    *
183    * <code>JOB_STATE_RUNNING = 3;</code>
184    */
185   public static final int JOB_STATE_RUNNING_VALUE = 3;
186   /**
187    *
188    *
189    * <pre>
190    * The job completed successfully.
191    * </pre>
192    *
193    * <code>JOB_STATE_SUCCEEDED = 4;</code>
194    */
195   public static final int JOB_STATE_SUCCEEDED_VALUE = 4;
196   /**
197    *
198    *
199    * <pre>
200    * The job failed.
201    * </pre>
202    *
203    * <code>JOB_STATE_FAILED = 5;</code>
204    */
205   public static final int JOB_STATE_FAILED_VALUE = 5;
206   /**
207    *
208    *
209    * <pre>
210    * The job is being cancelled. From this state the job may only go to
211    * either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
212    * </pre>
213    *
214    * <code>JOB_STATE_CANCELLING = 6;</code>
215    */
216   public static final int JOB_STATE_CANCELLING_VALUE = 6;
217   /**
218    *
219    *
220    * <pre>
221    * The job has been cancelled.
222    * </pre>
223    *
224    * <code>JOB_STATE_CANCELLED = 7;</code>
225    */
226   public static final int JOB_STATE_CANCELLED_VALUE = 7;
227   /**
228    *
229    *
230    * <pre>
231    * The job has been stopped, and can be resumed.
232    * </pre>
233    *
234    * <code>JOB_STATE_PAUSED = 8;</code>
235    */
236   public static final int JOB_STATE_PAUSED_VALUE = 8;
237   /**
238    *
239    *
240    * <pre>
241    * The job has expired.
242    * </pre>
243    *
244    * <code>JOB_STATE_EXPIRED = 9;</code>
245    */
246   public static final int JOB_STATE_EXPIRED_VALUE = 9;
247   /**
248    *
249    *
250    * <pre>
251    * The job is being updated. Only jobs in the `RUNNING` state can be updated.
252    * After updating, the job goes back to the `RUNNING` state.
253    * </pre>
254    *
255    * <code>JOB_STATE_UPDATING = 10;</code>
256    */
257   public static final int JOB_STATE_UPDATING_VALUE = 10;
258 
getNumber()259   public final int getNumber() {
260     if (this == UNRECOGNIZED) {
261       throw new java.lang.IllegalArgumentException(
262           "Can't get the number of an unknown enum value.");
263     }
264     return value;
265   }
266 
267   /**
268    * @param value The numeric wire value of the corresponding enum entry.
269    * @return The enum associated with the given numeric wire value.
270    * @deprecated Use {@link #forNumber(int)} instead.
271    */
272   @java.lang.Deprecated
valueOf(int value)273   public static JobState valueOf(int value) {
274     return forNumber(value);
275   }
276 
277   /**
278    * @param value The numeric wire value of the corresponding enum entry.
279    * @return The enum associated with the given numeric wire value.
280    */
forNumber(int value)281   public static JobState forNumber(int value) {
282     switch (value) {
283       case 0:
284         return JOB_STATE_UNSPECIFIED;
285       case 1:
286         return JOB_STATE_QUEUED;
287       case 2:
288         return JOB_STATE_PENDING;
289       case 3:
290         return JOB_STATE_RUNNING;
291       case 4:
292         return JOB_STATE_SUCCEEDED;
293       case 5:
294         return JOB_STATE_FAILED;
295       case 6:
296         return JOB_STATE_CANCELLING;
297       case 7:
298         return JOB_STATE_CANCELLED;
299       case 8:
300         return JOB_STATE_PAUSED;
301       case 9:
302         return JOB_STATE_EXPIRED;
303       case 10:
304         return JOB_STATE_UPDATING;
305       default:
306         return null;
307     }
308   }
309 
internalGetValueMap()310   public static com.google.protobuf.Internal.EnumLiteMap<JobState> internalGetValueMap() {
311     return internalValueMap;
312   }
313 
314   private static final com.google.protobuf.Internal.EnumLiteMap<JobState> internalValueMap =
315       new com.google.protobuf.Internal.EnumLiteMap<JobState>() {
316         public JobState findValueByNumber(int number) {
317           return JobState.forNumber(number);
318         }
319       };
320 
getValueDescriptor()321   public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
322     if (this == UNRECOGNIZED) {
323       throw new java.lang.IllegalStateException(
324           "Can't get the descriptor of an unrecognized enum value.");
325     }
326     return getDescriptor().getValues().get(ordinal());
327   }
328 
getDescriptorForType()329   public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
330     return getDescriptor();
331   }
332 
getDescriptor()333   public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
334     return com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor().getEnumTypes().get(0);
335   }
336 
337   private static final JobState[] VALUES = values();
338 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)339   public static JobState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
340     if (desc.getType() != getDescriptor()) {
341       throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
342     }
343     if (desc.getIndex() == -1) {
344       return UNRECOGNIZED;
345     }
346     return VALUES[desc.getIndex()];
347   }
348 
349   private final int value;
350 
JobState(int value)351   private JobState(int value) {
352     this.value = value;
353   }
354 
355   // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.JobState)
356 }
357