• 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/biglake/v1alpha1/metastore.proto
18 
19 package com.google.cloud.bigquery.biglake.v1alpha1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Represents a lock.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.bigquery.biglake.v1alpha1.Lock}
29  */
30 public final class Lock extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.bigquery.biglake.v1alpha1.Lock)
33     LockOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use Lock.newBuilder() to construct.
Lock(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private Lock(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
Lock()40   private Lock() {
41     name_ = "";
42     type_ = 0;
43     state_ = 0;
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new Lock();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.cloud.bigquery.biglake.v1alpha1.MetastoreProto
59         .internal_static_google_cloud_bigquery_biglake_v1alpha1_Lock_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.cloud.bigquery.biglake.v1alpha1.MetastoreProto
66         .internal_static_google_cloud_bigquery_biglake_v1alpha1_Lock_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.cloud.bigquery.biglake.v1alpha1.Lock.class,
69             com.google.cloud.bigquery.biglake.v1alpha1.Lock.Builder.class);
70   }
71 
72   /**
73    *
74    *
75    * <pre>
76    * The lock type.
77    * </pre>
78    *
79    * Protobuf enum {@code google.cloud.bigquery.biglake.v1alpha1.Lock.Type}
80    */
81   public enum Type implements com.google.protobuf.ProtocolMessageEnum {
82     /**
83      *
84      *
85      * <pre>
86      * The type is not specified.
87      * </pre>
88      *
89      * <code>TYPE_UNSPECIFIED = 0;</code>
90      */
91     TYPE_UNSPECIFIED(0),
92     /**
93      *
94      *
95      * <pre>
96      * An exclusive lock prevents another lock from being created on the same
97      * resource.
98      * </pre>
99      *
100      * <code>EXCLUSIVE = 1;</code>
101      */
102     EXCLUSIVE(1),
103     UNRECOGNIZED(-1),
104     ;
105 
106     /**
107      *
108      *
109      * <pre>
110      * The type is not specified.
111      * </pre>
112      *
113      * <code>TYPE_UNSPECIFIED = 0;</code>
114      */
115     public static final int TYPE_UNSPECIFIED_VALUE = 0;
116     /**
117      *
118      *
119      * <pre>
120      * An exclusive lock prevents another lock from being created on the same
121      * resource.
122      * </pre>
123      *
124      * <code>EXCLUSIVE = 1;</code>
125      */
126     public static final int EXCLUSIVE_VALUE = 1;
127 
getNumber()128     public final int getNumber() {
129       if (this == UNRECOGNIZED) {
130         throw new java.lang.IllegalArgumentException(
131             "Can't get the number of an unknown enum value.");
132       }
133       return value;
134     }
135 
136     /**
137      * @param value The numeric wire value of the corresponding enum entry.
138      * @return The enum associated with the given numeric wire value.
139      * @deprecated Use {@link #forNumber(int)} instead.
140      */
141     @java.lang.Deprecated
valueOf(int value)142     public static Type valueOf(int value) {
143       return forNumber(value);
144     }
145 
146     /**
147      * @param value The numeric wire value of the corresponding enum entry.
148      * @return The enum associated with the given numeric wire value.
149      */
forNumber(int value)150     public static Type forNumber(int value) {
151       switch (value) {
152         case 0:
153           return TYPE_UNSPECIFIED;
154         case 1:
155           return EXCLUSIVE;
156         default:
157           return null;
158       }
159     }
160 
internalGetValueMap()161     public static com.google.protobuf.Internal.EnumLiteMap<Type> internalGetValueMap() {
162       return internalValueMap;
163     }
164 
165     private static final com.google.protobuf.Internal.EnumLiteMap<Type> internalValueMap =
166         new com.google.protobuf.Internal.EnumLiteMap<Type>() {
167           public Type findValueByNumber(int number) {
168             return Type.forNumber(number);
169           }
170         };
171 
getValueDescriptor()172     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
173       if (this == UNRECOGNIZED) {
174         throw new java.lang.IllegalStateException(
175             "Can't get the descriptor of an unrecognized enum value.");
176       }
177       return getDescriptor().getValues().get(ordinal());
178     }
179 
getDescriptorForType()180     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
181       return getDescriptor();
182     }
183 
getDescriptor()184     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
185       return com.google.cloud.bigquery.biglake.v1alpha1.Lock.getDescriptor().getEnumTypes().get(0);
186     }
187 
188     private static final Type[] VALUES = values();
189 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)190     public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
191       if (desc.getType() != getDescriptor()) {
192         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
193       }
194       if (desc.getIndex() == -1) {
195         return UNRECOGNIZED;
196       }
197       return VALUES[desc.getIndex()];
198     }
199 
200     private final int value;
201 
Type(int value)202     private Type(int value) {
203       this.value = value;
204     }
205 
206     // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.biglake.v1alpha1.Lock.Type)
207   }
208 
209   /**
210    *
211    *
212    * <pre>
213    * The lock state.
214    * </pre>
215    *
216    * Protobuf enum {@code google.cloud.bigquery.biglake.v1alpha1.Lock.State}
217    */
218   public enum State implements com.google.protobuf.ProtocolMessageEnum {
219     /**
220      *
221      *
222      * <pre>
223      * The state is not specified.
224      * </pre>
225      *
226      * <code>STATE_UNSPECIFIED = 0;</code>
227      */
228     STATE_UNSPECIFIED(0),
229     /**
230      *
231      *
232      * <pre>
233      * Waiting to acquire the lock.
234      * </pre>
235      *
236      * <code>WAITING = 1;</code>
237      */
238     WAITING(1),
239     /**
240      *
241      *
242      * <pre>
243      * The lock has been acquired.
244      * </pre>
245      *
246      * <code>ACQUIRED = 2;</code>
247      */
248     ACQUIRED(2),
249     UNRECOGNIZED(-1),
250     ;
251 
252     /**
253      *
254      *
255      * <pre>
256      * The state is not specified.
257      * </pre>
258      *
259      * <code>STATE_UNSPECIFIED = 0;</code>
260      */
261     public static final int STATE_UNSPECIFIED_VALUE = 0;
262     /**
263      *
264      *
265      * <pre>
266      * Waiting to acquire the lock.
267      * </pre>
268      *
269      * <code>WAITING = 1;</code>
270      */
271     public static final int WAITING_VALUE = 1;
272     /**
273      *
274      *
275      * <pre>
276      * The lock has been acquired.
277      * </pre>
278      *
279      * <code>ACQUIRED = 2;</code>
280      */
281     public static final int ACQUIRED_VALUE = 2;
282 
getNumber()283     public final int getNumber() {
284       if (this == UNRECOGNIZED) {
285         throw new java.lang.IllegalArgumentException(
286             "Can't get the number of an unknown enum value.");
287       }
288       return value;
289     }
290 
291     /**
292      * @param value The numeric wire value of the corresponding enum entry.
293      * @return The enum associated with the given numeric wire value.
294      * @deprecated Use {@link #forNumber(int)} instead.
295      */
296     @java.lang.Deprecated
valueOf(int value)297     public static State valueOf(int value) {
298       return forNumber(value);
299     }
300 
301     /**
302      * @param value The numeric wire value of the corresponding enum entry.
303      * @return The enum associated with the given numeric wire value.
304      */
forNumber(int value)305     public static State forNumber(int value) {
306       switch (value) {
307         case 0:
308           return STATE_UNSPECIFIED;
309         case 1:
310           return WAITING;
311         case 2:
312           return ACQUIRED;
313         default:
314           return null;
315       }
316     }
317 
internalGetValueMap()318     public static com.google.protobuf.Internal.EnumLiteMap<State> internalGetValueMap() {
319       return internalValueMap;
320     }
321 
322     private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap =
323         new com.google.protobuf.Internal.EnumLiteMap<State>() {
324           public State findValueByNumber(int number) {
325             return State.forNumber(number);
326           }
327         };
328 
getValueDescriptor()329     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
330       if (this == UNRECOGNIZED) {
331         throw new java.lang.IllegalStateException(
332             "Can't get the descriptor of an unrecognized enum value.");
333       }
334       return getDescriptor().getValues().get(ordinal());
335     }
336 
getDescriptorForType()337     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
338       return getDescriptor();
339     }
340 
getDescriptor()341     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
342       return com.google.cloud.bigquery.biglake.v1alpha1.Lock.getDescriptor().getEnumTypes().get(1);
343     }
344 
345     private static final State[] VALUES = values();
346 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)347     public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
348       if (desc.getType() != getDescriptor()) {
349         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
350       }
351       if (desc.getIndex() == -1) {
352         return UNRECOGNIZED;
353       }
354       return VALUES[desc.getIndex()];
355     }
356 
357     private final int value;
358 
State(int value)359     private State(int value) {
360       this.value = value;
361     }
362 
363     // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.biglake.v1alpha1.Lock.State)
364   }
365 
366   private int resourcesCase_ = 0;
367   private java.lang.Object resources_;
368 
369   public enum ResourcesCase
370       implements
371           com.google.protobuf.Internal.EnumLite,
372           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
373     TABLE_ID(5),
374     RESOURCES_NOT_SET(0);
375     private final int value;
376 
ResourcesCase(int value)377     private ResourcesCase(int value) {
378       this.value = value;
379     }
380     /**
381      * @param value The number of the enum to look for.
382      * @return The enum associated with the given number.
383      * @deprecated Use {@link #forNumber(int)} instead.
384      */
385     @java.lang.Deprecated
valueOf(int value)386     public static ResourcesCase valueOf(int value) {
387       return forNumber(value);
388     }
389 
forNumber(int value)390     public static ResourcesCase forNumber(int value) {
391       switch (value) {
392         case 5:
393           return TABLE_ID;
394         case 0:
395           return RESOURCES_NOT_SET;
396         default:
397           return null;
398       }
399     }
400 
getNumber()401     public int getNumber() {
402       return this.value;
403     }
404   };
405 
getResourcesCase()406   public ResourcesCase getResourcesCase() {
407     return ResourcesCase.forNumber(resourcesCase_);
408   }
409 
410   public static final int TABLE_ID_FIELD_NUMBER = 5;
411   /**
412    *
413    *
414    * <pre>
415    * The table ID (not fully qualified name) in the same database that the
416    * lock will be created on. The table must exist.
417    * </pre>
418    *
419    * <code>string table_id = 5;</code>
420    *
421    * @return Whether the tableId field is set.
422    */
hasTableId()423   public boolean hasTableId() {
424     return resourcesCase_ == 5;
425   }
426   /**
427    *
428    *
429    * <pre>
430    * The table ID (not fully qualified name) in the same database that the
431    * lock will be created on. The table must exist.
432    * </pre>
433    *
434    * <code>string table_id = 5;</code>
435    *
436    * @return The tableId.
437    */
getTableId()438   public java.lang.String getTableId() {
439     java.lang.Object ref = "";
440     if (resourcesCase_ == 5) {
441       ref = resources_;
442     }
443     if (ref instanceof java.lang.String) {
444       return (java.lang.String) ref;
445     } else {
446       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
447       java.lang.String s = bs.toStringUtf8();
448       if (resourcesCase_ == 5) {
449         resources_ = s;
450       }
451       return s;
452     }
453   }
454   /**
455    *
456    *
457    * <pre>
458    * The table ID (not fully qualified name) in the same database that the
459    * lock will be created on. The table must exist.
460    * </pre>
461    *
462    * <code>string table_id = 5;</code>
463    *
464    * @return The bytes for tableId.
465    */
getTableIdBytes()466   public com.google.protobuf.ByteString getTableIdBytes() {
467     java.lang.Object ref = "";
468     if (resourcesCase_ == 5) {
469       ref = resources_;
470     }
471     if (ref instanceof java.lang.String) {
472       com.google.protobuf.ByteString b =
473           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
474       if (resourcesCase_ == 5) {
475         resources_ = b;
476       }
477       return b;
478     } else {
479       return (com.google.protobuf.ByteString) ref;
480     }
481   }
482 
483   public static final int NAME_FIELD_NUMBER = 1;
484 
485   @SuppressWarnings("serial")
486   private volatile java.lang.Object name_ = "";
487   /**
488    *
489    *
490    * <pre>
491    * Output only. The resource name.
492    * Format:
493    * projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/locks/{lock_id}
494    * </pre>
495    *
496    * <code>
497    * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
498    * </code>
499    *
500    * @return The name.
501    */
502   @java.lang.Override
getName()503   public java.lang.String getName() {
504     java.lang.Object ref = name_;
505     if (ref instanceof java.lang.String) {
506       return (java.lang.String) ref;
507     } else {
508       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
509       java.lang.String s = bs.toStringUtf8();
510       name_ = s;
511       return s;
512     }
513   }
514   /**
515    *
516    *
517    * <pre>
518    * Output only. The resource name.
519    * Format:
520    * projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/locks/{lock_id}
521    * </pre>
522    *
523    * <code>
524    * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
525    * </code>
526    *
527    * @return The bytes for name.
528    */
529   @java.lang.Override
getNameBytes()530   public com.google.protobuf.ByteString getNameBytes() {
531     java.lang.Object ref = name_;
532     if (ref instanceof java.lang.String) {
533       com.google.protobuf.ByteString b =
534           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
535       name_ = b;
536       return b;
537     } else {
538       return (com.google.protobuf.ByteString) ref;
539     }
540   }
541 
542   public static final int CREATE_TIME_FIELD_NUMBER = 2;
543   private com.google.protobuf.Timestamp createTime_;
544   /**
545    *
546    *
547    * <pre>
548    * Output only. The creation time of the lock.
549    * </pre>
550    *
551    * <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
552    * </code>
553    *
554    * @return Whether the createTime field is set.
555    */
556   @java.lang.Override
hasCreateTime()557   public boolean hasCreateTime() {
558     return createTime_ != null;
559   }
560   /**
561    *
562    *
563    * <pre>
564    * Output only. The creation time of the lock.
565    * </pre>
566    *
567    * <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
568    * </code>
569    *
570    * @return The createTime.
571    */
572   @java.lang.Override
getCreateTime()573   public com.google.protobuf.Timestamp getCreateTime() {
574     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
575   }
576   /**
577    *
578    *
579    * <pre>
580    * Output only. The creation time of the lock.
581    * </pre>
582    *
583    * <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
584    * </code>
585    */
586   @java.lang.Override
getCreateTimeOrBuilder()587   public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
588     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
589   }
590 
591   public static final int TYPE_FIELD_NUMBER = 3;
592   private int type_ = 0;
593   /**
594    *
595    *
596    * <pre>
597    * The lock type.
598    * </pre>
599    *
600    * <code>.google.cloud.bigquery.biglake.v1alpha1.Lock.Type type = 3;</code>
601    *
602    * @return The enum numeric value on the wire for type.
603    */
604   @java.lang.Override
getTypeValue()605   public int getTypeValue() {
606     return type_;
607   }
608   /**
609    *
610    *
611    * <pre>
612    * The lock type.
613    * </pre>
614    *
615    * <code>.google.cloud.bigquery.biglake.v1alpha1.Lock.Type type = 3;</code>
616    *
617    * @return The type.
618    */
619   @java.lang.Override
getType()620   public com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type getType() {
621     com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type result =
622         com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type.forNumber(type_);
623     return result == null
624         ? com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type.UNRECOGNIZED
625         : result;
626   }
627 
628   public static final int STATE_FIELD_NUMBER = 4;
629   private int state_ = 0;
630   /**
631    *
632    *
633    * <pre>
634    * Output only. The lock state.
635    * </pre>
636    *
637    * <code>
638    * .google.cloud.bigquery.biglake.v1alpha1.Lock.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
639    * </code>
640    *
641    * @return The enum numeric value on the wire for state.
642    */
643   @java.lang.Override
getStateValue()644   public int getStateValue() {
645     return state_;
646   }
647   /**
648    *
649    *
650    * <pre>
651    * Output only. The lock state.
652    * </pre>
653    *
654    * <code>
655    * .google.cloud.bigquery.biglake.v1alpha1.Lock.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
656    * </code>
657    *
658    * @return The state.
659    */
660   @java.lang.Override
getState()661   public com.google.cloud.bigquery.biglake.v1alpha1.Lock.State getState() {
662     com.google.cloud.bigquery.biglake.v1alpha1.Lock.State result =
663         com.google.cloud.bigquery.biglake.v1alpha1.Lock.State.forNumber(state_);
664     return result == null
665         ? com.google.cloud.bigquery.biglake.v1alpha1.Lock.State.UNRECOGNIZED
666         : result;
667   }
668 
669   private byte memoizedIsInitialized = -1;
670 
671   @java.lang.Override
isInitialized()672   public final boolean isInitialized() {
673     byte isInitialized = memoizedIsInitialized;
674     if (isInitialized == 1) return true;
675     if (isInitialized == 0) return false;
676 
677     memoizedIsInitialized = 1;
678     return true;
679   }
680 
681   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)682   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
683     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
684       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
685     }
686     if (createTime_ != null) {
687       output.writeMessage(2, getCreateTime());
688     }
689     if (type_
690         != com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type.TYPE_UNSPECIFIED.getNumber()) {
691       output.writeEnum(3, type_);
692     }
693     if (state_
694         != com.google.cloud.bigquery.biglake.v1alpha1.Lock.State.STATE_UNSPECIFIED.getNumber()) {
695       output.writeEnum(4, state_);
696     }
697     if (resourcesCase_ == 5) {
698       com.google.protobuf.GeneratedMessageV3.writeString(output, 5, resources_);
699     }
700     getUnknownFields().writeTo(output);
701   }
702 
703   @java.lang.Override
getSerializedSize()704   public int getSerializedSize() {
705     int size = memoizedSize;
706     if (size != -1) return size;
707 
708     size = 0;
709     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
710       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
711     }
712     if (createTime_ != null) {
713       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime());
714     }
715     if (type_
716         != com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type.TYPE_UNSPECIFIED.getNumber()) {
717       size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_);
718     }
719     if (state_
720         != com.google.cloud.bigquery.biglake.v1alpha1.Lock.State.STATE_UNSPECIFIED.getNumber()) {
721       size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_);
722     }
723     if (resourcesCase_ == 5) {
724       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, resources_);
725     }
726     size += getUnknownFields().getSerializedSize();
727     memoizedSize = size;
728     return size;
729   }
730 
731   @java.lang.Override
equals(final java.lang.Object obj)732   public boolean equals(final java.lang.Object obj) {
733     if (obj == this) {
734       return true;
735     }
736     if (!(obj instanceof com.google.cloud.bigquery.biglake.v1alpha1.Lock)) {
737       return super.equals(obj);
738     }
739     com.google.cloud.bigquery.biglake.v1alpha1.Lock other =
740         (com.google.cloud.bigquery.biglake.v1alpha1.Lock) obj;
741 
742     if (!getName().equals(other.getName())) return false;
743     if (hasCreateTime() != other.hasCreateTime()) return false;
744     if (hasCreateTime()) {
745       if (!getCreateTime().equals(other.getCreateTime())) return false;
746     }
747     if (type_ != other.type_) return false;
748     if (state_ != other.state_) return false;
749     if (!getResourcesCase().equals(other.getResourcesCase())) return false;
750     switch (resourcesCase_) {
751       case 5:
752         if (!getTableId().equals(other.getTableId())) return false;
753         break;
754       case 0:
755       default:
756     }
757     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
758     return true;
759   }
760 
761   @java.lang.Override
hashCode()762   public int hashCode() {
763     if (memoizedHashCode != 0) {
764       return memoizedHashCode;
765     }
766     int hash = 41;
767     hash = (19 * hash) + getDescriptor().hashCode();
768     hash = (37 * hash) + NAME_FIELD_NUMBER;
769     hash = (53 * hash) + getName().hashCode();
770     if (hasCreateTime()) {
771       hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
772       hash = (53 * hash) + getCreateTime().hashCode();
773     }
774     hash = (37 * hash) + TYPE_FIELD_NUMBER;
775     hash = (53 * hash) + type_;
776     hash = (37 * hash) + STATE_FIELD_NUMBER;
777     hash = (53 * hash) + state_;
778     switch (resourcesCase_) {
779       case 5:
780         hash = (37 * hash) + TABLE_ID_FIELD_NUMBER;
781         hash = (53 * hash) + getTableId().hashCode();
782         break;
783       case 0:
784       default:
785     }
786     hash = (29 * hash) + getUnknownFields().hashCode();
787     memoizedHashCode = hash;
788     return hash;
789   }
790 
parseFrom(java.nio.ByteBuffer data)791   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseFrom(java.nio.ByteBuffer data)
792       throws com.google.protobuf.InvalidProtocolBufferException {
793     return PARSER.parseFrom(data);
794   }
795 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)796   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseFrom(
797       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
798       throws com.google.protobuf.InvalidProtocolBufferException {
799     return PARSER.parseFrom(data, extensionRegistry);
800   }
801 
parseFrom( com.google.protobuf.ByteString data)802   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseFrom(
803       com.google.protobuf.ByteString data)
804       throws com.google.protobuf.InvalidProtocolBufferException {
805     return PARSER.parseFrom(data);
806   }
807 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)808   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseFrom(
809       com.google.protobuf.ByteString data,
810       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
811       throws com.google.protobuf.InvalidProtocolBufferException {
812     return PARSER.parseFrom(data, extensionRegistry);
813   }
814 
parseFrom(byte[] data)815   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseFrom(byte[] data)
816       throws com.google.protobuf.InvalidProtocolBufferException {
817     return PARSER.parseFrom(data);
818   }
819 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)820   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseFrom(
821       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
822       throws com.google.protobuf.InvalidProtocolBufferException {
823     return PARSER.parseFrom(data, extensionRegistry);
824   }
825 
parseFrom(java.io.InputStream input)826   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseFrom(java.io.InputStream input)
827       throws java.io.IOException {
828     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
829   }
830 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)831   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseFrom(
832       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
833       throws java.io.IOException {
834     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
835         PARSER, input, extensionRegistry);
836   }
837 
parseDelimitedFrom( java.io.InputStream input)838   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseDelimitedFrom(
839       java.io.InputStream input) throws java.io.IOException {
840     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
841   }
842 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)843   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseDelimitedFrom(
844       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
845       throws java.io.IOException {
846     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
847         PARSER, input, extensionRegistry);
848   }
849 
parseFrom( com.google.protobuf.CodedInputStream input)850   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseFrom(
851       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
852     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
853   }
854 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)855   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock parseFrom(
856       com.google.protobuf.CodedInputStream input,
857       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
858       throws java.io.IOException {
859     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
860         PARSER, input, extensionRegistry);
861   }
862 
863   @java.lang.Override
newBuilderForType()864   public Builder newBuilderForType() {
865     return newBuilder();
866   }
867 
newBuilder()868   public static Builder newBuilder() {
869     return DEFAULT_INSTANCE.toBuilder();
870   }
871 
newBuilder(com.google.cloud.bigquery.biglake.v1alpha1.Lock prototype)872   public static Builder newBuilder(com.google.cloud.bigquery.biglake.v1alpha1.Lock prototype) {
873     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
874   }
875 
876   @java.lang.Override
toBuilder()877   public Builder toBuilder() {
878     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
879   }
880 
881   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)882   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
883     Builder builder = new Builder(parent);
884     return builder;
885   }
886   /**
887    *
888    *
889    * <pre>
890    * Represents a lock.
891    * </pre>
892    *
893    * Protobuf type {@code google.cloud.bigquery.biglake.v1alpha1.Lock}
894    */
895   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
896       implements
897       // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.biglake.v1alpha1.Lock)
898       com.google.cloud.bigquery.biglake.v1alpha1.LockOrBuilder {
getDescriptor()899     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
900       return com.google.cloud.bigquery.biglake.v1alpha1.MetastoreProto
901           .internal_static_google_cloud_bigquery_biglake_v1alpha1_Lock_descriptor;
902     }
903 
904     @java.lang.Override
905     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()906         internalGetFieldAccessorTable() {
907       return com.google.cloud.bigquery.biglake.v1alpha1.MetastoreProto
908           .internal_static_google_cloud_bigquery_biglake_v1alpha1_Lock_fieldAccessorTable
909           .ensureFieldAccessorsInitialized(
910               com.google.cloud.bigquery.biglake.v1alpha1.Lock.class,
911               com.google.cloud.bigquery.biglake.v1alpha1.Lock.Builder.class);
912     }
913 
914     // Construct using com.google.cloud.bigquery.biglake.v1alpha1.Lock.newBuilder()
Builder()915     private Builder() {}
916 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)917     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
918       super(parent);
919     }
920 
921     @java.lang.Override
clear()922     public Builder clear() {
923       super.clear();
924       bitField0_ = 0;
925       name_ = "";
926       createTime_ = null;
927       if (createTimeBuilder_ != null) {
928         createTimeBuilder_.dispose();
929         createTimeBuilder_ = null;
930       }
931       type_ = 0;
932       state_ = 0;
933       resourcesCase_ = 0;
934       resources_ = null;
935       return this;
936     }
937 
938     @java.lang.Override
getDescriptorForType()939     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
940       return com.google.cloud.bigquery.biglake.v1alpha1.MetastoreProto
941           .internal_static_google_cloud_bigquery_biglake_v1alpha1_Lock_descriptor;
942     }
943 
944     @java.lang.Override
getDefaultInstanceForType()945     public com.google.cloud.bigquery.biglake.v1alpha1.Lock getDefaultInstanceForType() {
946       return com.google.cloud.bigquery.biglake.v1alpha1.Lock.getDefaultInstance();
947     }
948 
949     @java.lang.Override
build()950     public com.google.cloud.bigquery.biglake.v1alpha1.Lock build() {
951       com.google.cloud.bigquery.biglake.v1alpha1.Lock result = buildPartial();
952       if (!result.isInitialized()) {
953         throw newUninitializedMessageException(result);
954       }
955       return result;
956     }
957 
958     @java.lang.Override
buildPartial()959     public com.google.cloud.bigquery.biglake.v1alpha1.Lock buildPartial() {
960       com.google.cloud.bigquery.biglake.v1alpha1.Lock result =
961           new com.google.cloud.bigquery.biglake.v1alpha1.Lock(this);
962       if (bitField0_ != 0) {
963         buildPartial0(result);
964       }
965       buildPartialOneofs(result);
966       onBuilt();
967       return result;
968     }
969 
buildPartial0(com.google.cloud.bigquery.biglake.v1alpha1.Lock result)970     private void buildPartial0(com.google.cloud.bigquery.biglake.v1alpha1.Lock result) {
971       int from_bitField0_ = bitField0_;
972       if (((from_bitField0_ & 0x00000002) != 0)) {
973         result.name_ = name_;
974       }
975       if (((from_bitField0_ & 0x00000004) != 0)) {
976         result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
977       }
978       if (((from_bitField0_ & 0x00000008) != 0)) {
979         result.type_ = type_;
980       }
981       if (((from_bitField0_ & 0x00000010) != 0)) {
982         result.state_ = state_;
983       }
984     }
985 
buildPartialOneofs(com.google.cloud.bigquery.biglake.v1alpha1.Lock result)986     private void buildPartialOneofs(com.google.cloud.bigquery.biglake.v1alpha1.Lock result) {
987       result.resourcesCase_ = resourcesCase_;
988       result.resources_ = this.resources_;
989     }
990 
991     @java.lang.Override
clone()992     public Builder clone() {
993       return super.clone();
994     }
995 
996     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)997     public Builder setField(
998         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
999       return super.setField(field, value);
1000     }
1001 
1002     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1003     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1004       return super.clearField(field);
1005     }
1006 
1007     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1008     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1009       return super.clearOneof(oneof);
1010     }
1011 
1012     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1013     public Builder setRepeatedField(
1014         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1015       return super.setRepeatedField(field, index, value);
1016     }
1017 
1018     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1019     public Builder addRepeatedField(
1020         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1021       return super.addRepeatedField(field, value);
1022     }
1023 
1024     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1025     public Builder mergeFrom(com.google.protobuf.Message other) {
1026       if (other instanceof com.google.cloud.bigquery.biglake.v1alpha1.Lock) {
1027         return mergeFrom((com.google.cloud.bigquery.biglake.v1alpha1.Lock) other);
1028       } else {
1029         super.mergeFrom(other);
1030         return this;
1031       }
1032     }
1033 
mergeFrom(com.google.cloud.bigquery.biglake.v1alpha1.Lock other)1034     public Builder mergeFrom(com.google.cloud.bigquery.biglake.v1alpha1.Lock other) {
1035       if (other == com.google.cloud.bigquery.biglake.v1alpha1.Lock.getDefaultInstance())
1036         return this;
1037       if (!other.getName().isEmpty()) {
1038         name_ = other.name_;
1039         bitField0_ |= 0x00000002;
1040         onChanged();
1041       }
1042       if (other.hasCreateTime()) {
1043         mergeCreateTime(other.getCreateTime());
1044       }
1045       if (other.type_ != 0) {
1046         setTypeValue(other.getTypeValue());
1047       }
1048       if (other.state_ != 0) {
1049         setStateValue(other.getStateValue());
1050       }
1051       switch (other.getResourcesCase()) {
1052         case TABLE_ID:
1053           {
1054             resourcesCase_ = 5;
1055             resources_ = other.resources_;
1056             onChanged();
1057             break;
1058           }
1059         case RESOURCES_NOT_SET:
1060           {
1061             break;
1062           }
1063       }
1064       this.mergeUnknownFields(other.getUnknownFields());
1065       onChanged();
1066       return this;
1067     }
1068 
1069     @java.lang.Override
isInitialized()1070     public final boolean isInitialized() {
1071       return true;
1072     }
1073 
1074     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1075     public Builder mergeFrom(
1076         com.google.protobuf.CodedInputStream input,
1077         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1078         throws java.io.IOException {
1079       if (extensionRegistry == null) {
1080         throw new java.lang.NullPointerException();
1081       }
1082       try {
1083         boolean done = false;
1084         while (!done) {
1085           int tag = input.readTag();
1086           switch (tag) {
1087             case 0:
1088               done = true;
1089               break;
1090             case 10:
1091               {
1092                 name_ = input.readStringRequireUtf8();
1093                 bitField0_ |= 0x00000002;
1094                 break;
1095               } // case 10
1096             case 18:
1097               {
1098                 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
1099                 bitField0_ |= 0x00000004;
1100                 break;
1101               } // case 18
1102             case 24:
1103               {
1104                 type_ = input.readEnum();
1105                 bitField0_ |= 0x00000008;
1106                 break;
1107               } // case 24
1108             case 32:
1109               {
1110                 state_ = input.readEnum();
1111                 bitField0_ |= 0x00000010;
1112                 break;
1113               } // case 32
1114             case 42:
1115               {
1116                 java.lang.String s = input.readStringRequireUtf8();
1117                 resourcesCase_ = 5;
1118                 resources_ = s;
1119                 break;
1120               } // case 42
1121             default:
1122               {
1123                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1124                   done = true; // was an endgroup tag
1125                 }
1126                 break;
1127               } // default:
1128           } // switch (tag)
1129         } // while (!done)
1130       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1131         throw e.unwrapIOException();
1132       } finally {
1133         onChanged();
1134       } // finally
1135       return this;
1136     }
1137 
1138     private int resourcesCase_ = 0;
1139     private java.lang.Object resources_;
1140 
getResourcesCase()1141     public ResourcesCase getResourcesCase() {
1142       return ResourcesCase.forNumber(resourcesCase_);
1143     }
1144 
clearResources()1145     public Builder clearResources() {
1146       resourcesCase_ = 0;
1147       resources_ = null;
1148       onChanged();
1149       return this;
1150     }
1151 
1152     private int bitField0_;
1153 
1154     /**
1155      *
1156      *
1157      * <pre>
1158      * The table ID (not fully qualified name) in the same database that the
1159      * lock will be created on. The table must exist.
1160      * </pre>
1161      *
1162      * <code>string table_id = 5;</code>
1163      *
1164      * @return Whether the tableId field is set.
1165      */
1166     @java.lang.Override
hasTableId()1167     public boolean hasTableId() {
1168       return resourcesCase_ == 5;
1169     }
1170     /**
1171      *
1172      *
1173      * <pre>
1174      * The table ID (not fully qualified name) in the same database that the
1175      * lock will be created on. The table must exist.
1176      * </pre>
1177      *
1178      * <code>string table_id = 5;</code>
1179      *
1180      * @return The tableId.
1181      */
1182     @java.lang.Override
getTableId()1183     public java.lang.String getTableId() {
1184       java.lang.Object ref = "";
1185       if (resourcesCase_ == 5) {
1186         ref = resources_;
1187       }
1188       if (!(ref instanceof java.lang.String)) {
1189         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1190         java.lang.String s = bs.toStringUtf8();
1191         if (resourcesCase_ == 5) {
1192           resources_ = s;
1193         }
1194         return s;
1195       } else {
1196         return (java.lang.String) ref;
1197       }
1198     }
1199     /**
1200      *
1201      *
1202      * <pre>
1203      * The table ID (not fully qualified name) in the same database that the
1204      * lock will be created on. The table must exist.
1205      * </pre>
1206      *
1207      * <code>string table_id = 5;</code>
1208      *
1209      * @return The bytes for tableId.
1210      */
1211     @java.lang.Override
getTableIdBytes()1212     public com.google.protobuf.ByteString getTableIdBytes() {
1213       java.lang.Object ref = "";
1214       if (resourcesCase_ == 5) {
1215         ref = resources_;
1216       }
1217       if (ref instanceof String) {
1218         com.google.protobuf.ByteString b =
1219             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1220         if (resourcesCase_ == 5) {
1221           resources_ = b;
1222         }
1223         return b;
1224       } else {
1225         return (com.google.protobuf.ByteString) ref;
1226       }
1227     }
1228     /**
1229      *
1230      *
1231      * <pre>
1232      * The table ID (not fully qualified name) in the same database that the
1233      * lock will be created on. The table must exist.
1234      * </pre>
1235      *
1236      * <code>string table_id = 5;</code>
1237      *
1238      * @param value The tableId to set.
1239      * @return This builder for chaining.
1240      */
setTableId(java.lang.String value)1241     public Builder setTableId(java.lang.String value) {
1242       if (value == null) {
1243         throw new NullPointerException();
1244       }
1245       resourcesCase_ = 5;
1246       resources_ = value;
1247       onChanged();
1248       return this;
1249     }
1250     /**
1251      *
1252      *
1253      * <pre>
1254      * The table ID (not fully qualified name) in the same database that the
1255      * lock will be created on. The table must exist.
1256      * </pre>
1257      *
1258      * <code>string table_id = 5;</code>
1259      *
1260      * @return This builder for chaining.
1261      */
clearTableId()1262     public Builder clearTableId() {
1263       if (resourcesCase_ == 5) {
1264         resourcesCase_ = 0;
1265         resources_ = null;
1266         onChanged();
1267       }
1268       return this;
1269     }
1270     /**
1271      *
1272      *
1273      * <pre>
1274      * The table ID (not fully qualified name) in the same database that the
1275      * lock will be created on. The table must exist.
1276      * </pre>
1277      *
1278      * <code>string table_id = 5;</code>
1279      *
1280      * @param value The bytes for tableId to set.
1281      * @return This builder for chaining.
1282      */
setTableIdBytes(com.google.protobuf.ByteString value)1283     public Builder setTableIdBytes(com.google.protobuf.ByteString value) {
1284       if (value == null) {
1285         throw new NullPointerException();
1286       }
1287       checkByteStringIsUtf8(value);
1288       resourcesCase_ = 5;
1289       resources_ = value;
1290       onChanged();
1291       return this;
1292     }
1293 
1294     private java.lang.Object name_ = "";
1295     /**
1296      *
1297      *
1298      * <pre>
1299      * Output only. The resource name.
1300      * Format:
1301      * projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/locks/{lock_id}
1302      * </pre>
1303      *
1304      * <code>
1305      * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
1306      * </code>
1307      *
1308      * @return The name.
1309      */
getName()1310     public java.lang.String getName() {
1311       java.lang.Object ref = name_;
1312       if (!(ref instanceof java.lang.String)) {
1313         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1314         java.lang.String s = bs.toStringUtf8();
1315         name_ = s;
1316         return s;
1317       } else {
1318         return (java.lang.String) ref;
1319       }
1320     }
1321     /**
1322      *
1323      *
1324      * <pre>
1325      * Output only. The resource name.
1326      * Format:
1327      * projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/locks/{lock_id}
1328      * </pre>
1329      *
1330      * <code>
1331      * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
1332      * </code>
1333      *
1334      * @return The bytes for name.
1335      */
getNameBytes()1336     public com.google.protobuf.ByteString getNameBytes() {
1337       java.lang.Object ref = name_;
1338       if (ref instanceof String) {
1339         com.google.protobuf.ByteString b =
1340             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1341         name_ = b;
1342         return b;
1343       } else {
1344         return (com.google.protobuf.ByteString) ref;
1345       }
1346     }
1347     /**
1348      *
1349      *
1350      * <pre>
1351      * Output only. The resource name.
1352      * Format:
1353      * projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/locks/{lock_id}
1354      * </pre>
1355      *
1356      * <code>
1357      * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
1358      * </code>
1359      *
1360      * @param value The name to set.
1361      * @return This builder for chaining.
1362      */
setName(java.lang.String value)1363     public Builder setName(java.lang.String value) {
1364       if (value == null) {
1365         throw new NullPointerException();
1366       }
1367       name_ = value;
1368       bitField0_ |= 0x00000002;
1369       onChanged();
1370       return this;
1371     }
1372     /**
1373      *
1374      *
1375      * <pre>
1376      * Output only. The resource name.
1377      * Format:
1378      * projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/locks/{lock_id}
1379      * </pre>
1380      *
1381      * <code>
1382      * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
1383      * </code>
1384      *
1385      * @return This builder for chaining.
1386      */
clearName()1387     public Builder clearName() {
1388       name_ = getDefaultInstance().getName();
1389       bitField0_ = (bitField0_ & ~0x00000002);
1390       onChanged();
1391       return this;
1392     }
1393     /**
1394      *
1395      *
1396      * <pre>
1397      * Output only. The resource name.
1398      * Format:
1399      * projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/locks/{lock_id}
1400      * </pre>
1401      *
1402      * <code>
1403      * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
1404      * </code>
1405      *
1406      * @param value The bytes for name to set.
1407      * @return This builder for chaining.
1408      */
setNameBytes(com.google.protobuf.ByteString value)1409     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1410       if (value == null) {
1411         throw new NullPointerException();
1412       }
1413       checkByteStringIsUtf8(value);
1414       name_ = value;
1415       bitField0_ |= 0x00000002;
1416       onChanged();
1417       return this;
1418     }
1419 
1420     private com.google.protobuf.Timestamp createTime_;
1421     private com.google.protobuf.SingleFieldBuilderV3<
1422             com.google.protobuf.Timestamp,
1423             com.google.protobuf.Timestamp.Builder,
1424             com.google.protobuf.TimestampOrBuilder>
1425         createTimeBuilder_;
1426     /**
1427      *
1428      *
1429      * <pre>
1430      * Output only. The creation time of the lock.
1431      * </pre>
1432      *
1433      * <code>
1434      * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
1435      * </code>
1436      *
1437      * @return Whether the createTime field is set.
1438      */
hasCreateTime()1439     public boolean hasCreateTime() {
1440       return ((bitField0_ & 0x00000004) != 0);
1441     }
1442     /**
1443      *
1444      *
1445      * <pre>
1446      * Output only. The creation time of the lock.
1447      * </pre>
1448      *
1449      * <code>
1450      * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
1451      * </code>
1452      *
1453      * @return The createTime.
1454      */
getCreateTime()1455     public com.google.protobuf.Timestamp getCreateTime() {
1456       if (createTimeBuilder_ == null) {
1457         return createTime_ == null
1458             ? com.google.protobuf.Timestamp.getDefaultInstance()
1459             : createTime_;
1460       } else {
1461         return createTimeBuilder_.getMessage();
1462       }
1463     }
1464     /**
1465      *
1466      *
1467      * <pre>
1468      * Output only. The creation time of the lock.
1469      * </pre>
1470      *
1471      * <code>
1472      * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
1473      * </code>
1474      */
setCreateTime(com.google.protobuf.Timestamp value)1475     public Builder setCreateTime(com.google.protobuf.Timestamp value) {
1476       if (createTimeBuilder_ == null) {
1477         if (value == null) {
1478           throw new NullPointerException();
1479         }
1480         createTime_ = value;
1481       } else {
1482         createTimeBuilder_.setMessage(value);
1483       }
1484       bitField0_ |= 0x00000004;
1485       onChanged();
1486       return this;
1487     }
1488     /**
1489      *
1490      *
1491      * <pre>
1492      * Output only. The creation time of the lock.
1493      * </pre>
1494      *
1495      * <code>
1496      * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
1497      * </code>
1498      */
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)1499     public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
1500       if (createTimeBuilder_ == null) {
1501         createTime_ = builderForValue.build();
1502       } else {
1503         createTimeBuilder_.setMessage(builderForValue.build());
1504       }
1505       bitField0_ |= 0x00000004;
1506       onChanged();
1507       return this;
1508     }
1509     /**
1510      *
1511      *
1512      * <pre>
1513      * Output only. The creation time of the lock.
1514      * </pre>
1515      *
1516      * <code>
1517      * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
1518      * </code>
1519      */
mergeCreateTime(com.google.protobuf.Timestamp value)1520     public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
1521       if (createTimeBuilder_ == null) {
1522         if (((bitField0_ & 0x00000004) != 0)
1523             && createTime_ != null
1524             && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
1525           getCreateTimeBuilder().mergeFrom(value);
1526         } else {
1527           createTime_ = value;
1528         }
1529       } else {
1530         createTimeBuilder_.mergeFrom(value);
1531       }
1532       bitField0_ |= 0x00000004;
1533       onChanged();
1534       return this;
1535     }
1536     /**
1537      *
1538      *
1539      * <pre>
1540      * Output only. The creation time of the lock.
1541      * </pre>
1542      *
1543      * <code>
1544      * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
1545      * </code>
1546      */
clearCreateTime()1547     public Builder clearCreateTime() {
1548       bitField0_ = (bitField0_ & ~0x00000004);
1549       createTime_ = null;
1550       if (createTimeBuilder_ != null) {
1551         createTimeBuilder_.dispose();
1552         createTimeBuilder_ = null;
1553       }
1554       onChanged();
1555       return this;
1556     }
1557     /**
1558      *
1559      *
1560      * <pre>
1561      * Output only. The creation time of the lock.
1562      * </pre>
1563      *
1564      * <code>
1565      * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
1566      * </code>
1567      */
getCreateTimeBuilder()1568     public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
1569       bitField0_ |= 0x00000004;
1570       onChanged();
1571       return getCreateTimeFieldBuilder().getBuilder();
1572     }
1573     /**
1574      *
1575      *
1576      * <pre>
1577      * Output only. The creation time of the lock.
1578      * </pre>
1579      *
1580      * <code>
1581      * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
1582      * </code>
1583      */
getCreateTimeOrBuilder()1584     public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
1585       if (createTimeBuilder_ != null) {
1586         return createTimeBuilder_.getMessageOrBuilder();
1587       } else {
1588         return createTime_ == null
1589             ? com.google.protobuf.Timestamp.getDefaultInstance()
1590             : createTime_;
1591       }
1592     }
1593     /**
1594      *
1595      *
1596      * <pre>
1597      * Output only. The creation time of the lock.
1598      * </pre>
1599      *
1600      * <code>
1601      * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
1602      * </code>
1603      */
1604     private com.google.protobuf.SingleFieldBuilderV3<
1605             com.google.protobuf.Timestamp,
1606             com.google.protobuf.Timestamp.Builder,
1607             com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder()1608         getCreateTimeFieldBuilder() {
1609       if (createTimeBuilder_ == null) {
1610         createTimeBuilder_ =
1611             new com.google.protobuf.SingleFieldBuilderV3<
1612                 com.google.protobuf.Timestamp,
1613                 com.google.protobuf.Timestamp.Builder,
1614                 com.google.protobuf.TimestampOrBuilder>(
1615                 getCreateTime(), getParentForChildren(), isClean());
1616         createTime_ = null;
1617       }
1618       return createTimeBuilder_;
1619     }
1620 
1621     private int type_ = 0;
1622     /**
1623      *
1624      *
1625      * <pre>
1626      * The lock type.
1627      * </pre>
1628      *
1629      * <code>.google.cloud.bigquery.biglake.v1alpha1.Lock.Type type = 3;</code>
1630      *
1631      * @return The enum numeric value on the wire for type.
1632      */
1633     @java.lang.Override
getTypeValue()1634     public int getTypeValue() {
1635       return type_;
1636     }
1637     /**
1638      *
1639      *
1640      * <pre>
1641      * The lock type.
1642      * </pre>
1643      *
1644      * <code>.google.cloud.bigquery.biglake.v1alpha1.Lock.Type type = 3;</code>
1645      *
1646      * @param value The enum numeric value on the wire for type to set.
1647      * @return This builder for chaining.
1648      */
setTypeValue(int value)1649     public Builder setTypeValue(int value) {
1650       type_ = value;
1651       bitField0_ |= 0x00000008;
1652       onChanged();
1653       return this;
1654     }
1655     /**
1656      *
1657      *
1658      * <pre>
1659      * The lock type.
1660      * </pre>
1661      *
1662      * <code>.google.cloud.bigquery.biglake.v1alpha1.Lock.Type type = 3;</code>
1663      *
1664      * @return The type.
1665      */
1666     @java.lang.Override
getType()1667     public com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type getType() {
1668       com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type result =
1669           com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type.forNumber(type_);
1670       return result == null
1671           ? com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type.UNRECOGNIZED
1672           : result;
1673     }
1674     /**
1675      *
1676      *
1677      * <pre>
1678      * The lock type.
1679      * </pre>
1680      *
1681      * <code>.google.cloud.bigquery.biglake.v1alpha1.Lock.Type type = 3;</code>
1682      *
1683      * @param value The type to set.
1684      * @return This builder for chaining.
1685      */
setType(com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type value)1686     public Builder setType(com.google.cloud.bigquery.biglake.v1alpha1.Lock.Type value) {
1687       if (value == null) {
1688         throw new NullPointerException();
1689       }
1690       bitField0_ |= 0x00000008;
1691       type_ = value.getNumber();
1692       onChanged();
1693       return this;
1694     }
1695     /**
1696      *
1697      *
1698      * <pre>
1699      * The lock type.
1700      * </pre>
1701      *
1702      * <code>.google.cloud.bigquery.biglake.v1alpha1.Lock.Type type = 3;</code>
1703      *
1704      * @return This builder for chaining.
1705      */
clearType()1706     public Builder clearType() {
1707       bitField0_ = (bitField0_ & ~0x00000008);
1708       type_ = 0;
1709       onChanged();
1710       return this;
1711     }
1712 
1713     private int state_ = 0;
1714     /**
1715      *
1716      *
1717      * <pre>
1718      * Output only. The lock state.
1719      * </pre>
1720      *
1721      * <code>
1722      * .google.cloud.bigquery.biglake.v1alpha1.Lock.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1723      * </code>
1724      *
1725      * @return The enum numeric value on the wire for state.
1726      */
1727     @java.lang.Override
getStateValue()1728     public int getStateValue() {
1729       return state_;
1730     }
1731     /**
1732      *
1733      *
1734      * <pre>
1735      * Output only. The lock state.
1736      * </pre>
1737      *
1738      * <code>
1739      * .google.cloud.bigquery.biglake.v1alpha1.Lock.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1740      * </code>
1741      *
1742      * @param value The enum numeric value on the wire for state to set.
1743      * @return This builder for chaining.
1744      */
setStateValue(int value)1745     public Builder setStateValue(int value) {
1746       state_ = value;
1747       bitField0_ |= 0x00000010;
1748       onChanged();
1749       return this;
1750     }
1751     /**
1752      *
1753      *
1754      * <pre>
1755      * Output only. The lock state.
1756      * </pre>
1757      *
1758      * <code>
1759      * .google.cloud.bigquery.biglake.v1alpha1.Lock.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1760      * </code>
1761      *
1762      * @return The state.
1763      */
1764     @java.lang.Override
getState()1765     public com.google.cloud.bigquery.biglake.v1alpha1.Lock.State getState() {
1766       com.google.cloud.bigquery.biglake.v1alpha1.Lock.State result =
1767           com.google.cloud.bigquery.biglake.v1alpha1.Lock.State.forNumber(state_);
1768       return result == null
1769           ? com.google.cloud.bigquery.biglake.v1alpha1.Lock.State.UNRECOGNIZED
1770           : result;
1771     }
1772     /**
1773      *
1774      *
1775      * <pre>
1776      * Output only. The lock state.
1777      * </pre>
1778      *
1779      * <code>
1780      * .google.cloud.bigquery.biglake.v1alpha1.Lock.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1781      * </code>
1782      *
1783      * @param value The state to set.
1784      * @return This builder for chaining.
1785      */
setState(com.google.cloud.bigquery.biglake.v1alpha1.Lock.State value)1786     public Builder setState(com.google.cloud.bigquery.biglake.v1alpha1.Lock.State value) {
1787       if (value == null) {
1788         throw new NullPointerException();
1789       }
1790       bitField0_ |= 0x00000010;
1791       state_ = value.getNumber();
1792       onChanged();
1793       return this;
1794     }
1795     /**
1796      *
1797      *
1798      * <pre>
1799      * Output only. The lock state.
1800      * </pre>
1801      *
1802      * <code>
1803      * .google.cloud.bigquery.biglake.v1alpha1.Lock.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1804      * </code>
1805      *
1806      * @return This builder for chaining.
1807      */
clearState()1808     public Builder clearState() {
1809       bitField0_ = (bitField0_ & ~0x00000010);
1810       state_ = 0;
1811       onChanged();
1812       return this;
1813     }
1814 
1815     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1816     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1817       return super.setUnknownFields(unknownFields);
1818     }
1819 
1820     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1821     public final Builder mergeUnknownFields(
1822         final com.google.protobuf.UnknownFieldSet unknownFields) {
1823       return super.mergeUnknownFields(unknownFields);
1824     }
1825 
1826     // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.biglake.v1alpha1.Lock)
1827   }
1828 
1829   // @@protoc_insertion_point(class_scope:google.cloud.bigquery.biglake.v1alpha1.Lock)
1830   private static final com.google.cloud.bigquery.biglake.v1alpha1.Lock DEFAULT_INSTANCE;
1831 
1832   static {
1833     DEFAULT_INSTANCE = new com.google.cloud.bigquery.biglake.v1alpha1.Lock();
1834   }
1835 
getDefaultInstance()1836   public static com.google.cloud.bigquery.biglake.v1alpha1.Lock getDefaultInstance() {
1837     return DEFAULT_INSTANCE;
1838   }
1839 
1840   private static final com.google.protobuf.Parser<Lock> PARSER =
1841       new com.google.protobuf.AbstractParser<Lock>() {
1842         @java.lang.Override
1843         public Lock parsePartialFrom(
1844             com.google.protobuf.CodedInputStream input,
1845             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1846             throws com.google.protobuf.InvalidProtocolBufferException {
1847           Builder builder = newBuilder();
1848           try {
1849             builder.mergeFrom(input, extensionRegistry);
1850           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1851             throw e.setUnfinishedMessage(builder.buildPartial());
1852           } catch (com.google.protobuf.UninitializedMessageException e) {
1853             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1854           } catch (java.io.IOException e) {
1855             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1856                 .setUnfinishedMessage(builder.buildPartial());
1857           }
1858           return builder.buildPartial();
1859         }
1860       };
1861 
parser()1862   public static com.google.protobuf.Parser<Lock> parser() {
1863     return PARSER;
1864   }
1865 
1866   @java.lang.Override
getParserForType()1867   public com.google.protobuf.Parser<Lock> getParserForType() {
1868     return PARSER;
1869   }
1870 
1871   @java.lang.Override
getDefaultInstanceForType()1872   public com.google.cloud.bigquery.biglake.v1alpha1.Lock getDefaultInstanceForType() {
1873     return DEFAULT_INSTANCE;
1874   }
1875 }
1876