2222import com .google .common .base .MoreObjects ;
2323import com .google .common .collect .ImmutableList ;
2424import com .google .common .collect .Lists ;
25-
2625import java .io .Serializable ;
2726import java .util .List ;
2827import java .util .Objects ;
28+ import javax .annotation .Nullable ;
2929
3030/**
3131 * A Google BigQuery Job status. Objects of this class can be examined when polling an asynchronous
@@ -35,9 +35,7 @@ public class JobStatus implements Serializable {
3535
3636 private static final long serialVersionUID = -714976456815445365L ;
3737
38- /**
39- * Possible states that a BigQuery Job can assume.
40- */
38+ /** Possible states that a BigQuery Job can assume. */
4139 public static final class State extends StringEnumValue {
4240 private static final long serialVersionUID = 818920627219751204L ;
4341
@@ -49,18 +47,12 @@ public State apply(String constant) {
4947 }
5048 };
5149
52- private static final StringEnumType <State > type = new StringEnumType (
53- State .class ,
54- CONSTRUCTOR );
50+ private static final StringEnumType <State > type = new StringEnumType (State .class , CONSTRUCTOR );
5551
56- /**
57- * The BigQuery Job is waiting to be executed.
58- */
52+ /** The BigQuery Job is waiting to be executed. */
5953 public static final State PENDING = type .createAndRegister ("PENDING" );
6054
61- /**
62- * The BigQuery Job is being executed.
63- */
55+ /** The BigQuery Job is being executed. */
6456 public static final State RUNNING = type .createAndRegister ("RUNNING" );
6557
6658 /**
@@ -74,23 +66,19 @@ private State(String constant) {
7466 }
7567
7668 /**
77- * Get the State for the given String constant, and throw an exception if the constant is
78- * not recognized.
69+ * Get the State for the given String constant, and throw an exception if the constant is not
70+ * recognized.
7971 */
8072 public static State valueOfStrict (String constant ) {
8173 return type .valueOfStrict (constant );
8274 }
8375
84- /**
85- * Get the State for the given String constant, and allow unrecognized values.
86- */
76+ /** Get the State for the given String constant, and allow unrecognized values. */
8777 public static State valueOf (String constant ) {
8878 return type .valueOf (constant );
8979 }
9080
91- /**
92- * Return the known values for State.
93- */
81+ /** Return the known values for State. */
9482 public static State [] values () {
9583 return type .values ();
9684 }
@@ -112,35 +100,33 @@ public static State[] values() {
112100 this .executionErrors = executionErrors != null ? ImmutableList .copyOf (executionErrors ) : null ;
113101 }
114102
115-
116103 /**
117- * Returns the state of the job. A {@link State#PENDING} job is waiting to be executed. A
118- * {@link State#RUNNING} is being executed. A {@link State#DONE} job has completed either
119- * succeeding or failing. If failed {@link #getError()} will be non-null.
104+ * Returns the state of the job. A {@link State#PENDING} job is waiting to be executed. A {@link
105+ * State#RUNNING} is being executed. A {@link State#DONE} job has completed either succeeding or
106+ * failing. If failed {@link #getError()} will be non-null.
120107 */
121108 public State getState () {
122109 return state ;
123110 }
124111
125-
126112 /**
127- * Returns the final error result of the job. If present, indicates that the job has completed
128- * and was unsuccessful.
113+ * Returns the final error result of the job. If present, indicates that the job has completed and
114+ * was unsuccessful.
129115 *
130- * @see <a href="https://cloud.google.com/bigquery/troubleshooting-errors">
131- * Troubleshooting Errors</a>
116+ * @see <a href="https://cloud.google.com/bigquery/troubleshooting-errors">Troubleshooting
117+ * Errors</a>
132118 */
119+ @ Nullable
133120 public BigQueryError getError () {
134121 return error ;
135122 }
136123
137-
138124 /**
139125 * Returns all errors encountered during the running of the job. Errors here do not necessarily
140126 * mean that the job has completed or was unsuccessful.
141127 *
142- * @see <a href="https://cloud.google.com/bigquery/troubleshooting-errors">
143- * Troubleshooting Errors</a>
128+ * @see <a href="https://cloud.google.com/bigquery/troubleshooting-errors">Troubleshooting
129+ * Errors</a>
144130 */
145131 public List <BigQueryError > getExecutionErrors () {
146132 return executionErrors ;
@@ -164,8 +150,8 @@ public final int hashCode() {
164150 public final boolean equals (Object obj ) {
165151 return obj == this
166152 || obj != null
167- && obj .getClass ().equals (JobStatus .class )
168- && Objects .equals (toPb (), ((JobStatus ) obj ).toPb ());
153+ && obj .getClass ().equals (JobStatus .class )
154+ && Objects .equals (toPb (), ((JobStatus ) obj ).toPb ());
169155 }
170156
171157 com .google .api .services .bigquery .model .JobStatus toPb () {
0 commit comments