• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2019 The Grafeas Authors. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 // Generated by the protocol buffer compiler.  DO NOT EDIT!
18 // source: grafeas/v1/common.proto
19 
20 package io.grafeas.v1;
21 
22 /**
23  *
24  *
25  * <pre>
26  * Indicates the location at which a package was found.
27  * </pre>
28  *
29  * Protobuf type {@code grafeas.v1.FileLocation}
30  */
31 public final class FileLocation extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:grafeas.v1.FileLocation)
34     FileLocationOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use FileLocation.newBuilder() to construct.
FileLocation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private FileLocation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
FileLocation()41   private FileLocation() {
42     filePath_ = "";
43   }
44 
45   @java.lang.Override
46   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)47   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
48     return new FileLocation();
49   }
50 
51   @java.lang.Override
getUnknownFields()52   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
53     return this.unknownFields;
54   }
55 
getDescriptor()56   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
57     return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor;
58   }
59 
60   @java.lang.Override
61   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()62       internalGetFieldAccessorTable() {
63     return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_fieldAccessorTable
64         .ensureFieldAccessorsInitialized(
65             io.grafeas.v1.FileLocation.class, io.grafeas.v1.FileLocation.Builder.class);
66   }
67 
68   public static final int FILE_PATH_FIELD_NUMBER = 1;
69 
70   @SuppressWarnings("serial")
71   private volatile java.lang.Object filePath_ = "";
72   /**
73    *
74    *
75    * <pre>
76    * For jars that are contained inside .war files, this filepath
77    * can indicate the path to war file combined with the path to jar file.
78    * </pre>
79    *
80    * <code>string file_path = 1;</code>
81    *
82    * @return The filePath.
83    */
84   @java.lang.Override
getFilePath()85   public java.lang.String getFilePath() {
86     java.lang.Object ref = filePath_;
87     if (ref instanceof java.lang.String) {
88       return (java.lang.String) ref;
89     } else {
90       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
91       java.lang.String s = bs.toStringUtf8();
92       filePath_ = s;
93       return s;
94     }
95   }
96   /**
97    *
98    *
99    * <pre>
100    * For jars that are contained inside .war files, this filepath
101    * can indicate the path to war file combined with the path to jar file.
102    * </pre>
103    *
104    * <code>string file_path = 1;</code>
105    *
106    * @return The bytes for filePath.
107    */
108   @java.lang.Override
getFilePathBytes()109   public com.google.protobuf.ByteString getFilePathBytes() {
110     java.lang.Object ref = filePath_;
111     if (ref instanceof java.lang.String) {
112       com.google.protobuf.ByteString b =
113           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
114       filePath_ = b;
115       return b;
116     } else {
117       return (com.google.protobuf.ByteString) ref;
118     }
119   }
120 
121   private byte memoizedIsInitialized = -1;
122 
123   @java.lang.Override
isInitialized()124   public final boolean isInitialized() {
125     byte isInitialized = memoizedIsInitialized;
126     if (isInitialized == 1) return true;
127     if (isInitialized == 0) return false;
128 
129     memoizedIsInitialized = 1;
130     return true;
131   }
132 
133   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)134   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
135     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) {
136       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filePath_);
137     }
138     getUnknownFields().writeTo(output);
139   }
140 
141   @java.lang.Override
getSerializedSize()142   public int getSerializedSize() {
143     int size = memoizedSize;
144     if (size != -1) return size;
145 
146     size = 0;
147     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) {
148       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filePath_);
149     }
150     size += getUnknownFields().getSerializedSize();
151     memoizedSize = size;
152     return size;
153   }
154 
155   @java.lang.Override
equals(final java.lang.Object obj)156   public boolean equals(final java.lang.Object obj) {
157     if (obj == this) {
158       return true;
159     }
160     if (!(obj instanceof io.grafeas.v1.FileLocation)) {
161       return super.equals(obj);
162     }
163     io.grafeas.v1.FileLocation other = (io.grafeas.v1.FileLocation) obj;
164 
165     if (!getFilePath().equals(other.getFilePath())) return false;
166     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
167     return true;
168   }
169 
170   @java.lang.Override
hashCode()171   public int hashCode() {
172     if (memoizedHashCode != 0) {
173       return memoizedHashCode;
174     }
175     int hash = 41;
176     hash = (19 * hash) + getDescriptor().hashCode();
177     hash = (37 * hash) + FILE_PATH_FIELD_NUMBER;
178     hash = (53 * hash) + getFilePath().hashCode();
179     hash = (29 * hash) + getUnknownFields().hashCode();
180     memoizedHashCode = hash;
181     return hash;
182   }
183 
parseFrom(java.nio.ByteBuffer data)184   public static io.grafeas.v1.FileLocation parseFrom(java.nio.ByteBuffer data)
185       throws com.google.protobuf.InvalidProtocolBufferException {
186     return PARSER.parseFrom(data);
187   }
188 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)189   public static io.grafeas.v1.FileLocation parseFrom(
190       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
191       throws com.google.protobuf.InvalidProtocolBufferException {
192     return PARSER.parseFrom(data, extensionRegistry);
193   }
194 
parseFrom(com.google.protobuf.ByteString data)195   public static io.grafeas.v1.FileLocation parseFrom(com.google.protobuf.ByteString data)
196       throws com.google.protobuf.InvalidProtocolBufferException {
197     return PARSER.parseFrom(data);
198   }
199 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)200   public static io.grafeas.v1.FileLocation parseFrom(
201       com.google.protobuf.ByteString data,
202       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
203       throws com.google.protobuf.InvalidProtocolBufferException {
204     return PARSER.parseFrom(data, extensionRegistry);
205   }
206 
parseFrom(byte[] data)207   public static io.grafeas.v1.FileLocation parseFrom(byte[] data)
208       throws com.google.protobuf.InvalidProtocolBufferException {
209     return PARSER.parseFrom(data);
210   }
211 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)212   public static io.grafeas.v1.FileLocation parseFrom(
213       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
214       throws com.google.protobuf.InvalidProtocolBufferException {
215     return PARSER.parseFrom(data, extensionRegistry);
216   }
217 
parseFrom(java.io.InputStream input)218   public static io.grafeas.v1.FileLocation parseFrom(java.io.InputStream input)
219       throws java.io.IOException {
220     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
221   }
222 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)223   public static io.grafeas.v1.FileLocation parseFrom(
224       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
225       throws java.io.IOException {
226     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
227         PARSER, input, extensionRegistry);
228   }
229 
parseDelimitedFrom(java.io.InputStream input)230   public static io.grafeas.v1.FileLocation parseDelimitedFrom(java.io.InputStream input)
231       throws java.io.IOException {
232     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
233   }
234 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)235   public static io.grafeas.v1.FileLocation parseDelimitedFrom(
236       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
237       throws java.io.IOException {
238     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
239         PARSER, input, extensionRegistry);
240   }
241 
parseFrom(com.google.protobuf.CodedInputStream input)242   public static io.grafeas.v1.FileLocation parseFrom(com.google.protobuf.CodedInputStream input)
243       throws java.io.IOException {
244     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
245   }
246 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)247   public static io.grafeas.v1.FileLocation parseFrom(
248       com.google.protobuf.CodedInputStream input,
249       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
250       throws java.io.IOException {
251     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
252         PARSER, input, extensionRegistry);
253   }
254 
255   @java.lang.Override
newBuilderForType()256   public Builder newBuilderForType() {
257     return newBuilder();
258   }
259 
newBuilder()260   public static Builder newBuilder() {
261     return DEFAULT_INSTANCE.toBuilder();
262   }
263 
newBuilder(io.grafeas.v1.FileLocation prototype)264   public static Builder newBuilder(io.grafeas.v1.FileLocation prototype) {
265     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
266   }
267 
268   @java.lang.Override
toBuilder()269   public Builder toBuilder() {
270     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
271   }
272 
273   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)274   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
275     Builder builder = new Builder(parent);
276     return builder;
277   }
278   /**
279    *
280    *
281    * <pre>
282    * Indicates the location at which a package was found.
283    * </pre>
284    *
285    * Protobuf type {@code grafeas.v1.FileLocation}
286    */
287   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
288       implements
289       // @@protoc_insertion_point(builder_implements:grafeas.v1.FileLocation)
290       io.grafeas.v1.FileLocationOrBuilder {
getDescriptor()291     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
292       return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor;
293     }
294 
295     @java.lang.Override
296     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()297         internalGetFieldAccessorTable() {
298       return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_fieldAccessorTable
299           .ensureFieldAccessorsInitialized(
300               io.grafeas.v1.FileLocation.class, io.grafeas.v1.FileLocation.Builder.class);
301     }
302 
303     // Construct using io.grafeas.v1.FileLocation.newBuilder()
Builder()304     private Builder() {}
305 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)306     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
307       super(parent);
308     }
309 
310     @java.lang.Override
clear()311     public Builder clear() {
312       super.clear();
313       bitField0_ = 0;
314       filePath_ = "";
315       return this;
316     }
317 
318     @java.lang.Override
getDescriptorForType()319     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
320       return io.grafeas.v1.Common.internal_static_grafeas_v1_FileLocation_descriptor;
321     }
322 
323     @java.lang.Override
getDefaultInstanceForType()324     public io.grafeas.v1.FileLocation getDefaultInstanceForType() {
325       return io.grafeas.v1.FileLocation.getDefaultInstance();
326     }
327 
328     @java.lang.Override
build()329     public io.grafeas.v1.FileLocation build() {
330       io.grafeas.v1.FileLocation result = buildPartial();
331       if (!result.isInitialized()) {
332         throw newUninitializedMessageException(result);
333       }
334       return result;
335     }
336 
337     @java.lang.Override
buildPartial()338     public io.grafeas.v1.FileLocation buildPartial() {
339       io.grafeas.v1.FileLocation result = new io.grafeas.v1.FileLocation(this);
340       if (bitField0_ != 0) {
341         buildPartial0(result);
342       }
343       onBuilt();
344       return result;
345     }
346 
buildPartial0(io.grafeas.v1.FileLocation result)347     private void buildPartial0(io.grafeas.v1.FileLocation result) {
348       int from_bitField0_ = bitField0_;
349       if (((from_bitField0_ & 0x00000001) != 0)) {
350         result.filePath_ = filePath_;
351       }
352     }
353 
354     @java.lang.Override
clone()355     public Builder clone() {
356       return super.clone();
357     }
358 
359     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)360     public Builder setField(
361         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
362       return super.setField(field, value);
363     }
364 
365     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)366     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
367       return super.clearField(field);
368     }
369 
370     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)371     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
372       return super.clearOneof(oneof);
373     }
374 
375     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)376     public Builder setRepeatedField(
377         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
378       return super.setRepeatedField(field, index, value);
379     }
380 
381     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)382     public Builder addRepeatedField(
383         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
384       return super.addRepeatedField(field, value);
385     }
386 
387     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)388     public Builder mergeFrom(com.google.protobuf.Message other) {
389       if (other instanceof io.grafeas.v1.FileLocation) {
390         return mergeFrom((io.grafeas.v1.FileLocation) other);
391       } else {
392         super.mergeFrom(other);
393         return this;
394       }
395     }
396 
mergeFrom(io.grafeas.v1.FileLocation other)397     public Builder mergeFrom(io.grafeas.v1.FileLocation other) {
398       if (other == io.grafeas.v1.FileLocation.getDefaultInstance()) return this;
399       if (!other.getFilePath().isEmpty()) {
400         filePath_ = other.filePath_;
401         bitField0_ |= 0x00000001;
402         onChanged();
403       }
404       this.mergeUnknownFields(other.getUnknownFields());
405       onChanged();
406       return this;
407     }
408 
409     @java.lang.Override
isInitialized()410     public final boolean isInitialized() {
411       return true;
412     }
413 
414     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)415     public Builder mergeFrom(
416         com.google.protobuf.CodedInputStream input,
417         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
418         throws java.io.IOException {
419       if (extensionRegistry == null) {
420         throw new java.lang.NullPointerException();
421       }
422       try {
423         boolean done = false;
424         while (!done) {
425           int tag = input.readTag();
426           switch (tag) {
427             case 0:
428               done = true;
429               break;
430             case 10:
431               {
432                 filePath_ = input.readStringRequireUtf8();
433                 bitField0_ |= 0x00000001;
434                 break;
435               } // case 10
436             default:
437               {
438                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
439                   done = true; // was an endgroup tag
440                 }
441                 break;
442               } // default:
443           } // switch (tag)
444         } // while (!done)
445       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
446         throw e.unwrapIOException();
447       } finally {
448         onChanged();
449       } // finally
450       return this;
451     }
452 
453     private int bitField0_;
454 
455     private java.lang.Object filePath_ = "";
456     /**
457      *
458      *
459      * <pre>
460      * For jars that are contained inside .war files, this filepath
461      * can indicate the path to war file combined with the path to jar file.
462      * </pre>
463      *
464      * <code>string file_path = 1;</code>
465      *
466      * @return The filePath.
467      */
getFilePath()468     public java.lang.String getFilePath() {
469       java.lang.Object ref = filePath_;
470       if (!(ref instanceof java.lang.String)) {
471         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
472         java.lang.String s = bs.toStringUtf8();
473         filePath_ = s;
474         return s;
475       } else {
476         return (java.lang.String) ref;
477       }
478     }
479     /**
480      *
481      *
482      * <pre>
483      * For jars that are contained inside .war files, this filepath
484      * can indicate the path to war file combined with the path to jar file.
485      * </pre>
486      *
487      * <code>string file_path = 1;</code>
488      *
489      * @return The bytes for filePath.
490      */
getFilePathBytes()491     public com.google.protobuf.ByteString getFilePathBytes() {
492       java.lang.Object ref = filePath_;
493       if (ref instanceof String) {
494         com.google.protobuf.ByteString b =
495             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
496         filePath_ = b;
497         return b;
498       } else {
499         return (com.google.protobuf.ByteString) ref;
500       }
501     }
502     /**
503      *
504      *
505      * <pre>
506      * For jars that are contained inside .war files, this filepath
507      * can indicate the path to war file combined with the path to jar file.
508      * </pre>
509      *
510      * <code>string file_path = 1;</code>
511      *
512      * @param value The filePath to set.
513      * @return This builder for chaining.
514      */
setFilePath(java.lang.String value)515     public Builder setFilePath(java.lang.String value) {
516       if (value == null) {
517         throw new NullPointerException();
518       }
519       filePath_ = value;
520       bitField0_ |= 0x00000001;
521       onChanged();
522       return this;
523     }
524     /**
525      *
526      *
527      * <pre>
528      * For jars that are contained inside .war files, this filepath
529      * can indicate the path to war file combined with the path to jar file.
530      * </pre>
531      *
532      * <code>string file_path = 1;</code>
533      *
534      * @return This builder for chaining.
535      */
clearFilePath()536     public Builder clearFilePath() {
537       filePath_ = getDefaultInstance().getFilePath();
538       bitField0_ = (bitField0_ & ~0x00000001);
539       onChanged();
540       return this;
541     }
542     /**
543      *
544      *
545      * <pre>
546      * For jars that are contained inside .war files, this filepath
547      * can indicate the path to war file combined with the path to jar file.
548      * </pre>
549      *
550      * <code>string file_path = 1;</code>
551      *
552      * @param value The bytes for filePath to set.
553      * @return This builder for chaining.
554      */
setFilePathBytes(com.google.protobuf.ByteString value)555     public Builder setFilePathBytes(com.google.protobuf.ByteString value) {
556       if (value == null) {
557         throw new NullPointerException();
558       }
559       checkByteStringIsUtf8(value);
560       filePath_ = value;
561       bitField0_ |= 0x00000001;
562       onChanged();
563       return this;
564     }
565 
566     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)567     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
568       return super.setUnknownFields(unknownFields);
569     }
570 
571     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)572     public final Builder mergeUnknownFields(
573         final com.google.protobuf.UnknownFieldSet unknownFields) {
574       return super.mergeUnknownFields(unknownFields);
575     }
576 
577     // @@protoc_insertion_point(builder_scope:grafeas.v1.FileLocation)
578   }
579 
580   // @@protoc_insertion_point(class_scope:grafeas.v1.FileLocation)
581   private static final io.grafeas.v1.FileLocation DEFAULT_INSTANCE;
582 
583   static {
584     DEFAULT_INSTANCE = new io.grafeas.v1.FileLocation();
585   }
586 
getDefaultInstance()587   public static io.grafeas.v1.FileLocation getDefaultInstance() {
588     return DEFAULT_INSTANCE;
589   }
590 
591   private static final com.google.protobuf.Parser<FileLocation> PARSER =
592       new com.google.protobuf.AbstractParser<FileLocation>() {
593         @java.lang.Override
594         public FileLocation parsePartialFrom(
595             com.google.protobuf.CodedInputStream input,
596             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
597             throws com.google.protobuf.InvalidProtocolBufferException {
598           Builder builder = newBuilder();
599           try {
600             builder.mergeFrom(input, extensionRegistry);
601           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
602             throw e.setUnfinishedMessage(builder.buildPartial());
603           } catch (com.google.protobuf.UninitializedMessageException e) {
604             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
605           } catch (java.io.IOException e) {
606             throw new com.google.protobuf.InvalidProtocolBufferException(e)
607                 .setUnfinishedMessage(builder.buildPartial());
608           }
609           return builder.buildPartial();
610         }
611       };
612 
parser()613   public static com.google.protobuf.Parser<FileLocation> parser() {
614     return PARSER;
615   }
616 
617   @java.lang.Override
getParserForType()618   public com.google.protobuf.Parser<FileLocation> getParserForType() {
619     return PARSER;
620   }
621 
622   @java.lang.Override
getDefaultInstanceForType()623   public io.grafeas.v1.FileLocation getDefaultInstanceForType() {
624     return DEFAULT_INSTANCE;
625   }
626 }
627