• 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/common.proto
19 
20 package io.grafeas.v1;
21 
22 /**
23  *
24  *
25  * <pre>
26  * License information.
27  * </pre>
28  *
29  * Protobuf type {@code grafeas.v1.License}
30  */
31 public final class License extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:grafeas.v1.License)
34     LicenseOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use License.newBuilder() to construct.
License(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private License(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
License()41   private License() {
42     expression_ = "";
43     comments_ = "";
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new License();
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.Common.internal_static_grafeas_v1_License_descriptor;
59   }
60 
61   @java.lang.Override
62   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()63       internalGetFieldAccessorTable() {
64     return io.grafeas.v1.Common.internal_static_grafeas_v1_License_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             io.grafeas.v1.License.class, io.grafeas.v1.License.Builder.class);
67   }
68 
69   public static final int EXPRESSION_FIELD_NUMBER = 1;
70 
71   @SuppressWarnings("serial")
72   private volatile java.lang.Object expression_ = "";
73   /**
74    *
75    *
76    * <pre>
77    * Often a single license can be used to represent the licensing terms.
78    * Sometimes it is necessary to include a choice of one or more licenses
79    * or some combination of license identifiers.
80    * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
81    * "GPL-2.0-or-later WITH Bison-exception-2.2".
82    * </pre>
83    *
84    * <code>string expression = 1;</code>
85    *
86    * @return The expression.
87    */
88   @java.lang.Override
getExpression()89   public java.lang.String getExpression() {
90     java.lang.Object ref = expression_;
91     if (ref instanceof java.lang.String) {
92       return (java.lang.String) ref;
93     } else {
94       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
95       java.lang.String s = bs.toStringUtf8();
96       expression_ = s;
97       return s;
98     }
99   }
100   /**
101    *
102    *
103    * <pre>
104    * Often a single license can be used to represent the licensing terms.
105    * Sometimes it is necessary to include a choice of one or more licenses
106    * or some combination of license identifiers.
107    * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
108    * "GPL-2.0-or-later WITH Bison-exception-2.2".
109    * </pre>
110    *
111    * <code>string expression = 1;</code>
112    *
113    * @return The bytes for expression.
114    */
115   @java.lang.Override
getExpressionBytes()116   public com.google.protobuf.ByteString getExpressionBytes() {
117     java.lang.Object ref = expression_;
118     if (ref instanceof java.lang.String) {
119       com.google.protobuf.ByteString b =
120           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
121       expression_ = b;
122       return b;
123     } else {
124       return (com.google.protobuf.ByteString) ref;
125     }
126   }
127 
128   public static final int COMMENTS_FIELD_NUMBER = 2;
129 
130   @SuppressWarnings("serial")
131   private volatile java.lang.Object comments_ = "";
132   /**
133    *
134    *
135    * <pre>
136    * Comments
137    * </pre>
138    *
139    * <code>string comments = 2;</code>
140    *
141    * @return The comments.
142    */
143   @java.lang.Override
getComments()144   public java.lang.String getComments() {
145     java.lang.Object ref = comments_;
146     if (ref instanceof java.lang.String) {
147       return (java.lang.String) ref;
148     } else {
149       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
150       java.lang.String s = bs.toStringUtf8();
151       comments_ = s;
152       return s;
153     }
154   }
155   /**
156    *
157    *
158    * <pre>
159    * Comments
160    * </pre>
161    *
162    * <code>string comments = 2;</code>
163    *
164    * @return The bytes for comments.
165    */
166   @java.lang.Override
getCommentsBytes()167   public com.google.protobuf.ByteString getCommentsBytes() {
168     java.lang.Object ref = comments_;
169     if (ref instanceof java.lang.String) {
170       com.google.protobuf.ByteString b =
171           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
172       comments_ = b;
173       return b;
174     } else {
175       return (com.google.protobuf.ByteString) ref;
176     }
177   }
178 
179   private byte memoizedIsInitialized = -1;
180 
181   @java.lang.Override
isInitialized()182   public final boolean isInitialized() {
183     byte isInitialized = memoizedIsInitialized;
184     if (isInitialized == 1) return true;
185     if (isInitialized == 0) return false;
186 
187     memoizedIsInitialized = 1;
188     return true;
189   }
190 
191   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)192   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
193     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) {
194       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, expression_);
195     }
196     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comments_)) {
197       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comments_);
198     }
199     getUnknownFields().writeTo(output);
200   }
201 
202   @java.lang.Override
getSerializedSize()203   public int getSerializedSize() {
204     int size = memoizedSize;
205     if (size != -1) return size;
206 
207     size = 0;
208     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) {
209       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, expression_);
210     }
211     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comments_)) {
212       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, comments_);
213     }
214     size += getUnknownFields().getSerializedSize();
215     memoizedSize = size;
216     return size;
217   }
218 
219   @java.lang.Override
equals(final java.lang.Object obj)220   public boolean equals(final java.lang.Object obj) {
221     if (obj == this) {
222       return true;
223     }
224     if (!(obj instanceof io.grafeas.v1.License)) {
225       return super.equals(obj);
226     }
227     io.grafeas.v1.License other = (io.grafeas.v1.License) obj;
228 
229     if (!getExpression().equals(other.getExpression())) return false;
230     if (!getComments().equals(other.getComments())) return false;
231     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
232     return true;
233   }
234 
235   @java.lang.Override
hashCode()236   public int hashCode() {
237     if (memoizedHashCode != 0) {
238       return memoizedHashCode;
239     }
240     int hash = 41;
241     hash = (19 * hash) + getDescriptor().hashCode();
242     hash = (37 * hash) + EXPRESSION_FIELD_NUMBER;
243     hash = (53 * hash) + getExpression().hashCode();
244     hash = (37 * hash) + COMMENTS_FIELD_NUMBER;
245     hash = (53 * hash) + getComments().hashCode();
246     hash = (29 * hash) + getUnknownFields().hashCode();
247     memoizedHashCode = hash;
248     return hash;
249   }
250 
parseFrom(java.nio.ByteBuffer data)251   public static io.grafeas.v1.License parseFrom(java.nio.ByteBuffer data)
252       throws com.google.protobuf.InvalidProtocolBufferException {
253     return PARSER.parseFrom(data);
254   }
255 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)256   public static io.grafeas.v1.License parseFrom(
257       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
258       throws com.google.protobuf.InvalidProtocolBufferException {
259     return PARSER.parseFrom(data, extensionRegistry);
260   }
261 
parseFrom(com.google.protobuf.ByteString data)262   public static io.grafeas.v1.License parseFrom(com.google.protobuf.ByteString data)
263       throws com.google.protobuf.InvalidProtocolBufferException {
264     return PARSER.parseFrom(data);
265   }
266 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)267   public static io.grafeas.v1.License parseFrom(
268       com.google.protobuf.ByteString data,
269       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
270       throws com.google.protobuf.InvalidProtocolBufferException {
271     return PARSER.parseFrom(data, extensionRegistry);
272   }
273 
parseFrom(byte[] data)274   public static io.grafeas.v1.License parseFrom(byte[] data)
275       throws com.google.protobuf.InvalidProtocolBufferException {
276     return PARSER.parseFrom(data);
277   }
278 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)279   public static io.grafeas.v1.License parseFrom(
280       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
281       throws com.google.protobuf.InvalidProtocolBufferException {
282     return PARSER.parseFrom(data, extensionRegistry);
283   }
284 
parseFrom(java.io.InputStream input)285   public static io.grafeas.v1.License parseFrom(java.io.InputStream input)
286       throws java.io.IOException {
287     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
288   }
289 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)290   public static io.grafeas.v1.License parseFrom(
291       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
292       throws java.io.IOException {
293     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
294         PARSER, input, extensionRegistry);
295   }
296 
parseDelimitedFrom(java.io.InputStream input)297   public static io.grafeas.v1.License parseDelimitedFrom(java.io.InputStream input)
298       throws java.io.IOException {
299     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
300   }
301 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)302   public static io.grafeas.v1.License parseDelimitedFrom(
303       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
304       throws java.io.IOException {
305     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
306         PARSER, input, extensionRegistry);
307   }
308 
parseFrom(com.google.protobuf.CodedInputStream input)309   public static io.grafeas.v1.License parseFrom(com.google.protobuf.CodedInputStream input)
310       throws java.io.IOException {
311     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
312   }
313 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)314   public static io.grafeas.v1.License parseFrom(
315       com.google.protobuf.CodedInputStream input,
316       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
317       throws java.io.IOException {
318     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
319         PARSER, input, extensionRegistry);
320   }
321 
322   @java.lang.Override
newBuilderForType()323   public Builder newBuilderForType() {
324     return newBuilder();
325   }
326 
newBuilder()327   public static Builder newBuilder() {
328     return DEFAULT_INSTANCE.toBuilder();
329   }
330 
newBuilder(io.grafeas.v1.License prototype)331   public static Builder newBuilder(io.grafeas.v1.License prototype) {
332     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
333   }
334 
335   @java.lang.Override
toBuilder()336   public Builder toBuilder() {
337     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
338   }
339 
340   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)341   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
342     Builder builder = new Builder(parent);
343     return builder;
344   }
345   /**
346    *
347    *
348    * <pre>
349    * License information.
350    * </pre>
351    *
352    * Protobuf type {@code grafeas.v1.License}
353    */
354   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
355       implements
356       // @@protoc_insertion_point(builder_implements:grafeas.v1.License)
357       io.grafeas.v1.LicenseOrBuilder {
getDescriptor()358     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
359       return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor;
360     }
361 
362     @java.lang.Override
363     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()364         internalGetFieldAccessorTable() {
365       return io.grafeas.v1.Common.internal_static_grafeas_v1_License_fieldAccessorTable
366           .ensureFieldAccessorsInitialized(
367               io.grafeas.v1.License.class, io.grafeas.v1.License.Builder.class);
368     }
369 
370     // Construct using io.grafeas.v1.License.newBuilder()
Builder()371     private Builder() {}
372 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)373     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
374       super(parent);
375     }
376 
377     @java.lang.Override
clear()378     public Builder clear() {
379       super.clear();
380       bitField0_ = 0;
381       expression_ = "";
382       comments_ = "";
383       return this;
384     }
385 
386     @java.lang.Override
getDescriptorForType()387     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
388       return io.grafeas.v1.Common.internal_static_grafeas_v1_License_descriptor;
389     }
390 
391     @java.lang.Override
getDefaultInstanceForType()392     public io.grafeas.v1.License getDefaultInstanceForType() {
393       return io.grafeas.v1.License.getDefaultInstance();
394     }
395 
396     @java.lang.Override
build()397     public io.grafeas.v1.License build() {
398       io.grafeas.v1.License result = buildPartial();
399       if (!result.isInitialized()) {
400         throw newUninitializedMessageException(result);
401       }
402       return result;
403     }
404 
405     @java.lang.Override
buildPartial()406     public io.grafeas.v1.License buildPartial() {
407       io.grafeas.v1.License result = new io.grafeas.v1.License(this);
408       if (bitField0_ != 0) {
409         buildPartial0(result);
410       }
411       onBuilt();
412       return result;
413     }
414 
buildPartial0(io.grafeas.v1.License result)415     private void buildPartial0(io.grafeas.v1.License result) {
416       int from_bitField0_ = bitField0_;
417       if (((from_bitField0_ & 0x00000001) != 0)) {
418         result.expression_ = expression_;
419       }
420       if (((from_bitField0_ & 0x00000002) != 0)) {
421         result.comments_ = comments_;
422       }
423     }
424 
425     @java.lang.Override
clone()426     public Builder clone() {
427       return super.clone();
428     }
429 
430     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)431     public Builder setField(
432         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
433       return super.setField(field, value);
434     }
435 
436     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)437     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
438       return super.clearField(field);
439     }
440 
441     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)442     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
443       return super.clearOneof(oneof);
444     }
445 
446     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)447     public Builder setRepeatedField(
448         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
449       return super.setRepeatedField(field, index, value);
450     }
451 
452     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)453     public Builder addRepeatedField(
454         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
455       return super.addRepeatedField(field, value);
456     }
457 
458     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)459     public Builder mergeFrom(com.google.protobuf.Message other) {
460       if (other instanceof io.grafeas.v1.License) {
461         return mergeFrom((io.grafeas.v1.License) other);
462       } else {
463         super.mergeFrom(other);
464         return this;
465       }
466     }
467 
mergeFrom(io.grafeas.v1.License other)468     public Builder mergeFrom(io.grafeas.v1.License other) {
469       if (other == io.grafeas.v1.License.getDefaultInstance()) return this;
470       if (!other.getExpression().isEmpty()) {
471         expression_ = other.expression_;
472         bitField0_ |= 0x00000001;
473         onChanged();
474       }
475       if (!other.getComments().isEmpty()) {
476         comments_ = other.comments_;
477         bitField0_ |= 0x00000002;
478         onChanged();
479       }
480       this.mergeUnknownFields(other.getUnknownFields());
481       onChanged();
482       return this;
483     }
484 
485     @java.lang.Override
isInitialized()486     public final boolean isInitialized() {
487       return true;
488     }
489 
490     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)491     public Builder mergeFrom(
492         com.google.protobuf.CodedInputStream input,
493         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
494         throws java.io.IOException {
495       if (extensionRegistry == null) {
496         throw new java.lang.NullPointerException();
497       }
498       try {
499         boolean done = false;
500         while (!done) {
501           int tag = input.readTag();
502           switch (tag) {
503             case 0:
504               done = true;
505               break;
506             case 10:
507               {
508                 expression_ = input.readStringRequireUtf8();
509                 bitField0_ |= 0x00000001;
510                 break;
511               } // case 10
512             case 18:
513               {
514                 comments_ = input.readStringRequireUtf8();
515                 bitField0_ |= 0x00000002;
516                 break;
517               } // case 18
518             default:
519               {
520                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
521                   done = true; // was an endgroup tag
522                 }
523                 break;
524               } // default:
525           } // switch (tag)
526         } // while (!done)
527       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
528         throw e.unwrapIOException();
529       } finally {
530         onChanged();
531       } // finally
532       return this;
533     }
534 
535     private int bitField0_;
536 
537     private java.lang.Object expression_ = "";
538     /**
539      *
540      *
541      * <pre>
542      * Often a single license can be used to represent the licensing terms.
543      * Sometimes it is necessary to include a choice of one or more licenses
544      * or some combination of license identifiers.
545      * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
546      * "GPL-2.0-or-later WITH Bison-exception-2.2".
547      * </pre>
548      *
549      * <code>string expression = 1;</code>
550      *
551      * @return The expression.
552      */
getExpression()553     public java.lang.String getExpression() {
554       java.lang.Object ref = expression_;
555       if (!(ref instanceof java.lang.String)) {
556         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
557         java.lang.String s = bs.toStringUtf8();
558         expression_ = s;
559         return s;
560       } else {
561         return (java.lang.String) ref;
562       }
563     }
564     /**
565      *
566      *
567      * <pre>
568      * Often a single license can be used to represent the licensing terms.
569      * Sometimes it is necessary to include a choice of one or more licenses
570      * or some combination of license identifiers.
571      * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
572      * "GPL-2.0-or-later WITH Bison-exception-2.2".
573      * </pre>
574      *
575      * <code>string expression = 1;</code>
576      *
577      * @return The bytes for expression.
578      */
getExpressionBytes()579     public com.google.protobuf.ByteString getExpressionBytes() {
580       java.lang.Object ref = expression_;
581       if (ref instanceof String) {
582         com.google.protobuf.ByteString b =
583             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
584         expression_ = b;
585         return b;
586       } else {
587         return (com.google.protobuf.ByteString) ref;
588       }
589     }
590     /**
591      *
592      *
593      * <pre>
594      * Often a single license can be used to represent the licensing terms.
595      * Sometimes it is necessary to include a choice of one or more licenses
596      * or some combination of license identifiers.
597      * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
598      * "GPL-2.0-or-later WITH Bison-exception-2.2".
599      * </pre>
600      *
601      * <code>string expression = 1;</code>
602      *
603      * @param value The expression to set.
604      * @return This builder for chaining.
605      */
setExpression(java.lang.String value)606     public Builder setExpression(java.lang.String value) {
607       if (value == null) {
608         throw new NullPointerException();
609       }
610       expression_ = value;
611       bitField0_ |= 0x00000001;
612       onChanged();
613       return this;
614     }
615     /**
616      *
617      *
618      * <pre>
619      * Often a single license can be used to represent the licensing terms.
620      * Sometimes it is necessary to include a choice of one or more licenses
621      * or some combination of license identifiers.
622      * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
623      * "GPL-2.0-or-later WITH Bison-exception-2.2".
624      * </pre>
625      *
626      * <code>string expression = 1;</code>
627      *
628      * @return This builder for chaining.
629      */
clearExpression()630     public Builder clearExpression() {
631       expression_ = getDefaultInstance().getExpression();
632       bitField0_ = (bitField0_ & ~0x00000001);
633       onChanged();
634       return this;
635     }
636     /**
637      *
638      *
639      * <pre>
640      * Often a single license can be used to represent the licensing terms.
641      * Sometimes it is necessary to include a choice of one or more licenses
642      * or some combination of license identifiers.
643      * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
644      * "GPL-2.0-or-later WITH Bison-exception-2.2".
645      * </pre>
646      *
647      * <code>string expression = 1;</code>
648      *
649      * @param value The bytes for expression to set.
650      * @return This builder for chaining.
651      */
setExpressionBytes(com.google.protobuf.ByteString value)652     public Builder setExpressionBytes(com.google.protobuf.ByteString value) {
653       if (value == null) {
654         throw new NullPointerException();
655       }
656       checkByteStringIsUtf8(value);
657       expression_ = value;
658       bitField0_ |= 0x00000001;
659       onChanged();
660       return this;
661     }
662 
663     private java.lang.Object comments_ = "";
664     /**
665      *
666      *
667      * <pre>
668      * Comments
669      * </pre>
670      *
671      * <code>string comments = 2;</code>
672      *
673      * @return The comments.
674      */
getComments()675     public java.lang.String getComments() {
676       java.lang.Object ref = comments_;
677       if (!(ref instanceof java.lang.String)) {
678         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
679         java.lang.String s = bs.toStringUtf8();
680         comments_ = s;
681         return s;
682       } else {
683         return (java.lang.String) ref;
684       }
685     }
686     /**
687      *
688      *
689      * <pre>
690      * Comments
691      * </pre>
692      *
693      * <code>string comments = 2;</code>
694      *
695      * @return The bytes for comments.
696      */
getCommentsBytes()697     public com.google.protobuf.ByteString getCommentsBytes() {
698       java.lang.Object ref = comments_;
699       if (ref instanceof String) {
700         com.google.protobuf.ByteString b =
701             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
702         comments_ = b;
703         return b;
704       } else {
705         return (com.google.protobuf.ByteString) ref;
706       }
707     }
708     /**
709      *
710      *
711      * <pre>
712      * Comments
713      * </pre>
714      *
715      * <code>string comments = 2;</code>
716      *
717      * @param value The comments to set.
718      * @return This builder for chaining.
719      */
setComments(java.lang.String value)720     public Builder setComments(java.lang.String value) {
721       if (value == null) {
722         throw new NullPointerException();
723       }
724       comments_ = value;
725       bitField0_ |= 0x00000002;
726       onChanged();
727       return this;
728     }
729     /**
730      *
731      *
732      * <pre>
733      * Comments
734      * </pre>
735      *
736      * <code>string comments = 2;</code>
737      *
738      * @return This builder for chaining.
739      */
clearComments()740     public Builder clearComments() {
741       comments_ = getDefaultInstance().getComments();
742       bitField0_ = (bitField0_ & ~0x00000002);
743       onChanged();
744       return this;
745     }
746     /**
747      *
748      *
749      * <pre>
750      * Comments
751      * </pre>
752      *
753      * <code>string comments = 2;</code>
754      *
755      * @param value The bytes for comments to set.
756      * @return This builder for chaining.
757      */
setCommentsBytes(com.google.protobuf.ByteString value)758     public Builder setCommentsBytes(com.google.protobuf.ByteString value) {
759       if (value == null) {
760         throw new NullPointerException();
761       }
762       checkByteStringIsUtf8(value);
763       comments_ = value;
764       bitField0_ |= 0x00000002;
765       onChanged();
766       return this;
767     }
768 
769     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)770     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
771       return super.setUnknownFields(unknownFields);
772     }
773 
774     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)775     public final Builder mergeUnknownFields(
776         final com.google.protobuf.UnknownFieldSet unknownFields) {
777       return super.mergeUnknownFields(unknownFields);
778     }
779 
780     // @@protoc_insertion_point(builder_scope:grafeas.v1.License)
781   }
782 
783   // @@protoc_insertion_point(class_scope:grafeas.v1.License)
784   private static final io.grafeas.v1.License DEFAULT_INSTANCE;
785 
786   static {
787     DEFAULT_INSTANCE = new io.grafeas.v1.License();
788   }
789 
getDefaultInstance()790   public static io.grafeas.v1.License getDefaultInstance() {
791     return DEFAULT_INSTANCE;
792   }
793 
794   private static final com.google.protobuf.Parser<License> PARSER =
795       new com.google.protobuf.AbstractParser<License>() {
796         @java.lang.Override
797         public License parsePartialFrom(
798             com.google.protobuf.CodedInputStream input,
799             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
800             throws com.google.protobuf.InvalidProtocolBufferException {
801           Builder builder = newBuilder();
802           try {
803             builder.mergeFrom(input, extensionRegistry);
804           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
805             throw e.setUnfinishedMessage(builder.buildPartial());
806           } catch (com.google.protobuf.UninitializedMessageException e) {
807             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
808           } catch (java.io.IOException e) {
809             throw new com.google.protobuf.InvalidProtocolBufferException(e)
810                 .setUnfinishedMessage(builder.buildPartial());
811           }
812           return builder.buildPartial();
813         }
814       };
815 
parser()816   public static com.google.protobuf.Parser<License> parser() {
817     return PARSER;
818   }
819 
820   @java.lang.Override
getParserForType()821   public com.google.protobuf.Parser<License> getParserForType() {
822     return PARSER;
823   }
824 
825   @java.lang.Override
getDefaultInstanceForType()826   public io.grafeas.v1.License getDefaultInstanceForType() {
827     return DEFAULT_INSTANCE;
828   }
829 }
830