• 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  * An occurrence of a particular package installation found within a system's
27  * filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
28  * </pre>
29  *
30  * Protobuf type {@code grafeas.v1.Location}
31  */
32 public final class Location extends com.google.protobuf.GeneratedMessageV3
33     implements
34     // @@protoc_insertion_point(message_implements:grafeas.v1.Location)
35     LocationOrBuilder {
36   private static final long serialVersionUID = 0L;
37   // Use Location.newBuilder() to construct.
Location(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)38   private Location(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
39     super(builder);
40   }
41 
Location()42   private Location() {
43     cpeUri_ = "";
44     path_ = "";
45   }
46 
47   @java.lang.Override
48   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)49   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
50     return new Location();
51   }
52 
53   @java.lang.Override
getUnknownFields()54   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
55     return this.unknownFields;
56   }
57 
getDescriptor()58   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
59     return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_fieldAccessorTable
66         .ensureFieldAccessorsInitialized(
67             io.grafeas.v1.Location.class, io.grafeas.v1.Location.Builder.class);
68   }
69 
70   public static final int CPE_URI_FIELD_NUMBER = 1;
71 
72   @SuppressWarnings("serial")
73   private volatile java.lang.Object cpeUri_ = "";
74   /**
75    *
76    *
77    * <pre>
78    * Deprecated.
79    * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
80    * </pre>
81    *
82    * <code>string cpe_uri = 1;</code>
83    *
84    * @return The cpeUri.
85    */
86   @java.lang.Override
getCpeUri()87   public java.lang.String getCpeUri() {
88     java.lang.Object ref = cpeUri_;
89     if (ref instanceof java.lang.String) {
90       return (java.lang.String) ref;
91     } else {
92       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
93       java.lang.String s = bs.toStringUtf8();
94       cpeUri_ = s;
95       return s;
96     }
97   }
98   /**
99    *
100    *
101    * <pre>
102    * Deprecated.
103    * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
104    * </pre>
105    *
106    * <code>string cpe_uri = 1;</code>
107    *
108    * @return The bytes for cpeUri.
109    */
110   @java.lang.Override
getCpeUriBytes()111   public com.google.protobuf.ByteString getCpeUriBytes() {
112     java.lang.Object ref = cpeUri_;
113     if (ref instanceof java.lang.String) {
114       com.google.protobuf.ByteString b =
115           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
116       cpeUri_ = b;
117       return b;
118     } else {
119       return (com.google.protobuf.ByteString) ref;
120     }
121   }
122 
123   public static final int VERSION_FIELD_NUMBER = 2;
124   private io.grafeas.v1.Version version_;
125   /**
126    *
127    *
128    * <pre>
129    * Deprecated.
130    * The version installed at this location.
131    * </pre>
132    *
133    * <code>.grafeas.v1.Version version = 2;</code>
134    *
135    * @return Whether the version field is set.
136    */
137   @java.lang.Override
hasVersion()138   public boolean hasVersion() {
139     return version_ != null;
140   }
141   /**
142    *
143    *
144    * <pre>
145    * Deprecated.
146    * The version installed at this location.
147    * </pre>
148    *
149    * <code>.grafeas.v1.Version version = 2;</code>
150    *
151    * @return The version.
152    */
153   @java.lang.Override
getVersion()154   public io.grafeas.v1.Version getVersion() {
155     return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
156   }
157   /**
158    *
159    *
160    * <pre>
161    * Deprecated.
162    * The version installed at this location.
163    * </pre>
164    *
165    * <code>.grafeas.v1.Version version = 2;</code>
166    */
167   @java.lang.Override
getVersionOrBuilder()168   public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() {
169     return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
170   }
171 
172   public static final int PATH_FIELD_NUMBER = 3;
173 
174   @SuppressWarnings("serial")
175   private volatile java.lang.Object path_ = "";
176   /**
177    *
178    *
179    * <pre>
180    * The path from which we gathered that this package/version is installed.
181    * </pre>
182    *
183    * <code>string path = 3;</code>
184    *
185    * @return The path.
186    */
187   @java.lang.Override
getPath()188   public java.lang.String getPath() {
189     java.lang.Object ref = path_;
190     if (ref instanceof java.lang.String) {
191       return (java.lang.String) ref;
192     } else {
193       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
194       java.lang.String s = bs.toStringUtf8();
195       path_ = s;
196       return s;
197     }
198   }
199   /**
200    *
201    *
202    * <pre>
203    * The path from which we gathered that this package/version is installed.
204    * </pre>
205    *
206    * <code>string path = 3;</code>
207    *
208    * @return The bytes for path.
209    */
210   @java.lang.Override
getPathBytes()211   public com.google.protobuf.ByteString getPathBytes() {
212     java.lang.Object ref = path_;
213     if (ref instanceof java.lang.String) {
214       com.google.protobuf.ByteString b =
215           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
216       path_ = b;
217       return b;
218     } else {
219       return (com.google.protobuf.ByteString) ref;
220     }
221   }
222 
223   private byte memoizedIsInitialized = -1;
224 
225   @java.lang.Override
isInitialized()226   public final boolean isInitialized() {
227     byte isInitialized = memoizedIsInitialized;
228     if (isInitialized == 1) return true;
229     if (isInitialized == 0) return false;
230 
231     memoizedIsInitialized = 1;
232     return true;
233   }
234 
235   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)236   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
237     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) {
238       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpeUri_);
239     }
240     if (version_ != null) {
241       output.writeMessage(2, getVersion());
242     }
243     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
244       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_);
245     }
246     getUnknownFields().writeTo(output);
247   }
248 
249   @java.lang.Override
getSerializedSize()250   public int getSerializedSize() {
251     int size = memoizedSize;
252     if (size != -1) return size;
253 
254     size = 0;
255     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) {
256       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpeUri_);
257     }
258     if (version_ != null) {
259       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVersion());
260     }
261     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
262       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, path_);
263     }
264     size += getUnknownFields().getSerializedSize();
265     memoizedSize = size;
266     return size;
267   }
268 
269   @java.lang.Override
equals(final java.lang.Object obj)270   public boolean equals(final java.lang.Object obj) {
271     if (obj == this) {
272       return true;
273     }
274     if (!(obj instanceof io.grafeas.v1.Location)) {
275       return super.equals(obj);
276     }
277     io.grafeas.v1.Location other = (io.grafeas.v1.Location) obj;
278 
279     if (!getCpeUri().equals(other.getCpeUri())) return false;
280     if (hasVersion() != other.hasVersion()) return false;
281     if (hasVersion()) {
282       if (!getVersion().equals(other.getVersion())) return false;
283     }
284     if (!getPath().equals(other.getPath())) return false;
285     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
286     return true;
287   }
288 
289   @java.lang.Override
hashCode()290   public int hashCode() {
291     if (memoizedHashCode != 0) {
292       return memoizedHashCode;
293     }
294     int hash = 41;
295     hash = (19 * hash) + getDescriptor().hashCode();
296     hash = (37 * hash) + CPE_URI_FIELD_NUMBER;
297     hash = (53 * hash) + getCpeUri().hashCode();
298     if (hasVersion()) {
299       hash = (37 * hash) + VERSION_FIELD_NUMBER;
300       hash = (53 * hash) + getVersion().hashCode();
301     }
302     hash = (37 * hash) + PATH_FIELD_NUMBER;
303     hash = (53 * hash) + getPath().hashCode();
304     hash = (29 * hash) + getUnknownFields().hashCode();
305     memoizedHashCode = hash;
306     return hash;
307   }
308 
parseFrom(java.nio.ByteBuffer data)309   public static io.grafeas.v1.Location parseFrom(java.nio.ByteBuffer data)
310       throws com.google.protobuf.InvalidProtocolBufferException {
311     return PARSER.parseFrom(data);
312   }
313 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)314   public static io.grafeas.v1.Location parseFrom(
315       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
316       throws com.google.protobuf.InvalidProtocolBufferException {
317     return PARSER.parseFrom(data, extensionRegistry);
318   }
319 
parseFrom(com.google.protobuf.ByteString data)320   public static io.grafeas.v1.Location parseFrom(com.google.protobuf.ByteString data)
321       throws com.google.protobuf.InvalidProtocolBufferException {
322     return PARSER.parseFrom(data);
323   }
324 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)325   public static io.grafeas.v1.Location parseFrom(
326       com.google.protobuf.ByteString data,
327       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
328       throws com.google.protobuf.InvalidProtocolBufferException {
329     return PARSER.parseFrom(data, extensionRegistry);
330   }
331 
parseFrom(byte[] data)332   public static io.grafeas.v1.Location parseFrom(byte[] data)
333       throws com.google.protobuf.InvalidProtocolBufferException {
334     return PARSER.parseFrom(data);
335   }
336 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)337   public static io.grafeas.v1.Location parseFrom(
338       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
339       throws com.google.protobuf.InvalidProtocolBufferException {
340     return PARSER.parseFrom(data, extensionRegistry);
341   }
342 
parseFrom(java.io.InputStream input)343   public static io.grafeas.v1.Location parseFrom(java.io.InputStream input)
344       throws java.io.IOException {
345     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
346   }
347 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)348   public static io.grafeas.v1.Location parseFrom(
349       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
350       throws java.io.IOException {
351     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
352         PARSER, input, extensionRegistry);
353   }
354 
parseDelimitedFrom(java.io.InputStream input)355   public static io.grafeas.v1.Location parseDelimitedFrom(java.io.InputStream input)
356       throws java.io.IOException {
357     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
358   }
359 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)360   public static io.grafeas.v1.Location parseDelimitedFrom(
361       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
362       throws java.io.IOException {
363     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
364         PARSER, input, extensionRegistry);
365   }
366 
parseFrom(com.google.protobuf.CodedInputStream input)367   public static io.grafeas.v1.Location parseFrom(com.google.protobuf.CodedInputStream input)
368       throws java.io.IOException {
369     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
370   }
371 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)372   public static io.grafeas.v1.Location parseFrom(
373       com.google.protobuf.CodedInputStream input,
374       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
375       throws java.io.IOException {
376     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
377         PARSER, input, extensionRegistry);
378   }
379 
380   @java.lang.Override
newBuilderForType()381   public Builder newBuilderForType() {
382     return newBuilder();
383   }
384 
newBuilder()385   public static Builder newBuilder() {
386     return DEFAULT_INSTANCE.toBuilder();
387   }
388 
newBuilder(io.grafeas.v1.Location prototype)389   public static Builder newBuilder(io.grafeas.v1.Location prototype) {
390     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
391   }
392 
393   @java.lang.Override
toBuilder()394   public Builder toBuilder() {
395     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
396   }
397 
398   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)399   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
400     Builder builder = new Builder(parent);
401     return builder;
402   }
403   /**
404    *
405    *
406    * <pre>
407    * An occurrence of a particular package installation found within a system's
408    * filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
409    * </pre>
410    *
411    * Protobuf type {@code grafeas.v1.Location}
412    */
413   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
414       implements
415       // @@protoc_insertion_point(builder_implements:grafeas.v1.Location)
416       io.grafeas.v1.LocationOrBuilder {
getDescriptor()417     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
418       return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor;
419     }
420 
421     @java.lang.Override
422     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()423         internalGetFieldAccessorTable() {
424       return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_fieldAccessorTable
425           .ensureFieldAccessorsInitialized(
426               io.grafeas.v1.Location.class, io.grafeas.v1.Location.Builder.class);
427     }
428 
429     // Construct using io.grafeas.v1.Location.newBuilder()
Builder()430     private Builder() {}
431 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)432     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
433       super(parent);
434     }
435 
436     @java.lang.Override
clear()437     public Builder clear() {
438       super.clear();
439       bitField0_ = 0;
440       cpeUri_ = "";
441       version_ = null;
442       if (versionBuilder_ != null) {
443         versionBuilder_.dispose();
444         versionBuilder_ = null;
445       }
446       path_ = "";
447       return this;
448     }
449 
450     @java.lang.Override
getDescriptorForType()451     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
452       return io.grafeas.v1.Package.internal_static_grafeas_v1_Location_descriptor;
453     }
454 
455     @java.lang.Override
getDefaultInstanceForType()456     public io.grafeas.v1.Location getDefaultInstanceForType() {
457       return io.grafeas.v1.Location.getDefaultInstance();
458     }
459 
460     @java.lang.Override
build()461     public io.grafeas.v1.Location build() {
462       io.grafeas.v1.Location result = buildPartial();
463       if (!result.isInitialized()) {
464         throw newUninitializedMessageException(result);
465       }
466       return result;
467     }
468 
469     @java.lang.Override
buildPartial()470     public io.grafeas.v1.Location buildPartial() {
471       io.grafeas.v1.Location result = new io.grafeas.v1.Location(this);
472       if (bitField0_ != 0) {
473         buildPartial0(result);
474       }
475       onBuilt();
476       return result;
477     }
478 
buildPartial0(io.grafeas.v1.Location result)479     private void buildPartial0(io.grafeas.v1.Location result) {
480       int from_bitField0_ = bitField0_;
481       if (((from_bitField0_ & 0x00000001) != 0)) {
482         result.cpeUri_ = cpeUri_;
483       }
484       if (((from_bitField0_ & 0x00000002) != 0)) {
485         result.version_ = versionBuilder_ == null ? version_ : versionBuilder_.build();
486       }
487       if (((from_bitField0_ & 0x00000004) != 0)) {
488         result.path_ = path_;
489       }
490     }
491 
492     @java.lang.Override
clone()493     public Builder clone() {
494       return super.clone();
495     }
496 
497     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)498     public Builder setField(
499         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
500       return super.setField(field, value);
501     }
502 
503     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)504     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
505       return super.clearField(field);
506     }
507 
508     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)509     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
510       return super.clearOneof(oneof);
511     }
512 
513     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)514     public Builder setRepeatedField(
515         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
516       return super.setRepeatedField(field, index, value);
517     }
518 
519     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)520     public Builder addRepeatedField(
521         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
522       return super.addRepeatedField(field, value);
523     }
524 
525     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)526     public Builder mergeFrom(com.google.protobuf.Message other) {
527       if (other instanceof io.grafeas.v1.Location) {
528         return mergeFrom((io.grafeas.v1.Location) other);
529       } else {
530         super.mergeFrom(other);
531         return this;
532       }
533     }
534 
mergeFrom(io.grafeas.v1.Location other)535     public Builder mergeFrom(io.grafeas.v1.Location other) {
536       if (other == io.grafeas.v1.Location.getDefaultInstance()) return this;
537       if (!other.getCpeUri().isEmpty()) {
538         cpeUri_ = other.cpeUri_;
539         bitField0_ |= 0x00000001;
540         onChanged();
541       }
542       if (other.hasVersion()) {
543         mergeVersion(other.getVersion());
544       }
545       if (!other.getPath().isEmpty()) {
546         path_ = other.path_;
547         bitField0_ |= 0x00000004;
548         onChanged();
549       }
550       this.mergeUnknownFields(other.getUnknownFields());
551       onChanged();
552       return this;
553     }
554 
555     @java.lang.Override
isInitialized()556     public final boolean isInitialized() {
557       return true;
558     }
559 
560     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)561     public Builder mergeFrom(
562         com.google.protobuf.CodedInputStream input,
563         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
564         throws java.io.IOException {
565       if (extensionRegistry == null) {
566         throw new java.lang.NullPointerException();
567       }
568       try {
569         boolean done = false;
570         while (!done) {
571           int tag = input.readTag();
572           switch (tag) {
573             case 0:
574               done = true;
575               break;
576             case 10:
577               {
578                 cpeUri_ = input.readStringRequireUtf8();
579                 bitField0_ |= 0x00000001;
580                 break;
581               } // case 10
582             case 18:
583               {
584                 input.readMessage(getVersionFieldBuilder().getBuilder(), extensionRegistry);
585                 bitField0_ |= 0x00000002;
586                 break;
587               } // case 18
588             case 26:
589               {
590                 path_ = input.readStringRequireUtf8();
591                 bitField0_ |= 0x00000004;
592                 break;
593               } // case 26
594             default:
595               {
596                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
597                   done = true; // was an endgroup tag
598                 }
599                 break;
600               } // default:
601           } // switch (tag)
602         } // while (!done)
603       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
604         throw e.unwrapIOException();
605       } finally {
606         onChanged();
607       } // finally
608       return this;
609     }
610 
611     private int bitField0_;
612 
613     private java.lang.Object cpeUri_ = "";
614     /**
615      *
616      *
617      * <pre>
618      * Deprecated.
619      * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
620      * </pre>
621      *
622      * <code>string cpe_uri = 1;</code>
623      *
624      * @return The cpeUri.
625      */
getCpeUri()626     public java.lang.String getCpeUri() {
627       java.lang.Object ref = cpeUri_;
628       if (!(ref instanceof java.lang.String)) {
629         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
630         java.lang.String s = bs.toStringUtf8();
631         cpeUri_ = s;
632         return s;
633       } else {
634         return (java.lang.String) ref;
635       }
636     }
637     /**
638      *
639      *
640      * <pre>
641      * Deprecated.
642      * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
643      * </pre>
644      *
645      * <code>string cpe_uri = 1;</code>
646      *
647      * @return The bytes for cpeUri.
648      */
getCpeUriBytes()649     public com.google.protobuf.ByteString getCpeUriBytes() {
650       java.lang.Object ref = cpeUri_;
651       if (ref instanceof String) {
652         com.google.protobuf.ByteString b =
653             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
654         cpeUri_ = b;
655         return b;
656       } else {
657         return (com.google.protobuf.ByteString) ref;
658       }
659     }
660     /**
661      *
662      *
663      * <pre>
664      * Deprecated.
665      * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
666      * </pre>
667      *
668      * <code>string cpe_uri = 1;</code>
669      *
670      * @param value The cpeUri to set.
671      * @return This builder for chaining.
672      */
setCpeUri(java.lang.String value)673     public Builder setCpeUri(java.lang.String value) {
674       if (value == null) {
675         throw new NullPointerException();
676       }
677       cpeUri_ = value;
678       bitField0_ |= 0x00000001;
679       onChanged();
680       return this;
681     }
682     /**
683      *
684      *
685      * <pre>
686      * Deprecated.
687      * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
688      * </pre>
689      *
690      * <code>string cpe_uri = 1;</code>
691      *
692      * @return This builder for chaining.
693      */
clearCpeUri()694     public Builder clearCpeUri() {
695       cpeUri_ = getDefaultInstance().getCpeUri();
696       bitField0_ = (bitField0_ & ~0x00000001);
697       onChanged();
698       return this;
699     }
700     /**
701      *
702      *
703      * <pre>
704      * Deprecated.
705      * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
706      * </pre>
707      *
708      * <code>string cpe_uri = 1;</code>
709      *
710      * @param value The bytes for cpeUri to set.
711      * @return This builder for chaining.
712      */
setCpeUriBytes(com.google.protobuf.ByteString value)713     public Builder setCpeUriBytes(com.google.protobuf.ByteString value) {
714       if (value == null) {
715         throw new NullPointerException();
716       }
717       checkByteStringIsUtf8(value);
718       cpeUri_ = value;
719       bitField0_ |= 0x00000001;
720       onChanged();
721       return this;
722     }
723 
724     private io.grafeas.v1.Version version_;
725     private com.google.protobuf.SingleFieldBuilderV3<
726             io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>
727         versionBuilder_;
728     /**
729      *
730      *
731      * <pre>
732      * Deprecated.
733      * The version installed at this location.
734      * </pre>
735      *
736      * <code>.grafeas.v1.Version version = 2;</code>
737      *
738      * @return Whether the version field is set.
739      */
hasVersion()740     public boolean hasVersion() {
741       return ((bitField0_ & 0x00000002) != 0);
742     }
743     /**
744      *
745      *
746      * <pre>
747      * Deprecated.
748      * The version installed at this location.
749      * </pre>
750      *
751      * <code>.grafeas.v1.Version version = 2;</code>
752      *
753      * @return The version.
754      */
getVersion()755     public io.grafeas.v1.Version getVersion() {
756       if (versionBuilder_ == null) {
757         return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
758       } else {
759         return versionBuilder_.getMessage();
760       }
761     }
762     /**
763      *
764      *
765      * <pre>
766      * Deprecated.
767      * The version installed at this location.
768      * </pre>
769      *
770      * <code>.grafeas.v1.Version version = 2;</code>
771      */
setVersion(io.grafeas.v1.Version value)772     public Builder setVersion(io.grafeas.v1.Version value) {
773       if (versionBuilder_ == null) {
774         if (value == null) {
775           throw new NullPointerException();
776         }
777         version_ = value;
778       } else {
779         versionBuilder_.setMessage(value);
780       }
781       bitField0_ |= 0x00000002;
782       onChanged();
783       return this;
784     }
785     /**
786      *
787      *
788      * <pre>
789      * Deprecated.
790      * The version installed at this location.
791      * </pre>
792      *
793      * <code>.grafeas.v1.Version version = 2;</code>
794      */
setVersion(io.grafeas.v1.Version.Builder builderForValue)795     public Builder setVersion(io.grafeas.v1.Version.Builder builderForValue) {
796       if (versionBuilder_ == null) {
797         version_ = builderForValue.build();
798       } else {
799         versionBuilder_.setMessage(builderForValue.build());
800       }
801       bitField0_ |= 0x00000002;
802       onChanged();
803       return this;
804     }
805     /**
806      *
807      *
808      * <pre>
809      * Deprecated.
810      * The version installed at this location.
811      * </pre>
812      *
813      * <code>.grafeas.v1.Version version = 2;</code>
814      */
mergeVersion(io.grafeas.v1.Version value)815     public Builder mergeVersion(io.grafeas.v1.Version value) {
816       if (versionBuilder_ == null) {
817         if (((bitField0_ & 0x00000002) != 0)
818             && version_ != null
819             && version_ != io.grafeas.v1.Version.getDefaultInstance()) {
820           getVersionBuilder().mergeFrom(value);
821         } else {
822           version_ = value;
823         }
824       } else {
825         versionBuilder_.mergeFrom(value);
826       }
827       bitField0_ |= 0x00000002;
828       onChanged();
829       return this;
830     }
831     /**
832      *
833      *
834      * <pre>
835      * Deprecated.
836      * The version installed at this location.
837      * </pre>
838      *
839      * <code>.grafeas.v1.Version version = 2;</code>
840      */
clearVersion()841     public Builder clearVersion() {
842       bitField0_ = (bitField0_ & ~0x00000002);
843       version_ = null;
844       if (versionBuilder_ != null) {
845         versionBuilder_.dispose();
846         versionBuilder_ = null;
847       }
848       onChanged();
849       return this;
850     }
851     /**
852      *
853      *
854      * <pre>
855      * Deprecated.
856      * The version installed at this location.
857      * </pre>
858      *
859      * <code>.grafeas.v1.Version version = 2;</code>
860      */
getVersionBuilder()861     public io.grafeas.v1.Version.Builder getVersionBuilder() {
862       bitField0_ |= 0x00000002;
863       onChanged();
864       return getVersionFieldBuilder().getBuilder();
865     }
866     /**
867      *
868      *
869      * <pre>
870      * Deprecated.
871      * The version installed at this location.
872      * </pre>
873      *
874      * <code>.grafeas.v1.Version version = 2;</code>
875      */
getVersionOrBuilder()876     public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() {
877       if (versionBuilder_ != null) {
878         return versionBuilder_.getMessageOrBuilder();
879       } else {
880         return version_ == null ? io.grafeas.v1.Version.getDefaultInstance() : version_;
881       }
882     }
883     /**
884      *
885      *
886      * <pre>
887      * Deprecated.
888      * The version installed at this location.
889      * </pre>
890      *
891      * <code>.grafeas.v1.Version version = 2;</code>
892      */
893     private com.google.protobuf.SingleFieldBuilderV3<
894             io.grafeas.v1.Version, io.grafeas.v1.Version.Builder, io.grafeas.v1.VersionOrBuilder>
getVersionFieldBuilder()895         getVersionFieldBuilder() {
896       if (versionBuilder_ == null) {
897         versionBuilder_ =
898             new com.google.protobuf.SingleFieldBuilderV3<
899                 io.grafeas.v1.Version,
900                 io.grafeas.v1.Version.Builder,
901                 io.grafeas.v1.VersionOrBuilder>(getVersion(), getParentForChildren(), isClean());
902         version_ = null;
903       }
904       return versionBuilder_;
905     }
906 
907     private java.lang.Object path_ = "";
908     /**
909      *
910      *
911      * <pre>
912      * The path from which we gathered that this package/version is installed.
913      * </pre>
914      *
915      * <code>string path = 3;</code>
916      *
917      * @return The path.
918      */
getPath()919     public java.lang.String getPath() {
920       java.lang.Object ref = path_;
921       if (!(ref instanceof java.lang.String)) {
922         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
923         java.lang.String s = bs.toStringUtf8();
924         path_ = s;
925         return s;
926       } else {
927         return (java.lang.String) ref;
928       }
929     }
930     /**
931      *
932      *
933      * <pre>
934      * The path from which we gathered that this package/version is installed.
935      * </pre>
936      *
937      * <code>string path = 3;</code>
938      *
939      * @return The bytes for path.
940      */
getPathBytes()941     public com.google.protobuf.ByteString getPathBytes() {
942       java.lang.Object ref = path_;
943       if (ref instanceof String) {
944         com.google.protobuf.ByteString b =
945             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
946         path_ = b;
947         return b;
948       } else {
949         return (com.google.protobuf.ByteString) ref;
950       }
951     }
952     /**
953      *
954      *
955      * <pre>
956      * The path from which we gathered that this package/version is installed.
957      * </pre>
958      *
959      * <code>string path = 3;</code>
960      *
961      * @param value The path to set.
962      * @return This builder for chaining.
963      */
setPath(java.lang.String value)964     public Builder setPath(java.lang.String value) {
965       if (value == null) {
966         throw new NullPointerException();
967       }
968       path_ = value;
969       bitField0_ |= 0x00000004;
970       onChanged();
971       return this;
972     }
973     /**
974      *
975      *
976      * <pre>
977      * The path from which we gathered that this package/version is installed.
978      * </pre>
979      *
980      * <code>string path = 3;</code>
981      *
982      * @return This builder for chaining.
983      */
clearPath()984     public Builder clearPath() {
985       path_ = getDefaultInstance().getPath();
986       bitField0_ = (bitField0_ & ~0x00000004);
987       onChanged();
988       return this;
989     }
990     /**
991      *
992      *
993      * <pre>
994      * The path from which we gathered that this package/version is installed.
995      * </pre>
996      *
997      * <code>string path = 3;</code>
998      *
999      * @param value The bytes for path to set.
1000      * @return This builder for chaining.
1001      */
setPathBytes(com.google.protobuf.ByteString value)1002     public Builder setPathBytes(com.google.protobuf.ByteString value) {
1003       if (value == null) {
1004         throw new NullPointerException();
1005       }
1006       checkByteStringIsUtf8(value);
1007       path_ = value;
1008       bitField0_ |= 0x00000004;
1009       onChanged();
1010       return this;
1011     }
1012 
1013     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1014     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1015       return super.setUnknownFields(unknownFields);
1016     }
1017 
1018     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1019     public final Builder mergeUnknownFields(
1020         final com.google.protobuf.UnknownFieldSet unknownFields) {
1021       return super.mergeUnknownFields(unknownFields);
1022     }
1023 
1024     // @@protoc_insertion_point(builder_scope:grafeas.v1.Location)
1025   }
1026 
1027   // @@protoc_insertion_point(class_scope:grafeas.v1.Location)
1028   private static final io.grafeas.v1.Location DEFAULT_INSTANCE;
1029 
1030   static {
1031     DEFAULT_INSTANCE = new io.grafeas.v1.Location();
1032   }
1033 
getDefaultInstance()1034   public static io.grafeas.v1.Location getDefaultInstance() {
1035     return DEFAULT_INSTANCE;
1036   }
1037 
1038   private static final com.google.protobuf.Parser<Location> PARSER =
1039       new com.google.protobuf.AbstractParser<Location>() {
1040         @java.lang.Override
1041         public Location parsePartialFrom(
1042             com.google.protobuf.CodedInputStream input,
1043             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1044             throws com.google.protobuf.InvalidProtocolBufferException {
1045           Builder builder = newBuilder();
1046           try {
1047             builder.mergeFrom(input, extensionRegistry);
1048           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1049             throw e.setUnfinishedMessage(builder.buildPartial());
1050           } catch (com.google.protobuf.UninitializedMessageException e) {
1051             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1052           } catch (java.io.IOException e) {
1053             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1054                 .setUnfinishedMessage(builder.buildPartial());
1055           }
1056           return builder.buildPartial();
1057         }
1058       };
1059 
parser()1060   public static com.google.protobuf.Parser<Location> parser() {
1061     return PARSER;
1062   }
1063 
1064   @java.lang.Override
getParserForType()1065   public com.google.protobuf.Parser<Location> getParserForType() {
1066     return PARSER;
1067   }
1068 
1069   @java.lang.Override
getDefaultInstanceForType()1070   public io.grafeas.v1.Location getDefaultInstanceForType() {
1071     return DEFAULT_INSTANCE;
1072   }
1073 }
1074