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