• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2019 The Grafeas Authors. All rights reserved.
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 
17 // Generated by the protocol buffer compiler.  DO NOT EDIT!
18 // source: grafeas/v1/provenance.proto
19 
20 package io.grafeas.v1;
21 
22 /**
23  *
24  *
25  * <pre>
26  * An alias to a repo revision.
27  * </pre>
28  *
29  * Protobuf type {@code grafeas.v1.AliasContext}
30  */
31 public final class AliasContext extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:grafeas.v1.AliasContext)
34     AliasContextOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use AliasContext.newBuilder() to construct.
AliasContext(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private AliasContext(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
AliasContext()41   private AliasContext() {
42     kind_ = 0;
43     name_ = "";
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new AliasContext();
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 io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor;
59   }
60 
61   @java.lang.Override
62   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()63       internalGetFieldAccessorTable() {
64     return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             io.grafeas.v1.AliasContext.class, io.grafeas.v1.AliasContext.Builder.class);
67   }
68 
69   /**
70    *
71    *
72    * <pre>
73    * The type of an alias.
74    * </pre>
75    *
76    * Protobuf enum {@code grafeas.v1.AliasContext.Kind}
77    */
78   public enum Kind implements com.google.protobuf.ProtocolMessageEnum {
79     /**
80      *
81      *
82      * <pre>
83      * Unknown.
84      * </pre>
85      *
86      * <code>KIND_UNSPECIFIED = 0;</code>
87      */
88     KIND_UNSPECIFIED(0),
89     /**
90      *
91      *
92      * <pre>
93      * Git tag.
94      * </pre>
95      *
96      * <code>FIXED = 1;</code>
97      */
98     FIXED(1),
99     /**
100      *
101      *
102      * <pre>
103      * Git branch.
104      * </pre>
105      *
106      * <code>MOVABLE = 2;</code>
107      */
108     MOVABLE(2),
109     /**
110      *
111      *
112      * <pre>
113      * Used to specify non-standard aliases. For example, if a Git repo has a
114      * ref named "refs/foo/bar".
115      * </pre>
116      *
117      * <code>OTHER = 4;</code>
118      */
119     OTHER(4),
120     UNRECOGNIZED(-1),
121     ;
122 
123     /**
124      *
125      *
126      * <pre>
127      * Unknown.
128      * </pre>
129      *
130      * <code>KIND_UNSPECIFIED = 0;</code>
131      */
132     public static final int KIND_UNSPECIFIED_VALUE = 0;
133     /**
134      *
135      *
136      * <pre>
137      * Git tag.
138      * </pre>
139      *
140      * <code>FIXED = 1;</code>
141      */
142     public static final int FIXED_VALUE = 1;
143     /**
144      *
145      *
146      * <pre>
147      * Git branch.
148      * </pre>
149      *
150      * <code>MOVABLE = 2;</code>
151      */
152     public static final int MOVABLE_VALUE = 2;
153     /**
154      *
155      *
156      * <pre>
157      * Used to specify non-standard aliases. For example, if a Git repo has a
158      * ref named "refs/foo/bar".
159      * </pre>
160      *
161      * <code>OTHER = 4;</code>
162      */
163     public static final int OTHER_VALUE = 4;
164 
getNumber()165     public final int getNumber() {
166       if (this == UNRECOGNIZED) {
167         throw new java.lang.IllegalArgumentException(
168             "Can't get the number of an unknown enum value.");
169       }
170       return value;
171     }
172 
173     /**
174      * @param value The numeric wire value of the corresponding enum entry.
175      * @return The enum associated with the given numeric wire value.
176      * @deprecated Use {@link #forNumber(int)} instead.
177      */
178     @java.lang.Deprecated
valueOf(int value)179     public static Kind valueOf(int value) {
180       return forNumber(value);
181     }
182 
183     /**
184      * @param value The numeric wire value of the corresponding enum entry.
185      * @return The enum associated with the given numeric wire value.
186      */
forNumber(int value)187     public static Kind forNumber(int value) {
188       switch (value) {
189         case 0:
190           return KIND_UNSPECIFIED;
191         case 1:
192           return FIXED;
193         case 2:
194           return MOVABLE;
195         case 4:
196           return OTHER;
197         default:
198           return null;
199       }
200     }
201 
internalGetValueMap()202     public static com.google.protobuf.Internal.EnumLiteMap<Kind> internalGetValueMap() {
203       return internalValueMap;
204     }
205 
206     private static final com.google.protobuf.Internal.EnumLiteMap<Kind> internalValueMap =
207         new com.google.protobuf.Internal.EnumLiteMap<Kind>() {
208           public Kind findValueByNumber(int number) {
209             return Kind.forNumber(number);
210           }
211         };
212 
getValueDescriptor()213     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
214       if (this == UNRECOGNIZED) {
215         throw new java.lang.IllegalStateException(
216             "Can't get the descriptor of an unrecognized enum value.");
217       }
218       return getDescriptor().getValues().get(ordinal());
219     }
220 
getDescriptorForType()221     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
222       return getDescriptor();
223     }
224 
getDescriptor()225     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
226       return io.grafeas.v1.AliasContext.getDescriptor().getEnumTypes().get(0);
227     }
228 
229     private static final Kind[] VALUES = values();
230 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)231     public static Kind valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
232       if (desc.getType() != getDescriptor()) {
233         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
234       }
235       if (desc.getIndex() == -1) {
236         return UNRECOGNIZED;
237       }
238       return VALUES[desc.getIndex()];
239     }
240 
241     private final int value;
242 
Kind(int value)243     private Kind(int value) {
244       this.value = value;
245     }
246 
247     // @@protoc_insertion_point(enum_scope:grafeas.v1.AliasContext.Kind)
248   }
249 
250   public static final int KIND_FIELD_NUMBER = 1;
251   private int kind_ = 0;
252   /**
253    *
254    *
255    * <pre>
256    * The alias kind.
257    * </pre>
258    *
259    * <code>.grafeas.v1.AliasContext.Kind kind = 1;</code>
260    *
261    * @return The enum numeric value on the wire for kind.
262    */
263   @java.lang.Override
getKindValue()264   public int getKindValue() {
265     return kind_;
266   }
267   /**
268    *
269    *
270    * <pre>
271    * The alias kind.
272    * </pre>
273    *
274    * <code>.grafeas.v1.AliasContext.Kind kind = 1;</code>
275    *
276    * @return The kind.
277    */
278   @java.lang.Override
getKind()279   public io.grafeas.v1.AliasContext.Kind getKind() {
280     io.grafeas.v1.AliasContext.Kind result = io.grafeas.v1.AliasContext.Kind.forNumber(kind_);
281     return result == null ? io.grafeas.v1.AliasContext.Kind.UNRECOGNIZED : result;
282   }
283 
284   public static final int NAME_FIELD_NUMBER = 2;
285 
286   @SuppressWarnings("serial")
287   private volatile java.lang.Object name_ = "";
288   /**
289    *
290    *
291    * <pre>
292    * The alias name.
293    * </pre>
294    *
295    * <code>string name = 2;</code>
296    *
297    * @return The name.
298    */
299   @java.lang.Override
getName()300   public java.lang.String getName() {
301     java.lang.Object ref = name_;
302     if (ref instanceof java.lang.String) {
303       return (java.lang.String) ref;
304     } else {
305       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
306       java.lang.String s = bs.toStringUtf8();
307       name_ = s;
308       return s;
309     }
310   }
311   /**
312    *
313    *
314    * <pre>
315    * The alias name.
316    * </pre>
317    *
318    * <code>string name = 2;</code>
319    *
320    * @return The bytes for name.
321    */
322   @java.lang.Override
getNameBytes()323   public com.google.protobuf.ByteString getNameBytes() {
324     java.lang.Object ref = name_;
325     if (ref instanceof java.lang.String) {
326       com.google.protobuf.ByteString b =
327           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
328       name_ = b;
329       return b;
330     } else {
331       return (com.google.protobuf.ByteString) ref;
332     }
333   }
334 
335   private byte memoizedIsInitialized = -1;
336 
337   @java.lang.Override
isInitialized()338   public final boolean isInitialized() {
339     byte isInitialized = memoizedIsInitialized;
340     if (isInitialized == 1) return true;
341     if (isInitialized == 0) return false;
342 
343     memoizedIsInitialized = 1;
344     return true;
345   }
346 
347   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)348   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
349     if (kind_ != io.grafeas.v1.AliasContext.Kind.KIND_UNSPECIFIED.getNumber()) {
350       output.writeEnum(1, kind_);
351     }
352     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
353       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
354     }
355     getUnknownFields().writeTo(output);
356   }
357 
358   @java.lang.Override
getSerializedSize()359   public int getSerializedSize() {
360     int size = memoizedSize;
361     if (size != -1) return size;
362 
363     size = 0;
364     if (kind_ != io.grafeas.v1.AliasContext.Kind.KIND_UNSPECIFIED.getNumber()) {
365       size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, kind_);
366     }
367     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
368       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
369     }
370     size += getUnknownFields().getSerializedSize();
371     memoizedSize = size;
372     return size;
373   }
374 
375   @java.lang.Override
equals(final java.lang.Object obj)376   public boolean equals(final java.lang.Object obj) {
377     if (obj == this) {
378       return true;
379     }
380     if (!(obj instanceof io.grafeas.v1.AliasContext)) {
381       return super.equals(obj);
382     }
383     io.grafeas.v1.AliasContext other = (io.grafeas.v1.AliasContext) obj;
384 
385     if (kind_ != other.kind_) return false;
386     if (!getName().equals(other.getName())) return false;
387     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
388     return true;
389   }
390 
391   @java.lang.Override
hashCode()392   public int hashCode() {
393     if (memoizedHashCode != 0) {
394       return memoizedHashCode;
395     }
396     int hash = 41;
397     hash = (19 * hash) + getDescriptor().hashCode();
398     hash = (37 * hash) + KIND_FIELD_NUMBER;
399     hash = (53 * hash) + kind_;
400     hash = (37 * hash) + NAME_FIELD_NUMBER;
401     hash = (53 * hash) + getName().hashCode();
402     hash = (29 * hash) + getUnknownFields().hashCode();
403     memoizedHashCode = hash;
404     return hash;
405   }
406 
parseFrom(java.nio.ByteBuffer data)407   public static io.grafeas.v1.AliasContext parseFrom(java.nio.ByteBuffer data)
408       throws com.google.protobuf.InvalidProtocolBufferException {
409     return PARSER.parseFrom(data);
410   }
411 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)412   public static io.grafeas.v1.AliasContext parseFrom(
413       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
414       throws com.google.protobuf.InvalidProtocolBufferException {
415     return PARSER.parseFrom(data, extensionRegistry);
416   }
417 
parseFrom(com.google.protobuf.ByteString data)418   public static io.grafeas.v1.AliasContext parseFrom(com.google.protobuf.ByteString data)
419       throws com.google.protobuf.InvalidProtocolBufferException {
420     return PARSER.parseFrom(data);
421   }
422 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)423   public static io.grafeas.v1.AliasContext parseFrom(
424       com.google.protobuf.ByteString data,
425       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
426       throws com.google.protobuf.InvalidProtocolBufferException {
427     return PARSER.parseFrom(data, extensionRegistry);
428   }
429 
parseFrom(byte[] data)430   public static io.grafeas.v1.AliasContext parseFrom(byte[] data)
431       throws com.google.protobuf.InvalidProtocolBufferException {
432     return PARSER.parseFrom(data);
433   }
434 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)435   public static io.grafeas.v1.AliasContext parseFrom(
436       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
437       throws com.google.protobuf.InvalidProtocolBufferException {
438     return PARSER.parseFrom(data, extensionRegistry);
439   }
440 
parseFrom(java.io.InputStream input)441   public static io.grafeas.v1.AliasContext parseFrom(java.io.InputStream input)
442       throws java.io.IOException {
443     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
444   }
445 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)446   public static io.grafeas.v1.AliasContext parseFrom(
447       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
448       throws java.io.IOException {
449     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
450         PARSER, input, extensionRegistry);
451   }
452 
parseDelimitedFrom(java.io.InputStream input)453   public static io.grafeas.v1.AliasContext parseDelimitedFrom(java.io.InputStream input)
454       throws java.io.IOException {
455     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
456   }
457 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)458   public static io.grafeas.v1.AliasContext parseDelimitedFrom(
459       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
460       throws java.io.IOException {
461     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
462         PARSER, input, extensionRegistry);
463   }
464 
parseFrom(com.google.protobuf.CodedInputStream input)465   public static io.grafeas.v1.AliasContext parseFrom(com.google.protobuf.CodedInputStream input)
466       throws java.io.IOException {
467     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
468   }
469 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)470   public static io.grafeas.v1.AliasContext parseFrom(
471       com.google.protobuf.CodedInputStream input,
472       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
473       throws java.io.IOException {
474     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
475         PARSER, input, extensionRegistry);
476   }
477 
478   @java.lang.Override
newBuilderForType()479   public Builder newBuilderForType() {
480     return newBuilder();
481   }
482 
newBuilder()483   public static Builder newBuilder() {
484     return DEFAULT_INSTANCE.toBuilder();
485   }
486 
newBuilder(io.grafeas.v1.AliasContext prototype)487   public static Builder newBuilder(io.grafeas.v1.AliasContext prototype) {
488     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
489   }
490 
491   @java.lang.Override
toBuilder()492   public Builder toBuilder() {
493     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
494   }
495 
496   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)497   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
498     Builder builder = new Builder(parent);
499     return builder;
500   }
501   /**
502    *
503    *
504    * <pre>
505    * An alias to a repo revision.
506    * </pre>
507    *
508    * Protobuf type {@code grafeas.v1.AliasContext}
509    */
510   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
511       implements
512       // @@protoc_insertion_point(builder_implements:grafeas.v1.AliasContext)
513       io.grafeas.v1.AliasContextOrBuilder {
getDescriptor()514     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
515       return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor;
516     }
517 
518     @java.lang.Override
519     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()520         internalGetFieldAccessorTable() {
521       return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_fieldAccessorTable
522           .ensureFieldAccessorsInitialized(
523               io.grafeas.v1.AliasContext.class, io.grafeas.v1.AliasContext.Builder.class);
524     }
525 
526     // Construct using io.grafeas.v1.AliasContext.newBuilder()
Builder()527     private Builder() {}
528 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)529     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
530       super(parent);
531     }
532 
533     @java.lang.Override
clear()534     public Builder clear() {
535       super.clear();
536       bitField0_ = 0;
537       kind_ = 0;
538       name_ = "";
539       return this;
540     }
541 
542     @java.lang.Override
getDescriptorForType()543     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
544       return io.grafeas.v1.Provenance.internal_static_grafeas_v1_AliasContext_descriptor;
545     }
546 
547     @java.lang.Override
getDefaultInstanceForType()548     public io.grafeas.v1.AliasContext getDefaultInstanceForType() {
549       return io.grafeas.v1.AliasContext.getDefaultInstance();
550     }
551 
552     @java.lang.Override
build()553     public io.grafeas.v1.AliasContext build() {
554       io.grafeas.v1.AliasContext result = buildPartial();
555       if (!result.isInitialized()) {
556         throw newUninitializedMessageException(result);
557       }
558       return result;
559     }
560 
561     @java.lang.Override
buildPartial()562     public io.grafeas.v1.AliasContext buildPartial() {
563       io.grafeas.v1.AliasContext result = new io.grafeas.v1.AliasContext(this);
564       if (bitField0_ != 0) {
565         buildPartial0(result);
566       }
567       onBuilt();
568       return result;
569     }
570 
buildPartial0(io.grafeas.v1.AliasContext result)571     private void buildPartial0(io.grafeas.v1.AliasContext result) {
572       int from_bitField0_ = bitField0_;
573       if (((from_bitField0_ & 0x00000001) != 0)) {
574         result.kind_ = kind_;
575       }
576       if (((from_bitField0_ & 0x00000002) != 0)) {
577         result.name_ = name_;
578       }
579     }
580 
581     @java.lang.Override
clone()582     public Builder clone() {
583       return super.clone();
584     }
585 
586     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)587     public Builder setField(
588         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
589       return super.setField(field, value);
590     }
591 
592     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)593     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
594       return super.clearField(field);
595     }
596 
597     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)598     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
599       return super.clearOneof(oneof);
600     }
601 
602     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)603     public Builder setRepeatedField(
604         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
605       return super.setRepeatedField(field, index, value);
606     }
607 
608     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)609     public Builder addRepeatedField(
610         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
611       return super.addRepeatedField(field, value);
612     }
613 
614     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)615     public Builder mergeFrom(com.google.protobuf.Message other) {
616       if (other instanceof io.grafeas.v1.AliasContext) {
617         return mergeFrom((io.grafeas.v1.AliasContext) other);
618       } else {
619         super.mergeFrom(other);
620         return this;
621       }
622     }
623 
mergeFrom(io.grafeas.v1.AliasContext other)624     public Builder mergeFrom(io.grafeas.v1.AliasContext other) {
625       if (other == io.grafeas.v1.AliasContext.getDefaultInstance()) return this;
626       if (other.kind_ != 0) {
627         setKindValue(other.getKindValue());
628       }
629       if (!other.getName().isEmpty()) {
630         name_ = other.name_;
631         bitField0_ |= 0x00000002;
632         onChanged();
633       }
634       this.mergeUnknownFields(other.getUnknownFields());
635       onChanged();
636       return this;
637     }
638 
639     @java.lang.Override
isInitialized()640     public final boolean isInitialized() {
641       return true;
642     }
643 
644     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)645     public Builder mergeFrom(
646         com.google.protobuf.CodedInputStream input,
647         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
648         throws java.io.IOException {
649       if (extensionRegistry == null) {
650         throw new java.lang.NullPointerException();
651       }
652       try {
653         boolean done = false;
654         while (!done) {
655           int tag = input.readTag();
656           switch (tag) {
657             case 0:
658               done = true;
659               break;
660             case 8:
661               {
662                 kind_ = input.readEnum();
663                 bitField0_ |= 0x00000001;
664                 break;
665               } // case 8
666             case 18:
667               {
668                 name_ = input.readStringRequireUtf8();
669                 bitField0_ |= 0x00000002;
670                 break;
671               } // case 18
672             default:
673               {
674                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
675                   done = true; // was an endgroup tag
676                 }
677                 break;
678               } // default:
679           } // switch (tag)
680         } // while (!done)
681       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
682         throw e.unwrapIOException();
683       } finally {
684         onChanged();
685       } // finally
686       return this;
687     }
688 
689     private int bitField0_;
690 
691     private int kind_ = 0;
692     /**
693      *
694      *
695      * <pre>
696      * The alias kind.
697      * </pre>
698      *
699      * <code>.grafeas.v1.AliasContext.Kind kind = 1;</code>
700      *
701      * @return The enum numeric value on the wire for kind.
702      */
703     @java.lang.Override
getKindValue()704     public int getKindValue() {
705       return kind_;
706     }
707     /**
708      *
709      *
710      * <pre>
711      * The alias kind.
712      * </pre>
713      *
714      * <code>.grafeas.v1.AliasContext.Kind kind = 1;</code>
715      *
716      * @param value The enum numeric value on the wire for kind to set.
717      * @return This builder for chaining.
718      */
setKindValue(int value)719     public Builder setKindValue(int value) {
720       kind_ = value;
721       bitField0_ |= 0x00000001;
722       onChanged();
723       return this;
724     }
725     /**
726      *
727      *
728      * <pre>
729      * The alias kind.
730      * </pre>
731      *
732      * <code>.grafeas.v1.AliasContext.Kind kind = 1;</code>
733      *
734      * @return The kind.
735      */
736     @java.lang.Override
getKind()737     public io.grafeas.v1.AliasContext.Kind getKind() {
738       io.grafeas.v1.AliasContext.Kind result = io.grafeas.v1.AliasContext.Kind.forNumber(kind_);
739       return result == null ? io.grafeas.v1.AliasContext.Kind.UNRECOGNIZED : result;
740     }
741     /**
742      *
743      *
744      * <pre>
745      * The alias kind.
746      * </pre>
747      *
748      * <code>.grafeas.v1.AliasContext.Kind kind = 1;</code>
749      *
750      * @param value The kind to set.
751      * @return This builder for chaining.
752      */
setKind(io.grafeas.v1.AliasContext.Kind value)753     public Builder setKind(io.grafeas.v1.AliasContext.Kind value) {
754       if (value == null) {
755         throw new NullPointerException();
756       }
757       bitField0_ |= 0x00000001;
758       kind_ = value.getNumber();
759       onChanged();
760       return this;
761     }
762     /**
763      *
764      *
765      * <pre>
766      * The alias kind.
767      * </pre>
768      *
769      * <code>.grafeas.v1.AliasContext.Kind kind = 1;</code>
770      *
771      * @return This builder for chaining.
772      */
clearKind()773     public Builder clearKind() {
774       bitField0_ = (bitField0_ & ~0x00000001);
775       kind_ = 0;
776       onChanged();
777       return this;
778     }
779 
780     private java.lang.Object name_ = "";
781     /**
782      *
783      *
784      * <pre>
785      * The alias name.
786      * </pre>
787      *
788      * <code>string name = 2;</code>
789      *
790      * @return The name.
791      */
getName()792     public java.lang.String getName() {
793       java.lang.Object ref = name_;
794       if (!(ref instanceof java.lang.String)) {
795         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
796         java.lang.String s = bs.toStringUtf8();
797         name_ = s;
798         return s;
799       } else {
800         return (java.lang.String) ref;
801       }
802     }
803     /**
804      *
805      *
806      * <pre>
807      * The alias name.
808      * </pre>
809      *
810      * <code>string name = 2;</code>
811      *
812      * @return The bytes for name.
813      */
getNameBytes()814     public com.google.protobuf.ByteString getNameBytes() {
815       java.lang.Object ref = name_;
816       if (ref instanceof String) {
817         com.google.protobuf.ByteString b =
818             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
819         name_ = b;
820         return b;
821       } else {
822         return (com.google.protobuf.ByteString) ref;
823       }
824     }
825     /**
826      *
827      *
828      * <pre>
829      * The alias name.
830      * </pre>
831      *
832      * <code>string name = 2;</code>
833      *
834      * @param value The name to set.
835      * @return This builder for chaining.
836      */
setName(java.lang.String value)837     public Builder setName(java.lang.String value) {
838       if (value == null) {
839         throw new NullPointerException();
840       }
841       name_ = value;
842       bitField0_ |= 0x00000002;
843       onChanged();
844       return this;
845     }
846     /**
847      *
848      *
849      * <pre>
850      * The alias name.
851      * </pre>
852      *
853      * <code>string name = 2;</code>
854      *
855      * @return This builder for chaining.
856      */
clearName()857     public Builder clearName() {
858       name_ = getDefaultInstance().getName();
859       bitField0_ = (bitField0_ & ~0x00000002);
860       onChanged();
861       return this;
862     }
863     /**
864      *
865      *
866      * <pre>
867      * The alias name.
868      * </pre>
869      *
870      * <code>string name = 2;</code>
871      *
872      * @param value The bytes for name to set.
873      * @return This builder for chaining.
874      */
setNameBytes(com.google.protobuf.ByteString value)875     public Builder setNameBytes(com.google.protobuf.ByteString value) {
876       if (value == null) {
877         throw new NullPointerException();
878       }
879       checkByteStringIsUtf8(value);
880       name_ = value;
881       bitField0_ |= 0x00000002;
882       onChanged();
883       return this;
884     }
885 
886     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)887     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
888       return super.setUnknownFields(unknownFields);
889     }
890 
891     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)892     public final Builder mergeUnknownFields(
893         final com.google.protobuf.UnknownFieldSet unknownFields) {
894       return super.mergeUnknownFields(unknownFields);
895     }
896 
897     // @@protoc_insertion_point(builder_scope:grafeas.v1.AliasContext)
898   }
899 
900   // @@protoc_insertion_point(class_scope:grafeas.v1.AliasContext)
901   private static final io.grafeas.v1.AliasContext DEFAULT_INSTANCE;
902 
903   static {
904     DEFAULT_INSTANCE = new io.grafeas.v1.AliasContext();
905   }
906 
getDefaultInstance()907   public static io.grafeas.v1.AliasContext getDefaultInstance() {
908     return DEFAULT_INSTANCE;
909   }
910 
911   private static final com.google.protobuf.Parser<AliasContext> PARSER =
912       new com.google.protobuf.AbstractParser<AliasContext>() {
913         @java.lang.Override
914         public AliasContext parsePartialFrom(
915             com.google.protobuf.CodedInputStream input,
916             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
917             throws com.google.protobuf.InvalidProtocolBufferException {
918           Builder builder = newBuilder();
919           try {
920             builder.mergeFrom(input, extensionRegistry);
921           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
922             throw e.setUnfinishedMessage(builder.buildPartial());
923           } catch (com.google.protobuf.UninitializedMessageException e) {
924             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
925           } catch (java.io.IOException e) {
926             throw new com.google.protobuf.InvalidProtocolBufferException(e)
927                 .setUnfinishedMessage(builder.buildPartial());
928           }
929           return builder.buildPartial();
930         }
931       };
932 
parser()933   public static com.google.protobuf.Parser<AliasContext> parser() {
934     return PARSER;
935   }
936 
937   @java.lang.Override
getParserForType()938   public com.google.protobuf.Parser<AliasContext> getParserForType() {
939     return PARSER;
940   }
941 
942   @java.lang.Override
getDefaultInstanceForType()943   public io.grafeas.v1.AliasContext getDefaultInstanceForType() {
944     return DEFAULT_INSTANCE;
945   }
946 }
947