• 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/bigquery/reservation/v1/reservation.proto
18 
19 package com.google.cloud.bigquery.reservation.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * An assignment allows a project to submit jobs
26  * of a certain type using slots from the specified reservation.
27  * </pre>
28  *
29  * Protobuf type {@code google.cloud.bigquery.reservation.v1.Assignment}
30  */
31 public final class Assignment extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.cloud.bigquery.reservation.v1.Assignment)
34     AssignmentOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use Assignment.newBuilder() to construct.
Assignment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private Assignment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
Assignment()41   private Assignment() {
42     name_ = "";
43     assignee_ = "";
44     jobType_ = 0;
45     state_ = 0;
46   }
47 
48   @java.lang.Override
49   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)50   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
51     return new Assignment();
52   }
53 
54   @java.lang.Override
getUnknownFields()55   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
56     return this.unknownFields;
57   }
58 
getDescriptor()59   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
60     return com.google.cloud.bigquery.reservation.v1.ReservationProto
61         .internal_static_google_cloud_bigquery_reservation_v1_Assignment_descriptor;
62   }
63 
64   @java.lang.Override
65   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()66       internalGetFieldAccessorTable() {
67     return com.google.cloud.bigquery.reservation.v1.ReservationProto
68         .internal_static_google_cloud_bigquery_reservation_v1_Assignment_fieldAccessorTable
69         .ensureFieldAccessorsInitialized(
70             com.google.cloud.bigquery.reservation.v1.Assignment.class,
71             com.google.cloud.bigquery.reservation.v1.Assignment.Builder.class);
72   }
73 
74   /**
75    *
76    *
77    * <pre>
78    * Types of job, which could be specified when using the reservation.
79    * </pre>
80    *
81    * Protobuf enum {@code google.cloud.bigquery.reservation.v1.Assignment.JobType}
82    */
83   public enum JobType implements com.google.protobuf.ProtocolMessageEnum {
84     /**
85      *
86      *
87      * <pre>
88      * Invalid type. Requests with this value will be rejected with
89      * error code `google.rpc.Code.INVALID_ARGUMENT`.
90      * </pre>
91      *
92      * <code>JOB_TYPE_UNSPECIFIED = 0;</code>
93      */
94     JOB_TYPE_UNSPECIFIED(0),
95     /**
96      *
97      *
98      * <pre>
99      * Pipeline (load/export) jobs from the project will use the reservation.
100      * </pre>
101      *
102      * <code>PIPELINE = 1;</code>
103      */
104     PIPELINE(1),
105     /**
106      *
107      *
108      * <pre>
109      * Query jobs from the project will use the reservation.
110      * </pre>
111      *
112      * <code>QUERY = 2;</code>
113      */
114     QUERY(2),
115     /**
116      *
117      *
118      * <pre>
119      * BigQuery ML jobs that use services external to BigQuery for model
120      * training. These jobs will not utilize idle slots from other reservations.
121      * </pre>
122      *
123      * <code>ML_EXTERNAL = 3;</code>
124      */
125     ML_EXTERNAL(3),
126     /**
127      *
128      *
129      * <pre>
130      * Background jobs that BigQuery runs for the customers in the background.
131      * </pre>
132      *
133      * <code>BACKGROUND = 4;</code>
134      */
135     BACKGROUND(4),
136     UNRECOGNIZED(-1),
137     ;
138 
139     /**
140      *
141      *
142      * <pre>
143      * Invalid type. Requests with this value will be rejected with
144      * error code `google.rpc.Code.INVALID_ARGUMENT`.
145      * </pre>
146      *
147      * <code>JOB_TYPE_UNSPECIFIED = 0;</code>
148      */
149     public static final int JOB_TYPE_UNSPECIFIED_VALUE = 0;
150     /**
151      *
152      *
153      * <pre>
154      * Pipeline (load/export) jobs from the project will use the reservation.
155      * </pre>
156      *
157      * <code>PIPELINE = 1;</code>
158      */
159     public static final int PIPELINE_VALUE = 1;
160     /**
161      *
162      *
163      * <pre>
164      * Query jobs from the project will use the reservation.
165      * </pre>
166      *
167      * <code>QUERY = 2;</code>
168      */
169     public static final int QUERY_VALUE = 2;
170     /**
171      *
172      *
173      * <pre>
174      * BigQuery ML jobs that use services external to BigQuery for model
175      * training. These jobs will not utilize idle slots from other reservations.
176      * </pre>
177      *
178      * <code>ML_EXTERNAL = 3;</code>
179      */
180     public static final int ML_EXTERNAL_VALUE = 3;
181     /**
182      *
183      *
184      * <pre>
185      * Background jobs that BigQuery runs for the customers in the background.
186      * </pre>
187      *
188      * <code>BACKGROUND = 4;</code>
189      */
190     public static final int BACKGROUND_VALUE = 4;
191 
getNumber()192     public final int getNumber() {
193       if (this == UNRECOGNIZED) {
194         throw new java.lang.IllegalArgumentException(
195             "Can't get the number of an unknown enum value.");
196       }
197       return value;
198     }
199 
200     /**
201      * @param value The numeric wire value of the corresponding enum entry.
202      * @return The enum associated with the given numeric wire value.
203      * @deprecated Use {@link #forNumber(int)} instead.
204      */
205     @java.lang.Deprecated
valueOf(int value)206     public static JobType valueOf(int value) {
207       return forNumber(value);
208     }
209 
210     /**
211      * @param value The numeric wire value of the corresponding enum entry.
212      * @return The enum associated with the given numeric wire value.
213      */
forNumber(int value)214     public static JobType forNumber(int value) {
215       switch (value) {
216         case 0:
217           return JOB_TYPE_UNSPECIFIED;
218         case 1:
219           return PIPELINE;
220         case 2:
221           return QUERY;
222         case 3:
223           return ML_EXTERNAL;
224         case 4:
225           return BACKGROUND;
226         default:
227           return null;
228       }
229     }
230 
internalGetValueMap()231     public static com.google.protobuf.Internal.EnumLiteMap<JobType> internalGetValueMap() {
232       return internalValueMap;
233     }
234 
235     private static final com.google.protobuf.Internal.EnumLiteMap<JobType> internalValueMap =
236         new com.google.protobuf.Internal.EnumLiteMap<JobType>() {
237           public JobType findValueByNumber(int number) {
238             return JobType.forNumber(number);
239           }
240         };
241 
getValueDescriptor()242     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
243       if (this == UNRECOGNIZED) {
244         throw new java.lang.IllegalStateException(
245             "Can't get the descriptor of an unrecognized enum value.");
246       }
247       return getDescriptor().getValues().get(ordinal());
248     }
249 
getDescriptorForType()250     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
251       return getDescriptor();
252     }
253 
getDescriptor()254     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
255       return com.google.cloud.bigquery.reservation.v1.Assignment.getDescriptor()
256           .getEnumTypes()
257           .get(0);
258     }
259 
260     private static final JobType[] VALUES = values();
261 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)262     public static JobType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
263       if (desc.getType() != getDescriptor()) {
264         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
265       }
266       if (desc.getIndex() == -1) {
267         return UNRECOGNIZED;
268       }
269       return VALUES[desc.getIndex()];
270     }
271 
272     private final int value;
273 
JobType(int value)274     private JobType(int value) {
275       this.value = value;
276     }
277 
278     // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.reservation.v1.Assignment.JobType)
279   }
280 
281   /**
282    *
283    *
284    * <pre>
285    * Assignment will remain in PENDING state if no active capacity commitment is
286    * present. It will become ACTIVE when some capacity commitment becomes
287    * active.
288    * </pre>
289    *
290    * Protobuf enum {@code google.cloud.bigquery.reservation.v1.Assignment.State}
291    */
292   public enum State implements com.google.protobuf.ProtocolMessageEnum {
293     /**
294      *
295      *
296      * <pre>
297      * Invalid state value.
298      * </pre>
299      *
300      * <code>STATE_UNSPECIFIED = 0;</code>
301      */
302     STATE_UNSPECIFIED(0),
303     /**
304      *
305      *
306      * <pre>
307      * Queries from assignee will be executed as on-demand, if related
308      * assignment is pending.
309      * </pre>
310      *
311      * <code>PENDING = 1;</code>
312      */
313     PENDING(1),
314     /**
315      *
316      *
317      * <pre>
318      * Assignment is ready.
319      * </pre>
320      *
321      * <code>ACTIVE = 2;</code>
322      */
323     ACTIVE(2),
324     UNRECOGNIZED(-1),
325     ;
326 
327     /**
328      *
329      *
330      * <pre>
331      * Invalid state value.
332      * </pre>
333      *
334      * <code>STATE_UNSPECIFIED = 0;</code>
335      */
336     public static final int STATE_UNSPECIFIED_VALUE = 0;
337     /**
338      *
339      *
340      * <pre>
341      * Queries from assignee will be executed as on-demand, if related
342      * assignment is pending.
343      * </pre>
344      *
345      * <code>PENDING = 1;</code>
346      */
347     public static final int PENDING_VALUE = 1;
348     /**
349      *
350      *
351      * <pre>
352      * Assignment is ready.
353      * </pre>
354      *
355      * <code>ACTIVE = 2;</code>
356      */
357     public static final int ACTIVE_VALUE = 2;
358 
getNumber()359     public final int getNumber() {
360       if (this == UNRECOGNIZED) {
361         throw new java.lang.IllegalArgumentException(
362             "Can't get the number of an unknown enum value.");
363       }
364       return value;
365     }
366 
367     /**
368      * @param value The numeric wire value of the corresponding enum entry.
369      * @return The enum associated with the given numeric wire value.
370      * @deprecated Use {@link #forNumber(int)} instead.
371      */
372     @java.lang.Deprecated
valueOf(int value)373     public static State valueOf(int value) {
374       return forNumber(value);
375     }
376 
377     /**
378      * @param value The numeric wire value of the corresponding enum entry.
379      * @return The enum associated with the given numeric wire value.
380      */
forNumber(int value)381     public static State forNumber(int value) {
382       switch (value) {
383         case 0:
384           return STATE_UNSPECIFIED;
385         case 1:
386           return PENDING;
387         case 2:
388           return ACTIVE;
389         default:
390           return null;
391       }
392     }
393 
internalGetValueMap()394     public static com.google.protobuf.Internal.EnumLiteMap<State> internalGetValueMap() {
395       return internalValueMap;
396     }
397 
398     private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap =
399         new com.google.protobuf.Internal.EnumLiteMap<State>() {
400           public State findValueByNumber(int number) {
401             return State.forNumber(number);
402           }
403         };
404 
getValueDescriptor()405     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
406       if (this == UNRECOGNIZED) {
407         throw new java.lang.IllegalStateException(
408             "Can't get the descriptor of an unrecognized enum value.");
409       }
410       return getDescriptor().getValues().get(ordinal());
411     }
412 
getDescriptorForType()413     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
414       return getDescriptor();
415     }
416 
getDescriptor()417     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
418       return com.google.cloud.bigquery.reservation.v1.Assignment.getDescriptor()
419           .getEnumTypes()
420           .get(1);
421     }
422 
423     private static final State[] VALUES = values();
424 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)425     public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
426       if (desc.getType() != getDescriptor()) {
427         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
428       }
429       if (desc.getIndex() == -1) {
430         return UNRECOGNIZED;
431       }
432       return VALUES[desc.getIndex()];
433     }
434 
435     private final int value;
436 
State(int value)437     private State(int value) {
438       this.value = value;
439     }
440 
441     // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.reservation.v1.Assignment.State)
442   }
443 
444   public static final int NAME_FIELD_NUMBER = 1;
445 
446   @SuppressWarnings("serial")
447   private volatile java.lang.Object name_ = "";
448   /**
449    *
450    *
451    * <pre>
452    * Output only. Name of the resource. E.g.:
453    * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
454    * The assignment_id must only contain lower case alphanumeric characters or
455    * dashes and the max length is 64 characters.
456    * </pre>
457    *
458    * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
459    *
460    * @return The name.
461    */
462   @java.lang.Override
getName()463   public java.lang.String getName() {
464     java.lang.Object ref = name_;
465     if (ref instanceof java.lang.String) {
466       return (java.lang.String) ref;
467     } else {
468       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
469       java.lang.String s = bs.toStringUtf8();
470       name_ = s;
471       return s;
472     }
473   }
474   /**
475    *
476    *
477    * <pre>
478    * Output only. Name of the resource. E.g.:
479    * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
480    * The assignment_id must only contain lower case alphanumeric characters or
481    * dashes and the max length is 64 characters.
482    * </pre>
483    *
484    * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
485    *
486    * @return The bytes for name.
487    */
488   @java.lang.Override
getNameBytes()489   public com.google.protobuf.ByteString getNameBytes() {
490     java.lang.Object ref = name_;
491     if (ref instanceof java.lang.String) {
492       com.google.protobuf.ByteString b =
493           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
494       name_ = b;
495       return b;
496     } else {
497       return (com.google.protobuf.ByteString) ref;
498     }
499   }
500 
501   public static final int ASSIGNEE_FIELD_NUMBER = 4;
502 
503   @SuppressWarnings("serial")
504   private volatile java.lang.Object assignee_ = "";
505   /**
506    *
507    *
508    * <pre>
509    * The resource which will use the reservation. E.g.
510    * `projects/myproject`, `folders/123`, or `organizations/456`.
511    * </pre>
512    *
513    * <code>string assignee = 4;</code>
514    *
515    * @return The assignee.
516    */
517   @java.lang.Override
getAssignee()518   public java.lang.String getAssignee() {
519     java.lang.Object ref = assignee_;
520     if (ref instanceof java.lang.String) {
521       return (java.lang.String) ref;
522     } else {
523       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
524       java.lang.String s = bs.toStringUtf8();
525       assignee_ = s;
526       return s;
527     }
528   }
529   /**
530    *
531    *
532    * <pre>
533    * The resource which will use the reservation. E.g.
534    * `projects/myproject`, `folders/123`, or `organizations/456`.
535    * </pre>
536    *
537    * <code>string assignee = 4;</code>
538    *
539    * @return The bytes for assignee.
540    */
541   @java.lang.Override
getAssigneeBytes()542   public com.google.protobuf.ByteString getAssigneeBytes() {
543     java.lang.Object ref = assignee_;
544     if (ref instanceof java.lang.String) {
545       com.google.protobuf.ByteString b =
546           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
547       assignee_ = b;
548       return b;
549     } else {
550       return (com.google.protobuf.ByteString) ref;
551     }
552   }
553 
554   public static final int JOB_TYPE_FIELD_NUMBER = 3;
555   private int jobType_ = 0;
556   /**
557    *
558    *
559    * <pre>
560    * Which type of jobs will use the reservation.
561    * </pre>
562    *
563    * <code>.google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3;</code>
564    *
565    * @return The enum numeric value on the wire for jobType.
566    */
567   @java.lang.Override
getJobTypeValue()568   public int getJobTypeValue() {
569     return jobType_;
570   }
571   /**
572    *
573    *
574    * <pre>
575    * Which type of jobs will use the reservation.
576    * </pre>
577    *
578    * <code>.google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3;</code>
579    *
580    * @return The jobType.
581    */
582   @java.lang.Override
getJobType()583   public com.google.cloud.bigquery.reservation.v1.Assignment.JobType getJobType() {
584     com.google.cloud.bigquery.reservation.v1.Assignment.JobType result =
585         com.google.cloud.bigquery.reservation.v1.Assignment.JobType.forNumber(jobType_);
586     return result == null
587         ? com.google.cloud.bigquery.reservation.v1.Assignment.JobType.UNRECOGNIZED
588         : result;
589   }
590 
591   public static final int STATE_FIELD_NUMBER = 6;
592   private int state_ = 0;
593   /**
594    *
595    *
596    * <pre>
597    * Output only. State of the assignment.
598    * </pre>
599    *
600    * <code>
601    * .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
602    * </code>
603    *
604    * @return The enum numeric value on the wire for state.
605    */
606   @java.lang.Override
getStateValue()607   public int getStateValue() {
608     return state_;
609   }
610   /**
611    *
612    *
613    * <pre>
614    * Output only. State of the assignment.
615    * </pre>
616    *
617    * <code>
618    * .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
619    * </code>
620    *
621    * @return The state.
622    */
623   @java.lang.Override
getState()624   public com.google.cloud.bigquery.reservation.v1.Assignment.State getState() {
625     com.google.cloud.bigquery.reservation.v1.Assignment.State result =
626         com.google.cloud.bigquery.reservation.v1.Assignment.State.forNumber(state_);
627     return result == null
628         ? com.google.cloud.bigquery.reservation.v1.Assignment.State.UNRECOGNIZED
629         : result;
630   }
631 
632   private byte memoizedIsInitialized = -1;
633 
634   @java.lang.Override
isInitialized()635   public final boolean isInitialized() {
636     byte isInitialized = memoizedIsInitialized;
637     if (isInitialized == 1) return true;
638     if (isInitialized == 0) return false;
639 
640     memoizedIsInitialized = 1;
641     return true;
642   }
643 
644   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)645   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
646     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
647       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
648     }
649     if (jobType_
650         != com.google.cloud.bigquery.reservation.v1.Assignment.JobType.JOB_TYPE_UNSPECIFIED
651             .getNumber()) {
652       output.writeEnum(3, jobType_);
653     }
654     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assignee_)) {
655       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, assignee_);
656     }
657     if (state_
658         != com.google.cloud.bigquery.reservation.v1.Assignment.State.STATE_UNSPECIFIED
659             .getNumber()) {
660       output.writeEnum(6, state_);
661     }
662     getUnknownFields().writeTo(output);
663   }
664 
665   @java.lang.Override
getSerializedSize()666   public int getSerializedSize() {
667     int size = memoizedSize;
668     if (size != -1) return size;
669 
670     size = 0;
671     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
672       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
673     }
674     if (jobType_
675         != com.google.cloud.bigquery.reservation.v1.Assignment.JobType.JOB_TYPE_UNSPECIFIED
676             .getNumber()) {
677       size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, jobType_);
678     }
679     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assignee_)) {
680       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, assignee_);
681     }
682     if (state_
683         != com.google.cloud.bigquery.reservation.v1.Assignment.State.STATE_UNSPECIFIED
684             .getNumber()) {
685       size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_);
686     }
687     size += getUnknownFields().getSerializedSize();
688     memoizedSize = size;
689     return size;
690   }
691 
692   @java.lang.Override
equals(final java.lang.Object obj)693   public boolean equals(final java.lang.Object obj) {
694     if (obj == this) {
695       return true;
696     }
697     if (!(obj instanceof com.google.cloud.bigquery.reservation.v1.Assignment)) {
698       return super.equals(obj);
699     }
700     com.google.cloud.bigquery.reservation.v1.Assignment other =
701         (com.google.cloud.bigquery.reservation.v1.Assignment) obj;
702 
703     if (!getName().equals(other.getName())) return false;
704     if (!getAssignee().equals(other.getAssignee())) return false;
705     if (jobType_ != other.jobType_) return false;
706     if (state_ != other.state_) return false;
707     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
708     return true;
709   }
710 
711   @java.lang.Override
hashCode()712   public int hashCode() {
713     if (memoizedHashCode != 0) {
714       return memoizedHashCode;
715     }
716     int hash = 41;
717     hash = (19 * hash) + getDescriptor().hashCode();
718     hash = (37 * hash) + NAME_FIELD_NUMBER;
719     hash = (53 * hash) + getName().hashCode();
720     hash = (37 * hash) + ASSIGNEE_FIELD_NUMBER;
721     hash = (53 * hash) + getAssignee().hashCode();
722     hash = (37 * hash) + JOB_TYPE_FIELD_NUMBER;
723     hash = (53 * hash) + jobType_;
724     hash = (37 * hash) + STATE_FIELD_NUMBER;
725     hash = (53 * hash) + state_;
726     hash = (29 * hash) + getUnknownFields().hashCode();
727     memoizedHashCode = hash;
728     return hash;
729   }
730 
parseFrom( java.nio.ByteBuffer data)731   public static com.google.cloud.bigquery.reservation.v1.Assignment parseFrom(
732       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
733     return PARSER.parseFrom(data);
734   }
735 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)736   public static com.google.cloud.bigquery.reservation.v1.Assignment parseFrom(
737       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
738       throws com.google.protobuf.InvalidProtocolBufferException {
739     return PARSER.parseFrom(data, extensionRegistry);
740   }
741 
parseFrom( com.google.protobuf.ByteString data)742   public static com.google.cloud.bigquery.reservation.v1.Assignment parseFrom(
743       com.google.protobuf.ByteString data)
744       throws com.google.protobuf.InvalidProtocolBufferException {
745     return PARSER.parseFrom(data);
746   }
747 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)748   public static com.google.cloud.bigquery.reservation.v1.Assignment parseFrom(
749       com.google.protobuf.ByteString data,
750       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
751       throws com.google.protobuf.InvalidProtocolBufferException {
752     return PARSER.parseFrom(data, extensionRegistry);
753   }
754 
parseFrom(byte[] data)755   public static com.google.cloud.bigquery.reservation.v1.Assignment parseFrom(byte[] data)
756       throws com.google.protobuf.InvalidProtocolBufferException {
757     return PARSER.parseFrom(data);
758   }
759 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)760   public static com.google.cloud.bigquery.reservation.v1.Assignment parseFrom(
761       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
762       throws com.google.protobuf.InvalidProtocolBufferException {
763     return PARSER.parseFrom(data, extensionRegistry);
764   }
765 
parseFrom( java.io.InputStream input)766   public static com.google.cloud.bigquery.reservation.v1.Assignment parseFrom(
767       java.io.InputStream input) throws java.io.IOException {
768     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
769   }
770 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)771   public static com.google.cloud.bigquery.reservation.v1.Assignment parseFrom(
772       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
773       throws java.io.IOException {
774     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
775         PARSER, input, extensionRegistry);
776   }
777 
parseDelimitedFrom( java.io.InputStream input)778   public static com.google.cloud.bigquery.reservation.v1.Assignment parseDelimitedFrom(
779       java.io.InputStream input) throws java.io.IOException {
780     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
781   }
782 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)783   public static com.google.cloud.bigquery.reservation.v1.Assignment parseDelimitedFrom(
784       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
785       throws java.io.IOException {
786     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
787         PARSER, input, extensionRegistry);
788   }
789 
parseFrom( com.google.protobuf.CodedInputStream input)790   public static com.google.cloud.bigquery.reservation.v1.Assignment parseFrom(
791       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
792     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
793   }
794 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)795   public static com.google.cloud.bigquery.reservation.v1.Assignment parseFrom(
796       com.google.protobuf.CodedInputStream input,
797       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
798       throws java.io.IOException {
799     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
800         PARSER, input, extensionRegistry);
801   }
802 
803   @java.lang.Override
newBuilderForType()804   public Builder newBuilderForType() {
805     return newBuilder();
806   }
807 
newBuilder()808   public static Builder newBuilder() {
809     return DEFAULT_INSTANCE.toBuilder();
810   }
811 
newBuilder(com.google.cloud.bigquery.reservation.v1.Assignment prototype)812   public static Builder newBuilder(com.google.cloud.bigquery.reservation.v1.Assignment prototype) {
813     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
814   }
815 
816   @java.lang.Override
toBuilder()817   public Builder toBuilder() {
818     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
819   }
820 
821   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)822   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
823     Builder builder = new Builder(parent);
824     return builder;
825   }
826   /**
827    *
828    *
829    * <pre>
830    * An assignment allows a project to submit jobs
831    * of a certain type using slots from the specified reservation.
832    * </pre>
833    *
834    * Protobuf type {@code google.cloud.bigquery.reservation.v1.Assignment}
835    */
836   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
837       implements
838       // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.reservation.v1.Assignment)
839       com.google.cloud.bigquery.reservation.v1.AssignmentOrBuilder {
getDescriptor()840     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
841       return com.google.cloud.bigquery.reservation.v1.ReservationProto
842           .internal_static_google_cloud_bigquery_reservation_v1_Assignment_descriptor;
843     }
844 
845     @java.lang.Override
846     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()847         internalGetFieldAccessorTable() {
848       return com.google.cloud.bigquery.reservation.v1.ReservationProto
849           .internal_static_google_cloud_bigquery_reservation_v1_Assignment_fieldAccessorTable
850           .ensureFieldAccessorsInitialized(
851               com.google.cloud.bigquery.reservation.v1.Assignment.class,
852               com.google.cloud.bigquery.reservation.v1.Assignment.Builder.class);
853     }
854 
855     // Construct using com.google.cloud.bigquery.reservation.v1.Assignment.newBuilder()
Builder()856     private Builder() {}
857 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)858     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
859       super(parent);
860     }
861 
862     @java.lang.Override
clear()863     public Builder clear() {
864       super.clear();
865       bitField0_ = 0;
866       name_ = "";
867       assignee_ = "";
868       jobType_ = 0;
869       state_ = 0;
870       return this;
871     }
872 
873     @java.lang.Override
getDescriptorForType()874     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
875       return com.google.cloud.bigquery.reservation.v1.ReservationProto
876           .internal_static_google_cloud_bigquery_reservation_v1_Assignment_descriptor;
877     }
878 
879     @java.lang.Override
getDefaultInstanceForType()880     public com.google.cloud.bigquery.reservation.v1.Assignment getDefaultInstanceForType() {
881       return com.google.cloud.bigquery.reservation.v1.Assignment.getDefaultInstance();
882     }
883 
884     @java.lang.Override
build()885     public com.google.cloud.bigquery.reservation.v1.Assignment build() {
886       com.google.cloud.bigquery.reservation.v1.Assignment result = buildPartial();
887       if (!result.isInitialized()) {
888         throw newUninitializedMessageException(result);
889       }
890       return result;
891     }
892 
893     @java.lang.Override
buildPartial()894     public com.google.cloud.bigquery.reservation.v1.Assignment buildPartial() {
895       com.google.cloud.bigquery.reservation.v1.Assignment result =
896           new com.google.cloud.bigquery.reservation.v1.Assignment(this);
897       if (bitField0_ != 0) {
898         buildPartial0(result);
899       }
900       onBuilt();
901       return result;
902     }
903 
buildPartial0(com.google.cloud.bigquery.reservation.v1.Assignment result)904     private void buildPartial0(com.google.cloud.bigquery.reservation.v1.Assignment result) {
905       int from_bitField0_ = bitField0_;
906       if (((from_bitField0_ & 0x00000001) != 0)) {
907         result.name_ = name_;
908       }
909       if (((from_bitField0_ & 0x00000002) != 0)) {
910         result.assignee_ = assignee_;
911       }
912       if (((from_bitField0_ & 0x00000004) != 0)) {
913         result.jobType_ = jobType_;
914       }
915       if (((from_bitField0_ & 0x00000008) != 0)) {
916         result.state_ = state_;
917       }
918     }
919 
920     @java.lang.Override
clone()921     public Builder clone() {
922       return super.clone();
923     }
924 
925     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)926     public Builder setField(
927         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
928       return super.setField(field, value);
929     }
930 
931     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)932     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
933       return super.clearField(field);
934     }
935 
936     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)937     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
938       return super.clearOneof(oneof);
939     }
940 
941     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)942     public Builder setRepeatedField(
943         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
944       return super.setRepeatedField(field, index, value);
945     }
946 
947     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)948     public Builder addRepeatedField(
949         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
950       return super.addRepeatedField(field, value);
951     }
952 
953     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)954     public Builder mergeFrom(com.google.protobuf.Message other) {
955       if (other instanceof com.google.cloud.bigquery.reservation.v1.Assignment) {
956         return mergeFrom((com.google.cloud.bigquery.reservation.v1.Assignment) other);
957       } else {
958         super.mergeFrom(other);
959         return this;
960       }
961     }
962 
mergeFrom(com.google.cloud.bigquery.reservation.v1.Assignment other)963     public Builder mergeFrom(com.google.cloud.bigquery.reservation.v1.Assignment other) {
964       if (other == com.google.cloud.bigquery.reservation.v1.Assignment.getDefaultInstance())
965         return this;
966       if (!other.getName().isEmpty()) {
967         name_ = other.name_;
968         bitField0_ |= 0x00000001;
969         onChanged();
970       }
971       if (!other.getAssignee().isEmpty()) {
972         assignee_ = other.assignee_;
973         bitField0_ |= 0x00000002;
974         onChanged();
975       }
976       if (other.jobType_ != 0) {
977         setJobTypeValue(other.getJobTypeValue());
978       }
979       if (other.state_ != 0) {
980         setStateValue(other.getStateValue());
981       }
982       this.mergeUnknownFields(other.getUnknownFields());
983       onChanged();
984       return this;
985     }
986 
987     @java.lang.Override
isInitialized()988     public final boolean isInitialized() {
989       return true;
990     }
991 
992     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)993     public Builder mergeFrom(
994         com.google.protobuf.CodedInputStream input,
995         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
996         throws java.io.IOException {
997       if (extensionRegistry == null) {
998         throw new java.lang.NullPointerException();
999       }
1000       try {
1001         boolean done = false;
1002         while (!done) {
1003           int tag = input.readTag();
1004           switch (tag) {
1005             case 0:
1006               done = true;
1007               break;
1008             case 10:
1009               {
1010                 name_ = input.readStringRequireUtf8();
1011                 bitField0_ |= 0x00000001;
1012                 break;
1013               } // case 10
1014             case 24:
1015               {
1016                 jobType_ = input.readEnum();
1017                 bitField0_ |= 0x00000004;
1018                 break;
1019               } // case 24
1020             case 34:
1021               {
1022                 assignee_ = input.readStringRequireUtf8();
1023                 bitField0_ |= 0x00000002;
1024                 break;
1025               } // case 34
1026             case 48:
1027               {
1028                 state_ = input.readEnum();
1029                 bitField0_ |= 0x00000008;
1030                 break;
1031               } // case 48
1032             default:
1033               {
1034                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1035                   done = true; // was an endgroup tag
1036                 }
1037                 break;
1038               } // default:
1039           } // switch (tag)
1040         } // while (!done)
1041       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1042         throw e.unwrapIOException();
1043       } finally {
1044         onChanged();
1045       } // finally
1046       return this;
1047     }
1048 
1049     private int bitField0_;
1050 
1051     private java.lang.Object name_ = "";
1052     /**
1053      *
1054      *
1055      * <pre>
1056      * Output only. Name of the resource. E.g.:
1057      * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
1058      * The assignment_id must only contain lower case alphanumeric characters or
1059      * dashes and the max length is 64 characters.
1060      * </pre>
1061      *
1062      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1063      *
1064      * @return The name.
1065      */
getName()1066     public java.lang.String getName() {
1067       java.lang.Object ref = name_;
1068       if (!(ref instanceof java.lang.String)) {
1069         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1070         java.lang.String s = bs.toStringUtf8();
1071         name_ = s;
1072         return s;
1073       } else {
1074         return (java.lang.String) ref;
1075       }
1076     }
1077     /**
1078      *
1079      *
1080      * <pre>
1081      * Output only. Name of the resource. E.g.:
1082      * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
1083      * The assignment_id must only contain lower case alphanumeric characters or
1084      * dashes and the max length is 64 characters.
1085      * </pre>
1086      *
1087      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1088      *
1089      * @return The bytes for name.
1090      */
getNameBytes()1091     public com.google.protobuf.ByteString getNameBytes() {
1092       java.lang.Object ref = name_;
1093       if (ref instanceof String) {
1094         com.google.protobuf.ByteString b =
1095             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1096         name_ = b;
1097         return b;
1098       } else {
1099         return (com.google.protobuf.ByteString) ref;
1100       }
1101     }
1102     /**
1103      *
1104      *
1105      * <pre>
1106      * Output only. Name of the resource. E.g.:
1107      * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
1108      * The assignment_id must only contain lower case alphanumeric characters or
1109      * dashes and the max length is 64 characters.
1110      * </pre>
1111      *
1112      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1113      *
1114      * @param value The name to set.
1115      * @return This builder for chaining.
1116      */
setName(java.lang.String value)1117     public Builder setName(java.lang.String value) {
1118       if (value == null) {
1119         throw new NullPointerException();
1120       }
1121       name_ = value;
1122       bitField0_ |= 0x00000001;
1123       onChanged();
1124       return this;
1125     }
1126     /**
1127      *
1128      *
1129      * <pre>
1130      * Output only. Name of the resource. E.g.:
1131      * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
1132      * The assignment_id must only contain lower case alphanumeric characters or
1133      * dashes and the max length is 64 characters.
1134      * </pre>
1135      *
1136      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1137      *
1138      * @return This builder for chaining.
1139      */
clearName()1140     public Builder clearName() {
1141       name_ = getDefaultInstance().getName();
1142       bitField0_ = (bitField0_ & ~0x00000001);
1143       onChanged();
1144       return this;
1145     }
1146     /**
1147      *
1148      *
1149      * <pre>
1150      * Output only. Name of the resource. E.g.:
1151      * `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
1152      * The assignment_id must only contain lower case alphanumeric characters or
1153      * dashes and the max length is 64 characters.
1154      * </pre>
1155      *
1156      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1157      *
1158      * @param value The bytes for name to set.
1159      * @return This builder for chaining.
1160      */
setNameBytes(com.google.protobuf.ByteString value)1161     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1162       if (value == null) {
1163         throw new NullPointerException();
1164       }
1165       checkByteStringIsUtf8(value);
1166       name_ = value;
1167       bitField0_ |= 0x00000001;
1168       onChanged();
1169       return this;
1170     }
1171 
1172     private java.lang.Object assignee_ = "";
1173     /**
1174      *
1175      *
1176      * <pre>
1177      * The resource which will use the reservation. E.g.
1178      * `projects/myproject`, `folders/123`, or `organizations/456`.
1179      * </pre>
1180      *
1181      * <code>string assignee = 4;</code>
1182      *
1183      * @return The assignee.
1184      */
getAssignee()1185     public java.lang.String getAssignee() {
1186       java.lang.Object ref = assignee_;
1187       if (!(ref instanceof java.lang.String)) {
1188         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1189         java.lang.String s = bs.toStringUtf8();
1190         assignee_ = s;
1191         return s;
1192       } else {
1193         return (java.lang.String) ref;
1194       }
1195     }
1196     /**
1197      *
1198      *
1199      * <pre>
1200      * The resource which will use the reservation. E.g.
1201      * `projects/myproject`, `folders/123`, or `organizations/456`.
1202      * </pre>
1203      *
1204      * <code>string assignee = 4;</code>
1205      *
1206      * @return The bytes for assignee.
1207      */
getAssigneeBytes()1208     public com.google.protobuf.ByteString getAssigneeBytes() {
1209       java.lang.Object ref = assignee_;
1210       if (ref instanceof String) {
1211         com.google.protobuf.ByteString b =
1212             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1213         assignee_ = b;
1214         return b;
1215       } else {
1216         return (com.google.protobuf.ByteString) ref;
1217       }
1218     }
1219     /**
1220      *
1221      *
1222      * <pre>
1223      * The resource which will use the reservation. E.g.
1224      * `projects/myproject`, `folders/123`, or `organizations/456`.
1225      * </pre>
1226      *
1227      * <code>string assignee = 4;</code>
1228      *
1229      * @param value The assignee to set.
1230      * @return This builder for chaining.
1231      */
setAssignee(java.lang.String value)1232     public Builder setAssignee(java.lang.String value) {
1233       if (value == null) {
1234         throw new NullPointerException();
1235       }
1236       assignee_ = value;
1237       bitField0_ |= 0x00000002;
1238       onChanged();
1239       return this;
1240     }
1241     /**
1242      *
1243      *
1244      * <pre>
1245      * The resource which will use the reservation. E.g.
1246      * `projects/myproject`, `folders/123`, or `organizations/456`.
1247      * </pre>
1248      *
1249      * <code>string assignee = 4;</code>
1250      *
1251      * @return This builder for chaining.
1252      */
clearAssignee()1253     public Builder clearAssignee() {
1254       assignee_ = getDefaultInstance().getAssignee();
1255       bitField0_ = (bitField0_ & ~0x00000002);
1256       onChanged();
1257       return this;
1258     }
1259     /**
1260      *
1261      *
1262      * <pre>
1263      * The resource which will use the reservation. E.g.
1264      * `projects/myproject`, `folders/123`, or `organizations/456`.
1265      * </pre>
1266      *
1267      * <code>string assignee = 4;</code>
1268      *
1269      * @param value The bytes for assignee to set.
1270      * @return This builder for chaining.
1271      */
setAssigneeBytes(com.google.protobuf.ByteString value)1272     public Builder setAssigneeBytes(com.google.protobuf.ByteString value) {
1273       if (value == null) {
1274         throw new NullPointerException();
1275       }
1276       checkByteStringIsUtf8(value);
1277       assignee_ = value;
1278       bitField0_ |= 0x00000002;
1279       onChanged();
1280       return this;
1281     }
1282 
1283     private int jobType_ = 0;
1284     /**
1285      *
1286      *
1287      * <pre>
1288      * Which type of jobs will use the reservation.
1289      * </pre>
1290      *
1291      * <code>.google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3;</code>
1292      *
1293      * @return The enum numeric value on the wire for jobType.
1294      */
1295     @java.lang.Override
getJobTypeValue()1296     public int getJobTypeValue() {
1297       return jobType_;
1298     }
1299     /**
1300      *
1301      *
1302      * <pre>
1303      * Which type of jobs will use the reservation.
1304      * </pre>
1305      *
1306      * <code>.google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3;</code>
1307      *
1308      * @param value The enum numeric value on the wire for jobType to set.
1309      * @return This builder for chaining.
1310      */
setJobTypeValue(int value)1311     public Builder setJobTypeValue(int value) {
1312       jobType_ = value;
1313       bitField0_ |= 0x00000004;
1314       onChanged();
1315       return this;
1316     }
1317     /**
1318      *
1319      *
1320      * <pre>
1321      * Which type of jobs will use the reservation.
1322      * </pre>
1323      *
1324      * <code>.google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3;</code>
1325      *
1326      * @return The jobType.
1327      */
1328     @java.lang.Override
getJobType()1329     public com.google.cloud.bigquery.reservation.v1.Assignment.JobType getJobType() {
1330       com.google.cloud.bigquery.reservation.v1.Assignment.JobType result =
1331           com.google.cloud.bigquery.reservation.v1.Assignment.JobType.forNumber(jobType_);
1332       return result == null
1333           ? com.google.cloud.bigquery.reservation.v1.Assignment.JobType.UNRECOGNIZED
1334           : result;
1335     }
1336     /**
1337      *
1338      *
1339      * <pre>
1340      * Which type of jobs will use the reservation.
1341      * </pre>
1342      *
1343      * <code>.google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3;</code>
1344      *
1345      * @param value The jobType to set.
1346      * @return This builder for chaining.
1347      */
setJobType(com.google.cloud.bigquery.reservation.v1.Assignment.JobType value)1348     public Builder setJobType(com.google.cloud.bigquery.reservation.v1.Assignment.JobType value) {
1349       if (value == null) {
1350         throw new NullPointerException();
1351       }
1352       bitField0_ |= 0x00000004;
1353       jobType_ = value.getNumber();
1354       onChanged();
1355       return this;
1356     }
1357     /**
1358      *
1359      *
1360      * <pre>
1361      * Which type of jobs will use the reservation.
1362      * </pre>
1363      *
1364      * <code>.google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3;</code>
1365      *
1366      * @return This builder for chaining.
1367      */
clearJobType()1368     public Builder clearJobType() {
1369       bitField0_ = (bitField0_ & ~0x00000004);
1370       jobType_ = 0;
1371       onChanged();
1372       return this;
1373     }
1374 
1375     private int state_ = 0;
1376     /**
1377      *
1378      *
1379      * <pre>
1380      * Output only. State of the assignment.
1381      * </pre>
1382      *
1383      * <code>
1384      * .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
1385      * </code>
1386      *
1387      * @return The enum numeric value on the wire for state.
1388      */
1389     @java.lang.Override
getStateValue()1390     public int getStateValue() {
1391       return state_;
1392     }
1393     /**
1394      *
1395      *
1396      * <pre>
1397      * Output only. State of the assignment.
1398      * </pre>
1399      *
1400      * <code>
1401      * .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
1402      * </code>
1403      *
1404      * @param value The enum numeric value on the wire for state to set.
1405      * @return This builder for chaining.
1406      */
setStateValue(int value)1407     public Builder setStateValue(int value) {
1408       state_ = value;
1409       bitField0_ |= 0x00000008;
1410       onChanged();
1411       return this;
1412     }
1413     /**
1414      *
1415      *
1416      * <pre>
1417      * Output only. State of the assignment.
1418      * </pre>
1419      *
1420      * <code>
1421      * .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
1422      * </code>
1423      *
1424      * @return The state.
1425      */
1426     @java.lang.Override
getState()1427     public com.google.cloud.bigquery.reservation.v1.Assignment.State getState() {
1428       com.google.cloud.bigquery.reservation.v1.Assignment.State result =
1429           com.google.cloud.bigquery.reservation.v1.Assignment.State.forNumber(state_);
1430       return result == null
1431           ? com.google.cloud.bigquery.reservation.v1.Assignment.State.UNRECOGNIZED
1432           : result;
1433     }
1434     /**
1435      *
1436      *
1437      * <pre>
1438      * Output only. State of the assignment.
1439      * </pre>
1440      *
1441      * <code>
1442      * .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
1443      * </code>
1444      *
1445      * @param value The state to set.
1446      * @return This builder for chaining.
1447      */
setState(com.google.cloud.bigquery.reservation.v1.Assignment.State value)1448     public Builder setState(com.google.cloud.bigquery.reservation.v1.Assignment.State value) {
1449       if (value == null) {
1450         throw new NullPointerException();
1451       }
1452       bitField0_ |= 0x00000008;
1453       state_ = value.getNumber();
1454       onChanged();
1455       return this;
1456     }
1457     /**
1458      *
1459      *
1460      * <pre>
1461      * Output only. State of the assignment.
1462      * </pre>
1463      *
1464      * <code>
1465      * .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
1466      * </code>
1467      *
1468      * @return This builder for chaining.
1469      */
clearState()1470     public Builder clearState() {
1471       bitField0_ = (bitField0_ & ~0x00000008);
1472       state_ = 0;
1473       onChanged();
1474       return this;
1475     }
1476 
1477     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1478     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1479       return super.setUnknownFields(unknownFields);
1480     }
1481 
1482     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1483     public final Builder mergeUnknownFields(
1484         final com.google.protobuf.UnknownFieldSet unknownFields) {
1485       return super.mergeUnknownFields(unknownFields);
1486     }
1487 
1488     // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.reservation.v1.Assignment)
1489   }
1490 
1491   // @@protoc_insertion_point(class_scope:google.cloud.bigquery.reservation.v1.Assignment)
1492   private static final com.google.cloud.bigquery.reservation.v1.Assignment DEFAULT_INSTANCE;
1493 
1494   static {
1495     DEFAULT_INSTANCE = new com.google.cloud.bigquery.reservation.v1.Assignment();
1496   }
1497 
getDefaultInstance()1498   public static com.google.cloud.bigquery.reservation.v1.Assignment getDefaultInstance() {
1499     return DEFAULT_INSTANCE;
1500   }
1501 
1502   private static final com.google.protobuf.Parser<Assignment> PARSER =
1503       new com.google.protobuf.AbstractParser<Assignment>() {
1504         @java.lang.Override
1505         public Assignment parsePartialFrom(
1506             com.google.protobuf.CodedInputStream input,
1507             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1508             throws com.google.protobuf.InvalidProtocolBufferException {
1509           Builder builder = newBuilder();
1510           try {
1511             builder.mergeFrom(input, extensionRegistry);
1512           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1513             throw e.setUnfinishedMessage(builder.buildPartial());
1514           } catch (com.google.protobuf.UninitializedMessageException e) {
1515             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1516           } catch (java.io.IOException e) {
1517             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1518                 .setUnfinishedMessage(builder.buildPartial());
1519           }
1520           return builder.buildPartial();
1521         }
1522       };
1523 
parser()1524   public static com.google.protobuf.Parser<Assignment> parser() {
1525     return PARSER;
1526   }
1527 
1528   @java.lang.Override
getParserForType()1529   public com.google.protobuf.Parser<Assignment> getParserForType() {
1530     return PARSER;
1531   }
1532 
1533   @java.lang.Override
getDefaultInstanceForType()1534   public com.google.cloud.bigquery.reservation.v1.Assignment getDefaultInstanceForType() {
1535     return DEFAULT_INSTANCE;
1536   }
1537 }
1538