• 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  * Details on how a particular software package was installed on a system.
27  * </pre>
28  *
29  * Protobuf type {@code grafeas.v1.PackageOccurrence}
30  */
31 public final class PackageOccurrence extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:grafeas.v1.PackageOccurrence)
34     PackageOccurrenceOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use PackageOccurrence.newBuilder() to construct.
PackageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private PackageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
PackageOccurrence()41   private PackageOccurrence() {
42     name_ = "";
43     location_ = java.util.Collections.emptyList();
44     packageType_ = "";
45     cpeUri_ = "";
46     architecture_ = 0;
47   }
48 
49   @java.lang.Override
50   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)51   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
52     return new PackageOccurrence();
53   }
54 
55   @java.lang.Override
getUnknownFields()56   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
57     return this.unknownFields;
58   }
59 
getDescriptor()60   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
61     return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor;
62   }
63 
64   @java.lang.Override
65   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()66       internalGetFieldAccessorTable() {
67     return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable
68         .ensureFieldAccessorsInitialized(
69             io.grafeas.v1.PackageOccurrence.class, io.grafeas.v1.PackageOccurrence.Builder.class);
70   }
71 
72   public static final int NAME_FIELD_NUMBER = 1;
73 
74   @SuppressWarnings("serial")
75   private volatile java.lang.Object name_ = "";
76   /**
77    *
78    *
79    * <pre>
80    * The name of the installed package.
81    * </pre>
82    *
83    * <code>
84    * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY];
85    * </code>
86    *
87    * @return The name.
88    */
89   @java.lang.Override
getName()90   public java.lang.String getName() {
91     java.lang.Object ref = name_;
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       name_ = s;
98       return s;
99     }
100   }
101   /**
102    *
103    *
104    * <pre>
105    * The name of the installed package.
106    * </pre>
107    *
108    * <code>
109    * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY];
110    * </code>
111    *
112    * @return The bytes for name.
113    */
114   @java.lang.Override
getNameBytes()115   public com.google.protobuf.ByteString getNameBytes() {
116     java.lang.Object ref = name_;
117     if (ref instanceof java.lang.String) {
118       com.google.protobuf.ByteString b =
119           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
120       name_ = b;
121       return b;
122     } else {
123       return (com.google.protobuf.ByteString) ref;
124     }
125   }
126 
127   public static final int LOCATION_FIELD_NUMBER = 2;
128 
129   @SuppressWarnings("serial")
130   private java.util.List<io.grafeas.v1.Location> location_;
131   /**
132    *
133    *
134    * <pre>
135    * All of the places within the filesystem versions of this package
136    * have been found.
137    * </pre>
138    *
139    * <code>repeated .grafeas.v1.Location location = 2;</code>
140    */
141   @java.lang.Override
getLocationList()142   public java.util.List<io.grafeas.v1.Location> getLocationList() {
143     return location_;
144   }
145   /**
146    *
147    *
148    * <pre>
149    * All of the places within the filesystem versions of this package
150    * have been found.
151    * </pre>
152    *
153    * <code>repeated .grafeas.v1.Location location = 2;</code>
154    */
155   @java.lang.Override
getLocationOrBuilderList()156   public java.util.List<? extends io.grafeas.v1.LocationOrBuilder> getLocationOrBuilderList() {
157     return location_;
158   }
159   /**
160    *
161    *
162    * <pre>
163    * All of the places within the filesystem versions of this package
164    * have been found.
165    * </pre>
166    *
167    * <code>repeated .grafeas.v1.Location location = 2;</code>
168    */
169   @java.lang.Override
getLocationCount()170   public int getLocationCount() {
171     return location_.size();
172   }
173   /**
174    *
175    *
176    * <pre>
177    * All of the places within the filesystem versions of this package
178    * have been found.
179    * </pre>
180    *
181    * <code>repeated .grafeas.v1.Location location = 2;</code>
182    */
183   @java.lang.Override
getLocation(int index)184   public io.grafeas.v1.Location getLocation(int index) {
185     return location_.get(index);
186   }
187   /**
188    *
189    *
190    * <pre>
191    * All of the places within the filesystem versions of this package
192    * have been found.
193    * </pre>
194    *
195    * <code>repeated .grafeas.v1.Location location = 2;</code>
196    */
197   @java.lang.Override
getLocationOrBuilder(int index)198   public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder(int index) {
199     return location_.get(index);
200   }
201 
202   public static final int PACKAGE_TYPE_FIELD_NUMBER = 3;
203 
204   @SuppressWarnings("serial")
205   private volatile java.lang.Object packageType_ = "";
206   /**
207    *
208    *
209    * <pre>
210    * The type of package; whether native or non native (e.g., ruby gems,
211    * node.js packages, etc.).
212    * </pre>
213    *
214    * <code>string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
215    *
216    * @return The packageType.
217    */
218   @java.lang.Override
getPackageType()219   public java.lang.String getPackageType() {
220     java.lang.Object ref = packageType_;
221     if (ref instanceof java.lang.String) {
222       return (java.lang.String) ref;
223     } else {
224       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
225       java.lang.String s = bs.toStringUtf8();
226       packageType_ = s;
227       return s;
228     }
229   }
230   /**
231    *
232    *
233    * <pre>
234    * The type of package; whether native or non native (e.g., ruby gems,
235    * node.js packages, etc.).
236    * </pre>
237    *
238    * <code>string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
239    *
240    * @return The bytes for packageType.
241    */
242   @java.lang.Override
getPackageTypeBytes()243   public com.google.protobuf.ByteString getPackageTypeBytes() {
244     java.lang.Object ref = packageType_;
245     if (ref instanceof java.lang.String) {
246       com.google.protobuf.ByteString b =
247           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
248       packageType_ = b;
249       return b;
250     } else {
251       return (com.google.protobuf.ByteString) ref;
252     }
253   }
254 
255   public static final int CPE_URI_FIELD_NUMBER = 4;
256 
257   @SuppressWarnings("serial")
258   private volatile java.lang.Object cpeUri_ = "";
259   /**
260    *
261    *
262    * <pre>
263    * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
264    * denoting the package manager version distributing a package.
265    * The cpe_uri will be blank for language packages.
266    * </pre>
267    *
268    * <code>string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
269    *
270    * @return The cpeUri.
271    */
272   @java.lang.Override
getCpeUri()273   public java.lang.String getCpeUri() {
274     java.lang.Object ref = cpeUri_;
275     if (ref instanceof java.lang.String) {
276       return (java.lang.String) ref;
277     } else {
278       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
279       java.lang.String s = bs.toStringUtf8();
280       cpeUri_ = s;
281       return s;
282     }
283   }
284   /**
285    *
286    *
287    * <pre>
288    * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
289    * denoting the package manager version distributing a package.
290    * The cpe_uri will be blank for language packages.
291    * </pre>
292    *
293    * <code>string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
294    *
295    * @return The bytes for cpeUri.
296    */
297   @java.lang.Override
getCpeUriBytes()298   public com.google.protobuf.ByteString getCpeUriBytes() {
299     java.lang.Object ref = cpeUri_;
300     if (ref instanceof java.lang.String) {
301       com.google.protobuf.ByteString b =
302           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
303       cpeUri_ = b;
304       return b;
305     } else {
306       return (com.google.protobuf.ByteString) ref;
307     }
308   }
309 
310   public static final int ARCHITECTURE_FIELD_NUMBER = 5;
311   private int architecture_ = 0;
312   /**
313    *
314    *
315    * <pre>
316    * The CPU architecture for which packages in this distribution channel were
317    * built. Architecture will be blank for language packages.
318    * </pre>
319    *
320    * <code>.grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
321    * </code>
322    *
323    * @return The enum numeric value on the wire for architecture.
324    */
325   @java.lang.Override
getArchitectureValue()326   public int getArchitectureValue() {
327     return architecture_;
328   }
329   /**
330    *
331    *
332    * <pre>
333    * The CPU architecture for which packages in this distribution channel were
334    * built. Architecture will be blank for language packages.
335    * </pre>
336    *
337    * <code>.grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
338    * </code>
339    *
340    * @return The architecture.
341    */
342   @java.lang.Override
getArchitecture()343   public io.grafeas.v1.Architecture getArchitecture() {
344     io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_);
345     return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result;
346   }
347 
348   public static final int LICENSE_FIELD_NUMBER = 6;
349   private io.grafeas.v1.License license_;
350   /**
351    *
352    *
353    * <pre>
354    * Licenses that have been declared by the authors of the package.
355    * </pre>
356    *
357    * <code>.grafeas.v1.License license = 6;</code>
358    *
359    * @return Whether the license field is set.
360    */
361   @java.lang.Override
hasLicense()362   public boolean hasLicense() {
363     return license_ != null;
364   }
365   /**
366    *
367    *
368    * <pre>
369    * Licenses that have been declared by the authors of the package.
370    * </pre>
371    *
372    * <code>.grafeas.v1.License license = 6;</code>
373    *
374    * @return The license.
375    */
376   @java.lang.Override
getLicense()377   public io.grafeas.v1.License getLicense() {
378     return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_;
379   }
380   /**
381    *
382    *
383    * <pre>
384    * Licenses that have been declared by the authors of the package.
385    * </pre>
386    *
387    * <code>.grafeas.v1.License license = 6;</code>
388    */
389   @java.lang.Override
getLicenseOrBuilder()390   public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() {
391     return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_;
392   }
393 
394   public static final int VERSION_FIELD_NUMBER = 7;
395   private io.grafeas.v1.Version version_;
396   /**
397    *
398    *
399    * <pre>
400    * The version of the package.
401    * </pre>
402    *
403    * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
404    *
405    * @return Whether the version field is set.
406    */
407   @java.lang.Override
hasVersion()408   public boolean hasVersion() {
409     return version_ != null;
410   }
411   /**
412    *
413    *
414    * <pre>
415    * The version of the package.
416    * </pre>
417    *
418    * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
419    *
420    * @return The version.
421    */
422   @java.lang.Override
getVersion()423   public io.grafeas.v1.Version getVersion() {
424     return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
425   }
426   /**
427    *
428    *
429    * <pre>
430    * The version of the package.
431    * </pre>
432    *
433    * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
434    */
435   @java.lang.Override
getVersionOrBuilder()436   public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() {
437     return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
438   }
439 
440   private byte memoizedIsInitialized = -1;
441 
442   @java.lang.Override
isInitialized()443   public final boolean isInitialized() {
444     byte isInitialized = memoizedIsInitialized;
445     if (isInitialized == 1) return true;
446     if (isInitialized == 0) return false;
447 
448     memoizedIsInitialized = 1;
449     return true;
450   }
451 
452   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)453   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
454     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
455       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
456     }
457     for (int i = 0; i < location_.size(); i++) {
458       output.writeMessage(2, location_.get(i));
459     }
460     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) {
461       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, packageType_);
462     }
463     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) {
464       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cpeUri_);
465     }
466     if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) {
467       output.writeEnum(5, architecture_);
468     }
469     if (license_ != null) {
470       output.writeMessage(6, getLicense());
471     }
472     if (version_ != null) {
473       output.writeMessage(7, getVersion());
474     }
475     getUnknownFields().writeTo(output);
476   }
477 
478   @java.lang.Override
getSerializedSize()479   public int getSerializedSize() {
480     int size = memoizedSize;
481     if (size != -1) return size;
482 
483     size = 0;
484     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
485       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
486     }
487     for (int i = 0; i < location_.size(); i++) {
488       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, location_.get(i));
489     }
490     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) {
491       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, packageType_);
492     }
493     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) {
494       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cpeUri_);
495     }
496     if (architecture_ != io.grafeas.v1.Architecture.ARCHITECTURE_UNSPECIFIED.getNumber()) {
497       size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, architecture_);
498     }
499     if (license_ != null) {
500       size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLicense());
501     }
502     if (version_ != null) {
503       size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getVersion());
504     }
505     size += getUnknownFields().getSerializedSize();
506     memoizedSize = size;
507     return size;
508   }
509 
510   @java.lang.Override
equals(final java.lang.Object obj)511   public boolean equals(final java.lang.Object obj) {
512     if (obj == this) {
513       return true;
514     }
515     if (!(obj instanceof io.grafeas.v1.PackageOccurrence)) {
516       return super.equals(obj);
517     }
518     io.grafeas.v1.PackageOccurrence other = (io.grafeas.v1.PackageOccurrence) obj;
519 
520     if (!getName().equals(other.getName())) return false;
521     if (!getLocationList().equals(other.getLocationList())) return false;
522     if (!getPackageType().equals(other.getPackageType())) return false;
523     if (!getCpeUri().equals(other.getCpeUri())) return false;
524     if (architecture_ != other.architecture_) return false;
525     if (hasLicense() != other.hasLicense()) return false;
526     if (hasLicense()) {
527       if (!getLicense().equals(other.getLicense())) return false;
528     }
529     if (hasVersion() != other.hasVersion()) return false;
530     if (hasVersion()) {
531       if (!getVersion().equals(other.getVersion())) return false;
532     }
533     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
534     return true;
535   }
536 
537   @java.lang.Override
hashCode()538   public int hashCode() {
539     if (memoizedHashCode != 0) {
540       return memoizedHashCode;
541     }
542     int hash = 41;
543     hash = (19 * hash) + getDescriptor().hashCode();
544     hash = (37 * hash) + NAME_FIELD_NUMBER;
545     hash = (53 * hash) + getName().hashCode();
546     if (getLocationCount() > 0) {
547       hash = (37 * hash) + LOCATION_FIELD_NUMBER;
548       hash = (53 * hash) + getLocationList().hashCode();
549     }
550     hash = (37 * hash) + PACKAGE_TYPE_FIELD_NUMBER;
551     hash = (53 * hash) + getPackageType().hashCode();
552     hash = (37 * hash) + CPE_URI_FIELD_NUMBER;
553     hash = (53 * hash) + getCpeUri().hashCode();
554     hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER;
555     hash = (53 * hash) + architecture_;
556     if (hasLicense()) {
557       hash = (37 * hash) + LICENSE_FIELD_NUMBER;
558       hash = (53 * hash) + getLicense().hashCode();
559     }
560     if (hasVersion()) {
561       hash = (37 * hash) + VERSION_FIELD_NUMBER;
562       hash = (53 * hash) + getVersion().hashCode();
563     }
564     hash = (29 * hash) + getUnknownFields().hashCode();
565     memoizedHashCode = hash;
566     return hash;
567   }
568 
parseFrom(java.nio.ByteBuffer data)569   public static io.grafeas.v1.PackageOccurrence parseFrom(java.nio.ByteBuffer data)
570       throws com.google.protobuf.InvalidProtocolBufferException {
571     return PARSER.parseFrom(data);
572   }
573 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)574   public static io.grafeas.v1.PackageOccurrence parseFrom(
575       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
576       throws com.google.protobuf.InvalidProtocolBufferException {
577     return PARSER.parseFrom(data, extensionRegistry);
578   }
579 
parseFrom(com.google.protobuf.ByteString data)580   public static io.grafeas.v1.PackageOccurrence parseFrom(com.google.protobuf.ByteString data)
581       throws com.google.protobuf.InvalidProtocolBufferException {
582     return PARSER.parseFrom(data);
583   }
584 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)585   public static io.grafeas.v1.PackageOccurrence parseFrom(
586       com.google.protobuf.ByteString data,
587       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
588       throws com.google.protobuf.InvalidProtocolBufferException {
589     return PARSER.parseFrom(data, extensionRegistry);
590   }
591 
parseFrom(byte[] data)592   public static io.grafeas.v1.PackageOccurrence parseFrom(byte[] data)
593       throws com.google.protobuf.InvalidProtocolBufferException {
594     return PARSER.parseFrom(data);
595   }
596 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)597   public static io.grafeas.v1.PackageOccurrence parseFrom(
598       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
599       throws com.google.protobuf.InvalidProtocolBufferException {
600     return PARSER.parseFrom(data, extensionRegistry);
601   }
602 
parseFrom(java.io.InputStream input)603   public static io.grafeas.v1.PackageOccurrence parseFrom(java.io.InputStream input)
604       throws java.io.IOException {
605     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
606   }
607 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)608   public static io.grafeas.v1.PackageOccurrence parseFrom(
609       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
610       throws java.io.IOException {
611     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
612         PARSER, input, extensionRegistry);
613   }
614 
parseDelimitedFrom(java.io.InputStream input)615   public static io.grafeas.v1.PackageOccurrence parseDelimitedFrom(java.io.InputStream input)
616       throws java.io.IOException {
617     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
618   }
619 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)620   public static io.grafeas.v1.PackageOccurrence parseDelimitedFrom(
621       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
622       throws java.io.IOException {
623     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
624         PARSER, input, extensionRegistry);
625   }
626 
parseFrom( com.google.protobuf.CodedInputStream input)627   public static io.grafeas.v1.PackageOccurrence parseFrom(
628       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
629     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
630   }
631 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)632   public static io.grafeas.v1.PackageOccurrence parseFrom(
633       com.google.protobuf.CodedInputStream input,
634       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
635       throws java.io.IOException {
636     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
637         PARSER, input, extensionRegistry);
638   }
639 
640   @java.lang.Override
newBuilderForType()641   public Builder newBuilderForType() {
642     return newBuilder();
643   }
644 
newBuilder()645   public static Builder newBuilder() {
646     return DEFAULT_INSTANCE.toBuilder();
647   }
648 
newBuilder(io.grafeas.v1.PackageOccurrence prototype)649   public static Builder newBuilder(io.grafeas.v1.PackageOccurrence prototype) {
650     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
651   }
652 
653   @java.lang.Override
toBuilder()654   public Builder toBuilder() {
655     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
656   }
657 
658   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)659   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
660     Builder builder = new Builder(parent);
661     return builder;
662   }
663   /**
664    *
665    *
666    * <pre>
667    * Details on how a particular software package was installed on a system.
668    * </pre>
669    *
670    * Protobuf type {@code grafeas.v1.PackageOccurrence}
671    */
672   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
673       implements
674       // @@protoc_insertion_point(builder_implements:grafeas.v1.PackageOccurrence)
675       io.grafeas.v1.PackageOccurrenceOrBuilder {
getDescriptor()676     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
677       return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor;
678     }
679 
680     @java.lang.Override
681     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()682         internalGetFieldAccessorTable() {
683       return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_fieldAccessorTable
684           .ensureFieldAccessorsInitialized(
685               io.grafeas.v1.PackageOccurrence.class, io.grafeas.v1.PackageOccurrence.Builder.class);
686     }
687 
688     // Construct using io.grafeas.v1.PackageOccurrence.newBuilder()
Builder()689     private Builder() {}
690 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)691     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
692       super(parent);
693     }
694 
695     @java.lang.Override
clear()696     public Builder clear() {
697       super.clear();
698       bitField0_ = 0;
699       name_ = "";
700       if (locationBuilder_ == null) {
701         location_ = java.util.Collections.emptyList();
702       } else {
703         location_ = null;
704         locationBuilder_.clear();
705       }
706       bitField0_ = (bitField0_ & ~0x00000002);
707       packageType_ = "";
708       cpeUri_ = "";
709       architecture_ = 0;
710       license_ = null;
711       if (licenseBuilder_ != null) {
712         licenseBuilder_.dispose();
713         licenseBuilder_ = null;
714       }
715       version_ = null;
716       if (versionBuilder_ != null) {
717         versionBuilder_.dispose();
718         versionBuilder_ = null;
719       }
720       return this;
721     }
722 
723     @java.lang.Override
getDescriptorForType()724     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
725       return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageOccurrence_descriptor;
726     }
727 
728     @java.lang.Override
getDefaultInstanceForType()729     public io.grafeas.v1.PackageOccurrence getDefaultInstanceForType() {
730       return io.grafeas.v1.PackageOccurrence.getDefaultInstance();
731     }
732 
733     @java.lang.Override
build()734     public io.grafeas.v1.PackageOccurrence build() {
735       io.grafeas.v1.PackageOccurrence result = buildPartial();
736       if (!result.isInitialized()) {
737         throw newUninitializedMessageException(result);
738       }
739       return result;
740     }
741 
742     @java.lang.Override
buildPartial()743     public io.grafeas.v1.PackageOccurrence buildPartial() {
744       io.grafeas.v1.PackageOccurrence result = new io.grafeas.v1.PackageOccurrence(this);
745       buildPartialRepeatedFields(result);
746       if (bitField0_ != 0) {
747         buildPartial0(result);
748       }
749       onBuilt();
750       return result;
751     }
752 
buildPartialRepeatedFields(io.grafeas.v1.PackageOccurrence result)753     private void buildPartialRepeatedFields(io.grafeas.v1.PackageOccurrence result) {
754       if (locationBuilder_ == null) {
755         if (((bitField0_ & 0x00000002) != 0)) {
756           location_ = java.util.Collections.unmodifiableList(location_);
757           bitField0_ = (bitField0_ & ~0x00000002);
758         }
759         result.location_ = location_;
760       } else {
761         result.location_ = locationBuilder_.build();
762       }
763     }
764 
buildPartial0(io.grafeas.v1.PackageOccurrence result)765     private void buildPartial0(io.grafeas.v1.PackageOccurrence result) {
766       int from_bitField0_ = bitField0_;
767       if (((from_bitField0_ & 0x00000001) != 0)) {
768         result.name_ = name_;
769       }
770       if (((from_bitField0_ & 0x00000004) != 0)) {
771         result.packageType_ = packageType_;
772       }
773       if (((from_bitField0_ & 0x00000008) != 0)) {
774         result.cpeUri_ = cpeUri_;
775       }
776       if (((from_bitField0_ & 0x00000010) != 0)) {
777         result.architecture_ = architecture_;
778       }
779       if (((from_bitField0_ & 0x00000020) != 0)) {
780         result.license_ = licenseBuilder_ == null ? license_ : licenseBuilder_.build();
781       }
782       if (((from_bitField0_ & 0x00000040) != 0)) {
783         result.version_ = versionBuilder_ == null ? version_ : versionBuilder_.build();
784       }
785     }
786 
787     @java.lang.Override
clone()788     public Builder clone() {
789       return super.clone();
790     }
791 
792     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)793     public Builder setField(
794         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
795       return super.setField(field, value);
796     }
797 
798     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)799     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
800       return super.clearField(field);
801     }
802 
803     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)804     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
805       return super.clearOneof(oneof);
806     }
807 
808     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)809     public Builder setRepeatedField(
810         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
811       return super.setRepeatedField(field, index, value);
812     }
813 
814     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)815     public Builder addRepeatedField(
816         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
817       return super.addRepeatedField(field, value);
818     }
819 
820     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)821     public Builder mergeFrom(com.google.protobuf.Message other) {
822       if (other instanceof io.grafeas.v1.PackageOccurrence) {
823         return mergeFrom((io.grafeas.v1.PackageOccurrence) other);
824       } else {
825         super.mergeFrom(other);
826         return this;
827       }
828     }
829 
mergeFrom(io.grafeas.v1.PackageOccurrence other)830     public Builder mergeFrom(io.grafeas.v1.PackageOccurrence other) {
831       if (other == io.grafeas.v1.PackageOccurrence.getDefaultInstance()) return this;
832       if (!other.getName().isEmpty()) {
833         name_ = other.name_;
834         bitField0_ |= 0x00000001;
835         onChanged();
836       }
837       if (locationBuilder_ == null) {
838         if (!other.location_.isEmpty()) {
839           if (location_.isEmpty()) {
840             location_ = other.location_;
841             bitField0_ = (bitField0_ & ~0x00000002);
842           } else {
843             ensureLocationIsMutable();
844             location_.addAll(other.location_);
845           }
846           onChanged();
847         }
848       } else {
849         if (!other.location_.isEmpty()) {
850           if (locationBuilder_.isEmpty()) {
851             locationBuilder_.dispose();
852             locationBuilder_ = null;
853             location_ = other.location_;
854             bitField0_ = (bitField0_ & ~0x00000002);
855             locationBuilder_ =
856                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
857                     ? getLocationFieldBuilder()
858                     : null;
859           } else {
860             locationBuilder_.addAllMessages(other.location_);
861           }
862         }
863       }
864       if (!other.getPackageType().isEmpty()) {
865         packageType_ = other.packageType_;
866         bitField0_ |= 0x00000004;
867         onChanged();
868       }
869       if (!other.getCpeUri().isEmpty()) {
870         cpeUri_ = other.cpeUri_;
871         bitField0_ |= 0x00000008;
872         onChanged();
873       }
874       if (other.architecture_ != 0) {
875         setArchitectureValue(other.getArchitectureValue());
876       }
877       if (other.hasLicense()) {
878         mergeLicense(other.getLicense());
879       }
880       if (other.hasVersion()) {
881         mergeVersion(other.getVersion());
882       }
883       this.mergeUnknownFields(other.getUnknownFields());
884       onChanged();
885       return this;
886     }
887 
888     @java.lang.Override
isInitialized()889     public final boolean isInitialized() {
890       return true;
891     }
892 
893     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)894     public Builder mergeFrom(
895         com.google.protobuf.CodedInputStream input,
896         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
897         throws java.io.IOException {
898       if (extensionRegistry == null) {
899         throw new java.lang.NullPointerException();
900       }
901       try {
902         boolean done = false;
903         while (!done) {
904           int tag = input.readTag();
905           switch (tag) {
906             case 0:
907               done = true;
908               break;
909             case 10:
910               {
911                 name_ = input.readStringRequireUtf8();
912                 bitField0_ |= 0x00000001;
913                 break;
914               } // case 10
915             case 18:
916               {
917                 io.grafeas.v1.Location m =
918                     input.readMessage(io.grafeas.v1.Location.parser(), extensionRegistry);
919                 if (locationBuilder_ == null) {
920                   ensureLocationIsMutable();
921                   location_.add(m);
922                 } else {
923                   locationBuilder_.addMessage(m);
924                 }
925                 break;
926               } // case 18
927             case 26:
928               {
929                 packageType_ = input.readStringRequireUtf8();
930                 bitField0_ |= 0x00000004;
931                 break;
932               } // case 26
933             case 34:
934               {
935                 cpeUri_ = input.readStringRequireUtf8();
936                 bitField0_ |= 0x00000008;
937                 break;
938               } // case 34
939             case 40:
940               {
941                 architecture_ = input.readEnum();
942                 bitField0_ |= 0x00000010;
943                 break;
944               } // case 40
945             case 50:
946               {
947                 input.readMessage(getLicenseFieldBuilder().getBuilder(), extensionRegistry);
948                 bitField0_ |= 0x00000020;
949                 break;
950               } // case 50
951             case 58:
952               {
953                 input.readMessage(getVersionFieldBuilder().getBuilder(), extensionRegistry);
954                 bitField0_ |= 0x00000040;
955                 break;
956               } // case 58
957             default:
958               {
959                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
960                   done = true; // was an endgroup tag
961                 }
962                 break;
963               } // default:
964           } // switch (tag)
965         } // while (!done)
966       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
967         throw e.unwrapIOException();
968       } finally {
969         onChanged();
970       } // finally
971       return this;
972     }
973 
974     private int bitField0_;
975 
976     private java.lang.Object name_ = "";
977     /**
978      *
979      *
980      * <pre>
981      * The name of the installed package.
982      * </pre>
983      *
984      * <code>
985      * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY];
986      * </code>
987      *
988      * @return The name.
989      */
getName()990     public java.lang.String getName() {
991       java.lang.Object ref = name_;
992       if (!(ref instanceof java.lang.String)) {
993         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
994         java.lang.String s = bs.toStringUtf8();
995         name_ = s;
996         return s;
997       } else {
998         return (java.lang.String) ref;
999       }
1000     }
1001     /**
1002      *
1003      *
1004      * <pre>
1005      * The name of the installed package.
1006      * </pre>
1007      *
1008      * <code>
1009      * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY];
1010      * </code>
1011      *
1012      * @return The bytes for name.
1013      */
getNameBytes()1014     public com.google.protobuf.ByteString getNameBytes() {
1015       java.lang.Object ref = name_;
1016       if (ref instanceof String) {
1017         com.google.protobuf.ByteString b =
1018             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1019         name_ = b;
1020         return b;
1021       } else {
1022         return (com.google.protobuf.ByteString) ref;
1023       }
1024     }
1025     /**
1026      *
1027      *
1028      * <pre>
1029      * The name of the installed package.
1030      * </pre>
1031      *
1032      * <code>
1033      * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY];
1034      * </code>
1035      *
1036      * @param value The name to set.
1037      * @return This builder for chaining.
1038      */
setName(java.lang.String value)1039     public Builder setName(java.lang.String value) {
1040       if (value == null) {
1041         throw new NullPointerException();
1042       }
1043       name_ = value;
1044       bitField0_ |= 0x00000001;
1045       onChanged();
1046       return this;
1047     }
1048     /**
1049      *
1050      *
1051      * <pre>
1052      * The name of the installed package.
1053      * </pre>
1054      *
1055      * <code>
1056      * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY];
1057      * </code>
1058      *
1059      * @return This builder for chaining.
1060      */
clearName()1061     public Builder clearName() {
1062       name_ = getDefaultInstance().getName();
1063       bitField0_ = (bitField0_ & ~0x00000001);
1064       onChanged();
1065       return this;
1066     }
1067     /**
1068      *
1069      *
1070      * <pre>
1071      * The name of the installed package.
1072      * </pre>
1073      *
1074      * <code>
1075      * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY];
1076      * </code>
1077      *
1078      * @param value The bytes for name to set.
1079      * @return This builder for chaining.
1080      */
setNameBytes(com.google.protobuf.ByteString value)1081     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1082       if (value == null) {
1083         throw new NullPointerException();
1084       }
1085       checkByteStringIsUtf8(value);
1086       name_ = value;
1087       bitField0_ |= 0x00000001;
1088       onChanged();
1089       return this;
1090     }
1091 
1092     private java.util.List<io.grafeas.v1.Location> location_ = java.util.Collections.emptyList();
1093 
ensureLocationIsMutable()1094     private void ensureLocationIsMutable() {
1095       if (!((bitField0_ & 0x00000002) != 0)) {
1096         location_ = new java.util.ArrayList<io.grafeas.v1.Location>(location_);
1097         bitField0_ |= 0x00000002;
1098       }
1099     }
1100 
1101     private com.google.protobuf.RepeatedFieldBuilderV3<
1102             io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder>
1103         locationBuilder_;
1104 
1105     /**
1106      *
1107      *
1108      * <pre>
1109      * All of the places within the filesystem versions of this package
1110      * have been found.
1111      * </pre>
1112      *
1113      * <code>repeated .grafeas.v1.Location location = 2;</code>
1114      */
getLocationList()1115     public java.util.List<io.grafeas.v1.Location> getLocationList() {
1116       if (locationBuilder_ == null) {
1117         return java.util.Collections.unmodifiableList(location_);
1118       } else {
1119         return locationBuilder_.getMessageList();
1120       }
1121     }
1122     /**
1123      *
1124      *
1125      * <pre>
1126      * All of the places within the filesystem versions of this package
1127      * have been found.
1128      * </pre>
1129      *
1130      * <code>repeated .grafeas.v1.Location location = 2;</code>
1131      */
getLocationCount()1132     public int getLocationCount() {
1133       if (locationBuilder_ == null) {
1134         return location_.size();
1135       } else {
1136         return locationBuilder_.getCount();
1137       }
1138     }
1139     /**
1140      *
1141      *
1142      * <pre>
1143      * All of the places within the filesystem versions of this package
1144      * have been found.
1145      * </pre>
1146      *
1147      * <code>repeated .grafeas.v1.Location location = 2;</code>
1148      */
getLocation(int index)1149     public io.grafeas.v1.Location getLocation(int index) {
1150       if (locationBuilder_ == null) {
1151         return location_.get(index);
1152       } else {
1153         return locationBuilder_.getMessage(index);
1154       }
1155     }
1156     /**
1157      *
1158      *
1159      * <pre>
1160      * All of the places within the filesystem versions of this package
1161      * have been found.
1162      * </pre>
1163      *
1164      * <code>repeated .grafeas.v1.Location location = 2;</code>
1165      */
setLocation(int index, io.grafeas.v1.Location value)1166     public Builder setLocation(int index, io.grafeas.v1.Location value) {
1167       if (locationBuilder_ == null) {
1168         if (value == null) {
1169           throw new NullPointerException();
1170         }
1171         ensureLocationIsMutable();
1172         location_.set(index, value);
1173         onChanged();
1174       } else {
1175         locationBuilder_.setMessage(index, value);
1176       }
1177       return this;
1178     }
1179     /**
1180      *
1181      *
1182      * <pre>
1183      * All of the places within the filesystem versions of this package
1184      * have been found.
1185      * </pre>
1186      *
1187      * <code>repeated .grafeas.v1.Location location = 2;</code>
1188      */
setLocation(int index, io.grafeas.v1.Location.Builder builderForValue)1189     public Builder setLocation(int index, io.grafeas.v1.Location.Builder builderForValue) {
1190       if (locationBuilder_ == null) {
1191         ensureLocationIsMutable();
1192         location_.set(index, builderForValue.build());
1193         onChanged();
1194       } else {
1195         locationBuilder_.setMessage(index, builderForValue.build());
1196       }
1197       return this;
1198     }
1199     /**
1200      *
1201      *
1202      * <pre>
1203      * All of the places within the filesystem versions of this package
1204      * have been found.
1205      * </pre>
1206      *
1207      * <code>repeated .grafeas.v1.Location location = 2;</code>
1208      */
addLocation(io.grafeas.v1.Location value)1209     public Builder addLocation(io.grafeas.v1.Location value) {
1210       if (locationBuilder_ == null) {
1211         if (value == null) {
1212           throw new NullPointerException();
1213         }
1214         ensureLocationIsMutable();
1215         location_.add(value);
1216         onChanged();
1217       } else {
1218         locationBuilder_.addMessage(value);
1219       }
1220       return this;
1221     }
1222     /**
1223      *
1224      *
1225      * <pre>
1226      * All of the places within the filesystem versions of this package
1227      * have been found.
1228      * </pre>
1229      *
1230      * <code>repeated .grafeas.v1.Location location = 2;</code>
1231      */
addLocation(int index, io.grafeas.v1.Location value)1232     public Builder addLocation(int index, io.grafeas.v1.Location value) {
1233       if (locationBuilder_ == null) {
1234         if (value == null) {
1235           throw new NullPointerException();
1236         }
1237         ensureLocationIsMutable();
1238         location_.add(index, value);
1239         onChanged();
1240       } else {
1241         locationBuilder_.addMessage(index, value);
1242       }
1243       return this;
1244     }
1245     /**
1246      *
1247      *
1248      * <pre>
1249      * All of the places within the filesystem versions of this package
1250      * have been found.
1251      * </pre>
1252      *
1253      * <code>repeated .grafeas.v1.Location location = 2;</code>
1254      */
addLocation(io.grafeas.v1.Location.Builder builderForValue)1255     public Builder addLocation(io.grafeas.v1.Location.Builder builderForValue) {
1256       if (locationBuilder_ == null) {
1257         ensureLocationIsMutable();
1258         location_.add(builderForValue.build());
1259         onChanged();
1260       } else {
1261         locationBuilder_.addMessage(builderForValue.build());
1262       }
1263       return this;
1264     }
1265     /**
1266      *
1267      *
1268      * <pre>
1269      * All of the places within the filesystem versions of this package
1270      * have been found.
1271      * </pre>
1272      *
1273      * <code>repeated .grafeas.v1.Location location = 2;</code>
1274      */
addLocation(int index, io.grafeas.v1.Location.Builder builderForValue)1275     public Builder addLocation(int index, io.grafeas.v1.Location.Builder builderForValue) {
1276       if (locationBuilder_ == null) {
1277         ensureLocationIsMutable();
1278         location_.add(index, builderForValue.build());
1279         onChanged();
1280       } else {
1281         locationBuilder_.addMessage(index, builderForValue.build());
1282       }
1283       return this;
1284     }
1285     /**
1286      *
1287      *
1288      * <pre>
1289      * All of the places within the filesystem versions of this package
1290      * have been found.
1291      * </pre>
1292      *
1293      * <code>repeated .grafeas.v1.Location location = 2;</code>
1294      */
addAllLocation(java.lang.Iterable<? extends io.grafeas.v1.Location> values)1295     public Builder addAllLocation(java.lang.Iterable<? extends io.grafeas.v1.Location> values) {
1296       if (locationBuilder_ == null) {
1297         ensureLocationIsMutable();
1298         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, location_);
1299         onChanged();
1300       } else {
1301         locationBuilder_.addAllMessages(values);
1302       }
1303       return this;
1304     }
1305     /**
1306      *
1307      *
1308      * <pre>
1309      * All of the places within the filesystem versions of this package
1310      * have been found.
1311      * </pre>
1312      *
1313      * <code>repeated .grafeas.v1.Location location = 2;</code>
1314      */
clearLocation()1315     public Builder clearLocation() {
1316       if (locationBuilder_ == null) {
1317         location_ = java.util.Collections.emptyList();
1318         bitField0_ = (bitField0_ & ~0x00000002);
1319         onChanged();
1320       } else {
1321         locationBuilder_.clear();
1322       }
1323       return this;
1324     }
1325     /**
1326      *
1327      *
1328      * <pre>
1329      * All of the places within the filesystem versions of this package
1330      * have been found.
1331      * </pre>
1332      *
1333      * <code>repeated .grafeas.v1.Location location = 2;</code>
1334      */
removeLocation(int index)1335     public Builder removeLocation(int index) {
1336       if (locationBuilder_ == null) {
1337         ensureLocationIsMutable();
1338         location_.remove(index);
1339         onChanged();
1340       } else {
1341         locationBuilder_.remove(index);
1342       }
1343       return this;
1344     }
1345     /**
1346      *
1347      *
1348      * <pre>
1349      * All of the places within the filesystem versions of this package
1350      * have been found.
1351      * </pre>
1352      *
1353      * <code>repeated .grafeas.v1.Location location = 2;</code>
1354      */
getLocationBuilder(int index)1355     public io.grafeas.v1.Location.Builder getLocationBuilder(int index) {
1356       return getLocationFieldBuilder().getBuilder(index);
1357     }
1358     /**
1359      *
1360      *
1361      * <pre>
1362      * All of the places within the filesystem versions of this package
1363      * have been found.
1364      * </pre>
1365      *
1366      * <code>repeated .grafeas.v1.Location location = 2;</code>
1367      */
getLocationOrBuilder(int index)1368     public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder(int index) {
1369       if (locationBuilder_ == null) {
1370         return location_.get(index);
1371       } else {
1372         return locationBuilder_.getMessageOrBuilder(index);
1373       }
1374     }
1375     /**
1376      *
1377      *
1378      * <pre>
1379      * All of the places within the filesystem versions of this package
1380      * have been found.
1381      * </pre>
1382      *
1383      * <code>repeated .grafeas.v1.Location location = 2;</code>
1384      */
getLocationOrBuilderList()1385     public java.util.List<? extends io.grafeas.v1.LocationOrBuilder> getLocationOrBuilderList() {
1386       if (locationBuilder_ != null) {
1387         return locationBuilder_.getMessageOrBuilderList();
1388       } else {
1389         return java.util.Collections.unmodifiableList(location_);
1390       }
1391     }
1392     /**
1393      *
1394      *
1395      * <pre>
1396      * All of the places within the filesystem versions of this package
1397      * have been found.
1398      * </pre>
1399      *
1400      * <code>repeated .grafeas.v1.Location location = 2;</code>
1401      */
addLocationBuilder()1402     public io.grafeas.v1.Location.Builder addLocationBuilder() {
1403       return getLocationFieldBuilder().addBuilder(io.grafeas.v1.Location.getDefaultInstance());
1404     }
1405     /**
1406      *
1407      *
1408      * <pre>
1409      * All of the places within the filesystem versions of this package
1410      * have been found.
1411      * </pre>
1412      *
1413      * <code>repeated .grafeas.v1.Location location = 2;</code>
1414      */
addLocationBuilder(int index)1415     public io.grafeas.v1.Location.Builder addLocationBuilder(int index) {
1416       return getLocationFieldBuilder()
1417           .addBuilder(index, io.grafeas.v1.Location.getDefaultInstance());
1418     }
1419     /**
1420      *
1421      *
1422      * <pre>
1423      * All of the places within the filesystem versions of this package
1424      * have been found.
1425      * </pre>
1426      *
1427      * <code>repeated .grafeas.v1.Location location = 2;</code>
1428      */
getLocationBuilderList()1429     public java.util.List<io.grafeas.v1.Location.Builder> getLocationBuilderList() {
1430       return getLocationFieldBuilder().getBuilderList();
1431     }
1432 
1433     private com.google.protobuf.RepeatedFieldBuilderV3<
1434             io.grafeas.v1.Location, io.grafeas.v1.Location.Builder, io.grafeas.v1.LocationOrBuilder>
getLocationFieldBuilder()1435         getLocationFieldBuilder() {
1436       if (locationBuilder_ == null) {
1437         locationBuilder_ =
1438             new com.google.protobuf.RepeatedFieldBuilderV3<
1439                 io.grafeas.v1.Location,
1440                 io.grafeas.v1.Location.Builder,
1441                 io.grafeas.v1.LocationOrBuilder>(
1442                 location_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
1443         location_ = null;
1444       }
1445       return locationBuilder_;
1446     }
1447 
1448     private java.lang.Object packageType_ = "";
1449     /**
1450      *
1451      *
1452      * <pre>
1453      * The type of package; whether native or non native (e.g., ruby gems,
1454      * node.js packages, etc.).
1455      * </pre>
1456      *
1457      * <code>string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1458      *
1459      * @return The packageType.
1460      */
getPackageType()1461     public java.lang.String getPackageType() {
1462       java.lang.Object ref = packageType_;
1463       if (!(ref instanceof java.lang.String)) {
1464         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1465         java.lang.String s = bs.toStringUtf8();
1466         packageType_ = s;
1467         return s;
1468       } else {
1469         return (java.lang.String) ref;
1470       }
1471     }
1472     /**
1473      *
1474      *
1475      * <pre>
1476      * The type of package; whether native or non native (e.g., ruby gems,
1477      * node.js packages, etc.).
1478      * </pre>
1479      *
1480      * <code>string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1481      *
1482      * @return The bytes for packageType.
1483      */
getPackageTypeBytes()1484     public com.google.protobuf.ByteString getPackageTypeBytes() {
1485       java.lang.Object ref = packageType_;
1486       if (ref instanceof String) {
1487         com.google.protobuf.ByteString b =
1488             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1489         packageType_ = b;
1490         return b;
1491       } else {
1492         return (com.google.protobuf.ByteString) ref;
1493       }
1494     }
1495     /**
1496      *
1497      *
1498      * <pre>
1499      * The type of package; whether native or non native (e.g., ruby gems,
1500      * node.js packages, etc.).
1501      * </pre>
1502      *
1503      * <code>string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1504      *
1505      * @param value The packageType to set.
1506      * @return This builder for chaining.
1507      */
setPackageType(java.lang.String value)1508     public Builder setPackageType(java.lang.String value) {
1509       if (value == null) {
1510         throw new NullPointerException();
1511       }
1512       packageType_ = value;
1513       bitField0_ |= 0x00000004;
1514       onChanged();
1515       return this;
1516     }
1517     /**
1518      *
1519      *
1520      * <pre>
1521      * The type of package; whether native or non native (e.g., ruby gems,
1522      * node.js packages, etc.).
1523      * </pre>
1524      *
1525      * <code>string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1526      *
1527      * @return This builder for chaining.
1528      */
clearPackageType()1529     public Builder clearPackageType() {
1530       packageType_ = getDefaultInstance().getPackageType();
1531       bitField0_ = (bitField0_ & ~0x00000004);
1532       onChanged();
1533       return this;
1534     }
1535     /**
1536      *
1537      *
1538      * <pre>
1539      * The type of package; whether native or non native (e.g., ruby gems,
1540      * node.js packages, etc.).
1541      * </pre>
1542      *
1543      * <code>string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1544      *
1545      * @param value The bytes for packageType to set.
1546      * @return This builder for chaining.
1547      */
setPackageTypeBytes(com.google.protobuf.ByteString value)1548     public Builder setPackageTypeBytes(com.google.protobuf.ByteString value) {
1549       if (value == null) {
1550         throw new NullPointerException();
1551       }
1552       checkByteStringIsUtf8(value);
1553       packageType_ = value;
1554       bitField0_ |= 0x00000004;
1555       onChanged();
1556       return this;
1557     }
1558 
1559     private java.lang.Object cpeUri_ = "";
1560     /**
1561      *
1562      *
1563      * <pre>
1564      * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
1565      * denoting the package manager version distributing a package.
1566      * The cpe_uri will be blank for language packages.
1567      * </pre>
1568      *
1569      * <code>string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1570      *
1571      * @return The cpeUri.
1572      */
getCpeUri()1573     public java.lang.String getCpeUri() {
1574       java.lang.Object ref = cpeUri_;
1575       if (!(ref instanceof java.lang.String)) {
1576         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1577         java.lang.String s = bs.toStringUtf8();
1578         cpeUri_ = s;
1579         return s;
1580       } else {
1581         return (java.lang.String) ref;
1582       }
1583     }
1584     /**
1585      *
1586      *
1587      * <pre>
1588      * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
1589      * denoting the package manager version distributing a package.
1590      * The cpe_uri will be blank for language packages.
1591      * </pre>
1592      *
1593      * <code>string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1594      *
1595      * @return The bytes for cpeUri.
1596      */
getCpeUriBytes()1597     public com.google.protobuf.ByteString getCpeUriBytes() {
1598       java.lang.Object ref = cpeUri_;
1599       if (ref instanceof String) {
1600         com.google.protobuf.ByteString b =
1601             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1602         cpeUri_ = b;
1603         return b;
1604       } else {
1605         return (com.google.protobuf.ByteString) ref;
1606       }
1607     }
1608     /**
1609      *
1610      *
1611      * <pre>
1612      * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
1613      * denoting the package manager version distributing a package.
1614      * The cpe_uri will be blank for language packages.
1615      * </pre>
1616      *
1617      * <code>string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1618      *
1619      * @param value The cpeUri to set.
1620      * @return This builder for chaining.
1621      */
setCpeUri(java.lang.String value)1622     public Builder setCpeUri(java.lang.String value) {
1623       if (value == null) {
1624         throw new NullPointerException();
1625       }
1626       cpeUri_ = value;
1627       bitField0_ |= 0x00000008;
1628       onChanged();
1629       return this;
1630     }
1631     /**
1632      *
1633      *
1634      * <pre>
1635      * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
1636      * denoting the package manager version distributing a package.
1637      * The cpe_uri will be blank for language packages.
1638      * </pre>
1639      *
1640      * <code>string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1641      *
1642      * @return This builder for chaining.
1643      */
clearCpeUri()1644     public Builder clearCpeUri() {
1645       cpeUri_ = getDefaultInstance().getCpeUri();
1646       bitField0_ = (bitField0_ & ~0x00000008);
1647       onChanged();
1648       return this;
1649     }
1650     /**
1651      *
1652      *
1653      * <pre>
1654      * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
1655      * denoting the package manager version distributing a package.
1656      * The cpe_uri will be blank for language packages.
1657      * </pre>
1658      *
1659      * <code>string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1660      *
1661      * @param value The bytes for cpeUri to set.
1662      * @return This builder for chaining.
1663      */
setCpeUriBytes(com.google.protobuf.ByteString value)1664     public Builder setCpeUriBytes(com.google.protobuf.ByteString value) {
1665       if (value == null) {
1666         throw new NullPointerException();
1667       }
1668       checkByteStringIsUtf8(value);
1669       cpeUri_ = value;
1670       bitField0_ |= 0x00000008;
1671       onChanged();
1672       return this;
1673     }
1674 
1675     private int architecture_ = 0;
1676     /**
1677      *
1678      *
1679      * <pre>
1680      * The CPU architecture for which packages in this distribution channel were
1681      * built. Architecture will be blank for language packages.
1682      * </pre>
1683      *
1684      * <code>.grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1685      * </code>
1686      *
1687      * @return The enum numeric value on the wire for architecture.
1688      */
1689     @java.lang.Override
getArchitectureValue()1690     public int getArchitectureValue() {
1691       return architecture_;
1692     }
1693     /**
1694      *
1695      *
1696      * <pre>
1697      * The CPU architecture for which packages in this distribution channel were
1698      * built. Architecture will be blank for language packages.
1699      * </pre>
1700      *
1701      * <code>.grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1702      * </code>
1703      *
1704      * @param value The enum numeric value on the wire for architecture to set.
1705      * @return This builder for chaining.
1706      */
setArchitectureValue(int value)1707     public Builder setArchitectureValue(int value) {
1708       architecture_ = value;
1709       bitField0_ |= 0x00000010;
1710       onChanged();
1711       return this;
1712     }
1713     /**
1714      *
1715      *
1716      * <pre>
1717      * The CPU architecture for which packages in this distribution channel were
1718      * built. Architecture will be blank for language packages.
1719      * </pre>
1720      *
1721      * <code>.grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1722      * </code>
1723      *
1724      * @return The architecture.
1725      */
1726     @java.lang.Override
getArchitecture()1727     public io.grafeas.v1.Architecture getArchitecture() {
1728       io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.forNumber(architecture_);
1729       return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result;
1730     }
1731     /**
1732      *
1733      *
1734      * <pre>
1735      * The CPU architecture for which packages in this distribution channel were
1736      * built. Architecture will be blank for language packages.
1737      * </pre>
1738      *
1739      * <code>.grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1740      * </code>
1741      *
1742      * @param value The architecture to set.
1743      * @return This builder for chaining.
1744      */
setArchitecture(io.grafeas.v1.Architecture value)1745     public Builder setArchitecture(io.grafeas.v1.Architecture value) {
1746       if (value == null) {
1747         throw new NullPointerException();
1748       }
1749       bitField0_ |= 0x00000010;
1750       architecture_ = value.getNumber();
1751       onChanged();
1752       return this;
1753     }
1754     /**
1755      *
1756      *
1757      * <pre>
1758      * The CPU architecture for which packages in this distribution channel were
1759      * built. Architecture will be blank for language packages.
1760      * </pre>
1761      *
1762      * <code>.grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1763      * </code>
1764      *
1765      * @return This builder for chaining.
1766      */
clearArchitecture()1767     public Builder clearArchitecture() {
1768       bitField0_ = (bitField0_ & ~0x00000010);
1769       architecture_ = 0;
1770       onChanged();
1771       return this;
1772     }
1773 
1774     private io.grafeas.v1.License license_;
1775     private com.google.protobuf.SingleFieldBuilderV3<
1776             io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>
1777         licenseBuilder_;
1778     /**
1779      *
1780      *
1781      * <pre>
1782      * Licenses that have been declared by the authors of the package.
1783      * </pre>
1784      *
1785      * <code>.grafeas.v1.License license = 6;</code>
1786      *
1787      * @return Whether the license field is set.
1788      */
hasLicense()1789     public boolean hasLicense() {
1790       return ((bitField0_ & 0x00000020) != 0);
1791     }
1792     /**
1793      *
1794      *
1795      * <pre>
1796      * Licenses that have been declared by the authors of the package.
1797      * </pre>
1798      *
1799      * <code>.grafeas.v1.License license = 6;</code>
1800      *
1801      * @return The license.
1802      */
getLicense()1803     public io.grafeas.v1.License getLicense() {
1804       if (licenseBuilder_ == null) {
1805         return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_;
1806       } else {
1807         return licenseBuilder_.getMessage();
1808       }
1809     }
1810     /**
1811      *
1812      *
1813      * <pre>
1814      * Licenses that have been declared by the authors of the package.
1815      * </pre>
1816      *
1817      * <code>.grafeas.v1.License license = 6;</code>
1818      */
setLicense(io.grafeas.v1.License value)1819     public Builder setLicense(io.grafeas.v1.License value) {
1820       if (licenseBuilder_ == null) {
1821         if (value == null) {
1822           throw new NullPointerException();
1823         }
1824         license_ = value;
1825       } else {
1826         licenseBuilder_.setMessage(value);
1827       }
1828       bitField0_ |= 0x00000020;
1829       onChanged();
1830       return this;
1831     }
1832     /**
1833      *
1834      *
1835      * <pre>
1836      * Licenses that have been declared by the authors of the package.
1837      * </pre>
1838      *
1839      * <code>.grafeas.v1.License license = 6;</code>
1840      */
setLicense(io.grafeas.v1.License.Builder builderForValue)1841     public Builder setLicense(io.grafeas.v1.License.Builder builderForValue) {
1842       if (licenseBuilder_ == null) {
1843         license_ = builderForValue.build();
1844       } else {
1845         licenseBuilder_.setMessage(builderForValue.build());
1846       }
1847       bitField0_ |= 0x00000020;
1848       onChanged();
1849       return this;
1850     }
1851     /**
1852      *
1853      *
1854      * <pre>
1855      * Licenses that have been declared by the authors of the package.
1856      * </pre>
1857      *
1858      * <code>.grafeas.v1.License license = 6;</code>
1859      */
mergeLicense(io.grafeas.v1.License value)1860     public Builder mergeLicense(io.grafeas.v1.License value) {
1861       if (licenseBuilder_ == null) {
1862         if (((bitField0_ & 0x00000020) != 0)
1863             && license_ != null
1864             && license_ != io.grafeas.v1.License.getDefaultInstance()) {
1865           getLicenseBuilder().mergeFrom(value);
1866         } else {
1867           license_ = value;
1868         }
1869       } else {
1870         licenseBuilder_.mergeFrom(value);
1871       }
1872       bitField0_ |= 0x00000020;
1873       onChanged();
1874       return this;
1875     }
1876     /**
1877      *
1878      *
1879      * <pre>
1880      * Licenses that have been declared by the authors of the package.
1881      * </pre>
1882      *
1883      * <code>.grafeas.v1.License license = 6;</code>
1884      */
clearLicense()1885     public Builder clearLicense() {
1886       bitField0_ = (bitField0_ & ~0x00000020);
1887       license_ = null;
1888       if (licenseBuilder_ != null) {
1889         licenseBuilder_.dispose();
1890         licenseBuilder_ = null;
1891       }
1892       onChanged();
1893       return this;
1894     }
1895     /**
1896      *
1897      *
1898      * <pre>
1899      * Licenses that have been declared by the authors of the package.
1900      * </pre>
1901      *
1902      * <code>.grafeas.v1.License license = 6;</code>
1903      */
getLicenseBuilder()1904     public io.grafeas.v1.License.Builder getLicenseBuilder() {
1905       bitField0_ |= 0x00000020;
1906       onChanged();
1907       return getLicenseFieldBuilder().getBuilder();
1908     }
1909     /**
1910      *
1911      *
1912      * <pre>
1913      * Licenses that have been declared by the authors of the package.
1914      * </pre>
1915      *
1916      * <code>.grafeas.v1.License license = 6;</code>
1917      */
getLicenseOrBuilder()1918     public io.grafeas.v1.LicenseOrBuilder getLicenseOrBuilder() {
1919       if (licenseBuilder_ != null) {
1920         return licenseBuilder_.getMessageOrBuilder();
1921       } else {
1922         return license_ == null ? io.grafeas.v1.License.getDefaultInstance() : license_;
1923       }
1924     }
1925     /**
1926      *
1927      *
1928      * <pre>
1929      * Licenses that have been declared by the authors of the package.
1930      * </pre>
1931      *
1932      * <code>.grafeas.v1.License license = 6;</code>
1933      */
1934     private com.google.protobuf.SingleFieldBuilderV3<
1935             io.grafeas.v1.License, io.grafeas.v1.License.Builder, io.grafeas.v1.LicenseOrBuilder>
getLicenseFieldBuilder()1936         getLicenseFieldBuilder() {
1937       if (licenseBuilder_ == null) {
1938         licenseBuilder_ =
1939             new com.google.protobuf.SingleFieldBuilderV3<
1940                 io.grafeas.v1.License,
1941                 io.grafeas.v1.License.Builder,
1942                 io.grafeas.v1.LicenseOrBuilder>(getLicense(), getParentForChildren(), isClean());
1943         license_ = null;
1944       }
1945       return licenseBuilder_;
1946     }
1947 
1948     private io.grafeas.v1.Version version_;
1949     private com.google.protobuf.SingleFieldBuilderV3<
1950             io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>
1951         versionBuilder_;
1952     /**
1953      *
1954      *
1955      * <pre>
1956      * The version of the package.
1957      * </pre>
1958      *
1959      * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1960      *
1961      * @return Whether the version field is set.
1962      */
hasVersion()1963     public boolean hasVersion() {
1964       return ((bitField0_ & 0x00000040) != 0);
1965     }
1966     /**
1967      *
1968      *
1969      * <pre>
1970      * The version of the package.
1971      * </pre>
1972      *
1973      * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1974      *
1975      * @return The version.
1976      */
getVersion()1977     public io.grafeas.v1.Version getVersion() {
1978       if (versionBuilder_ == null) {
1979         return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
1980       } else {
1981         return versionBuilder_.getMessage();
1982       }
1983     }
1984     /**
1985      *
1986      *
1987      * <pre>
1988      * The version of the package.
1989      * </pre>
1990      *
1991      * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1992      */
setVersion(io.grafeas.v1.Version value)1993     public Builder setVersion(io.grafeas.v1.Version value) {
1994       if (versionBuilder_ == null) {
1995         if (value == null) {
1996           throw new NullPointerException();
1997         }
1998         version_ = value;
1999       } else {
2000         versionBuilder_.setMessage(value);
2001       }
2002       bitField0_ |= 0x00000040;
2003       onChanged();
2004       return this;
2005     }
2006     /**
2007      *
2008      *
2009      * <pre>
2010      * The version of the package.
2011      * </pre>
2012      *
2013      * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2014      */
setVersion(io.grafeas.v1.Version.Builder builderForValue)2015     public Builder setVersion(io.grafeas.v1.Version.Builder builderForValue) {
2016       if (versionBuilder_ == null) {
2017         version_ = builderForValue.build();
2018       } else {
2019         versionBuilder_.setMessage(builderForValue.build());
2020       }
2021       bitField0_ |= 0x00000040;
2022       onChanged();
2023       return this;
2024     }
2025     /**
2026      *
2027      *
2028      * <pre>
2029      * The version of the package.
2030      * </pre>
2031      *
2032      * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2033      */
mergeVersion(io.grafeas.v1.Version value)2034     public Builder mergeVersion(io.grafeas.v1.Version value) {
2035       if (versionBuilder_ == null) {
2036         if (((bitField0_ & 0x00000040) != 0)
2037             && version_ != null
2038             && version_ != io.grafeas.v1.Version.getDefaultInstance()) {
2039           getVersionBuilder().mergeFrom(value);
2040         } else {
2041           version_ = value;
2042         }
2043       } else {
2044         versionBuilder_.mergeFrom(value);
2045       }
2046       bitField0_ |= 0x00000040;
2047       onChanged();
2048       return this;
2049     }
2050     /**
2051      *
2052      *
2053      * <pre>
2054      * The version of the package.
2055      * </pre>
2056      *
2057      * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2058      */
clearVersion()2059     public Builder clearVersion() {
2060       bitField0_ = (bitField0_ & ~0x00000040);
2061       version_ = null;
2062       if (versionBuilder_ != null) {
2063         versionBuilder_.dispose();
2064         versionBuilder_ = null;
2065       }
2066       onChanged();
2067       return this;
2068     }
2069     /**
2070      *
2071      *
2072      * <pre>
2073      * The version of the package.
2074      * </pre>
2075      *
2076      * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2077      */
getVersionBuilder()2078     public io.grafeas.v1.Version.Builder getVersionBuilder() {
2079       bitField0_ |= 0x00000040;
2080       onChanged();
2081       return getVersionFieldBuilder().getBuilder();
2082     }
2083     /**
2084      *
2085      *
2086      * <pre>
2087      * The version of the package.
2088      * </pre>
2089      *
2090      * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2091      */
getVersionOrBuilder()2092     public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() {
2093       if (versionBuilder_ != null) {
2094         return versionBuilder_.getMessageOrBuilder();
2095       } else {
2096         return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
2097       }
2098     }
2099     /**
2100      *
2101      *
2102      * <pre>
2103      * The version of the package.
2104      * </pre>
2105      *
2106      * <code>.grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2107      */
2108     private com.google.protobuf.SingleFieldBuilderV3<
2109             io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>
getVersionFieldBuilder()2110         getVersionFieldBuilder() {
2111       if (versionBuilder_ == null) {
2112         versionBuilder_ =
2113             new com.google.protobuf.SingleFieldBuilderV3<
2114                 io.grafeas.v1.Version,
2115                 io.grafeas.v1.Version.Builder,
2116                 io.grafeas.v1.VersionOrBuilder>(getVersion(), getParentForChildren(), isClean());
2117         version_ = null;
2118       }
2119       return versionBuilder_;
2120     }
2121 
2122     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2123     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2124       return super.setUnknownFields(unknownFields);
2125     }
2126 
2127     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2128     public final Builder mergeUnknownFields(
2129         final com.google.protobuf.UnknownFieldSet unknownFields) {
2130       return super.mergeUnknownFields(unknownFields);
2131     }
2132 
2133     // @@protoc_insertion_point(builder_scope:grafeas.v1.PackageOccurrence)
2134   }
2135 
2136   // @@protoc_insertion_point(class_scope:grafeas.v1.PackageOccurrence)
2137   private static final io.grafeas.v1.PackageOccurrence DEFAULT_INSTANCE;
2138 
2139   static {
2140     DEFAULT_INSTANCE = new io.grafeas.v1.PackageOccurrence();
2141   }
2142 
getDefaultInstance()2143   public static io.grafeas.v1.PackageOccurrence getDefaultInstance() {
2144     return DEFAULT_INSTANCE;
2145   }
2146 
2147   private static final com.google.protobuf.Parser<PackageOccurrence> PARSER =
2148       new com.google.protobuf.AbstractParser<PackageOccurrence>() {
2149         @java.lang.Override
2150         public PackageOccurrence parsePartialFrom(
2151             com.google.protobuf.CodedInputStream input,
2152             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2153             throws com.google.protobuf.InvalidProtocolBufferException {
2154           Builder builder = newBuilder();
2155           try {
2156             builder.mergeFrom(input, extensionRegistry);
2157           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2158             throw e.setUnfinishedMessage(builder.buildPartial());
2159           } catch (com.google.protobuf.UninitializedMessageException e) {
2160             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2161           } catch (java.io.IOException e) {
2162             throw new com.google.protobuf.InvalidProtocolBufferException(e)
2163                 .setUnfinishedMessage(builder.buildPartial());
2164           }
2165           return builder.buildPartial();
2166         }
2167       };
2168 
parser()2169   public static com.google.protobuf.Parser<PackageOccurrence> parser() {
2170     return PARSER;
2171   }
2172 
2173   @java.lang.Override
getParserForType()2174   public com.google.protobuf.Parser<PackageOccurrence> getParserForType() {
2175     return PARSER;
2176   }
2177 
2178   @java.lang.Override
getDefaultInstanceForType()2179   public io.grafeas.v1.PackageOccurrence getDefaultInstanceForType() {
2180     return DEFAULT_INSTANCE;
2181   }
2182 }
2183