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