• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
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 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/vision/v1/web_detection.proto
18 
19 package com.google.cloud.vision.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Relevant information for the image from the Internet.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.vision.v1.WebDetection}
29  */
30 public final class WebDetection extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection)
33     WebDetectionOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use WebDetection.newBuilder() to construct.
WebDetection(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
WebDetection()40   private WebDetection() {
41     webEntities_ = java.util.Collections.emptyList();
42     fullMatchingImages_ = java.util.Collections.emptyList();
43     partialMatchingImages_ = java.util.Collections.emptyList();
44     pagesWithMatchingImages_ = java.util.Collections.emptyList();
45     visuallySimilarImages_ = java.util.Collections.emptyList();
46     bestGuessLabels_ = java.util.Collections.emptyList();
47   }
48 
49   @java.lang.Override
50   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)51   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
52     return new WebDetection();
53   }
54 
55   @java.lang.Override
getUnknownFields()56   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
57     return this.unknownFields;
58   }
59 
getDescriptor()60   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
61     return com.google.cloud.vision.v1.WebDetectionProto
62         .internal_static_google_cloud_vision_v1_WebDetection_descriptor;
63   }
64 
65   @java.lang.Override
66   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()67       internalGetFieldAccessorTable() {
68     return com.google.cloud.vision.v1.WebDetectionProto
69         .internal_static_google_cloud_vision_v1_WebDetection_fieldAccessorTable
70         .ensureFieldAccessorsInitialized(
71             com.google.cloud.vision.v1.WebDetection.class,
72             com.google.cloud.vision.v1.WebDetection.Builder.class);
73   }
74 
75   public interface WebEntityOrBuilder
76       extends
77       // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebEntity)
78       com.google.protobuf.MessageOrBuilder {
79 
80     /**
81      *
82      *
83      * <pre>
84      * Opaque entity ID.
85      * </pre>
86      *
87      * <code>string entity_id = 1;</code>
88      *
89      * @return The entityId.
90      */
getEntityId()91     java.lang.String getEntityId();
92     /**
93      *
94      *
95      * <pre>
96      * Opaque entity ID.
97      * </pre>
98      *
99      * <code>string entity_id = 1;</code>
100      *
101      * @return The bytes for entityId.
102      */
getEntityIdBytes()103     com.google.protobuf.ByteString getEntityIdBytes();
104 
105     /**
106      *
107      *
108      * <pre>
109      * Overall relevancy score for the entity.
110      * Not normalized and not comparable across different image queries.
111      * </pre>
112      *
113      * <code>float score = 2;</code>
114      *
115      * @return The score.
116      */
getScore()117     float getScore();
118 
119     /**
120      *
121      *
122      * <pre>
123      * Canonical description of the entity, in English.
124      * </pre>
125      *
126      * <code>string description = 3;</code>
127      *
128      * @return The description.
129      */
getDescription()130     java.lang.String getDescription();
131     /**
132      *
133      *
134      * <pre>
135      * Canonical description of the entity, in English.
136      * </pre>
137      *
138      * <code>string description = 3;</code>
139      *
140      * @return The bytes for description.
141      */
getDescriptionBytes()142     com.google.protobuf.ByteString getDescriptionBytes();
143   }
144   /**
145    *
146    *
147    * <pre>
148    * Entity deduced from similar images on the Internet.
149    * </pre>
150    *
151    * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebEntity}
152    */
153   public static final class WebEntity extends com.google.protobuf.GeneratedMessageV3
154       implements
155       // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebEntity)
156       WebEntityOrBuilder {
157     private static final long serialVersionUID = 0L;
158     // Use WebEntity.newBuilder() to construct.
WebEntity(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)159     private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
160       super(builder);
161     }
162 
WebEntity()163     private WebEntity() {
164       entityId_ = "";
165       description_ = "";
166     }
167 
168     @java.lang.Override
169     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)170     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
171       return new WebEntity();
172     }
173 
174     @java.lang.Override
getUnknownFields()175     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
176       return this.unknownFields;
177     }
178 
getDescriptor()179     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
180       return com.google.cloud.vision.v1.WebDetectionProto
181           .internal_static_google_cloud_vision_v1_WebDetection_WebEntity_descriptor;
182     }
183 
184     @java.lang.Override
185     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()186         internalGetFieldAccessorTable() {
187       return com.google.cloud.vision.v1.WebDetectionProto
188           .internal_static_google_cloud_vision_v1_WebDetection_WebEntity_fieldAccessorTable
189           .ensureFieldAccessorsInitialized(
190               com.google.cloud.vision.v1.WebDetection.WebEntity.class,
191               com.google.cloud.vision.v1.WebDetection.WebEntity.Builder.class);
192     }
193 
194     public static final int ENTITY_ID_FIELD_NUMBER = 1;
195 
196     @SuppressWarnings("serial")
197     private volatile java.lang.Object entityId_ = "";
198     /**
199      *
200      *
201      * <pre>
202      * Opaque entity ID.
203      * </pre>
204      *
205      * <code>string entity_id = 1;</code>
206      *
207      * @return The entityId.
208      */
209     @java.lang.Override
getEntityId()210     public java.lang.String getEntityId() {
211       java.lang.Object ref = entityId_;
212       if (ref instanceof java.lang.String) {
213         return (java.lang.String) ref;
214       } else {
215         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
216         java.lang.String s = bs.toStringUtf8();
217         entityId_ = s;
218         return s;
219       }
220     }
221     /**
222      *
223      *
224      * <pre>
225      * Opaque entity ID.
226      * </pre>
227      *
228      * <code>string entity_id = 1;</code>
229      *
230      * @return The bytes for entityId.
231      */
232     @java.lang.Override
getEntityIdBytes()233     public com.google.protobuf.ByteString getEntityIdBytes() {
234       java.lang.Object ref = entityId_;
235       if (ref instanceof java.lang.String) {
236         com.google.protobuf.ByteString b =
237             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
238         entityId_ = b;
239         return b;
240       } else {
241         return (com.google.protobuf.ByteString) ref;
242       }
243     }
244 
245     public static final int SCORE_FIELD_NUMBER = 2;
246     private float score_ = 0F;
247     /**
248      *
249      *
250      * <pre>
251      * Overall relevancy score for the entity.
252      * Not normalized and not comparable across different image queries.
253      * </pre>
254      *
255      * <code>float score = 2;</code>
256      *
257      * @return The score.
258      */
259     @java.lang.Override
getScore()260     public float getScore() {
261       return score_;
262     }
263 
264     public static final int DESCRIPTION_FIELD_NUMBER = 3;
265 
266     @SuppressWarnings("serial")
267     private volatile java.lang.Object description_ = "";
268     /**
269      *
270      *
271      * <pre>
272      * Canonical description of the entity, in English.
273      * </pre>
274      *
275      * <code>string description = 3;</code>
276      *
277      * @return The description.
278      */
279     @java.lang.Override
getDescription()280     public java.lang.String getDescription() {
281       java.lang.Object ref = description_;
282       if (ref instanceof java.lang.String) {
283         return (java.lang.String) ref;
284       } else {
285         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
286         java.lang.String s = bs.toStringUtf8();
287         description_ = s;
288         return s;
289       }
290     }
291     /**
292      *
293      *
294      * <pre>
295      * Canonical description of the entity, in English.
296      * </pre>
297      *
298      * <code>string description = 3;</code>
299      *
300      * @return The bytes for description.
301      */
302     @java.lang.Override
getDescriptionBytes()303     public com.google.protobuf.ByteString getDescriptionBytes() {
304       java.lang.Object ref = description_;
305       if (ref instanceof java.lang.String) {
306         com.google.protobuf.ByteString b =
307             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
308         description_ = b;
309         return b;
310       } else {
311         return (com.google.protobuf.ByteString) ref;
312       }
313     }
314 
315     private byte memoizedIsInitialized = -1;
316 
317     @java.lang.Override
isInitialized()318     public final boolean isInitialized() {
319       byte isInitialized = memoizedIsInitialized;
320       if (isInitialized == 1) return true;
321       if (isInitialized == 0) return false;
322 
323       memoizedIsInitialized = 1;
324       return true;
325     }
326 
327     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)328     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
329       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) {
330         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_);
331       }
332       if (java.lang.Float.floatToRawIntBits(score_) != 0) {
333         output.writeFloat(2, score_);
334       }
335       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
336         com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
337       }
338       getUnknownFields().writeTo(output);
339     }
340 
341     @java.lang.Override
getSerializedSize()342     public int getSerializedSize() {
343       int size = memoizedSize;
344       if (size != -1) return size;
345 
346       size = 0;
347       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) {
348         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_);
349       }
350       if (java.lang.Float.floatToRawIntBits(score_) != 0) {
351         size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, score_);
352       }
353       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
354         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
355       }
356       size += getUnknownFields().getSerializedSize();
357       memoizedSize = size;
358       return size;
359     }
360 
361     @java.lang.Override
equals(final java.lang.Object obj)362     public boolean equals(final java.lang.Object obj) {
363       if (obj == this) {
364         return true;
365       }
366       if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebEntity)) {
367         return super.equals(obj);
368       }
369       com.google.cloud.vision.v1.WebDetection.WebEntity other =
370           (com.google.cloud.vision.v1.WebDetection.WebEntity) obj;
371 
372       if (!getEntityId().equals(other.getEntityId())) return false;
373       if (java.lang.Float.floatToIntBits(getScore())
374           != java.lang.Float.floatToIntBits(other.getScore())) return false;
375       if (!getDescription().equals(other.getDescription())) return false;
376       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
377       return true;
378     }
379 
380     @java.lang.Override
hashCode()381     public int hashCode() {
382       if (memoizedHashCode != 0) {
383         return memoizedHashCode;
384       }
385       int hash = 41;
386       hash = (19 * hash) + getDescriptor().hashCode();
387       hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER;
388       hash = (53 * hash) + getEntityId().hashCode();
389       hash = (37 * hash) + SCORE_FIELD_NUMBER;
390       hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore());
391       hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
392       hash = (53 * hash) + getDescription().hashCode();
393       hash = (29 * hash) + getUnknownFields().hashCode();
394       memoizedHashCode = hash;
395       return hash;
396     }
397 
parseFrom( java.nio.ByteBuffer data)398     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(
399         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
400       return PARSER.parseFrom(data);
401     }
402 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)403     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(
404         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
405         throws com.google.protobuf.InvalidProtocolBufferException {
406       return PARSER.parseFrom(data, extensionRegistry);
407     }
408 
parseFrom( com.google.protobuf.ByteString data)409     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(
410         com.google.protobuf.ByteString data)
411         throws com.google.protobuf.InvalidProtocolBufferException {
412       return PARSER.parseFrom(data);
413     }
414 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)415     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(
416         com.google.protobuf.ByteString data,
417         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
418         throws com.google.protobuf.InvalidProtocolBufferException {
419       return PARSER.parseFrom(data, extensionRegistry);
420     }
421 
parseFrom(byte[] data)422     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(byte[] data)
423         throws com.google.protobuf.InvalidProtocolBufferException {
424       return PARSER.parseFrom(data);
425     }
426 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)427     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(
428         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
429         throws com.google.protobuf.InvalidProtocolBufferException {
430       return PARSER.parseFrom(data, extensionRegistry);
431     }
432 
parseFrom( java.io.InputStream input)433     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(
434         java.io.InputStream input) throws java.io.IOException {
435       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
436     }
437 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)438     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(
439         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
440         throws java.io.IOException {
441       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
442           PARSER, input, extensionRegistry);
443     }
444 
parseDelimitedFrom( java.io.InputStream input)445     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseDelimitedFrom(
446         java.io.InputStream input) throws java.io.IOException {
447       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
448     }
449 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)450     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseDelimitedFrom(
451         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
452         throws java.io.IOException {
453       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
454           PARSER, input, extensionRegistry);
455     }
456 
parseFrom( com.google.protobuf.CodedInputStream input)457     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(
458         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
459       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
460     }
461 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)462     public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(
463         com.google.protobuf.CodedInputStream input,
464         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
465         throws java.io.IOException {
466       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
467           PARSER, input, extensionRegistry);
468     }
469 
470     @java.lang.Override
newBuilderForType()471     public Builder newBuilderForType() {
472       return newBuilder();
473     }
474 
newBuilder()475     public static Builder newBuilder() {
476       return DEFAULT_INSTANCE.toBuilder();
477     }
478 
newBuilder(com.google.cloud.vision.v1.WebDetection.WebEntity prototype)479     public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebEntity prototype) {
480       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
481     }
482 
483     @java.lang.Override
toBuilder()484     public Builder toBuilder() {
485       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
486     }
487 
488     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)489     protected Builder newBuilderForType(
490         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
491       Builder builder = new Builder(parent);
492       return builder;
493     }
494     /**
495      *
496      *
497      * <pre>
498      * Entity deduced from similar images on the Internet.
499      * </pre>
500      *
501      * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebEntity}
502      */
503     public static final class Builder
504         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
505         implements
506         // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebEntity)
507         com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder {
getDescriptor()508       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
509         return com.google.cloud.vision.v1.WebDetectionProto
510             .internal_static_google_cloud_vision_v1_WebDetection_WebEntity_descriptor;
511       }
512 
513       @java.lang.Override
514       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()515           internalGetFieldAccessorTable() {
516         return com.google.cloud.vision.v1.WebDetectionProto
517             .internal_static_google_cloud_vision_v1_WebDetection_WebEntity_fieldAccessorTable
518             .ensureFieldAccessorsInitialized(
519                 com.google.cloud.vision.v1.WebDetection.WebEntity.class,
520                 com.google.cloud.vision.v1.WebDetection.WebEntity.Builder.class);
521       }
522 
523       // Construct using com.google.cloud.vision.v1.WebDetection.WebEntity.newBuilder()
Builder()524       private Builder() {}
525 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)526       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
527         super(parent);
528       }
529 
530       @java.lang.Override
clear()531       public Builder clear() {
532         super.clear();
533         bitField0_ = 0;
534         entityId_ = "";
535         score_ = 0F;
536         description_ = "";
537         return this;
538       }
539 
540       @java.lang.Override
getDescriptorForType()541       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
542         return com.google.cloud.vision.v1.WebDetectionProto
543             .internal_static_google_cloud_vision_v1_WebDetection_WebEntity_descriptor;
544       }
545 
546       @java.lang.Override
getDefaultInstanceForType()547       public com.google.cloud.vision.v1.WebDetection.WebEntity getDefaultInstanceForType() {
548         return com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance();
549       }
550 
551       @java.lang.Override
build()552       public com.google.cloud.vision.v1.WebDetection.WebEntity build() {
553         com.google.cloud.vision.v1.WebDetection.WebEntity result = buildPartial();
554         if (!result.isInitialized()) {
555           throw newUninitializedMessageException(result);
556         }
557         return result;
558       }
559 
560       @java.lang.Override
buildPartial()561       public com.google.cloud.vision.v1.WebDetection.WebEntity buildPartial() {
562         com.google.cloud.vision.v1.WebDetection.WebEntity result =
563             new com.google.cloud.vision.v1.WebDetection.WebEntity(this);
564         if (bitField0_ != 0) {
565           buildPartial0(result);
566         }
567         onBuilt();
568         return result;
569       }
570 
buildPartial0(com.google.cloud.vision.v1.WebDetection.WebEntity result)571       private void buildPartial0(com.google.cloud.vision.v1.WebDetection.WebEntity result) {
572         int from_bitField0_ = bitField0_;
573         if (((from_bitField0_ & 0x00000001) != 0)) {
574           result.entityId_ = entityId_;
575         }
576         if (((from_bitField0_ & 0x00000002) != 0)) {
577           result.score_ = score_;
578         }
579         if (((from_bitField0_ & 0x00000004) != 0)) {
580           result.description_ = description_;
581         }
582       }
583 
584       @java.lang.Override
clone()585       public Builder clone() {
586         return super.clone();
587       }
588 
589       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)590       public Builder setField(
591           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
592         return super.setField(field, value);
593       }
594 
595       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)596       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
597         return super.clearField(field);
598       }
599 
600       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)601       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
602         return super.clearOneof(oneof);
603       }
604 
605       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)606       public Builder setRepeatedField(
607           com.google.protobuf.Descriptors.FieldDescriptor field,
608           int index,
609           java.lang.Object value) {
610         return super.setRepeatedField(field, index, value);
611       }
612 
613       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)614       public Builder addRepeatedField(
615           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
616         return super.addRepeatedField(field, value);
617       }
618 
619       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)620       public Builder mergeFrom(com.google.protobuf.Message other) {
621         if (other instanceof com.google.cloud.vision.v1.WebDetection.WebEntity) {
622           return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebEntity) other);
623         } else {
624           super.mergeFrom(other);
625           return this;
626         }
627       }
628 
mergeFrom(com.google.cloud.vision.v1.WebDetection.WebEntity other)629       public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebEntity other) {
630         if (other == com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance())
631           return this;
632         if (!other.getEntityId().isEmpty()) {
633           entityId_ = other.entityId_;
634           bitField0_ |= 0x00000001;
635           onChanged();
636         }
637         if (other.getScore() != 0F) {
638           setScore(other.getScore());
639         }
640         if (!other.getDescription().isEmpty()) {
641           description_ = other.description_;
642           bitField0_ |= 0x00000004;
643           onChanged();
644         }
645         this.mergeUnknownFields(other.getUnknownFields());
646         onChanged();
647         return this;
648       }
649 
650       @java.lang.Override
isInitialized()651       public final boolean isInitialized() {
652         return true;
653       }
654 
655       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)656       public Builder mergeFrom(
657           com.google.protobuf.CodedInputStream input,
658           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
659           throws java.io.IOException {
660         if (extensionRegistry == null) {
661           throw new java.lang.NullPointerException();
662         }
663         try {
664           boolean done = false;
665           while (!done) {
666             int tag = input.readTag();
667             switch (tag) {
668               case 0:
669                 done = true;
670                 break;
671               case 10:
672                 {
673                   entityId_ = input.readStringRequireUtf8();
674                   bitField0_ |= 0x00000001;
675                   break;
676                 } // case 10
677               case 21:
678                 {
679                   score_ = input.readFloat();
680                   bitField0_ |= 0x00000002;
681                   break;
682                 } // case 21
683               case 26:
684                 {
685                   description_ = input.readStringRequireUtf8();
686                   bitField0_ |= 0x00000004;
687                   break;
688                 } // case 26
689               default:
690                 {
691                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
692                     done = true; // was an endgroup tag
693                   }
694                   break;
695                 } // default:
696             } // switch (tag)
697           } // while (!done)
698         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
699           throw e.unwrapIOException();
700         } finally {
701           onChanged();
702         } // finally
703         return this;
704       }
705 
706       private int bitField0_;
707 
708       private java.lang.Object entityId_ = "";
709       /**
710        *
711        *
712        * <pre>
713        * Opaque entity ID.
714        * </pre>
715        *
716        * <code>string entity_id = 1;</code>
717        *
718        * @return The entityId.
719        */
getEntityId()720       public java.lang.String getEntityId() {
721         java.lang.Object ref = entityId_;
722         if (!(ref instanceof java.lang.String)) {
723           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
724           java.lang.String s = bs.toStringUtf8();
725           entityId_ = s;
726           return s;
727         } else {
728           return (java.lang.String) ref;
729         }
730       }
731       /**
732        *
733        *
734        * <pre>
735        * Opaque entity ID.
736        * </pre>
737        *
738        * <code>string entity_id = 1;</code>
739        *
740        * @return The bytes for entityId.
741        */
getEntityIdBytes()742       public com.google.protobuf.ByteString getEntityIdBytes() {
743         java.lang.Object ref = entityId_;
744         if (ref instanceof String) {
745           com.google.protobuf.ByteString b =
746               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
747           entityId_ = b;
748           return b;
749         } else {
750           return (com.google.protobuf.ByteString) ref;
751         }
752       }
753       /**
754        *
755        *
756        * <pre>
757        * Opaque entity ID.
758        * </pre>
759        *
760        * <code>string entity_id = 1;</code>
761        *
762        * @param value The entityId to set.
763        * @return This builder for chaining.
764        */
setEntityId(java.lang.String value)765       public Builder setEntityId(java.lang.String value) {
766         if (value == null) {
767           throw new NullPointerException();
768         }
769         entityId_ = value;
770         bitField0_ |= 0x00000001;
771         onChanged();
772         return this;
773       }
774       /**
775        *
776        *
777        * <pre>
778        * Opaque entity ID.
779        * </pre>
780        *
781        * <code>string entity_id = 1;</code>
782        *
783        * @return This builder for chaining.
784        */
clearEntityId()785       public Builder clearEntityId() {
786         entityId_ = getDefaultInstance().getEntityId();
787         bitField0_ = (bitField0_ & ~0x00000001);
788         onChanged();
789         return this;
790       }
791       /**
792        *
793        *
794        * <pre>
795        * Opaque entity ID.
796        * </pre>
797        *
798        * <code>string entity_id = 1;</code>
799        *
800        * @param value The bytes for entityId to set.
801        * @return This builder for chaining.
802        */
setEntityIdBytes(com.google.protobuf.ByteString value)803       public Builder setEntityIdBytes(com.google.protobuf.ByteString value) {
804         if (value == null) {
805           throw new NullPointerException();
806         }
807         checkByteStringIsUtf8(value);
808         entityId_ = value;
809         bitField0_ |= 0x00000001;
810         onChanged();
811         return this;
812       }
813 
814       private float score_;
815       /**
816        *
817        *
818        * <pre>
819        * Overall relevancy score for the entity.
820        * Not normalized and not comparable across different image queries.
821        * </pre>
822        *
823        * <code>float score = 2;</code>
824        *
825        * @return The score.
826        */
827       @java.lang.Override
getScore()828       public float getScore() {
829         return score_;
830       }
831       /**
832        *
833        *
834        * <pre>
835        * Overall relevancy score for the entity.
836        * Not normalized and not comparable across different image queries.
837        * </pre>
838        *
839        * <code>float score = 2;</code>
840        *
841        * @param value The score to set.
842        * @return This builder for chaining.
843        */
setScore(float value)844       public Builder setScore(float value) {
845 
846         score_ = value;
847         bitField0_ |= 0x00000002;
848         onChanged();
849         return this;
850       }
851       /**
852        *
853        *
854        * <pre>
855        * Overall relevancy score for the entity.
856        * Not normalized and not comparable across different image queries.
857        * </pre>
858        *
859        * <code>float score = 2;</code>
860        *
861        * @return This builder for chaining.
862        */
clearScore()863       public Builder clearScore() {
864         bitField0_ = (bitField0_ & ~0x00000002);
865         score_ = 0F;
866         onChanged();
867         return this;
868       }
869 
870       private java.lang.Object description_ = "";
871       /**
872        *
873        *
874        * <pre>
875        * Canonical description of the entity, in English.
876        * </pre>
877        *
878        * <code>string description = 3;</code>
879        *
880        * @return The description.
881        */
getDescription()882       public java.lang.String getDescription() {
883         java.lang.Object ref = description_;
884         if (!(ref instanceof java.lang.String)) {
885           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
886           java.lang.String s = bs.toStringUtf8();
887           description_ = s;
888           return s;
889         } else {
890           return (java.lang.String) ref;
891         }
892       }
893       /**
894        *
895        *
896        * <pre>
897        * Canonical description of the entity, in English.
898        * </pre>
899        *
900        * <code>string description = 3;</code>
901        *
902        * @return The bytes for description.
903        */
getDescriptionBytes()904       public com.google.protobuf.ByteString getDescriptionBytes() {
905         java.lang.Object ref = description_;
906         if (ref instanceof String) {
907           com.google.protobuf.ByteString b =
908               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
909           description_ = b;
910           return b;
911         } else {
912           return (com.google.protobuf.ByteString) ref;
913         }
914       }
915       /**
916        *
917        *
918        * <pre>
919        * Canonical description of the entity, in English.
920        * </pre>
921        *
922        * <code>string description = 3;</code>
923        *
924        * @param value The description to set.
925        * @return This builder for chaining.
926        */
setDescription(java.lang.String value)927       public Builder setDescription(java.lang.String value) {
928         if (value == null) {
929           throw new NullPointerException();
930         }
931         description_ = value;
932         bitField0_ |= 0x00000004;
933         onChanged();
934         return this;
935       }
936       /**
937        *
938        *
939        * <pre>
940        * Canonical description of the entity, in English.
941        * </pre>
942        *
943        * <code>string description = 3;</code>
944        *
945        * @return This builder for chaining.
946        */
clearDescription()947       public Builder clearDescription() {
948         description_ = getDefaultInstance().getDescription();
949         bitField0_ = (bitField0_ & ~0x00000004);
950         onChanged();
951         return this;
952       }
953       /**
954        *
955        *
956        * <pre>
957        * Canonical description of the entity, in English.
958        * </pre>
959        *
960        * <code>string description = 3;</code>
961        *
962        * @param value The bytes for description to set.
963        * @return This builder for chaining.
964        */
setDescriptionBytes(com.google.protobuf.ByteString value)965       public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
966         if (value == null) {
967           throw new NullPointerException();
968         }
969         checkByteStringIsUtf8(value);
970         description_ = value;
971         bitField0_ |= 0x00000004;
972         onChanged();
973         return this;
974       }
975 
976       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)977       public final Builder setUnknownFields(
978           final com.google.protobuf.UnknownFieldSet unknownFields) {
979         return super.setUnknownFields(unknownFields);
980       }
981 
982       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)983       public final Builder mergeUnknownFields(
984           final com.google.protobuf.UnknownFieldSet unknownFields) {
985         return super.mergeUnknownFields(unknownFields);
986       }
987 
988       // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebEntity)
989     }
990 
991     // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebEntity)
992     private static final com.google.cloud.vision.v1.WebDetection.WebEntity DEFAULT_INSTANCE;
993 
994     static {
995       DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebEntity();
996     }
997 
getDefaultInstance()998     public static com.google.cloud.vision.v1.WebDetection.WebEntity getDefaultInstance() {
999       return DEFAULT_INSTANCE;
1000     }
1001 
1002     private static final com.google.protobuf.Parser<WebEntity> PARSER =
1003         new com.google.protobuf.AbstractParser<WebEntity>() {
1004           @java.lang.Override
1005           public WebEntity parsePartialFrom(
1006               com.google.protobuf.CodedInputStream input,
1007               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1008               throws com.google.protobuf.InvalidProtocolBufferException {
1009             Builder builder = newBuilder();
1010             try {
1011               builder.mergeFrom(input, extensionRegistry);
1012             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1013               throw e.setUnfinishedMessage(builder.buildPartial());
1014             } catch (com.google.protobuf.UninitializedMessageException e) {
1015               throw e.asInvalidProtocolBufferException()
1016                   .setUnfinishedMessage(builder.buildPartial());
1017             } catch (java.io.IOException e) {
1018               throw new com.google.protobuf.InvalidProtocolBufferException(e)
1019                   .setUnfinishedMessage(builder.buildPartial());
1020             }
1021             return builder.buildPartial();
1022           }
1023         };
1024 
parser()1025     public static com.google.protobuf.Parser<WebEntity> parser() {
1026       return PARSER;
1027     }
1028 
1029     @java.lang.Override
getParserForType()1030     public com.google.protobuf.Parser<WebEntity> getParserForType() {
1031       return PARSER;
1032     }
1033 
1034     @java.lang.Override
getDefaultInstanceForType()1035     public com.google.cloud.vision.v1.WebDetection.WebEntity getDefaultInstanceForType() {
1036       return DEFAULT_INSTANCE;
1037     }
1038   }
1039 
1040   public interface WebImageOrBuilder
1041       extends
1042       // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebImage)
1043       com.google.protobuf.MessageOrBuilder {
1044 
1045     /**
1046      *
1047      *
1048      * <pre>
1049      * The result image URL.
1050      * </pre>
1051      *
1052      * <code>string url = 1;</code>
1053      *
1054      * @return The url.
1055      */
getUrl()1056     java.lang.String getUrl();
1057     /**
1058      *
1059      *
1060      * <pre>
1061      * The result image URL.
1062      * </pre>
1063      *
1064      * <code>string url = 1;</code>
1065      *
1066      * @return The bytes for url.
1067      */
getUrlBytes()1068     com.google.protobuf.ByteString getUrlBytes();
1069 
1070     /**
1071      *
1072      *
1073      * <pre>
1074      * (Deprecated) Overall relevancy score for the image.
1075      * </pre>
1076      *
1077      * <code>float score = 2;</code>
1078      *
1079      * @return The score.
1080      */
getScore()1081     float getScore();
1082   }
1083   /**
1084    *
1085    *
1086    * <pre>
1087    * Metadata for online images.
1088    * </pre>
1089    *
1090    * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebImage}
1091    */
1092   public static final class WebImage extends com.google.protobuf.GeneratedMessageV3
1093       implements
1094       // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebImage)
1095       WebImageOrBuilder {
1096     private static final long serialVersionUID = 0L;
1097     // Use WebImage.newBuilder() to construct.
WebImage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)1098     private WebImage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
1099       super(builder);
1100     }
1101 
WebImage()1102     private WebImage() {
1103       url_ = "";
1104     }
1105 
1106     @java.lang.Override
1107     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)1108     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
1109       return new WebImage();
1110     }
1111 
1112     @java.lang.Override
getUnknownFields()1113     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
1114       return this.unknownFields;
1115     }
1116 
getDescriptor()1117     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1118       return com.google.cloud.vision.v1.WebDetectionProto
1119           .internal_static_google_cloud_vision_v1_WebDetection_WebImage_descriptor;
1120     }
1121 
1122     @java.lang.Override
1123     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1124         internalGetFieldAccessorTable() {
1125       return com.google.cloud.vision.v1.WebDetectionProto
1126           .internal_static_google_cloud_vision_v1_WebDetection_WebImage_fieldAccessorTable
1127           .ensureFieldAccessorsInitialized(
1128               com.google.cloud.vision.v1.WebDetection.WebImage.class,
1129               com.google.cloud.vision.v1.WebDetection.WebImage.Builder.class);
1130     }
1131 
1132     public static final int URL_FIELD_NUMBER = 1;
1133 
1134     @SuppressWarnings("serial")
1135     private volatile java.lang.Object url_ = "";
1136     /**
1137      *
1138      *
1139      * <pre>
1140      * The result image URL.
1141      * </pre>
1142      *
1143      * <code>string url = 1;</code>
1144      *
1145      * @return The url.
1146      */
1147     @java.lang.Override
getUrl()1148     public java.lang.String getUrl() {
1149       java.lang.Object ref = url_;
1150       if (ref instanceof java.lang.String) {
1151         return (java.lang.String) ref;
1152       } else {
1153         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1154         java.lang.String s = bs.toStringUtf8();
1155         url_ = s;
1156         return s;
1157       }
1158     }
1159     /**
1160      *
1161      *
1162      * <pre>
1163      * The result image URL.
1164      * </pre>
1165      *
1166      * <code>string url = 1;</code>
1167      *
1168      * @return The bytes for url.
1169      */
1170     @java.lang.Override
getUrlBytes()1171     public com.google.protobuf.ByteString getUrlBytes() {
1172       java.lang.Object ref = url_;
1173       if (ref instanceof java.lang.String) {
1174         com.google.protobuf.ByteString b =
1175             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1176         url_ = b;
1177         return b;
1178       } else {
1179         return (com.google.protobuf.ByteString) ref;
1180       }
1181     }
1182 
1183     public static final int SCORE_FIELD_NUMBER = 2;
1184     private float score_ = 0F;
1185     /**
1186      *
1187      *
1188      * <pre>
1189      * (Deprecated) Overall relevancy score for the image.
1190      * </pre>
1191      *
1192      * <code>float score = 2;</code>
1193      *
1194      * @return The score.
1195      */
1196     @java.lang.Override
getScore()1197     public float getScore() {
1198       return score_;
1199     }
1200 
1201     private byte memoizedIsInitialized = -1;
1202 
1203     @java.lang.Override
isInitialized()1204     public final boolean isInitialized() {
1205       byte isInitialized = memoizedIsInitialized;
1206       if (isInitialized == 1) return true;
1207       if (isInitialized == 0) return false;
1208 
1209       memoizedIsInitialized = 1;
1210       return true;
1211     }
1212 
1213     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1214     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1215       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
1216         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_);
1217       }
1218       if (java.lang.Float.floatToRawIntBits(score_) != 0) {
1219         output.writeFloat(2, score_);
1220       }
1221       getUnknownFields().writeTo(output);
1222     }
1223 
1224     @java.lang.Override
getSerializedSize()1225     public int getSerializedSize() {
1226       int size = memoizedSize;
1227       if (size != -1) return size;
1228 
1229       size = 0;
1230       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
1231         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_);
1232       }
1233       if (java.lang.Float.floatToRawIntBits(score_) != 0) {
1234         size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, score_);
1235       }
1236       size += getUnknownFields().getSerializedSize();
1237       memoizedSize = size;
1238       return size;
1239     }
1240 
1241     @java.lang.Override
equals(final java.lang.Object obj)1242     public boolean equals(final java.lang.Object obj) {
1243       if (obj == this) {
1244         return true;
1245       }
1246       if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebImage)) {
1247         return super.equals(obj);
1248       }
1249       com.google.cloud.vision.v1.WebDetection.WebImage other =
1250           (com.google.cloud.vision.v1.WebDetection.WebImage) obj;
1251 
1252       if (!getUrl().equals(other.getUrl())) return false;
1253       if (java.lang.Float.floatToIntBits(getScore())
1254           != java.lang.Float.floatToIntBits(other.getScore())) return false;
1255       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1256       return true;
1257     }
1258 
1259     @java.lang.Override
hashCode()1260     public int hashCode() {
1261       if (memoizedHashCode != 0) {
1262         return memoizedHashCode;
1263       }
1264       int hash = 41;
1265       hash = (19 * hash) + getDescriptor().hashCode();
1266       hash = (37 * hash) + URL_FIELD_NUMBER;
1267       hash = (53 * hash) + getUrl().hashCode();
1268       hash = (37 * hash) + SCORE_FIELD_NUMBER;
1269       hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore());
1270       hash = (29 * hash) + getUnknownFields().hashCode();
1271       memoizedHashCode = hash;
1272       return hash;
1273     }
1274 
parseFrom( java.nio.ByteBuffer data)1275     public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(
1276         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
1277       return PARSER.parseFrom(data);
1278     }
1279 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1280     public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(
1281         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1282         throws com.google.protobuf.InvalidProtocolBufferException {
1283       return PARSER.parseFrom(data, extensionRegistry);
1284     }
1285 
parseFrom( com.google.protobuf.ByteString data)1286     public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(
1287         com.google.protobuf.ByteString data)
1288         throws com.google.protobuf.InvalidProtocolBufferException {
1289       return PARSER.parseFrom(data);
1290     }
1291 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1292     public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(
1293         com.google.protobuf.ByteString data,
1294         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1295         throws com.google.protobuf.InvalidProtocolBufferException {
1296       return PARSER.parseFrom(data, extensionRegistry);
1297     }
1298 
parseFrom(byte[] data)1299     public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(byte[] data)
1300         throws com.google.protobuf.InvalidProtocolBufferException {
1301       return PARSER.parseFrom(data);
1302     }
1303 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1304     public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(
1305         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1306         throws com.google.protobuf.InvalidProtocolBufferException {
1307       return PARSER.parseFrom(data, extensionRegistry);
1308     }
1309 
parseFrom( java.io.InputStream input)1310     public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(
1311         java.io.InputStream input) throws java.io.IOException {
1312       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1313     }
1314 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1315     public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(
1316         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1317         throws java.io.IOException {
1318       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1319           PARSER, input, extensionRegistry);
1320     }
1321 
parseDelimitedFrom( java.io.InputStream input)1322     public static com.google.cloud.vision.v1.WebDetection.WebImage parseDelimitedFrom(
1323         java.io.InputStream input) throws java.io.IOException {
1324       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1325     }
1326 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1327     public static com.google.cloud.vision.v1.WebDetection.WebImage parseDelimitedFrom(
1328         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1329         throws java.io.IOException {
1330       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1331           PARSER, input, extensionRegistry);
1332     }
1333 
parseFrom( com.google.protobuf.CodedInputStream input)1334     public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(
1335         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1336       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1337     }
1338 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1339     public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(
1340         com.google.protobuf.CodedInputStream input,
1341         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1342         throws java.io.IOException {
1343       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1344           PARSER, input, extensionRegistry);
1345     }
1346 
1347     @java.lang.Override
newBuilderForType()1348     public Builder newBuilderForType() {
1349       return newBuilder();
1350     }
1351 
newBuilder()1352     public static Builder newBuilder() {
1353       return DEFAULT_INSTANCE.toBuilder();
1354     }
1355 
newBuilder(com.google.cloud.vision.v1.WebDetection.WebImage prototype)1356     public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebImage prototype) {
1357       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1358     }
1359 
1360     @java.lang.Override
toBuilder()1361     public Builder toBuilder() {
1362       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1363     }
1364 
1365     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1366     protected Builder newBuilderForType(
1367         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1368       Builder builder = new Builder(parent);
1369       return builder;
1370     }
1371     /**
1372      *
1373      *
1374      * <pre>
1375      * Metadata for online images.
1376      * </pre>
1377      *
1378      * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebImage}
1379      */
1380     public static final class Builder
1381         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1382         implements
1383         // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebImage)
1384         com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder {
getDescriptor()1385       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1386         return com.google.cloud.vision.v1.WebDetectionProto
1387             .internal_static_google_cloud_vision_v1_WebDetection_WebImage_descriptor;
1388       }
1389 
1390       @java.lang.Override
1391       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1392           internalGetFieldAccessorTable() {
1393         return com.google.cloud.vision.v1.WebDetectionProto
1394             .internal_static_google_cloud_vision_v1_WebDetection_WebImage_fieldAccessorTable
1395             .ensureFieldAccessorsInitialized(
1396                 com.google.cloud.vision.v1.WebDetection.WebImage.class,
1397                 com.google.cloud.vision.v1.WebDetection.WebImage.Builder.class);
1398       }
1399 
1400       // Construct using com.google.cloud.vision.v1.WebDetection.WebImage.newBuilder()
Builder()1401       private Builder() {}
1402 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1403       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1404         super(parent);
1405       }
1406 
1407       @java.lang.Override
clear()1408       public Builder clear() {
1409         super.clear();
1410         bitField0_ = 0;
1411         url_ = "";
1412         score_ = 0F;
1413         return this;
1414       }
1415 
1416       @java.lang.Override
getDescriptorForType()1417       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1418         return com.google.cloud.vision.v1.WebDetectionProto
1419             .internal_static_google_cloud_vision_v1_WebDetection_WebImage_descriptor;
1420       }
1421 
1422       @java.lang.Override
getDefaultInstanceForType()1423       public com.google.cloud.vision.v1.WebDetection.WebImage getDefaultInstanceForType() {
1424         return com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance();
1425       }
1426 
1427       @java.lang.Override
build()1428       public com.google.cloud.vision.v1.WebDetection.WebImage build() {
1429         com.google.cloud.vision.v1.WebDetection.WebImage result = buildPartial();
1430         if (!result.isInitialized()) {
1431           throw newUninitializedMessageException(result);
1432         }
1433         return result;
1434       }
1435 
1436       @java.lang.Override
buildPartial()1437       public com.google.cloud.vision.v1.WebDetection.WebImage buildPartial() {
1438         com.google.cloud.vision.v1.WebDetection.WebImage result =
1439             new com.google.cloud.vision.v1.WebDetection.WebImage(this);
1440         if (bitField0_ != 0) {
1441           buildPartial0(result);
1442         }
1443         onBuilt();
1444         return result;
1445       }
1446 
buildPartial0(com.google.cloud.vision.v1.WebDetection.WebImage result)1447       private void buildPartial0(com.google.cloud.vision.v1.WebDetection.WebImage result) {
1448         int from_bitField0_ = bitField0_;
1449         if (((from_bitField0_ & 0x00000001) != 0)) {
1450           result.url_ = url_;
1451         }
1452         if (((from_bitField0_ & 0x00000002) != 0)) {
1453           result.score_ = score_;
1454         }
1455       }
1456 
1457       @java.lang.Override
clone()1458       public Builder clone() {
1459         return super.clone();
1460       }
1461 
1462       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1463       public Builder setField(
1464           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1465         return super.setField(field, value);
1466       }
1467 
1468       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1469       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1470         return super.clearField(field);
1471       }
1472 
1473       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1474       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1475         return super.clearOneof(oneof);
1476       }
1477 
1478       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1479       public Builder setRepeatedField(
1480           com.google.protobuf.Descriptors.FieldDescriptor field,
1481           int index,
1482           java.lang.Object value) {
1483         return super.setRepeatedField(field, index, value);
1484       }
1485 
1486       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1487       public Builder addRepeatedField(
1488           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1489         return super.addRepeatedField(field, value);
1490       }
1491 
1492       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1493       public Builder mergeFrom(com.google.protobuf.Message other) {
1494         if (other instanceof com.google.cloud.vision.v1.WebDetection.WebImage) {
1495           return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebImage) other);
1496         } else {
1497           super.mergeFrom(other);
1498           return this;
1499         }
1500       }
1501 
mergeFrom(com.google.cloud.vision.v1.WebDetection.WebImage other)1502       public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebImage other) {
1503         if (other == com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance())
1504           return this;
1505         if (!other.getUrl().isEmpty()) {
1506           url_ = other.url_;
1507           bitField0_ |= 0x00000001;
1508           onChanged();
1509         }
1510         if (other.getScore() != 0F) {
1511           setScore(other.getScore());
1512         }
1513         this.mergeUnknownFields(other.getUnknownFields());
1514         onChanged();
1515         return this;
1516       }
1517 
1518       @java.lang.Override
isInitialized()1519       public final boolean isInitialized() {
1520         return true;
1521       }
1522 
1523       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1524       public Builder mergeFrom(
1525           com.google.protobuf.CodedInputStream input,
1526           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1527           throws java.io.IOException {
1528         if (extensionRegistry == null) {
1529           throw new java.lang.NullPointerException();
1530         }
1531         try {
1532           boolean done = false;
1533           while (!done) {
1534             int tag = input.readTag();
1535             switch (tag) {
1536               case 0:
1537                 done = true;
1538                 break;
1539               case 10:
1540                 {
1541                   url_ = input.readStringRequireUtf8();
1542                   bitField0_ |= 0x00000001;
1543                   break;
1544                 } // case 10
1545               case 21:
1546                 {
1547                   score_ = input.readFloat();
1548                   bitField0_ |= 0x00000002;
1549                   break;
1550                 } // case 21
1551               default:
1552                 {
1553                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1554                     done = true; // was an endgroup tag
1555                   }
1556                   break;
1557                 } // default:
1558             } // switch (tag)
1559           } // while (!done)
1560         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1561           throw e.unwrapIOException();
1562         } finally {
1563           onChanged();
1564         } // finally
1565         return this;
1566       }
1567 
1568       private int bitField0_;
1569 
1570       private java.lang.Object url_ = "";
1571       /**
1572        *
1573        *
1574        * <pre>
1575        * The result image URL.
1576        * </pre>
1577        *
1578        * <code>string url = 1;</code>
1579        *
1580        * @return The url.
1581        */
getUrl()1582       public java.lang.String getUrl() {
1583         java.lang.Object ref = url_;
1584         if (!(ref instanceof java.lang.String)) {
1585           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1586           java.lang.String s = bs.toStringUtf8();
1587           url_ = s;
1588           return s;
1589         } else {
1590           return (java.lang.String) ref;
1591         }
1592       }
1593       /**
1594        *
1595        *
1596        * <pre>
1597        * The result image URL.
1598        * </pre>
1599        *
1600        * <code>string url = 1;</code>
1601        *
1602        * @return The bytes for url.
1603        */
getUrlBytes()1604       public com.google.protobuf.ByteString getUrlBytes() {
1605         java.lang.Object ref = url_;
1606         if (ref instanceof String) {
1607           com.google.protobuf.ByteString b =
1608               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1609           url_ = b;
1610           return b;
1611         } else {
1612           return (com.google.protobuf.ByteString) ref;
1613         }
1614       }
1615       /**
1616        *
1617        *
1618        * <pre>
1619        * The result image URL.
1620        * </pre>
1621        *
1622        * <code>string url = 1;</code>
1623        *
1624        * @param value The url to set.
1625        * @return This builder for chaining.
1626        */
setUrl(java.lang.String value)1627       public Builder setUrl(java.lang.String value) {
1628         if (value == null) {
1629           throw new NullPointerException();
1630         }
1631         url_ = value;
1632         bitField0_ |= 0x00000001;
1633         onChanged();
1634         return this;
1635       }
1636       /**
1637        *
1638        *
1639        * <pre>
1640        * The result image URL.
1641        * </pre>
1642        *
1643        * <code>string url = 1;</code>
1644        *
1645        * @return This builder for chaining.
1646        */
clearUrl()1647       public Builder clearUrl() {
1648         url_ = getDefaultInstance().getUrl();
1649         bitField0_ = (bitField0_ & ~0x00000001);
1650         onChanged();
1651         return this;
1652       }
1653       /**
1654        *
1655        *
1656        * <pre>
1657        * The result image URL.
1658        * </pre>
1659        *
1660        * <code>string url = 1;</code>
1661        *
1662        * @param value The bytes for url to set.
1663        * @return This builder for chaining.
1664        */
setUrlBytes(com.google.protobuf.ByteString value)1665       public Builder setUrlBytes(com.google.protobuf.ByteString value) {
1666         if (value == null) {
1667           throw new NullPointerException();
1668         }
1669         checkByteStringIsUtf8(value);
1670         url_ = value;
1671         bitField0_ |= 0x00000001;
1672         onChanged();
1673         return this;
1674       }
1675 
1676       private float score_;
1677       /**
1678        *
1679        *
1680        * <pre>
1681        * (Deprecated) Overall relevancy score for the image.
1682        * </pre>
1683        *
1684        * <code>float score = 2;</code>
1685        *
1686        * @return The score.
1687        */
1688       @java.lang.Override
getScore()1689       public float getScore() {
1690         return score_;
1691       }
1692       /**
1693        *
1694        *
1695        * <pre>
1696        * (Deprecated) Overall relevancy score for the image.
1697        * </pre>
1698        *
1699        * <code>float score = 2;</code>
1700        *
1701        * @param value The score to set.
1702        * @return This builder for chaining.
1703        */
setScore(float value)1704       public Builder setScore(float value) {
1705 
1706         score_ = value;
1707         bitField0_ |= 0x00000002;
1708         onChanged();
1709         return this;
1710       }
1711       /**
1712        *
1713        *
1714        * <pre>
1715        * (Deprecated) Overall relevancy score for the image.
1716        * </pre>
1717        *
1718        * <code>float score = 2;</code>
1719        *
1720        * @return This builder for chaining.
1721        */
clearScore()1722       public Builder clearScore() {
1723         bitField0_ = (bitField0_ & ~0x00000002);
1724         score_ = 0F;
1725         onChanged();
1726         return this;
1727       }
1728 
1729       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1730       public final Builder setUnknownFields(
1731           final com.google.protobuf.UnknownFieldSet unknownFields) {
1732         return super.setUnknownFields(unknownFields);
1733       }
1734 
1735       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1736       public final Builder mergeUnknownFields(
1737           final com.google.protobuf.UnknownFieldSet unknownFields) {
1738         return super.mergeUnknownFields(unknownFields);
1739       }
1740 
1741       // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebImage)
1742     }
1743 
1744     // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebImage)
1745     private static final com.google.cloud.vision.v1.WebDetection.WebImage DEFAULT_INSTANCE;
1746 
1747     static {
1748       DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebImage();
1749     }
1750 
getDefaultInstance()1751     public static com.google.cloud.vision.v1.WebDetection.WebImage getDefaultInstance() {
1752       return DEFAULT_INSTANCE;
1753     }
1754 
1755     private static final com.google.protobuf.Parser<WebImage> PARSER =
1756         new com.google.protobuf.AbstractParser<WebImage>() {
1757           @java.lang.Override
1758           public WebImage parsePartialFrom(
1759               com.google.protobuf.CodedInputStream input,
1760               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1761               throws com.google.protobuf.InvalidProtocolBufferException {
1762             Builder builder = newBuilder();
1763             try {
1764               builder.mergeFrom(input, extensionRegistry);
1765             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1766               throw e.setUnfinishedMessage(builder.buildPartial());
1767             } catch (com.google.protobuf.UninitializedMessageException e) {
1768               throw e.asInvalidProtocolBufferException()
1769                   .setUnfinishedMessage(builder.buildPartial());
1770             } catch (java.io.IOException e) {
1771               throw new com.google.protobuf.InvalidProtocolBufferException(e)
1772                   .setUnfinishedMessage(builder.buildPartial());
1773             }
1774             return builder.buildPartial();
1775           }
1776         };
1777 
parser()1778     public static com.google.protobuf.Parser<WebImage> parser() {
1779       return PARSER;
1780     }
1781 
1782     @java.lang.Override
getParserForType()1783     public com.google.protobuf.Parser<WebImage> getParserForType() {
1784       return PARSER;
1785     }
1786 
1787     @java.lang.Override
getDefaultInstanceForType()1788     public com.google.cloud.vision.v1.WebDetection.WebImage getDefaultInstanceForType() {
1789       return DEFAULT_INSTANCE;
1790     }
1791   }
1792 
1793   public interface WebPageOrBuilder
1794       extends
1795       // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebPage)
1796       com.google.protobuf.MessageOrBuilder {
1797 
1798     /**
1799      *
1800      *
1801      * <pre>
1802      * The result web page URL.
1803      * </pre>
1804      *
1805      * <code>string url = 1;</code>
1806      *
1807      * @return The url.
1808      */
getUrl()1809     java.lang.String getUrl();
1810     /**
1811      *
1812      *
1813      * <pre>
1814      * The result web page URL.
1815      * </pre>
1816      *
1817      * <code>string url = 1;</code>
1818      *
1819      * @return The bytes for url.
1820      */
getUrlBytes()1821     com.google.protobuf.ByteString getUrlBytes();
1822 
1823     /**
1824      *
1825      *
1826      * <pre>
1827      * (Deprecated) Overall relevancy score for the web page.
1828      * </pre>
1829      *
1830      * <code>float score = 2;</code>
1831      *
1832      * @return The score.
1833      */
getScore()1834     float getScore();
1835 
1836     /**
1837      *
1838      *
1839      * <pre>
1840      * Title for the web page, may contain HTML markups.
1841      * </pre>
1842      *
1843      * <code>string page_title = 3;</code>
1844      *
1845      * @return The pageTitle.
1846      */
getPageTitle()1847     java.lang.String getPageTitle();
1848     /**
1849      *
1850      *
1851      * <pre>
1852      * Title for the web page, may contain HTML markups.
1853      * </pre>
1854      *
1855      * <code>string page_title = 3;</code>
1856      *
1857      * @return The bytes for pageTitle.
1858      */
getPageTitleBytes()1859     com.google.protobuf.ByteString getPageTitleBytes();
1860 
1861     /**
1862      *
1863      *
1864      * <pre>
1865      * Fully matching images on the page.
1866      * Can include resized copies of the query image.
1867      * </pre>
1868      *
1869      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;</code>
1870      */
getFullMatchingImagesList()1871     java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage> getFullMatchingImagesList();
1872     /**
1873      *
1874      *
1875      * <pre>
1876      * Fully matching images on the page.
1877      * Can include resized copies of the query image.
1878      * </pre>
1879      *
1880      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;</code>
1881      */
getFullMatchingImages(int index)1882     com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index);
1883     /**
1884      *
1885      *
1886      * <pre>
1887      * Fully matching images on the page.
1888      * Can include resized copies of the query image.
1889      * </pre>
1890      *
1891      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;</code>
1892      */
getFullMatchingImagesCount()1893     int getFullMatchingImagesCount();
1894     /**
1895      *
1896      *
1897      * <pre>
1898      * Fully matching images on the page.
1899      * Can include resized copies of the query image.
1900      * </pre>
1901      *
1902      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;</code>
1903      */
1904     java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getFullMatchingImagesOrBuilderList()1905         getFullMatchingImagesOrBuilderList();
1906     /**
1907      *
1908      *
1909      * <pre>
1910      * Fully matching images on the page.
1911      * Can include resized copies of the query image.
1912      * </pre>
1913      *
1914      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;</code>
1915      */
getFullMatchingImagesOrBuilder( int index)1916     com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder(
1917         int index);
1918 
1919     /**
1920      *
1921      *
1922      * <pre>
1923      * Partial matching images on the page.
1924      * Those images are similar enough to share some key-point features. For
1925      * example an original image will likely have partial matching for its
1926      * crops.
1927      * </pre>
1928      *
1929      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
1930      * </code>
1931      */
getPartialMatchingImagesList()1932     java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage> getPartialMatchingImagesList();
1933     /**
1934      *
1935      *
1936      * <pre>
1937      * Partial matching images on the page.
1938      * Those images are similar enough to share some key-point features. For
1939      * example an original image will likely have partial matching for its
1940      * crops.
1941      * </pre>
1942      *
1943      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
1944      * </code>
1945      */
getPartialMatchingImages(int index)1946     com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index);
1947     /**
1948      *
1949      *
1950      * <pre>
1951      * Partial matching images on the page.
1952      * Those images are similar enough to share some key-point features. For
1953      * example an original image will likely have partial matching for its
1954      * crops.
1955      * </pre>
1956      *
1957      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
1958      * </code>
1959      */
getPartialMatchingImagesCount()1960     int getPartialMatchingImagesCount();
1961     /**
1962      *
1963      *
1964      * <pre>
1965      * Partial matching images on the page.
1966      * Those images are similar enough to share some key-point features. For
1967      * example an original image will likely have partial matching for its
1968      * crops.
1969      * </pre>
1970      *
1971      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
1972      * </code>
1973      */
1974     java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getPartialMatchingImagesOrBuilderList()1975         getPartialMatchingImagesOrBuilderList();
1976     /**
1977      *
1978      *
1979      * <pre>
1980      * Partial matching images on the page.
1981      * Those images are similar enough to share some key-point features. For
1982      * example an original image will likely have partial matching for its
1983      * crops.
1984      * </pre>
1985      *
1986      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
1987      * </code>
1988      */
getPartialMatchingImagesOrBuilder( int index)1989     com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder(
1990         int index);
1991   }
1992   /**
1993    *
1994    *
1995    * <pre>
1996    * Metadata for web pages.
1997    * </pre>
1998    *
1999    * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebPage}
2000    */
2001   public static final class WebPage extends com.google.protobuf.GeneratedMessageV3
2002       implements
2003       // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebPage)
2004       WebPageOrBuilder {
2005     private static final long serialVersionUID = 0L;
2006     // Use WebPage.newBuilder() to construct.
WebPage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)2007     private WebPage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
2008       super(builder);
2009     }
2010 
WebPage()2011     private WebPage() {
2012       url_ = "";
2013       pageTitle_ = "";
2014       fullMatchingImages_ = java.util.Collections.emptyList();
2015       partialMatchingImages_ = java.util.Collections.emptyList();
2016     }
2017 
2018     @java.lang.Override
2019     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)2020     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
2021       return new WebPage();
2022     }
2023 
2024     @java.lang.Override
getUnknownFields()2025     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
2026       return this.unknownFields;
2027     }
2028 
getDescriptor()2029     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
2030       return com.google.cloud.vision.v1.WebDetectionProto
2031           .internal_static_google_cloud_vision_v1_WebDetection_WebPage_descriptor;
2032     }
2033 
2034     @java.lang.Override
2035     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()2036         internalGetFieldAccessorTable() {
2037       return com.google.cloud.vision.v1.WebDetectionProto
2038           .internal_static_google_cloud_vision_v1_WebDetection_WebPage_fieldAccessorTable
2039           .ensureFieldAccessorsInitialized(
2040               com.google.cloud.vision.v1.WebDetection.WebPage.class,
2041               com.google.cloud.vision.v1.WebDetection.WebPage.Builder.class);
2042     }
2043 
2044     public static final int URL_FIELD_NUMBER = 1;
2045 
2046     @SuppressWarnings("serial")
2047     private volatile java.lang.Object url_ = "";
2048     /**
2049      *
2050      *
2051      * <pre>
2052      * The result web page URL.
2053      * </pre>
2054      *
2055      * <code>string url = 1;</code>
2056      *
2057      * @return The url.
2058      */
2059     @java.lang.Override
getUrl()2060     public java.lang.String getUrl() {
2061       java.lang.Object ref = url_;
2062       if (ref instanceof java.lang.String) {
2063         return (java.lang.String) ref;
2064       } else {
2065         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2066         java.lang.String s = bs.toStringUtf8();
2067         url_ = s;
2068         return s;
2069       }
2070     }
2071     /**
2072      *
2073      *
2074      * <pre>
2075      * The result web page URL.
2076      * </pre>
2077      *
2078      * <code>string url = 1;</code>
2079      *
2080      * @return The bytes for url.
2081      */
2082     @java.lang.Override
getUrlBytes()2083     public com.google.protobuf.ByteString getUrlBytes() {
2084       java.lang.Object ref = url_;
2085       if (ref instanceof java.lang.String) {
2086         com.google.protobuf.ByteString b =
2087             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2088         url_ = b;
2089         return b;
2090       } else {
2091         return (com.google.protobuf.ByteString) ref;
2092       }
2093     }
2094 
2095     public static final int SCORE_FIELD_NUMBER = 2;
2096     private float score_ = 0F;
2097     /**
2098      *
2099      *
2100      * <pre>
2101      * (Deprecated) Overall relevancy score for the web page.
2102      * </pre>
2103      *
2104      * <code>float score = 2;</code>
2105      *
2106      * @return The score.
2107      */
2108     @java.lang.Override
getScore()2109     public float getScore() {
2110       return score_;
2111     }
2112 
2113     public static final int PAGE_TITLE_FIELD_NUMBER = 3;
2114 
2115     @SuppressWarnings("serial")
2116     private volatile java.lang.Object pageTitle_ = "";
2117     /**
2118      *
2119      *
2120      * <pre>
2121      * Title for the web page, may contain HTML markups.
2122      * </pre>
2123      *
2124      * <code>string page_title = 3;</code>
2125      *
2126      * @return The pageTitle.
2127      */
2128     @java.lang.Override
getPageTitle()2129     public java.lang.String getPageTitle() {
2130       java.lang.Object ref = pageTitle_;
2131       if (ref instanceof java.lang.String) {
2132         return (java.lang.String) ref;
2133       } else {
2134         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2135         java.lang.String s = bs.toStringUtf8();
2136         pageTitle_ = s;
2137         return s;
2138       }
2139     }
2140     /**
2141      *
2142      *
2143      * <pre>
2144      * Title for the web page, may contain HTML markups.
2145      * </pre>
2146      *
2147      * <code>string page_title = 3;</code>
2148      *
2149      * @return The bytes for pageTitle.
2150      */
2151     @java.lang.Override
getPageTitleBytes()2152     public com.google.protobuf.ByteString getPageTitleBytes() {
2153       java.lang.Object ref = pageTitle_;
2154       if (ref instanceof java.lang.String) {
2155         com.google.protobuf.ByteString b =
2156             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2157         pageTitle_ = b;
2158         return b;
2159       } else {
2160         return (com.google.protobuf.ByteString) ref;
2161       }
2162     }
2163 
2164     public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4;
2165 
2166     @SuppressWarnings("serial")
2167     private java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage> fullMatchingImages_;
2168     /**
2169      *
2170      *
2171      * <pre>
2172      * Fully matching images on the page.
2173      * Can include resized copies of the query image.
2174      * </pre>
2175      *
2176      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;</code>
2177      */
2178     @java.lang.Override
2179     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
getFullMatchingImagesList()2180         getFullMatchingImagesList() {
2181       return fullMatchingImages_;
2182     }
2183     /**
2184      *
2185      *
2186      * <pre>
2187      * Fully matching images on the page.
2188      * Can include resized copies of the query image.
2189      * </pre>
2190      *
2191      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;</code>
2192      */
2193     @java.lang.Override
2194     public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getFullMatchingImagesOrBuilderList()2195         getFullMatchingImagesOrBuilderList() {
2196       return fullMatchingImages_;
2197     }
2198     /**
2199      *
2200      *
2201      * <pre>
2202      * Fully matching images on the page.
2203      * Can include resized copies of the query image.
2204      * </pre>
2205      *
2206      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;</code>
2207      */
2208     @java.lang.Override
getFullMatchingImagesCount()2209     public int getFullMatchingImagesCount() {
2210       return fullMatchingImages_.size();
2211     }
2212     /**
2213      *
2214      *
2215      * <pre>
2216      * Fully matching images on the page.
2217      * Can include resized copies of the query image.
2218      * </pre>
2219      *
2220      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;</code>
2221      */
2222     @java.lang.Override
getFullMatchingImages(int index)2223     public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) {
2224       return fullMatchingImages_.get(index);
2225     }
2226     /**
2227      *
2228      *
2229      * <pre>
2230      * Fully matching images on the page.
2231      * Can include resized copies of the query image.
2232      * </pre>
2233      *
2234      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;</code>
2235      */
2236     @java.lang.Override
getFullMatchingImagesOrBuilder( int index)2237     public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder(
2238         int index) {
2239       return fullMatchingImages_.get(index);
2240     }
2241 
2242     public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5;
2243 
2244     @SuppressWarnings("serial")
2245     private java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage> partialMatchingImages_;
2246     /**
2247      *
2248      *
2249      * <pre>
2250      * Partial matching images on the page.
2251      * Those images are similar enough to share some key-point features. For
2252      * example an original image will likely have partial matching for its
2253      * crops.
2254      * </pre>
2255      *
2256      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
2257      * </code>
2258      */
2259     @java.lang.Override
2260     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
getPartialMatchingImagesList()2261         getPartialMatchingImagesList() {
2262       return partialMatchingImages_;
2263     }
2264     /**
2265      *
2266      *
2267      * <pre>
2268      * Partial matching images on the page.
2269      * Those images are similar enough to share some key-point features. For
2270      * example an original image will likely have partial matching for its
2271      * crops.
2272      * </pre>
2273      *
2274      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
2275      * </code>
2276      */
2277     @java.lang.Override
2278     public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getPartialMatchingImagesOrBuilderList()2279         getPartialMatchingImagesOrBuilderList() {
2280       return partialMatchingImages_;
2281     }
2282     /**
2283      *
2284      *
2285      * <pre>
2286      * Partial matching images on the page.
2287      * Those images are similar enough to share some key-point features. For
2288      * example an original image will likely have partial matching for its
2289      * crops.
2290      * </pre>
2291      *
2292      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
2293      * </code>
2294      */
2295     @java.lang.Override
getPartialMatchingImagesCount()2296     public int getPartialMatchingImagesCount() {
2297       return partialMatchingImages_.size();
2298     }
2299     /**
2300      *
2301      *
2302      * <pre>
2303      * Partial matching images on the page.
2304      * Those images are similar enough to share some key-point features. For
2305      * example an original image will likely have partial matching for its
2306      * crops.
2307      * </pre>
2308      *
2309      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
2310      * </code>
2311      */
2312     @java.lang.Override
getPartialMatchingImages(int index)2313     public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) {
2314       return partialMatchingImages_.get(index);
2315     }
2316     /**
2317      *
2318      *
2319      * <pre>
2320      * Partial matching images on the page.
2321      * Those images are similar enough to share some key-point features. For
2322      * example an original image will likely have partial matching for its
2323      * crops.
2324      * </pre>
2325      *
2326      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
2327      * </code>
2328      */
2329     @java.lang.Override
2330     public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder
getPartialMatchingImagesOrBuilder(int index)2331         getPartialMatchingImagesOrBuilder(int index) {
2332       return partialMatchingImages_.get(index);
2333     }
2334 
2335     private byte memoizedIsInitialized = -1;
2336 
2337     @java.lang.Override
isInitialized()2338     public final boolean isInitialized() {
2339       byte isInitialized = memoizedIsInitialized;
2340       if (isInitialized == 1) return true;
2341       if (isInitialized == 0) return false;
2342 
2343       memoizedIsInitialized = 1;
2344       return true;
2345     }
2346 
2347     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)2348     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
2349       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
2350         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_);
2351       }
2352       if (java.lang.Float.floatToRawIntBits(score_) != 0) {
2353         output.writeFloat(2, score_);
2354       }
2355       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) {
2356         com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_);
2357       }
2358       for (int i = 0; i < fullMatchingImages_.size(); i++) {
2359         output.writeMessage(4, fullMatchingImages_.get(i));
2360       }
2361       for (int i = 0; i < partialMatchingImages_.size(); i++) {
2362         output.writeMessage(5, partialMatchingImages_.get(i));
2363       }
2364       getUnknownFields().writeTo(output);
2365     }
2366 
2367     @java.lang.Override
getSerializedSize()2368     public int getSerializedSize() {
2369       int size = memoizedSize;
2370       if (size != -1) return size;
2371 
2372       size = 0;
2373       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
2374         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_);
2375       }
2376       if (java.lang.Float.floatToRawIntBits(score_) != 0) {
2377         size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, score_);
2378       }
2379       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) {
2380         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_);
2381       }
2382       for (int i = 0; i < fullMatchingImages_.size(); i++) {
2383         size +=
2384             com.google.protobuf.CodedOutputStream.computeMessageSize(4, fullMatchingImages_.get(i));
2385       }
2386       for (int i = 0; i < partialMatchingImages_.size(); i++) {
2387         size +=
2388             com.google.protobuf.CodedOutputStream.computeMessageSize(
2389                 5, partialMatchingImages_.get(i));
2390       }
2391       size += getUnknownFields().getSerializedSize();
2392       memoizedSize = size;
2393       return size;
2394     }
2395 
2396     @java.lang.Override
equals(final java.lang.Object obj)2397     public boolean equals(final java.lang.Object obj) {
2398       if (obj == this) {
2399         return true;
2400       }
2401       if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebPage)) {
2402         return super.equals(obj);
2403       }
2404       com.google.cloud.vision.v1.WebDetection.WebPage other =
2405           (com.google.cloud.vision.v1.WebDetection.WebPage) obj;
2406 
2407       if (!getUrl().equals(other.getUrl())) return false;
2408       if (java.lang.Float.floatToIntBits(getScore())
2409           != java.lang.Float.floatToIntBits(other.getScore())) return false;
2410       if (!getPageTitle().equals(other.getPageTitle())) return false;
2411       if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false;
2412       if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList()))
2413         return false;
2414       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
2415       return true;
2416     }
2417 
2418     @java.lang.Override
hashCode()2419     public int hashCode() {
2420       if (memoizedHashCode != 0) {
2421         return memoizedHashCode;
2422       }
2423       int hash = 41;
2424       hash = (19 * hash) + getDescriptor().hashCode();
2425       hash = (37 * hash) + URL_FIELD_NUMBER;
2426       hash = (53 * hash) + getUrl().hashCode();
2427       hash = (37 * hash) + SCORE_FIELD_NUMBER;
2428       hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore());
2429       hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER;
2430       hash = (53 * hash) + getPageTitle().hashCode();
2431       if (getFullMatchingImagesCount() > 0) {
2432         hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER;
2433         hash = (53 * hash) + getFullMatchingImagesList().hashCode();
2434       }
2435       if (getPartialMatchingImagesCount() > 0) {
2436         hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER;
2437         hash = (53 * hash) + getPartialMatchingImagesList().hashCode();
2438       }
2439       hash = (29 * hash) + getUnknownFields().hashCode();
2440       memoizedHashCode = hash;
2441       return hash;
2442     }
2443 
parseFrom( java.nio.ByteBuffer data)2444     public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(
2445         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
2446       return PARSER.parseFrom(data);
2447     }
2448 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2449     public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(
2450         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2451         throws com.google.protobuf.InvalidProtocolBufferException {
2452       return PARSER.parseFrom(data, extensionRegistry);
2453     }
2454 
parseFrom( com.google.protobuf.ByteString data)2455     public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(
2456         com.google.protobuf.ByteString data)
2457         throws com.google.protobuf.InvalidProtocolBufferException {
2458       return PARSER.parseFrom(data);
2459     }
2460 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2461     public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(
2462         com.google.protobuf.ByteString data,
2463         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2464         throws com.google.protobuf.InvalidProtocolBufferException {
2465       return PARSER.parseFrom(data, extensionRegistry);
2466     }
2467 
parseFrom(byte[] data)2468     public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(byte[] data)
2469         throws com.google.protobuf.InvalidProtocolBufferException {
2470       return PARSER.parseFrom(data);
2471     }
2472 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2473     public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(
2474         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2475         throws com.google.protobuf.InvalidProtocolBufferException {
2476       return PARSER.parseFrom(data, extensionRegistry);
2477     }
2478 
parseFrom( java.io.InputStream input)2479     public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(
2480         java.io.InputStream input) throws java.io.IOException {
2481       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2482     }
2483 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2484     public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(
2485         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2486         throws java.io.IOException {
2487       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2488           PARSER, input, extensionRegistry);
2489     }
2490 
parseDelimitedFrom( java.io.InputStream input)2491     public static com.google.cloud.vision.v1.WebDetection.WebPage parseDelimitedFrom(
2492         java.io.InputStream input) throws java.io.IOException {
2493       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
2494     }
2495 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2496     public static com.google.cloud.vision.v1.WebDetection.WebPage parseDelimitedFrom(
2497         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2498         throws java.io.IOException {
2499       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
2500           PARSER, input, extensionRegistry);
2501     }
2502 
parseFrom( com.google.protobuf.CodedInputStream input)2503     public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(
2504         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
2505       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2506     }
2507 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2508     public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(
2509         com.google.protobuf.CodedInputStream input,
2510         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2511         throws java.io.IOException {
2512       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2513           PARSER, input, extensionRegistry);
2514     }
2515 
2516     @java.lang.Override
newBuilderForType()2517     public Builder newBuilderForType() {
2518       return newBuilder();
2519     }
2520 
newBuilder()2521     public static Builder newBuilder() {
2522       return DEFAULT_INSTANCE.toBuilder();
2523     }
2524 
newBuilder(com.google.cloud.vision.v1.WebDetection.WebPage prototype)2525     public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebPage prototype) {
2526       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2527     }
2528 
2529     @java.lang.Override
toBuilder()2530     public Builder toBuilder() {
2531       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
2532     }
2533 
2534     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2535     protected Builder newBuilderForType(
2536         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2537       Builder builder = new Builder(parent);
2538       return builder;
2539     }
2540     /**
2541      *
2542      *
2543      * <pre>
2544      * Metadata for web pages.
2545      * </pre>
2546      *
2547      * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebPage}
2548      */
2549     public static final class Builder
2550         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
2551         implements
2552         // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebPage)
2553         com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder {
getDescriptor()2554       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
2555         return com.google.cloud.vision.v1.WebDetectionProto
2556             .internal_static_google_cloud_vision_v1_WebDetection_WebPage_descriptor;
2557       }
2558 
2559       @java.lang.Override
2560       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()2561           internalGetFieldAccessorTable() {
2562         return com.google.cloud.vision.v1.WebDetectionProto
2563             .internal_static_google_cloud_vision_v1_WebDetection_WebPage_fieldAccessorTable
2564             .ensureFieldAccessorsInitialized(
2565                 com.google.cloud.vision.v1.WebDetection.WebPage.class,
2566                 com.google.cloud.vision.v1.WebDetection.WebPage.Builder.class);
2567       }
2568 
2569       // Construct using com.google.cloud.vision.v1.WebDetection.WebPage.newBuilder()
Builder()2570       private Builder() {}
2571 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2572       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2573         super(parent);
2574       }
2575 
2576       @java.lang.Override
clear()2577       public Builder clear() {
2578         super.clear();
2579         bitField0_ = 0;
2580         url_ = "";
2581         score_ = 0F;
2582         pageTitle_ = "";
2583         if (fullMatchingImagesBuilder_ == null) {
2584           fullMatchingImages_ = java.util.Collections.emptyList();
2585         } else {
2586           fullMatchingImages_ = null;
2587           fullMatchingImagesBuilder_.clear();
2588         }
2589         bitField0_ = (bitField0_ & ~0x00000008);
2590         if (partialMatchingImagesBuilder_ == null) {
2591           partialMatchingImages_ = java.util.Collections.emptyList();
2592         } else {
2593           partialMatchingImages_ = null;
2594           partialMatchingImagesBuilder_.clear();
2595         }
2596         bitField0_ = (bitField0_ & ~0x00000010);
2597         return this;
2598       }
2599 
2600       @java.lang.Override
getDescriptorForType()2601       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
2602         return com.google.cloud.vision.v1.WebDetectionProto
2603             .internal_static_google_cloud_vision_v1_WebDetection_WebPage_descriptor;
2604       }
2605 
2606       @java.lang.Override
getDefaultInstanceForType()2607       public com.google.cloud.vision.v1.WebDetection.WebPage getDefaultInstanceForType() {
2608         return com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance();
2609       }
2610 
2611       @java.lang.Override
build()2612       public com.google.cloud.vision.v1.WebDetection.WebPage build() {
2613         com.google.cloud.vision.v1.WebDetection.WebPage result = buildPartial();
2614         if (!result.isInitialized()) {
2615           throw newUninitializedMessageException(result);
2616         }
2617         return result;
2618       }
2619 
2620       @java.lang.Override
buildPartial()2621       public com.google.cloud.vision.v1.WebDetection.WebPage buildPartial() {
2622         com.google.cloud.vision.v1.WebDetection.WebPage result =
2623             new com.google.cloud.vision.v1.WebDetection.WebPage(this);
2624         buildPartialRepeatedFields(result);
2625         if (bitField0_ != 0) {
2626           buildPartial0(result);
2627         }
2628         onBuilt();
2629         return result;
2630       }
2631 
buildPartialRepeatedFields( com.google.cloud.vision.v1.WebDetection.WebPage result)2632       private void buildPartialRepeatedFields(
2633           com.google.cloud.vision.v1.WebDetection.WebPage result) {
2634         if (fullMatchingImagesBuilder_ == null) {
2635           if (((bitField0_ & 0x00000008) != 0)) {
2636             fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_);
2637             bitField0_ = (bitField0_ & ~0x00000008);
2638           }
2639           result.fullMatchingImages_ = fullMatchingImages_;
2640         } else {
2641           result.fullMatchingImages_ = fullMatchingImagesBuilder_.build();
2642         }
2643         if (partialMatchingImagesBuilder_ == null) {
2644           if (((bitField0_ & 0x00000010) != 0)) {
2645             partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_);
2646             bitField0_ = (bitField0_ & ~0x00000010);
2647           }
2648           result.partialMatchingImages_ = partialMatchingImages_;
2649         } else {
2650           result.partialMatchingImages_ = partialMatchingImagesBuilder_.build();
2651         }
2652       }
2653 
buildPartial0(com.google.cloud.vision.v1.WebDetection.WebPage result)2654       private void buildPartial0(com.google.cloud.vision.v1.WebDetection.WebPage result) {
2655         int from_bitField0_ = bitField0_;
2656         if (((from_bitField0_ & 0x00000001) != 0)) {
2657           result.url_ = url_;
2658         }
2659         if (((from_bitField0_ & 0x00000002) != 0)) {
2660           result.score_ = score_;
2661         }
2662         if (((from_bitField0_ & 0x00000004) != 0)) {
2663           result.pageTitle_ = pageTitle_;
2664         }
2665       }
2666 
2667       @java.lang.Override
clone()2668       public Builder clone() {
2669         return super.clone();
2670       }
2671 
2672       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2673       public Builder setField(
2674           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2675         return super.setField(field, value);
2676       }
2677 
2678       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2679       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
2680         return super.clearField(field);
2681       }
2682 
2683       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2684       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2685         return super.clearOneof(oneof);
2686       }
2687 
2688       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2689       public Builder setRepeatedField(
2690           com.google.protobuf.Descriptors.FieldDescriptor field,
2691           int index,
2692           java.lang.Object value) {
2693         return super.setRepeatedField(field, index, value);
2694       }
2695 
2696       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2697       public Builder addRepeatedField(
2698           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2699         return super.addRepeatedField(field, value);
2700       }
2701 
2702       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)2703       public Builder mergeFrom(com.google.protobuf.Message other) {
2704         if (other instanceof com.google.cloud.vision.v1.WebDetection.WebPage) {
2705           return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebPage) other);
2706         } else {
2707           super.mergeFrom(other);
2708           return this;
2709         }
2710       }
2711 
mergeFrom(com.google.cloud.vision.v1.WebDetection.WebPage other)2712       public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebPage other) {
2713         if (other == com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance())
2714           return this;
2715         if (!other.getUrl().isEmpty()) {
2716           url_ = other.url_;
2717           bitField0_ |= 0x00000001;
2718           onChanged();
2719         }
2720         if (other.getScore() != 0F) {
2721           setScore(other.getScore());
2722         }
2723         if (!other.getPageTitle().isEmpty()) {
2724           pageTitle_ = other.pageTitle_;
2725           bitField0_ |= 0x00000004;
2726           onChanged();
2727         }
2728         if (fullMatchingImagesBuilder_ == null) {
2729           if (!other.fullMatchingImages_.isEmpty()) {
2730             if (fullMatchingImages_.isEmpty()) {
2731               fullMatchingImages_ = other.fullMatchingImages_;
2732               bitField0_ = (bitField0_ & ~0x00000008);
2733             } else {
2734               ensureFullMatchingImagesIsMutable();
2735               fullMatchingImages_.addAll(other.fullMatchingImages_);
2736             }
2737             onChanged();
2738           }
2739         } else {
2740           if (!other.fullMatchingImages_.isEmpty()) {
2741             if (fullMatchingImagesBuilder_.isEmpty()) {
2742               fullMatchingImagesBuilder_.dispose();
2743               fullMatchingImagesBuilder_ = null;
2744               fullMatchingImages_ = other.fullMatchingImages_;
2745               bitField0_ = (bitField0_ & ~0x00000008);
2746               fullMatchingImagesBuilder_ =
2747                   com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
2748                       ? getFullMatchingImagesFieldBuilder()
2749                       : null;
2750             } else {
2751               fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_);
2752             }
2753           }
2754         }
2755         if (partialMatchingImagesBuilder_ == null) {
2756           if (!other.partialMatchingImages_.isEmpty()) {
2757             if (partialMatchingImages_.isEmpty()) {
2758               partialMatchingImages_ = other.partialMatchingImages_;
2759               bitField0_ = (bitField0_ & ~0x00000010);
2760             } else {
2761               ensurePartialMatchingImagesIsMutable();
2762               partialMatchingImages_.addAll(other.partialMatchingImages_);
2763             }
2764             onChanged();
2765           }
2766         } else {
2767           if (!other.partialMatchingImages_.isEmpty()) {
2768             if (partialMatchingImagesBuilder_.isEmpty()) {
2769               partialMatchingImagesBuilder_.dispose();
2770               partialMatchingImagesBuilder_ = null;
2771               partialMatchingImages_ = other.partialMatchingImages_;
2772               bitField0_ = (bitField0_ & ~0x00000010);
2773               partialMatchingImagesBuilder_ =
2774                   com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
2775                       ? getPartialMatchingImagesFieldBuilder()
2776                       : null;
2777             } else {
2778               partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_);
2779             }
2780           }
2781         }
2782         this.mergeUnknownFields(other.getUnknownFields());
2783         onChanged();
2784         return this;
2785       }
2786 
2787       @java.lang.Override
isInitialized()2788       public final boolean isInitialized() {
2789         return true;
2790       }
2791 
2792       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2793       public Builder mergeFrom(
2794           com.google.protobuf.CodedInputStream input,
2795           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2796           throws java.io.IOException {
2797         if (extensionRegistry == null) {
2798           throw new java.lang.NullPointerException();
2799         }
2800         try {
2801           boolean done = false;
2802           while (!done) {
2803             int tag = input.readTag();
2804             switch (tag) {
2805               case 0:
2806                 done = true;
2807                 break;
2808               case 10:
2809                 {
2810                   url_ = input.readStringRequireUtf8();
2811                   bitField0_ |= 0x00000001;
2812                   break;
2813                 } // case 10
2814               case 21:
2815                 {
2816                   score_ = input.readFloat();
2817                   bitField0_ |= 0x00000002;
2818                   break;
2819                 } // case 21
2820               case 26:
2821                 {
2822                   pageTitle_ = input.readStringRequireUtf8();
2823                   bitField0_ |= 0x00000004;
2824                   break;
2825                 } // case 26
2826               case 34:
2827                 {
2828                   com.google.cloud.vision.v1.WebDetection.WebImage m =
2829                       input.readMessage(
2830                           com.google.cloud.vision.v1.WebDetection.WebImage.parser(),
2831                           extensionRegistry);
2832                   if (fullMatchingImagesBuilder_ == null) {
2833                     ensureFullMatchingImagesIsMutable();
2834                     fullMatchingImages_.add(m);
2835                   } else {
2836                     fullMatchingImagesBuilder_.addMessage(m);
2837                   }
2838                   break;
2839                 } // case 34
2840               case 42:
2841                 {
2842                   com.google.cloud.vision.v1.WebDetection.WebImage m =
2843                       input.readMessage(
2844                           com.google.cloud.vision.v1.WebDetection.WebImage.parser(),
2845                           extensionRegistry);
2846                   if (partialMatchingImagesBuilder_ == null) {
2847                     ensurePartialMatchingImagesIsMutable();
2848                     partialMatchingImages_.add(m);
2849                   } else {
2850                     partialMatchingImagesBuilder_.addMessage(m);
2851                   }
2852                   break;
2853                 } // case 42
2854               default:
2855                 {
2856                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2857                     done = true; // was an endgroup tag
2858                   }
2859                   break;
2860                 } // default:
2861             } // switch (tag)
2862           } // while (!done)
2863         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2864           throw e.unwrapIOException();
2865         } finally {
2866           onChanged();
2867         } // finally
2868         return this;
2869       }
2870 
2871       private int bitField0_;
2872 
2873       private java.lang.Object url_ = "";
2874       /**
2875        *
2876        *
2877        * <pre>
2878        * The result web page URL.
2879        * </pre>
2880        *
2881        * <code>string url = 1;</code>
2882        *
2883        * @return The url.
2884        */
getUrl()2885       public java.lang.String getUrl() {
2886         java.lang.Object ref = url_;
2887         if (!(ref instanceof java.lang.String)) {
2888           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2889           java.lang.String s = bs.toStringUtf8();
2890           url_ = s;
2891           return s;
2892         } else {
2893           return (java.lang.String) ref;
2894         }
2895       }
2896       /**
2897        *
2898        *
2899        * <pre>
2900        * The result web page URL.
2901        * </pre>
2902        *
2903        * <code>string url = 1;</code>
2904        *
2905        * @return The bytes for url.
2906        */
getUrlBytes()2907       public com.google.protobuf.ByteString getUrlBytes() {
2908         java.lang.Object ref = url_;
2909         if (ref instanceof String) {
2910           com.google.protobuf.ByteString b =
2911               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2912           url_ = b;
2913           return b;
2914         } else {
2915           return (com.google.protobuf.ByteString) ref;
2916         }
2917       }
2918       /**
2919        *
2920        *
2921        * <pre>
2922        * The result web page URL.
2923        * </pre>
2924        *
2925        * <code>string url = 1;</code>
2926        *
2927        * @param value The url to set.
2928        * @return This builder for chaining.
2929        */
setUrl(java.lang.String value)2930       public Builder setUrl(java.lang.String value) {
2931         if (value == null) {
2932           throw new NullPointerException();
2933         }
2934         url_ = value;
2935         bitField0_ |= 0x00000001;
2936         onChanged();
2937         return this;
2938       }
2939       /**
2940        *
2941        *
2942        * <pre>
2943        * The result web page URL.
2944        * </pre>
2945        *
2946        * <code>string url = 1;</code>
2947        *
2948        * @return This builder for chaining.
2949        */
clearUrl()2950       public Builder clearUrl() {
2951         url_ = getDefaultInstance().getUrl();
2952         bitField0_ = (bitField0_ & ~0x00000001);
2953         onChanged();
2954         return this;
2955       }
2956       /**
2957        *
2958        *
2959        * <pre>
2960        * The result web page URL.
2961        * </pre>
2962        *
2963        * <code>string url = 1;</code>
2964        *
2965        * @param value The bytes for url to set.
2966        * @return This builder for chaining.
2967        */
setUrlBytes(com.google.protobuf.ByteString value)2968       public Builder setUrlBytes(com.google.protobuf.ByteString value) {
2969         if (value == null) {
2970           throw new NullPointerException();
2971         }
2972         checkByteStringIsUtf8(value);
2973         url_ = value;
2974         bitField0_ |= 0x00000001;
2975         onChanged();
2976         return this;
2977       }
2978 
2979       private float score_;
2980       /**
2981        *
2982        *
2983        * <pre>
2984        * (Deprecated) Overall relevancy score for the web page.
2985        * </pre>
2986        *
2987        * <code>float score = 2;</code>
2988        *
2989        * @return The score.
2990        */
2991       @java.lang.Override
getScore()2992       public float getScore() {
2993         return score_;
2994       }
2995       /**
2996        *
2997        *
2998        * <pre>
2999        * (Deprecated) Overall relevancy score for the web page.
3000        * </pre>
3001        *
3002        * <code>float score = 2;</code>
3003        *
3004        * @param value The score to set.
3005        * @return This builder for chaining.
3006        */
setScore(float value)3007       public Builder setScore(float value) {
3008 
3009         score_ = value;
3010         bitField0_ |= 0x00000002;
3011         onChanged();
3012         return this;
3013       }
3014       /**
3015        *
3016        *
3017        * <pre>
3018        * (Deprecated) Overall relevancy score for the web page.
3019        * </pre>
3020        *
3021        * <code>float score = 2;</code>
3022        *
3023        * @return This builder for chaining.
3024        */
clearScore()3025       public Builder clearScore() {
3026         bitField0_ = (bitField0_ & ~0x00000002);
3027         score_ = 0F;
3028         onChanged();
3029         return this;
3030       }
3031 
3032       private java.lang.Object pageTitle_ = "";
3033       /**
3034        *
3035        *
3036        * <pre>
3037        * Title for the web page, may contain HTML markups.
3038        * </pre>
3039        *
3040        * <code>string page_title = 3;</code>
3041        *
3042        * @return The pageTitle.
3043        */
getPageTitle()3044       public java.lang.String getPageTitle() {
3045         java.lang.Object ref = pageTitle_;
3046         if (!(ref instanceof java.lang.String)) {
3047           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3048           java.lang.String s = bs.toStringUtf8();
3049           pageTitle_ = s;
3050           return s;
3051         } else {
3052           return (java.lang.String) ref;
3053         }
3054       }
3055       /**
3056        *
3057        *
3058        * <pre>
3059        * Title for the web page, may contain HTML markups.
3060        * </pre>
3061        *
3062        * <code>string page_title = 3;</code>
3063        *
3064        * @return The bytes for pageTitle.
3065        */
getPageTitleBytes()3066       public com.google.protobuf.ByteString getPageTitleBytes() {
3067         java.lang.Object ref = pageTitle_;
3068         if (ref instanceof String) {
3069           com.google.protobuf.ByteString b =
3070               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3071           pageTitle_ = b;
3072           return b;
3073         } else {
3074           return (com.google.protobuf.ByteString) ref;
3075         }
3076       }
3077       /**
3078        *
3079        *
3080        * <pre>
3081        * Title for the web page, may contain HTML markups.
3082        * </pre>
3083        *
3084        * <code>string page_title = 3;</code>
3085        *
3086        * @param value The pageTitle to set.
3087        * @return This builder for chaining.
3088        */
setPageTitle(java.lang.String value)3089       public Builder setPageTitle(java.lang.String value) {
3090         if (value == null) {
3091           throw new NullPointerException();
3092         }
3093         pageTitle_ = value;
3094         bitField0_ |= 0x00000004;
3095         onChanged();
3096         return this;
3097       }
3098       /**
3099        *
3100        *
3101        * <pre>
3102        * Title for the web page, may contain HTML markups.
3103        * </pre>
3104        *
3105        * <code>string page_title = 3;</code>
3106        *
3107        * @return This builder for chaining.
3108        */
clearPageTitle()3109       public Builder clearPageTitle() {
3110         pageTitle_ = getDefaultInstance().getPageTitle();
3111         bitField0_ = (bitField0_ & ~0x00000004);
3112         onChanged();
3113         return this;
3114       }
3115       /**
3116        *
3117        *
3118        * <pre>
3119        * Title for the web page, may contain HTML markups.
3120        * </pre>
3121        *
3122        * <code>string page_title = 3;</code>
3123        *
3124        * @param value The bytes for pageTitle to set.
3125        * @return This builder for chaining.
3126        */
setPageTitleBytes(com.google.protobuf.ByteString value)3127       public Builder setPageTitleBytes(com.google.protobuf.ByteString value) {
3128         if (value == null) {
3129           throw new NullPointerException();
3130         }
3131         checkByteStringIsUtf8(value);
3132         pageTitle_ = value;
3133         bitField0_ |= 0x00000004;
3134         onChanged();
3135         return this;
3136       }
3137 
3138       private java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage> fullMatchingImages_ =
3139           java.util.Collections.emptyList();
3140 
ensureFullMatchingImagesIsMutable()3141       private void ensureFullMatchingImagesIsMutable() {
3142         if (!((bitField0_ & 0x00000008) != 0)) {
3143           fullMatchingImages_ =
3144               new java.util.ArrayList<com.google.cloud.vision.v1.WebDetection.WebImage>(
3145                   fullMatchingImages_);
3146           bitField0_ |= 0x00000008;
3147         }
3148       }
3149 
3150       private com.google.protobuf.RepeatedFieldBuilderV3<
3151               com.google.cloud.vision.v1.WebDetection.WebImage,
3152               com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
3153               com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
3154           fullMatchingImagesBuilder_;
3155 
3156       /**
3157        *
3158        *
3159        * <pre>
3160        * Fully matching images on the page.
3161        * Can include resized copies of the query image.
3162        * </pre>
3163        *
3164        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3165        * </code>
3166        */
3167       public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
getFullMatchingImagesList()3168           getFullMatchingImagesList() {
3169         if (fullMatchingImagesBuilder_ == null) {
3170           return java.util.Collections.unmodifiableList(fullMatchingImages_);
3171         } else {
3172           return fullMatchingImagesBuilder_.getMessageList();
3173         }
3174       }
3175       /**
3176        *
3177        *
3178        * <pre>
3179        * Fully matching images on the page.
3180        * Can include resized copies of the query image.
3181        * </pre>
3182        *
3183        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3184        * </code>
3185        */
getFullMatchingImagesCount()3186       public int getFullMatchingImagesCount() {
3187         if (fullMatchingImagesBuilder_ == null) {
3188           return fullMatchingImages_.size();
3189         } else {
3190           return fullMatchingImagesBuilder_.getCount();
3191         }
3192       }
3193       /**
3194        *
3195        *
3196        * <pre>
3197        * Fully matching images on the page.
3198        * Can include resized copies of the query image.
3199        * </pre>
3200        *
3201        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3202        * </code>
3203        */
getFullMatchingImages(int index)3204       public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) {
3205         if (fullMatchingImagesBuilder_ == null) {
3206           return fullMatchingImages_.get(index);
3207         } else {
3208           return fullMatchingImagesBuilder_.getMessage(index);
3209         }
3210       }
3211       /**
3212        *
3213        *
3214        * <pre>
3215        * Fully matching images on the page.
3216        * Can include resized copies of the query image.
3217        * </pre>
3218        *
3219        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3220        * </code>
3221        */
setFullMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage value)3222       public Builder setFullMatchingImages(
3223           int index, com.google.cloud.vision.v1.WebDetection.WebImage value) {
3224         if (fullMatchingImagesBuilder_ == null) {
3225           if (value == null) {
3226             throw new NullPointerException();
3227           }
3228           ensureFullMatchingImagesIsMutable();
3229           fullMatchingImages_.set(index, value);
3230           onChanged();
3231         } else {
3232           fullMatchingImagesBuilder_.setMessage(index, value);
3233         }
3234         return this;
3235       }
3236       /**
3237        *
3238        *
3239        * <pre>
3240        * Fully matching images on the page.
3241        * Can include resized copies of the query image.
3242        * </pre>
3243        *
3244        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3245        * </code>
3246        */
setFullMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)3247       public Builder setFullMatchingImages(
3248           int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
3249         if (fullMatchingImagesBuilder_ == null) {
3250           ensureFullMatchingImagesIsMutable();
3251           fullMatchingImages_.set(index, builderForValue.build());
3252           onChanged();
3253         } else {
3254           fullMatchingImagesBuilder_.setMessage(index, builderForValue.build());
3255         }
3256         return this;
3257       }
3258       /**
3259        *
3260        *
3261        * <pre>
3262        * Fully matching images on the page.
3263        * Can include resized copies of the query image.
3264        * </pre>
3265        *
3266        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3267        * </code>
3268        */
addFullMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value)3269       public Builder addFullMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value) {
3270         if (fullMatchingImagesBuilder_ == null) {
3271           if (value == null) {
3272             throw new NullPointerException();
3273           }
3274           ensureFullMatchingImagesIsMutable();
3275           fullMatchingImages_.add(value);
3276           onChanged();
3277         } else {
3278           fullMatchingImagesBuilder_.addMessage(value);
3279         }
3280         return this;
3281       }
3282       /**
3283        *
3284        *
3285        * <pre>
3286        * Fully matching images on the page.
3287        * Can include resized copies of the query image.
3288        * </pre>
3289        *
3290        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3291        * </code>
3292        */
addFullMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage value)3293       public Builder addFullMatchingImages(
3294           int index, com.google.cloud.vision.v1.WebDetection.WebImage value) {
3295         if (fullMatchingImagesBuilder_ == null) {
3296           if (value == null) {
3297             throw new NullPointerException();
3298           }
3299           ensureFullMatchingImagesIsMutable();
3300           fullMatchingImages_.add(index, value);
3301           onChanged();
3302         } else {
3303           fullMatchingImagesBuilder_.addMessage(index, value);
3304         }
3305         return this;
3306       }
3307       /**
3308        *
3309        *
3310        * <pre>
3311        * Fully matching images on the page.
3312        * Can include resized copies of the query image.
3313        * </pre>
3314        *
3315        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3316        * </code>
3317        */
addFullMatchingImages( com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)3318       public Builder addFullMatchingImages(
3319           com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
3320         if (fullMatchingImagesBuilder_ == null) {
3321           ensureFullMatchingImagesIsMutable();
3322           fullMatchingImages_.add(builderForValue.build());
3323           onChanged();
3324         } else {
3325           fullMatchingImagesBuilder_.addMessage(builderForValue.build());
3326         }
3327         return this;
3328       }
3329       /**
3330        *
3331        *
3332        * <pre>
3333        * Fully matching images on the page.
3334        * Can include resized copies of the query image.
3335        * </pre>
3336        *
3337        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3338        * </code>
3339        */
addFullMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)3340       public Builder addFullMatchingImages(
3341           int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
3342         if (fullMatchingImagesBuilder_ == null) {
3343           ensureFullMatchingImagesIsMutable();
3344           fullMatchingImages_.add(index, builderForValue.build());
3345           onChanged();
3346         } else {
3347           fullMatchingImagesBuilder_.addMessage(index, builderForValue.build());
3348         }
3349         return this;
3350       }
3351       /**
3352        *
3353        *
3354        * <pre>
3355        * Fully matching images on the page.
3356        * Can include resized copies of the query image.
3357        * </pre>
3358        *
3359        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3360        * </code>
3361        */
addAllFullMatchingImages( java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebImage> values)3362       public Builder addAllFullMatchingImages(
3363           java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebImage> values) {
3364         if (fullMatchingImagesBuilder_ == null) {
3365           ensureFullMatchingImagesIsMutable();
3366           com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fullMatchingImages_);
3367           onChanged();
3368         } else {
3369           fullMatchingImagesBuilder_.addAllMessages(values);
3370         }
3371         return this;
3372       }
3373       /**
3374        *
3375        *
3376        * <pre>
3377        * Fully matching images on the page.
3378        * Can include resized copies of the query image.
3379        * </pre>
3380        *
3381        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3382        * </code>
3383        */
clearFullMatchingImages()3384       public Builder clearFullMatchingImages() {
3385         if (fullMatchingImagesBuilder_ == null) {
3386           fullMatchingImages_ = java.util.Collections.emptyList();
3387           bitField0_ = (bitField0_ & ~0x00000008);
3388           onChanged();
3389         } else {
3390           fullMatchingImagesBuilder_.clear();
3391         }
3392         return this;
3393       }
3394       /**
3395        *
3396        *
3397        * <pre>
3398        * Fully matching images on the page.
3399        * Can include resized copies of the query image.
3400        * </pre>
3401        *
3402        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3403        * </code>
3404        */
removeFullMatchingImages(int index)3405       public Builder removeFullMatchingImages(int index) {
3406         if (fullMatchingImagesBuilder_ == null) {
3407           ensureFullMatchingImagesIsMutable();
3408           fullMatchingImages_.remove(index);
3409           onChanged();
3410         } else {
3411           fullMatchingImagesBuilder_.remove(index);
3412         }
3413         return this;
3414       }
3415       /**
3416        *
3417        *
3418        * <pre>
3419        * Fully matching images on the page.
3420        * Can include resized copies of the query image.
3421        * </pre>
3422        *
3423        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3424        * </code>
3425        */
getFullMatchingImagesBuilder( int index)3426       public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder(
3427           int index) {
3428         return getFullMatchingImagesFieldBuilder().getBuilder(index);
3429       }
3430       /**
3431        *
3432        *
3433        * <pre>
3434        * Fully matching images on the page.
3435        * Can include resized copies of the query image.
3436        * </pre>
3437        *
3438        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3439        * </code>
3440        */
3441       public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder
getFullMatchingImagesOrBuilder(int index)3442           getFullMatchingImagesOrBuilder(int index) {
3443         if (fullMatchingImagesBuilder_ == null) {
3444           return fullMatchingImages_.get(index);
3445         } else {
3446           return fullMatchingImagesBuilder_.getMessageOrBuilder(index);
3447         }
3448       }
3449       /**
3450        *
3451        *
3452        * <pre>
3453        * Fully matching images on the page.
3454        * Can include resized copies of the query image.
3455        * </pre>
3456        *
3457        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3458        * </code>
3459        */
3460       public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getFullMatchingImagesOrBuilderList()3461           getFullMatchingImagesOrBuilderList() {
3462         if (fullMatchingImagesBuilder_ != null) {
3463           return fullMatchingImagesBuilder_.getMessageOrBuilderList();
3464         } else {
3465           return java.util.Collections.unmodifiableList(fullMatchingImages_);
3466         }
3467       }
3468       /**
3469        *
3470        *
3471        * <pre>
3472        * Fully matching images on the page.
3473        * Can include resized copies of the query image.
3474        * </pre>
3475        *
3476        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3477        * </code>
3478        */
3479       public com.google.cloud.vision.v1.WebDetection.WebImage.Builder
addFullMatchingImagesBuilder()3480           addFullMatchingImagesBuilder() {
3481         return getFullMatchingImagesFieldBuilder()
3482             .addBuilder(com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance());
3483       }
3484       /**
3485        *
3486        *
3487        * <pre>
3488        * Fully matching images on the page.
3489        * Can include resized copies of the query image.
3490        * </pre>
3491        *
3492        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3493        * </code>
3494        */
addFullMatchingImagesBuilder( int index)3495       public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder(
3496           int index) {
3497         return getFullMatchingImagesFieldBuilder()
3498             .addBuilder(
3499                 index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance());
3500       }
3501       /**
3502        *
3503        *
3504        * <pre>
3505        * Fully matching images on the page.
3506        * Can include resized copies of the query image.
3507        * </pre>
3508        *
3509        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4;
3510        * </code>
3511        */
3512       public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage.Builder>
getFullMatchingImagesBuilderList()3513           getFullMatchingImagesBuilderList() {
3514         return getFullMatchingImagesFieldBuilder().getBuilderList();
3515       }
3516 
3517       private com.google.protobuf.RepeatedFieldBuilderV3<
3518               com.google.cloud.vision.v1.WebDetection.WebImage,
3519               com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
3520               com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getFullMatchingImagesFieldBuilder()3521           getFullMatchingImagesFieldBuilder() {
3522         if (fullMatchingImagesBuilder_ == null) {
3523           fullMatchingImagesBuilder_ =
3524               new com.google.protobuf.RepeatedFieldBuilderV3<
3525                   com.google.cloud.vision.v1.WebDetection.WebImage,
3526                   com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
3527                   com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>(
3528                   fullMatchingImages_,
3529                   ((bitField0_ & 0x00000008) != 0),
3530                   getParentForChildren(),
3531                   isClean());
3532           fullMatchingImages_ = null;
3533         }
3534         return fullMatchingImagesBuilder_;
3535       }
3536 
3537       private java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
3538           partialMatchingImages_ = java.util.Collections.emptyList();
3539 
ensurePartialMatchingImagesIsMutable()3540       private void ensurePartialMatchingImagesIsMutable() {
3541         if (!((bitField0_ & 0x00000010) != 0)) {
3542           partialMatchingImages_ =
3543               new java.util.ArrayList<com.google.cloud.vision.v1.WebDetection.WebImage>(
3544                   partialMatchingImages_);
3545           bitField0_ |= 0x00000010;
3546         }
3547       }
3548 
3549       private com.google.protobuf.RepeatedFieldBuilderV3<
3550               com.google.cloud.vision.v1.WebDetection.WebImage,
3551               com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
3552               com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
3553           partialMatchingImagesBuilder_;
3554 
3555       /**
3556        *
3557        *
3558        * <pre>
3559        * Partial matching images on the page.
3560        * Those images are similar enough to share some key-point features. For
3561        * example an original image will likely have partial matching for its
3562        * crops.
3563        * </pre>
3564        *
3565        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3566        * </code>
3567        */
3568       public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
getPartialMatchingImagesList()3569           getPartialMatchingImagesList() {
3570         if (partialMatchingImagesBuilder_ == null) {
3571           return java.util.Collections.unmodifiableList(partialMatchingImages_);
3572         } else {
3573           return partialMatchingImagesBuilder_.getMessageList();
3574         }
3575       }
3576       /**
3577        *
3578        *
3579        * <pre>
3580        * Partial matching images on the page.
3581        * Those images are similar enough to share some key-point features. For
3582        * example an original image will likely have partial matching for its
3583        * crops.
3584        * </pre>
3585        *
3586        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3587        * </code>
3588        */
getPartialMatchingImagesCount()3589       public int getPartialMatchingImagesCount() {
3590         if (partialMatchingImagesBuilder_ == null) {
3591           return partialMatchingImages_.size();
3592         } else {
3593           return partialMatchingImagesBuilder_.getCount();
3594         }
3595       }
3596       /**
3597        *
3598        *
3599        * <pre>
3600        * Partial matching images on the page.
3601        * Those images are similar enough to share some key-point features. For
3602        * example an original image will likely have partial matching for its
3603        * crops.
3604        * </pre>
3605        *
3606        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3607        * </code>
3608        */
getPartialMatchingImages(int index)3609       public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) {
3610         if (partialMatchingImagesBuilder_ == null) {
3611           return partialMatchingImages_.get(index);
3612         } else {
3613           return partialMatchingImagesBuilder_.getMessage(index);
3614         }
3615       }
3616       /**
3617        *
3618        *
3619        * <pre>
3620        * Partial matching images on the page.
3621        * Those images are similar enough to share some key-point features. For
3622        * example an original image will likely have partial matching for its
3623        * crops.
3624        * </pre>
3625        *
3626        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3627        * </code>
3628        */
setPartialMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage value)3629       public Builder setPartialMatchingImages(
3630           int index, com.google.cloud.vision.v1.WebDetection.WebImage value) {
3631         if (partialMatchingImagesBuilder_ == null) {
3632           if (value == null) {
3633             throw new NullPointerException();
3634           }
3635           ensurePartialMatchingImagesIsMutable();
3636           partialMatchingImages_.set(index, value);
3637           onChanged();
3638         } else {
3639           partialMatchingImagesBuilder_.setMessage(index, value);
3640         }
3641         return this;
3642       }
3643       /**
3644        *
3645        *
3646        * <pre>
3647        * Partial matching images on the page.
3648        * Those images are similar enough to share some key-point features. For
3649        * example an original image will likely have partial matching for its
3650        * crops.
3651        * </pre>
3652        *
3653        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3654        * </code>
3655        */
setPartialMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)3656       public Builder setPartialMatchingImages(
3657           int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
3658         if (partialMatchingImagesBuilder_ == null) {
3659           ensurePartialMatchingImagesIsMutable();
3660           partialMatchingImages_.set(index, builderForValue.build());
3661           onChanged();
3662         } else {
3663           partialMatchingImagesBuilder_.setMessage(index, builderForValue.build());
3664         }
3665         return this;
3666       }
3667       /**
3668        *
3669        *
3670        * <pre>
3671        * Partial matching images on the page.
3672        * Those images are similar enough to share some key-point features. For
3673        * example an original image will likely have partial matching for its
3674        * crops.
3675        * </pre>
3676        *
3677        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3678        * </code>
3679        */
addPartialMatchingImages( com.google.cloud.vision.v1.WebDetection.WebImage value)3680       public Builder addPartialMatchingImages(
3681           com.google.cloud.vision.v1.WebDetection.WebImage value) {
3682         if (partialMatchingImagesBuilder_ == null) {
3683           if (value == null) {
3684             throw new NullPointerException();
3685           }
3686           ensurePartialMatchingImagesIsMutable();
3687           partialMatchingImages_.add(value);
3688           onChanged();
3689         } else {
3690           partialMatchingImagesBuilder_.addMessage(value);
3691         }
3692         return this;
3693       }
3694       /**
3695        *
3696        *
3697        * <pre>
3698        * Partial matching images on the page.
3699        * Those images are similar enough to share some key-point features. For
3700        * example an original image will likely have partial matching for its
3701        * crops.
3702        * </pre>
3703        *
3704        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3705        * </code>
3706        */
addPartialMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage value)3707       public Builder addPartialMatchingImages(
3708           int index, com.google.cloud.vision.v1.WebDetection.WebImage value) {
3709         if (partialMatchingImagesBuilder_ == null) {
3710           if (value == null) {
3711             throw new NullPointerException();
3712           }
3713           ensurePartialMatchingImagesIsMutable();
3714           partialMatchingImages_.add(index, value);
3715           onChanged();
3716         } else {
3717           partialMatchingImagesBuilder_.addMessage(index, value);
3718         }
3719         return this;
3720       }
3721       /**
3722        *
3723        *
3724        * <pre>
3725        * Partial matching images on the page.
3726        * Those images are similar enough to share some key-point features. For
3727        * example an original image will likely have partial matching for its
3728        * crops.
3729        * </pre>
3730        *
3731        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3732        * </code>
3733        */
addPartialMatchingImages( com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)3734       public Builder addPartialMatchingImages(
3735           com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
3736         if (partialMatchingImagesBuilder_ == null) {
3737           ensurePartialMatchingImagesIsMutable();
3738           partialMatchingImages_.add(builderForValue.build());
3739           onChanged();
3740         } else {
3741           partialMatchingImagesBuilder_.addMessage(builderForValue.build());
3742         }
3743         return this;
3744       }
3745       /**
3746        *
3747        *
3748        * <pre>
3749        * Partial matching images on the page.
3750        * Those images are similar enough to share some key-point features. For
3751        * example an original image will likely have partial matching for its
3752        * crops.
3753        * </pre>
3754        *
3755        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3756        * </code>
3757        */
addPartialMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)3758       public Builder addPartialMatchingImages(
3759           int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
3760         if (partialMatchingImagesBuilder_ == null) {
3761           ensurePartialMatchingImagesIsMutable();
3762           partialMatchingImages_.add(index, builderForValue.build());
3763           onChanged();
3764         } else {
3765           partialMatchingImagesBuilder_.addMessage(index, builderForValue.build());
3766         }
3767         return this;
3768       }
3769       /**
3770        *
3771        *
3772        * <pre>
3773        * Partial matching images on the page.
3774        * Those images are similar enough to share some key-point features. For
3775        * example an original image will likely have partial matching for its
3776        * crops.
3777        * </pre>
3778        *
3779        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3780        * </code>
3781        */
addAllPartialMatchingImages( java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebImage> values)3782       public Builder addAllPartialMatchingImages(
3783           java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebImage> values) {
3784         if (partialMatchingImagesBuilder_ == null) {
3785           ensurePartialMatchingImagesIsMutable();
3786           com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialMatchingImages_);
3787           onChanged();
3788         } else {
3789           partialMatchingImagesBuilder_.addAllMessages(values);
3790         }
3791         return this;
3792       }
3793       /**
3794        *
3795        *
3796        * <pre>
3797        * Partial matching images on the page.
3798        * Those images are similar enough to share some key-point features. For
3799        * example an original image will likely have partial matching for its
3800        * crops.
3801        * </pre>
3802        *
3803        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3804        * </code>
3805        */
clearPartialMatchingImages()3806       public Builder clearPartialMatchingImages() {
3807         if (partialMatchingImagesBuilder_ == null) {
3808           partialMatchingImages_ = java.util.Collections.emptyList();
3809           bitField0_ = (bitField0_ & ~0x00000010);
3810           onChanged();
3811         } else {
3812           partialMatchingImagesBuilder_.clear();
3813         }
3814         return this;
3815       }
3816       /**
3817        *
3818        *
3819        * <pre>
3820        * Partial matching images on the page.
3821        * Those images are similar enough to share some key-point features. For
3822        * example an original image will likely have partial matching for its
3823        * crops.
3824        * </pre>
3825        *
3826        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3827        * </code>
3828        */
removePartialMatchingImages(int index)3829       public Builder removePartialMatchingImages(int index) {
3830         if (partialMatchingImagesBuilder_ == null) {
3831           ensurePartialMatchingImagesIsMutable();
3832           partialMatchingImages_.remove(index);
3833           onChanged();
3834         } else {
3835           partialMatchingImagesBuilder_.remove(index);
3836         }
3837         return this;
3838       }
3839       /**
3840        *
3841        *
3842        * <pre>
3843        * Partial matching images on the page.
3844        * Those images are similar enough to share some key-point features. For
3845        * example an original image will likely have partial matching for its
3846        * crops.
3847        * </pre>
3848        *
3849        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3850        * </code>
3851        */
3852       public com.google.cloud.vision.v1.WebDetection.WebImage.Builder
getPartialMatchingImagesBuilder(int index)3853           getPartialMatchingImagesBuilder(int index) {
3854         return getPartialMatchingImagesFieldBuilder().getBuilder(index);
3855       }
3856       /**
3857        *
3858        *
3859        * <pre>
3860        * Partial matching images on the page.
3861        * Those images are similar enough to share some key-point features. For
3862        * example an original image will likely have partial matching for its
3863        * crops.
3864        * </pre>
3865        *
3866        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3867        * </code>
3868        */
3869       public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder
getPartialMatchingImagesOrBuilder(int index)3870           getPartialMatchingImagesOrBuilder(int index) {
3871         if (partialMatchingImagesBuilder_ == null) {
3872           return partialMatchingImages_.get(index);
3873         } else {
3874           return partialMatchingImagesBuilder_.getMessageOrBuilder(index);
3875         }
3876       }
3877       /**
3878        *
3879        *
3880        * <pre>
3881        * Partial matching images on the page.
3882        * Those images are similar enough to share some key-point features. For
3883        * example an original image will likely have partial matching for its
3884        * crops.
3885        * </pre>
3886        *
3887        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3888        * </code>
3889        */
3890       public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getPartialMatchingImagesOrBuilderList()3891           getPartialMatchingImagesOrBuilderList() {
3892         if (partialMatchingImagesBuilder_ != null) {
3893           return partialMatchingImagesBuilder_.getMessageOrBuilderList();
3894         } else {
3895           return java.util.Collections.unmodifiableList(partialMatchingImages_);
3896         }
3897       }
3898       /**
3899        *
3900        *
3901        * <pre>
3902        * Partial matching images on the page.
3903        * Those images are similar enough to share some key-point features. For
3904        * example an original image will likely have partial matching for its
3905        * crops.
3906        * </pre>
3907        *
3908        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3909        * </code>
3910        */
3911       public com.google.cloud.vision.v1.WebDetection.WebImage.Builder
addPartialMatchingImagesBuilder()3912           addPartialMatchingImagesBuilder() {
3913         return getPartialMatchingImagesFieldBuilder()
3914             .addBuilder(com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance());
3915       }
3916       /**
3917        *
3918        *
3919        * <pre>
3920        * Partial matching images on the page.
3921        * Those images are similar enough to share some key-point features. For
3922        * example an original image will likely have partial matching for its
3923        * crops.
3924        * </pre>
3925        *
3926        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3927        * </code>
3928        */
3929       public com.google.cloud.vision.v1.WebDetection.WebImage.Builder
addPartialMatchingImagesBuilder(int index)3930           addPartialMatchingImagesBuilder(int index) {
3931         return getPartialMatchingImagesFieldBuilder()
3932             .addBuilder(
3933                 index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance());
3934       }
3935       /**
3936        *
3937        *
3938        * <pre>
3939        * Partial matching images on the page.
3940        * Those images are similar enough to share some key-point features. For
3941        * example an original image will likely have partial matching for its
3942        * crops.
3943        * </pre>
3944        *
3945        * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5;
3946        * </code>
3947        */
3948       public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage.Builder>
getPartialMatchingImagesBuilderList()3949           getPartialMatchingImagesBuilderList() {
3950         return getPartialMatchingImagesFieldBuilder().getBuilderList();
3951       }
3952 
3953       private com.google.protobuf.RepeatedFieldBuilderV3<
3954               com.google.cloud.vision.v1.WebDetection.WebImage,
3955               com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
3956               com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getPartialMatchingImagesFieldBuilder()3957           getPartialMatchingImagesFieldBuilder() {
3958         if (partialMatchingImagesBuilder_ == null) {
3959           partialMatchingImagesBuilder_ =
3960               new com.google.protobuf.RepeatedFieldBuilderV3<
3961                   com.google.cloud.vision.v1.WebDetection.WebImage,
3962                   com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
3963                   com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>(
3964                   partialMatchingImages_,
3965                   ((bitField0_ & 0x00000010) != 0),
3966                   getParentForChildren(),
3967                   isClean());
3968           partialMatchingImages_ = null;
3969         }
3970         return partialMatchingImagesBuilder_;
3971       }
3972 
3973       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3974       public final Builder setUnknownFields(
3975           final com.google.protobuf.UnknownFieldSet unknownFields) {
3976         return super.setUnknownFields(unknownFields);
3977       }
3978 
3979       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3980       public final Builder mergeUnknownFields(
3981           final com.google.protobuf.UnknownFieldSet unknownFields) {
3982         return super.mergeUnknownFields(unknownFields);
3983       }
3984 
3985       // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebPage)
3986     }
3987 
3988     // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebPage)
3989     private static final com.google.cloud.vision.v1.WebDetection.WebPage DEFAULT_INSTANCE;
3990 
3991     static {
3992       DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebPage();
3993     }
3994 
getDefaultInstance()3995     public static com.google.cloud.vision.v1.WebDetection.WebPage getDefaultInstance() {
3996       return DEFAULT_INSTANCE;
3997     }
3998 
3999     private static final com.google.protobuf.Parser<WebPage> PARSER =
4000         new com.google.protobuf.AbstractParser<WebPage>() {
4001           @java.lang.Override
4002           public WebPage parsePartialFrom(
4003               com.google.protobuf.CodedInputStream input,
4004               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4005               throws com.google.protobuf.InvalidProtocolBufferException {
4006             Builder builder = newBuilder();
4007             try {
4008               builder.mergeFrom(input, extensionRegistry);
4009             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4010               throw e.setUnfinishedMessage(builder.buildPartial());
4011             } catch (com.google.protobuf.UninitializedMessageException e) {
4012               throw e.asInvalidProtocolBufferException()
4013                   .setUnfinishedMessage(builder.buildPartial());
4014             } catch (java.io.IOException e) {
4015               throw new com.google.protobuf.InvalidProtocolBufferException(e)
4016                   .setUnfinishedMessage(builder.buildPartial());
4017             }
4018             return builder.buildPartial();
4019           }
4020         };
4021 
parser()4022     public static com.google.protobuf.Parser<WebPage> parser() {
4023       return PARSER;
4024     }
4025 
4026     @java.lang.Override
getParserForType()4027     public com.google.protobuf.Parser<WebPage> getParserForType() {
4028       return PARSER;
4029     }
4030 
4031     @java.lang.Override
getDefaultInstanceForType()4032     public com.google.cloud.vision.v1.WebDetection.WebPage getDefaultInstanceForType() {
4033       return DEFAULT_INSTANCE;
4034     }
4035   }
4036 
4037   public interface WebLabelOrBuilder
4038       extends
4039       // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebLabel)
4040       com.google.protobuf.MessageOrBuilder {
4041 
4042     /**
4043      *
4044      *
4045      * <pre>
4046      * Label for extra metadata.
4047      * </pre>
4048      *
4049      * <code>string label = 1;</code>
4050      *
4051      * @return The label.
4052      */
getLabel()4053     java.lang.String getLabel();
4054     /**
4055      *
4056      *
4057      * <pre>
4058      * Label for extra metadata.
4059      * </pre>
4060      *
4061      * <code>string label = 1;</code>
4062      *
4063      * @return The bytes for label.
4064      */
getLabelBytes()4065     com.google.protobuf.ByteString getLabelBytes();
4066 
4067     /**
4068      *
4069      *
4070      * <pre>
4071      * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
4072      * For more information, see
4073      * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
4074      * </pre>
4075      *
4076      * <code>string language_code = 2;</code>
4077      *
4078      * @return The languageCode.
4079      */
getLanguageCode()4080     java.lang.String getLanguageCode();
4081     /**
4082      *
4083      *
4084      * <pre>
4085      * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
4086      * For more information, see
4087      * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
4088      * </pre>
4089      *
4090      * <code>string language_code = 2;</code>
4091      *
4092      * @return The bytes for languageCode.
4093      */
getLanguageCodeBytes()4094     com.google.protobuf.ByteString getLanguageCodeBytes();
4095   }
4096   /**
4097    *
4098    *
4099    * <pre>
4100    * Label to provide extra metadata for the web detection.
4101    * </pre>
4102    *
4103    * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebLabel}
4104    */
4105   public static final class WebLabel extends com.google.protobuf.GeneratedMessageV3
4106       implements
4107       // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebLabel)
4108       WebLabelOrBuilder {
4109     private static final long serialVersionUID = 0L;
4110     // Use WebLabel.newBuilder() to construct.
WebLabel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)4111     private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
4112       super(builder);
4113     }
4114 
WebLabel()4115     private WebLabel() {
4116       label_ = "";
4117       languageCode_ = "";
4118     }
4119 
4120     @java.lang.Override
4121     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)4122     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
4123       return new WebLabel();
4124     }
4125 
4126     @java.lang.Override
getUnknownFields()4127     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
4128       return this.unknownFields;
4129     }
4130 
getDescriptor()4131     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
4132       return com.google.cloud.vision.v1.WebDetectionProto
4133           .internal_static_google_cloud_vision_v1_WebDetection_WebLabel_descriptor;
4134     }
4135 
4136     @java.lang.Override
4137     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()4138         internalGetFieldAccessorTable() {
4139       return com.google.cloud.vision.v1.WebDetectionProto
4140           .internal_static_google_cloud_vision_v1_WebDetection_WebLabel_fieldAccessorTable
4141           .ensureFieldAccessorsInitialized(
4142               com.google.cloud.vision.v1.WebDetection.WebLabel.class,
4143               com.google.cloud.vision.v1.WebDetection.WebLabel.Builder.class);
4144     }
4145 
4146     public static final int LABEL_FIELD_NUMBER = 1;
4147 
4148     @SuppressWarnings("serial")
4149     private volatile java.lang.Object label_ = "";
4150     /**
4151      *
4152      *
4153      * <pre>
4154      * Label for extra metadata.
4155      * </pre>
4156      *
4157      * <code>string label = 1;</code>
4158      *
4159      * @return The label.
4160      */
4161     @java.lang.Override
getLabel()4162     public java.lang.String getLabel() {
4163       java.lang.Object ref = label_;
4164       if (ref instanceof java.lang.String) {
4165         return (java.lang.String) ref;
4166       } else {
4167         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4168         java.lang.String s = bs.toStringUtf8();
4169         label_ = s;
4170         return s;
4171       }
4172     }
4173     /**
4174      *
4175      *
4176      * <pre>
4177      * Label for extra metadata.
4178      * </pre>
4179      *
4180      * <code>string label = 1;</code>
4181      *
4182      * @return The bytes for label.
4183      */
4184     @java.lang.Override
getLabelBytes()4185     public com.google.protobuf.ByteString getLabelBytes() {
4186       java.lang.Object ref = label_;
4187       if (ref instanceof java.lang.String) {
4188         com.google.protobuf.ByteString b =
4189             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4190         label_ = b;
4191         return b;
4192       } else {
4193         return (com.google.protobuf.ByteString) ref;
4194       }
4195     }
4196 
4197     public static final int LANGUAGE_CODE_FIELD_NUMBER = 2;
4198 
4199     @SuppressWarnings("serial")
4200     private volatile java.lang.Object languageCode_ = "";
4201     /**
4202      *
4203      *
4204      * <pre>
4205      * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
4206      * For more information, see
4207      * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
4208      * </pre>
4209      *
4210      * <code>string language_code = 2;</code>
4211      *
4212      * @return The languageCode.
4213      */
4214     @java.lang.Override
getLanguageCode()4215     public java.lang.String getLanguageCode() {
4216       java.lang.Object ref = languageCode_;
4217       if (ref instanceof java.lang.String) {
4218         return (java.lang.String) ref;
4219       } else {
4220         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4221         java.lang.String s = bs.toStringUtf8();
4222         languageCode_ = s;
4223         return s;
4224       }
4225     }
4226     /**
4227      *
4228      *
4229      * <pre>
4230      * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
4231      * For more information, see
4232      * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
4233      * </pre>
4234      *
4235      * <code>string language_code = 2;</code>
4236      *
4237      * @return The bytes for languageCode.
4238      */
4239     @java.lang.Override
getLanguageCodeBytes()4240     public com.google.protobuf.ByteString getLanguageCodeBytes() {
4241       java.lang.Object ref = languageCode_;
4242       if (ref instanceof java.lang.String) {
4243         com.google.protobuf.ByteString b =
4244             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4245         languageCode_ = b;
4246         return b;
4247       } else {
4248         return (com.google.protobuf.ByteString) ref;
4249       }
4250     }
4251 
4252     private byte memoizedIsInitialized = -1;
4253 
4254     @java.lang.Override
isInitialized()4255     public final boolean isInitialized() {
4256       byte isInitialized = memoizedIsInitialized;
4257       if (isInitialized == 1) return true;
4258       if (isInitialized == 0) return false;
4259 
4260       memoizedIsInitialized = 1;
4261       return true;
4262     }
4263 
4264     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)4265     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
4266       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
4267         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_);
4268       }
4269       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
4270         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_);
4271       }
4272       getUnknownFields().writeTo(output);
4273     }
4274 
4275     @java.lang.Override
getSerializedSize()4276     public int getSerializedSize() {
4277       int size = memoizedSize;
4278       if (size != -1) return size;
4279 
4280       size = 0;
4281       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
4282         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_);
4283       }
4284       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
4285         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_);
4286       }
4287       size += getUnknownFields().getSerializedSize();
4288       memoizedSize = size;
4289       return size;
4290     }
4291 
4292     @java.lang.Override
equals(final java.lang.Object obj)4293     public boolean equals(final java.lang.Object obj) {
4294       if (obj == this) {
4295         return true;
4296       }
4297       if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebLabel)) {
4298         return super.equals(obj);
4299       }
4300       com.google.cloud.vision.v1.WebDetection.WebLabel other =
4301           (com.google.cloud.vision.v1.WebDetection.WebLabel) obj;
4302 
4303       if (!getLabel().equals(other.getLabel())) return false;
4304       if (!getLanguageCode().equals(other.getLanguageCode())) return false;
4305       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
4306       return true;
4307     }
4308 
4309     @java.lang.Override
hashCode()4310     public int hashCode() {
4311       if (memoizedHashCode != 0) {
4312         return memoizedHashCode;
4313       }
4314       int hash = 41;
4315       hash = (19 * hash) + getDescriptor().hashCode();
4316       hash = (37 * hash) + LABEL_FIELD_NUMBER;
4317       hash = (53 * hash) + getLabel().hashCode();
4318       hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
4319       hash = (53 * hash) + getLanguageCode().hashCode();
4320       hash = (29 * hash) + getUnknownFields().hashCode();
4321       memoizedHashCode = hash;
4322       return hash;
4323     }
4324 
parseFrom( java.nio.ByteBuffer data)4325     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(
4326         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
4327       return PARSER.parseFrom(data);
4328     }
4329 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4330     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(
4331         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4332         throws com.google.protobuf.InvalidProtocolBufferException {
4333       return PARSER.parseFrom(data, extensionRegistry);
4334     }
4335 
parseFrom( com.google.protobuf.ByteString data)4336     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(
4337         com.google.protobuf.ByteString data)
4338         throws com.google.protobuf.InvalidProtocolBufferException {
4339       return PARSER.parseFrom(data);
4340     }
4341 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4342     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(
4343         com.google.protobuf.ByteString data,
4344         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4345         throws com.google.protobuf.InvalidProtocolBufferException {
4346       return PARSER.parseFrom(data, extensionRegistry);
4347     }
4348 
parseFrom(byte[] data)4349     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(byte[] data)
4350         throws com.google.protobuf.InvalidProtocolBufferException {
4351       return PARSER.parseFrom(data);
4352     }
4353 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4354     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(
4355         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4356         throws com.google.protobuf.InvalidProtocolBufferException {
4357       return PARSER.parseFrom(data, extensionRegistry);
4358     }
4359 
parseFrom( java.io.InputStream input)4360     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(
4361         java.io.InputStream input) throws java.io.IOException {
4362       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
4363     }
4364 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4365     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(
4366         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4367         throws java.io.IOException {
4368       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
4369           PARSER, input, extensionRegistry);
4370     }
4371 
parseDelimitedFrom( java.io.InputStream input)4372     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseDelimitedFrom(
4373         java.io.InputStream input) throws java.io.IOException {
4374       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
4375     }
4376 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4377     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseDelimitedFrom(
4378         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4379         throws java.io.IOException {
4380       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
4381           PARSER, input, extensionRegistry);
4382     }
4383 
parseFrom( com.google.protobuf.CodedInputStream input)4384     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(
4385         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
4386       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
4387     }
4388 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4389     public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(
4390         com.google.protobuf.CodedInputStream input,
4391         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4392         throws java.io.IOException {
4393       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
4394           PARSER, input, extensionRegistry);
4395     }
4396 
4397     @java.lang.Override
newBuilderForType()4398     public Builder newBuilderForType() {
4399       return newBuilder();
4400     }
4401 
newBuilder()4402     public static Builder newBuilder() {
4403       return DEFAULT_INSTANCE.toBuilder();
4404     }
4405 
newBuilder(com.google.cloud.vision.v1.WebDetection.WebLabel prototype)4406     public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebLabel prototype) {
4407       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
4408     }
4409 
4410     @java.lang.Override
toBuilder()4411     public Builder toBuilder() {
4412       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
4413     }
4414 
4415     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4416     protected Builder newBuilderForType(
4417         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
4418       Builder builder = new Builder(parent);
4419       return builder;
4420     }
4421     /**
4422      *
4423      *
4424      * <pre>
4425      * Label to provide extra metadata for the web detection.
4426      * </pre>
4427      *
4428      * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebLabel}
4429      */
4430     public static final class Builder
4431         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
4432         implements
4433         // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebLabel)
4434         com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder {
getDescriptor()4435       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
4436         return com.google.cloud.vision.v1.WebDetectionProto
4437             .internal_static_google_cloud_vision_v1_WebDetection_WebLabel_descriptor;
4438       }
4439 
4440       @java.lang.Override
4441       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()4442           internalGetFieldAccessorTable() {
4443         return com.google.cloud.vision.v1.WebDetectionProto
4444             .internal_static_google_cloud_vision_v1_WebDetection_WebLabel_fieldAccessorTable
4445             .ensureFieldAccessorsInitialized(
4446                 com.google.cloud.vision.v1.WebDetection.WebLabel.class,
4447                 com.google.cloud.vision.v1.WebDetection.WebLabel.Builder.class);
4448       }
4449 
4450       // Construct using com.google.cloud.vision.v1.WebDetection.WebLabel.newBuilder()
Builder()4451       private Builder() {}
4452 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4453       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
4454         super(parent);
4455       }
4456 
4457       @java.lang.Override
clear()4458       public Builder clear() {
4459         super.clear();
4460         bitField0_ = 0;
4461         label_ = "";
4462         languageCode_ = "";
4463         return this;
4464       }
4465 
4466       @java.lang.Override
getDescriptorForType()4467       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
4468         return com.google.cloud.vision.v1.WebDetectionProto
4469             .internal_static_google_cloud_vision_v1_WebDetection_WebLabel_descriptor;
4470       }
4471 
4472       @java.lang.Override
getDefaultInstanceForType()4473       public com.google.cloud.vision.v1.WebDetection.WebLabel getDefaultInstanceForType() {
4474         return com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance();
4475       }
4476 
4477       @java.lang.Override
build()4478       public com.google.cloud.vision.v1.WebDetection.WebLabel build() {
4479         com.google.cloud.vision.v1.WebDetection.WebLabel result = buildPartial();
4480         if (!result.isInitialized()) {
4481           throw newUninitializedMessageException(result);
4482         }
4483         return result;
4484       }
4485 
4486       @java.lang.Override
buildPartial()4487       public com.google.cloud.vision.v1.WebDetection.WebLabel buildPartial() {
4488         com.google.cloud.vision.v1.WebDetection.WebLabel result =
4489             new com.google.cloud.vision.v1.WebDetection.WebLabel(this);
4490         if (bitField0_ != 0) {
4491           buildPartial0(result);
4492         }
4493         onBuilt();
4494         return result;
4495       }
4496 
buildPartial0(com.google.cloud.vision.v1.WebDetection.WebLabel result)4497       private void buildPartial0(com.google.cloud.vision.v1.WebDetection.WebLabel result) {
4498         int from_bitField0_ = bitField0_;
4499         if (((from_bitField0_ & 0x00000001) != 0)) {
4500           result.label_ = label_;
4501         }
4502         if (((from_bitField0_ & 0x00000002) != 0)) {
4503           result.languageCode_ = languageCode_;
4504         }
4505       }
4506 
4507       @java.lang.Override
clone()4508       public Builder clone() {
4509         return super.clone();
4510       }
4511 
4512       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4513       public Builder setField(
4514           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
4515         return super.setField(field, value);
4516       }
4517 
4518       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)4519       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
4520         return super.clearField(field);
4521       }
4522 
4523       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)4524       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
4525         return super.clearOneof(oneof);
4526       }
4527 
4528       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)4529       public Builder setRepeatedField(
4530           com.google.protobuf.Descriptors.FieldDescriptor field,
4531           int index,
4532           java.lang.Object value) {
4533         return super.setRepeatedField(field, index, value);
4534       }
4535 
4536       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4537       public Builder addRepeatedField(
4538           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
4539         return super.addRepeatedField(field, value);
4540       }
4541 
4542       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)4543       public Builder mergeFrom(com.google.protobuf.Message other) {
4544         if (other instanceof com.google.cloud.vision.v1.WebDetection.WebLabel) {
4545           return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebLabel) other);
4546         } else {
4547           super.mergeFrom(other);
4548           return this;
4549         }
4550       }
4551 
mergeFrom(com.google.cloud.vision.v1.WebDetection.WebLabel other)4552       public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebLabel other) {
4553         if (other == com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance())
4554           return this;
4555         if (!other.getLabel().isEmpty()) {
4556           label_ = other.label_;
4557           bitField0_ |= 0x00000001;
4558           onChanged();
4559         }
4560         if (!other.getLanguageCode().isEmpty()) {
4561           languageCode_ = other.languageCode_;
4562           bitField0_ |= 0x00000002;
4563           onChanged();
4564         }
4565         this.mergeUnknownFields(other.getUnknownFields());
4566         onChanged();
4567         return this;
4568       }
4569 
4570       @java.lang.Override
isInitialized()4571       public final boolean isInitialized() {
4572         return true;
4573       }
4574 
4575       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4576       public Builder mergeFrom(
4577           com.google.protobuf.CodedInputStream input,
4578           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4579           throws java.io.IOException {
4580         if (extensionRegistry == null) {
4581           throw new java.lang.NullPointerException();
4582         }
4583         try {
4584           boolean done = false;
4585           while (!done) {
4586             int tag = input.readTag();
4587             switch (tag) {
4588               case 0:
4589                 done = true;
4590                 break;
4591               case 10:
4592                 {
4593                   label_ = input.readStringRequireUtf8();
4594                   bitField0_ |= 0x00000001;
4595                   break;
4596                 } // case 10
4597               case 18:
4598                 {
4599                   languageCode_ = input.readStringRequireUtf8();
4600                   bitField0_ |= 0x00000002;
4601                   break;
4602                 } // case 18
4603               default:
4604                 {
4605                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
4606                     done = true; // was an endgroup tag
4607                   }
4608                   break;
4609                 } // default:
4610             } // switch (tag)
4611           } // while (!done)
4612         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4613           throw e.unwrapIOException();
4614         } finally {
4615           onChanged();
4616         } // finally
4617         return this;
4618       }
4619 
4620       private int bitField0_;
4621 
4622       private java.lang.Object label_ = "";
4623       /**
4624        *
4625        *
4626        * <pre>
4627        * Label for extra metadata.
4628        * </pre>
4629        *
4630        * <code>string label = 1;</code>
4631        *
4632        * @return The label.
4633        */
getLabel()4634       public java.lang.String getLabel() {
4635         java.lang.Object ref = label_;
4636         if (!(ref instanceof java.lang.String)) {
4637           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4638           java.lang.String s = bs.toStringUtf8();
4639           label_ = s;
4640           return s;
4641         } else {
4642           return (java.lang.String) ref;
4643         }
4644       }
4645       /**
4646        *
4647        *
4648        * <pre>
4649        * Label for extra metadata.
4650        * </pre>
4651        *
4652        * <code>string label = 1;</code>
4653        *
4654        * @return The bytes for label.
4655        */
getLabelBytes()4656       public com.google.protobuf.ByteString getLabelBytes() {
4657         java.lang.Object ref = label_;
4658         if (ref instanceof String) {
4659           com.google.protobuf.ByteString b =
4660               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4661           label_ = b;
4662           return b;
4663         } else {
4664           return (com.google.protobuf.ByteString) ref;
4665         }
4666       }
4667       /**
4668        *
4669        *
4670        * <pre>
4671        * Label for extra metadata.
4672        * </pre>
4673        *
4674        * <code>string label = 1;</code>
4675        *
4676        * @param value The label to set.
4677        * @return This builder for chaining.
4678        */
setLabel(java.lang.String value)4679       public Builder setLabel(java.lang.String value) {
4680         if (value == null) {
4681           throw new NullPointerException();
4682         }
4683         label_ = value;
4684         bitField0_ |= 0x00000001;
4685         onChanged();
4686         return this;
4687       }
4688       /**
4689        *
4690        *
4691        * <pre>
4692        * Label for extra metadata.
4693        * </pre>
4694        *
4695        * <code>string label = 1;</code>
4696        *
4697        * @return This builder for chaining.
4698        */
clearLabel()4699       public Builder clearLabel() {
4700         label_ = getDefaultInstance().getLabel();
4701         bitField0_ = (bitField0_ & ~0x00000001);
4702         onChanged();
4703         return this;
4704       }
4705       /**
4706        *
4707        *
4708        * <pre>
4709        * Label for extra metadata.
4710        * </pre>
4711        *
4712        * <code>string label = 1;</code>
4713        *
4714        * @param value The bytes for label to set.
4715        * @return This builder for chaining.
4716        */
setLabelBytes(com.google.protobuf.ByteString value)4717       public Builder setLabelBytes(com.google.protobuf.ByteString value) {
4718         if (value == null) {
4719           throw new NullPointerException();
4720         }
4721         checkByteStringIsUtf8(value);
4722         label_ = value;
4723         bitField0_ |= 0x00000001;
4724         onChanged();
4725         return this;
4726       }
4727 
4728       private java.lang.Object languageCode_ = "";
4729       /**
4730        *
4731        *
4732        * <pre>
4733        * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
4734        * For more information, see
4735        * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
4736        * </pre>
4737        *
4738        * <code>string language_code = 2;</code>
4739        *
4740        * @return The languageCode.
4741        */
getLanguageCode()4742       public java.lang.String getLanguageCode() {
4743         java.lang.Object ref = languageCode_;
4744         if (!(ref instanceof java.lang.String)) {
4745           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4746           java.lang.String s = bs.toStringUtf8();
4747           languageCode_ = s;
4748           return s;
4749         } else {
4750           return (java.lang.String) ref;
4751         }
4752       }
4753       /**
4754        *
4755        *
4756        * <pre>
4757        * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
4758        * For more information, see
4759        * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
4760        * </pre>
4761        *
4762        * <code>string language_code = 2;</code>
4763        *
4764        * @return The bytes for languageCode.
4765        */
getLanguageCodeBytes()4766       public com.google.protobuf.ByteString getLanguageCodeBytes() {
4767         java.lang.Object ref = languageCode_;
4768         if (ref instanceof String) {
4769           com.google.protobuf.ByteString b =
4770               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4771           languageCode_ = b;
4772           return b;
4773         } else {
4774           return (com.google.protobuf.ByteString) ref;
4775         }
4776       }
4777       /**
4778        *
4779        *
4780        * <pre>
4781        * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
4782        * For more information, see
4783        * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
4784        * </pre>
4785        *
4786        * <code>string language_code = 2;</code>
4787        *
4788        * @param value The languageCode to set.
4789        * @return This builder for chaining.
4790        */
setLanguageCode(java.lang.String value)4791       public Builder setLanguageCode(java.lang.String value) {
4792         if (value == null) {
4793           throw new NullPointerException();
4794         }
4795         languageCode_ = value;
4796         bitField0_ |= 0x00000002;
4797         onChanged();
4798         return this;
4799       }
4800       /**
4801        *
4802        *
4803        * <pre>
4804        * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
4805        * For more information, see
4806        * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
4807        * </pre>
4808        *
4809        * <code>string language_code = 2;</code>
4810        *
4811        * @return This builder for chaining.
4812        */
clearLanguageCode()4813       public Builder clearLanguageCode() {
4814         languageCode_ = getDefaultInstance().getLanguageCode();
4815         bitField0_ = (bitField0_ & ~0x00000002);
4816         onChanged();
4817         return this;
4818       }
4819       /**
4820        *
4821        *
4822        * <pre>
4823        * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
4824        * For more information, see
4825        * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
4826        * </pre>
4827        *
4828        * <code>string language_code = 2;</code>
4829        *
4830        * @param value The bytes for languageCode to set.
4831        * @return This builder for chaining.
4832        */
setLanguageCodeBytes(com.google.protobuf.ByteString value)4833       public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) {
4834         if (value == null) {
4835           throw new NullPointerException();
4836         }
4837         checkByteStringIsUtf8(value);
4838         languageCode_ = value;
4839         bitField0_ |= 0x00000002;
4840         onChanged();
4841         return this;
4842       }
4843 
4844       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4845       public final Builder setUnknownFields(
4846           final com.google.protobuf.UnknownFieldSet unknownFields) {
4847         return super.setUnknownFields(unknownFields);
4848       }
4849 
4850       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4851       public final Builder mergeUnknownFields(
4852           final com.google.protobuf.UnknownFieldSet unknownFields) {
4853         return super.mergeUnknownFields(unknownFields);
4854       }
4855 
4856       // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebLabel)
4857     }
4858 
4859     // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebLabel)
4860     private static final com.google.cloud.vision.v1.WebDetection.WebLabel DEFAULT_INSTANCE;
4861 
4862     static {
4863       DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebLabel();
4864     }
4865 
getDefaultInstance()4866     public static com.google.cloud.vision.v1.WebDetection.WebLabel getDefaultInstance() {
4867       return DEFAULT_INSTANCE;
4868     }
4869 
4870     private static final com.google.protobuf.Parser<WebLabel> PARSER =
4871         new com.google.protobuf.AbstractParser<WebLabel>() {
4872           @java.lang.Override
4873           public WebLabel parsePartialFrom(
4874               com.google.protobuf.CodedInputStream input,
4875               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4876               throws com.google.protobuf.InvalidProtocolBufferException {
4877             Builder builder = newBuilder();
4878             try {
4879               builder.mergeFrom(input, extensionRegistry);
4880             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4881               throw e.setUnfinishedMessage(builder.buildPartial());
4882             } catch (com.google.protobuf.UninitializedMessageException e) {
4883               throw e.asInvalidProtocolBufferException()
4884                   .setUnfinishedMessage(builder.buildPartial());
4885             } catch (java.io.IOException e) {
4886               throw new com.google.protobuf.InvalidProtocolBufferException(e)
4887                   .setUnfinishedMessage(builder.buildPartial());
4888             }
4889             return builder.buildPartial();
4890           }
4891         };
4892 
parser()4893     public static com.google.protobuf.Parser<WebLabel> parser() {
4894       return PARSER;
4895     }
4896 
4897     @java.lang.Override
getParserForType()4898     public com.google.protobuf.Parser<WebLabel> getParserForType() {
4899       return PARSER;
4900     }
4901 
4902     @java.lang.Override
getDefaultInstanceForType()4903     public com.google.cloud.vision.v1.WebDetection.WebLabel getDefaultInstanceForType() {
4904       return DEFAULT_INSTANCE;
4905     }
4906   }
4907 
4908   public static final int WEB_ENTITIES_FIELD_NUMBER = 1;
4909 
4910   @SuppressWarnings("serial")
4911   private java.util.List<com.google.cloud.vision.v1.WebDetection.WebEntity> webEntities_;
4912   /**
4913    *
4914    *
4915    * <pre>
4916    * Deduced entities from similar images on the Internet.
4917    * </pre>
4918    *
4919    * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
4920    */
4921   @java.lang.Override
getWebEntitiesList()4922   public java.util.List<com.google.cloud.vision.v1.WebDetection.WebEntity> getWebEntitiesList() {
4923     return webEntities_;
4924   }
4925   /**
4926    *
4927    *
4928    * <pre>
4929    * Deduced entities from similar images on the Internet.
4930    * </pre>
4931    *
4932    * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
4933    */
4934   @java.lang.Override
4935   public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder>
getWebEntitiesOrBuilderList()4936       getWebEntitiesOrBuilderList() {
4937     return webEntities_;
4938   }
4939   /**
4940    *
4941    *
4942    * <pre>
4943    * Deduced entities from similar images on the Internet.
4944    * </pre>
4945    *
4946    * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
4947    */
4948   @java.lang.Override
getWebEntitiesCount()4949   public int getWebEntitiesCount() {
4950     return webEntities_.size();
4951   }
4952   /**
4953    *
4954    *
4955    * <pre>
4956    * Deduced entities from similar images on the Internet.
4957    * </pre>
4958    *
4959    * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
4960    */
4961   @java.lang.Override
getWebEntities(int index)4962   public com.google.cloud.vision.v1.WebDetection.WebEntity getWebEntities(int index) {
4963     return webEntities_.get(index);
4964   }
4965   /**
4966    *
4967    *
4968    * <pre>
4969    * Deduced entities from similar images on the Internet.
4970    * </pre>
4971    *
4972    * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
4973    */
4974   @java.lang.Override
getWebEntitiesOrBuilder( int index)4975   public com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder(
4976       int index) {
4977     return webEntities_.get(index);
4978   }
4979 
4980   public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2;
4981 
4982   @SuppressWarnings("serial")
4983   private java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage> fullMatchingImages_;
4984   /**
4985    *
4986    *
4987    * <pre>
4988    * Fully matching images from the Internet.
4989    * Can include resized copies of the query image.
4990    * </pre>
4991    *
4992    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
4993    */
4994   @java.lang.Override
4995   public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
getFullMatchingImagesList()4996       getFullMatchingImagesList() {
4997     return fullMatchingImages_;
4998   }
4999   /**
5000    *
5001    *
5002    * <pre>
5003    * Fully matching images from the Internet.
5004    * Can include resized copies of the query image.
5005    * </pre>
5006    *
5007    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
5008    */
5009   @java.lang.Override
5010   public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getFullMatchingImagesOrBuilderList()5011       getFullMatchingImagesOrBuilderList() {
5012     return fullMatchingImages_;
5013   }
5014   /**
5015    *
5016    *
5017    * <pre>
5018    * Fully matching images from the Internet.
5019    * Can include resized copies of the query image.
5020    * </pre>
5021    *
5022    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
5023    */
5024   @java.lang.Override
getFullMatchingImagesCount()5025   public int getFullMatchingImagesCount() {
5026     return fullMatchingImages_.size();
5027   }
5028   /**
5029    *
5030    *
5031    * <pre>
5032    * Fully matching images from the Internet.
5033    * Can include resized copies of the query image.
5034    * </pre>
5035    *
5036    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
5037    */
5038   @java.lang.Override
getFullMatchingImages(int index)5039   public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) {
5040     return fullMatchingImages_.get(index);
5041   }
5042   /**
5043    *
5044    *
5045    * <pre>
5046    * Fully matching images from the Internet.
5047    * Can include resized copies of the query image.
5048    * </pre>
5049    *
5050    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
5051    */
5052   @java.lang.Override
getFullMatchingImagesOrBuilder( int index)5053   public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder(
5054       int index) {
5055     return fullMatchingImages_.get(index);
5056   }
5057 
5058   public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3;
5059 
5060   @SuppressWarnings("serial")
5061   private java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage> partialMatchingImages_;
5062   /**
5063    *
5064    *
5065    * <pre>
5066    * Partial matching images from the Internet.
5067    * Those images are similar enough to share some key-point features. For
5068    * example an original image will likely have partial matching for its crops.
5069    * </pre>
5070    *
5071    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
5072    * </code>
5073    */
5074   @java.lang.Override
5075   public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
getPartialMatchingImagesList()5076       getPartialMatchingImagesList() {
5077     return partialMatchingImages_;
5078   }
5079   /**
5080    *
5081    *
5082    * <pre>
5083    * Partial matching images from the Internet.
5084    * Those images are similar enough to share some key-point features. For
5085    * example an original image will likely have partial matching for its crops.
5086    * </pre>
5087    *
5088    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
5089    * </code>
5090    */
5091   @java.lang.Override
5092   public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getPartialMatchingImagesOrBuilderList()5093       getPartialMatchingImagesOrBuilderList() {
5094     return partialMatchingImages_;
5095   }
5096   /**
5097    *
5098    *
5099    * <pre>
5100    * Partial matching images from the Internet.
5101    * Those images are similar enough to share some key-point features. For
5102    * example an original image will likely have partial matching for its crops.
5103    * </pre>
5104    *
5105    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
5106    * </code>
5107    */
5108   @java.lang.Override
getPartialMatchingImagesCount()5109   public int getPartialMatchingImagesCount() {
5110     return partialMatchingImages_.size();
5111   }
5112   /**
5113    *
5114    *
5115    * <pre>
5116    * Partial matching images from the Internet.
5117    * Those images are similar enough to share some key-point features. For
5118    * example an original image will likely have partial matching for its crops.
5119    * </pre>
5120    *
5121    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
5122    * </code>
5123    */
5124   @java.lang.Override
getPartialMatchingImages(int index)5125   public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) {
5126     return partialMatchingImages_.get(index);
5127   }
5128   /**
5129    *
5130    *
5131    * <pre>
5132    * Partial matching images from the Internet.
5133    * Those images are similar enough to share some key-point features. For
5134    * example an original image will likely have partial matching for its crops.
5135    * </pre>
5136    *
5137    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
5138    * </code>
5139    */
5140   @java.lang.Override
5141   public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder
getPartialMatchingImagesOrBuilder(int index)5142       getPartialMatchingImagesOrBuilder(int index) {
5143     return partialMatchingImages_.get(index);
5144   }
5145 
5146   public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4;
5147 
5148   @SuppressWarnings("serial")
5149   private java.util.List<com.google.cloud.vision.v1.WebDetection.WebPage> pagesWithMatchingImages_;
5150   /**
5151    *
5152    *
5153    * <pre>
5154    * Web pages containing the matching images from the Internet.
5155    * </pre>
5156    *
5157    * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
5158    * </code>
5159    */
5160   @java.lang.Override
5161   public java.util.List<com.google.cloud.vision.v1.WebDetection.WebPage>
getPagesWithMatchingImagesList()5162       getPagesWithMatchingImagesList() {
5163     return pagesWithMatchingImages_;
5164   }
5165   /**
5166    *
5167    *
5168    * <pre>
5169    * Web pages containing the matching images from the Internet.
5170    * </pre>
5171    *
5172    * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
5173    * </code>
5174    */
5175   @java.lang.Override
5176   public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder>
getPagesWithMatchingImagesOrBuilderList()5177       getPagesWithMatchingImagesOrBuilderList() {
5178     return pagesWithMatchingImages_;
5179   }
5180   /**
5181    *
5182    *
5183    * <pre>
5184    * Web pages containing the matching images from the Internet.
5185    * </pre>
5186    *
5187    * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
5188    * </code>
5189    */
5190   @java.lang.Override
getPagesWithMatchingImagesCount()5191   public int getPagesWithMatchingImagesCount() {
5192     return pagesWithMatchingImages_.size();
5193   }
5194   /**
5195    *
5196    *
5197    * <pre>
5198    * Web pages containing the matching images from the Internet.
5199    * </pre>
5200    *
5201    * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
5202    * </code>
5203    */
5204   @java.lang.Override
getPagesWithMatchingImages(int index)5205   public com.google.cloud.vision.v1.WebDetection.WebPage getPagesWithMatchingImages(int index) {
5206     return pagesWithMatchingImages_.get(index);
5207   }
5208   /**
5209    *
5210    *
5211    * <pre>
5212    * Web pages containing the matching images from the Internet.
5213    * </pre>
5214    *
5215    * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
5216    * </code>
5217    */
5218   @java.lang.Override
5219   public com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder
getPagesWithMatchingImagesOrBuilder(int index)5220       getPagesWithMatchingImagesOrBuilder(int index) {
5221     return pagesWithMatchingImages_.get(index);
5222   }
5223 
5224   public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6;
5225 
5226   @SuppressWarnings("serial")
5227   private java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage> visuallySimilarImages_;
5228   /**
5229    *
5230    *
5231    * <pre>
5232    * The visually similar image results.
5233    * </pre>
5234    *
5235    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
5236    * </code>
5237    */
5238   @java.lang.Override
5239   public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
getVisuallySimilarImagesList()5240       getVisuallySimilarImagesList() {
5241     return visuallySimilarImages_;
5242   }
5243   /**
5244    *
5245    *
5246    * <pre>
5247    * The visually similar image results.
5248    * </pre>
5249    *
5250    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
5251    * </code>
5252    */
5253   @java.lang.Override
5254   public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getVisuallySimilarImagesOrBuilderList()5255       getVisuallySimilarImagesOrBuilderList() {
5256     return visuallySimilarImages_;
5257   }
5258   /**
5259    *
5260    *
5261    * <pre>
5262    * The visually similar image results.
5263    * </pre>
5264    *
5265    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
5266    * </code>
5267    */
5268   @java.lang.Override
getVisuallySimilarImagesCount()5269   public int getVisuallySimilarImagesCount() {
5270     return visuallySimilarImages_.size();
5271   }
5272   /**
5273    *
5274    *
5275    * <pre>
5276    * The visually similar image results.
5277    * </pre>
5278    *
5279    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
5280    * </code>
5281    */
5282   @java.lang.Override
getVisuallySimilarImages(int index)5283   public com.google.cloud.vision.v1.WebDetection.WebImage getVisuallySimilarImages(int index) {
5284     return visuallySimilarImages_.get(index);
5285   }
5286   /**
5287    *
5288    *
5289    * <pre>
5290    * The visually similar image results.
5291    * </pre>
5292    *
5293    * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
5294    * </code>
5295    */
5296   @java.lang.Override
5297   public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder
getVisuallySimilarImagesOrBuilder(int index)5298       getVisuallySimilarImagesOrBuilder(int index) {
5299     return visuallySimilarImages_.get(index);
5300   }
5301 
5302   public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8;
5303 
5304   @SuppressWarnings("serial")
5305   private java.util.List<com.google.cloud.vision.v1.WebDetection.WebLabel> bestGuessLabels_;
5306   /**
5307    *
5308    *
5309    * <pre>
5310    * The service's best guess as to the topic of the request image.
5311    * Inferred from similar images on the open web.
5312    * </pre>
5313    *
5314    * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
5315    */
5316   @java.lang.Override
getBestGuessLabelsList()5317   public java.util.List<com.google.cloud.vision.v1.WebDetection.WebLabel> getBestGuessLabelsList() {
5318     return bestGuessLabels_;
5319   }
5320   /**
5321    *
5322    *
5323    * <pre>
5324    * The service's best guess as to the topic of the request image.
5325    * Inferred from similar images on the open web.
5326    * </pre>
5327    *
5328    * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
5329    */
5330   @java.lang.Override
5331   public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder>
getBestGuessLabelsOrBuilderList()5332       getBestGuessLabelsOrBuilderList() {
5333     return bestGuessLabels_;
5334   }
5335   /**
5336    *
5337    *
5338    * <pre>
5339    * The service's best guess as to the topic of the request image.
5340    * Inferred from similar images on the open web.
5341    * </pre>
5342    *
5343    * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
5344    */
5345   @java.lang.Override
getBestGuessLabelsCount()5346   public int getBestGuessLabelsCount() {
5347     return bestGuessLabels_.size();
5348   }
5349   /**
5350    *
5351    *
5352    * <pre>
5353    * The service's best guess as to the topic of the request image.
5354    * Inferred from similar images on the open web.
5355    * </pre>
5356    *
5357    * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
5358    */
5359   @java.lang.Override
getBestGuessLabels(int index)5360   public com.google.cloud.vision.v1.WebDetection.WebLabel getBestGuessLabels(int index) {
5361     return bestGuessLabels_.get(index);
5362   }
5363   /**
5364    *
5365    *
5366    * <pre>
5367    * The service's best guess as to the topic of the request image.
5368    * Inferred from similar images on the open web.
5369    * </pre>
5370    *
5371    * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
5372    */
5373   @java.lang.Override
getBestGuessLabelsOrBuilder( int index)5374   public com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder(
5375       int index) {
5376     return bestGuessLabels_.get(index);
5377   }
5378 
5379   private byte memoizedIsInitialized = -1;
5380 
5381   @java.lang.Override
isInitialized()5382   public final boolean isInitialized() {
5383     byte isInitialized = memoizedIsInitialized;
5384     if (isInitialized == 1) return true;
5385     if (isInitialized == 0) return false;
5386 
5387     memoizedIsInitialized = 1;
5388     return true;
5389   }
5390 
5391   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)5392   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
5393     for (int i = 0; i < webEntities_.size(); i++) {
5394       output.writeMessage(1, webEntities_.get(i));
5395     }
5396     for (int i = 0; i < fullMatchingImages_.size(); i++) {
5397       output.writeMessage(2, fullMatchingImages_.get(i));
5398     }
5399     for (int i = 0; i < partialMatchingImages_.size(); i++) {
5400       output.writeMessage(3, partialMatchingImages_.get(i));
5401     }
5402     for (int i = 0; i < pagesWithMatchingImages_.size(); i++) {
5403       output.writeMessage(4, pagesWithMatchingImages_.get(i));
5404     }
5405     for (int i = 0; i < visuallySimilarImages_.size(); i++) {
5406       output.writeMessage(6, visuallySimilarImages_.get(i));
5407     }
5408     for (int i = 0; i < bestGuessLabels_.size(); i++) {
5409       output.writeMessage(8, bestGuessLabels_.get(i));
5410     }
5411     getUnknownFields().writeTo(output);
5412   }
5413 
5414   @java.lang.Override
getSerializedSize()5415   public int getSerializedSize() {
5416     int size = memoizedSize;
5417     if (size != -1) return size;
5418 
5419     size = 0;
5420     for (int i = 0; i < webEntities_.size(); i++) {
5421       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, webEntities_.get(i));
5422     }
5423     for (int i = 0; i < fullMatchingImages_.size(); i++) {
5424       size +=
5425           com.google.protobuf.CodedOutputStream.computeMessageSize(2, fullMatchingImages_.get(i));
5426     }
5427     for (int i = 0; i < partialMatchingImages_.size(); i++) {
5428       size +=
5429           com.google.protobuf.CodedOutputStream.computeMessageSize(
5430               3, partialMatchingImages_.get(i));
5431     }
5432     for (int i = 0; i < pagesWithMatchingImages_.size(); i++) {
5433       size +=
5434           com.google.protobuf.CodedOutputStream.computeMessageSize(
5435               4, pagesWithMatchingImages_.get(i));
5436     }
5437     for (int i = 0; i < visuallySimilarImages_.size(); i++) {
5438       size +=
5439           com.google.protobuf.CodedOutputStream.computeMessageSize(
5440               6, visuallySimilarImages_.get(i));
5441     }
5442     for (int i = 0; i < bestGuessLabels_.size(); i++) {
5443       size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, bestGuessLabels_.get(i));
5444     }
5445     size += getUnknownFields().getSerializedSize();
5446     memoizedSize = size;
5447     return size;
5448   }
5449 
5450   @java.lang.Override
equals(final java.lang.Object obj)5451   public boolean equals(final java.lang.Object obj) {
5452     if (obj == this) {
5453       return true;
5454     }
5455     if (!(obj instanceof com.google.cloud.vision.v1.WebDetection)) {
5456       return super.equals(obj);
5457     }
5458     com.google.cloud.vision.v1.WebDetection other = (com.google.cloud.vision.v1.WebDetection) obj;
5459 
5460     if (!getWebEntitiesList().equals(other.getWebEntitiesList())) return false;
5461     if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false;
5462     if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList())) return false;
5463     if (!getPagesWithMatchingImagesList().equals(other.getPagesWithMatchingImagesList()))
5464       return false;
5465     if (!getVisuallySimilarImagesList().equals(other.getVisuallySimilarImagesList())) return false;
5466     if (!getBestGuessLabelsList().equals(other.getBestGuessLabelsList())) return false;
5467     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
5468     return true;
5469   }
5470 
5471   @java.lang.Override
hashCode()5472   public int hashCode() {
5473     if (memoizedHashCode != 0) {
5474       return memoizedHashCode;
5475     }
5476     int hash = 41;
5477     hash = (19 * hash) + getDescriptor().hashCode();
5478     if (getWebEntitiesCount() > 0) {
5479       hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER;
5480       hash = (53 * hash) + getWebEntitiesList().hashCode();
5481     }
5482     if (getFullMatchingImagesCount() > 0) {
5483       hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER;
5484       hash = (53 * hash) + getFullMatchingImagesList().hashCode();
5485     }
5486     if (getPartialMatchingImagesCount() > 0) {
5487       hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER;
5488       hash = (53 * hash) + getPartialMatchingImagesList().hashCode();
5489     }
5490     if (getPagesWithMatchingImagesCount() > 0) {
5491       hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER;
5492       hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode();
5493     }
5494     if (getVisuallySimilarImagesCount() > 0) {
5495       hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER;
5496       hash = (53 * hash) + getVisuallySimilarImagesList().hashCode();
5497     }
5498     if (getBestGuessLabelsCount() > 0) {
5499       hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER;
5500       hash = (53 * hash) + getBestGuessLabelsList().hashCode();
5501     }
5502     hash = (29 * hash) + getUnknownFields().hashCode();
5503     memoizedHashCode = hash;
5504     return hash;
5505   }
5506 
parseFrom(java.nio.ByteBuffer data)5507   public static com.google.cloud.vision.v1.WebDetection parseFrom(java.nio.ByteBuffer data)
5508       throws com.google.protobuf.InvalidProtocolBufferException {
5509     return PARSER.parseFrom(data);
5510   }
5511 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5512   public static com.google.cloud.vision.v1.WebDetection parseFrom(
5513       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5514       throws com.google.protobuf.InvalidProtocolBufferException {
5515     return PARSER.parseFrom(data, extensionRegistry);
5516   }
5517 
parseFrom( com.google.protobuf.ByteString data)5518   public static com.google.cloud.vision.v1.WebDetection parseFrom(
5519       com.google.protobuf.ByteString data)
5520       throws com.google.protobuf.InvalidProtocolBufferException {
5521     return PARSER.parseFrom(data);
5522   }
5523 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5524   public static com.google.cloud.vision.v1.WebDetection parseFrom(
5525       com.google.protobuf.ByteString data,
5526       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5527       throws com.google.protobuf.InvalidProtocolBufferException {
5528     return PARSER.parseFrom(data, extensionRegistry);
5529   }
5530 
parseFrom(byte[] data)5531   public static com.google.cloud.vision.v1.WebDetection parseFrom(byte[] data)
5532       throws com.google.protobuf.InvalidProtocolBufferException {
5533     return PARSER.parseFrom(data);
5534   }
5535 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5536   public static com.google.cloud.vision.v1.WebDetection parseFrom(
5537       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5538       throws com.google.protobuf.InvalidProtocolBufferException {
5539     return PARSER.parseFrom(data, extensionRegistry);
5540   }
5541 
parseFrom(java.io.InputStream input)5542   public static com.google.cloud.vision.v1.WebDetection parseFrom(java.io.InputStream input)
5543       throws java.io.IOException {
5544     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
5545   }
5546 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5547   public static com.google.cloud.vision.v1.WebDetection parseFrom(
5548       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5549       throws java.io.IOException {
5550     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
5551         PARSER, input, extensionRegistry);
5552   }
5553 
parseDelimitedFrom( java.io.InputStream input)5554   public static com.google.cloud.vision.v1.WebDetection parseDelimitedFrom(
5555       java.io.InputStream input) throws java.io.IOException {
5556     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
5557   }
5558 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5559   public static com.google.cloud.vision.v1.WebDetection parseDelimitedFrom(
5560       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5561       throws java.io.IOException {
5562     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
5563         PARSER, input, extensionRegistry);
5564   }
5565 
parseFrom( com.google.protobuf.CodedInputStream input)5566   public static com.google.cloud.vision.v1.WebDetection parseFrom(
5567       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
5568     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
5569   }
5570 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5571   public static com.google.cloud.vision.v1.WebDetection parseFrom(
5572       com.google.protobuf.CodedInputStream input,
5573       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5574       throws java.io.IOException {
5575     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
5576         PARSER, input, extensionRegistry);
5577   }
5578 
5579   @java.lang.Override
newBuilderForType()5580   public Builder newBuilderForType() {
5581     return newBuilder();
5582   }
5583 
newBuilder()5584   public static Builder newBuilder() {
5585     return DEFAULT_INSTANCE.toBuilder();
5586   }
5587 
newBuilder(com.google.cloud.vision.v1.WebDetection prototype)5588   public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection prototype) {
5589     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
5590   }
5591 
5592   @java.lang.Override
toBuilder()5593   public Builder toBuilder() {
5594     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
5595   }
5596 
5597   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)5598   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
5599     Builder builder = new Builder(parent);
5600     return builder;
5601   }
5602   /**
5603    *
5604    *
5605    * <pre>
5606    * Relevant information for the image from the Internet.
5607    * </pre>
5608    *
5609    * Protobuf type {@code google.cloud.vision.v1.WebDetection}
5610    */
5611   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
5612       implements
5613       // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection)
5614       com.google.cloud.vision.v1.WebDetectionOrBuilder {
getDescriptor()5615     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
5616       return com.google.cloud.vision.v1.WebDetectionProto
5617           .internal_static_google_cloud_vision_v1_WebDetection_descriptor;
5618     }
5619 
5620     @java.lang.Override
5621     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()5622         internalGetFieldAccessorTable() {
5623       return com.google.cloud.vision.v1.WebDetectionProto
5624           .internal_static_google_cloud_vision_v1_WebDetection_fieldAccessorTable
5625           .ensureFieldAccessorsInitialized(
5626               com.google.cloud.vision.v1.WebDetection.class,
5627               com.google.cloud.vision.v1.WebDetection.Builder.class);
5628     }
5629 
5630     // Construct using com.google.cloud.vision.v1.WebDetection.newBuilder()
Builder()5631     private Builder() {}
5632 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)5633     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
5634       super(parent);
5635     }
5636 
5637     @java.lang.Override
clear()5638     public Builder clear() {
5639       super.clear();
5640       bitField0_ = 0;
5641       if (webEntitiesBuilder_ == null) {
5642         webEntities_ = java.util.Collections.emptyList();
5643       } else {
5644         webEntities_ = null;
5645         webEntitiesBuilder_.clear();
5646       }
5647       bitField0_ = (bitField0_ & ~0x00000001);
5648       if (fullMatchingImagesBuilder_ == null) {
5649         fullMatchingImages_ = java.util.Collections.emptyList();
5650       } else {
5651         fullMatchingImages_ = null;
5652         fullMatchingImagesBuilder_.clear();
5653       }
5654       bitField0_ = (bitField0_ & ~0x00000002);
5655       if (partialMatchingImagesBuilder_ == null) {
5656         partialMatchingImages_ = java.util.Collections.emptyList();
5657       } else {
5658         partialMatchingImages_ = null;
5659         partialMatchingImagesBuilder_.clear();
5660       }
5661       bitField0_ = (bitField0_ & ~0x00000004);
5662       if (pagesWithMatchingImagesBuilder_ == null) {
5663         pagesWithMatchingImages_ = java.util.Collections.emptyList();
5664       } else {
5665         pagesWithMatchingImages_ = null;
5666         pagesWithMatchingImagesBuilder_.clear();
5667       }
5668       bitField0_ = (bitField0_ & ~0x00000008);
5669       if (visuallySimilarImagesBuilder_ == null) {
5670         visuallySimilarImages_ = java.util.Collections.emptyList();
5671       } else {
5672         visuallySimilarImages_ = null;
5673         visuallySimilarImagesBuilder_.clear();
5674       }
5675       bitField0_ = (bitField0_ & ~0x00000010);
5676       if (bestGuessLabelsBuilder_ == null) {
5677         bestGuessLabels_ = java.util.Collections.emptyList();
5678       } else {
5679         bestGuessLabels_ = null;
5680         bestGuessLabelsBuilder_.clear();
5681       }
5682       bitField0_ = (bitField0_ & ~0x00000020);
5683       return this;
5684     }
5685 
5686     @java.lang.Override
getDescriptorForType()5687     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
5688       return com.google.cloud.vision.v1.WebDetectionProto
5689           .internal_static_google_cloud_vision_v1_WebDetection_descriptor;
5690     }
5691 
5692     @java.lang.Override
getDefaultInstanceForType()5693     public com.google.cloud.vision.v1.WebDetection getDefaultInstanceForType() {
5694       return com.google.cloud.vision.v1.WebDetection.getDefaultInstance();
5695     }
5696 
5697     @java.lang.Override
build()5698     public com.google.cloud.vision.v1.WebDetection build() {
5699       com.google.cloud.vision.v1.WebDetection result = buildPartial();
5700       if (!result.isInitialized()) {
5701         throw newUninitializedMessageException(result);
5702       }
5703       return result;
5704     }
5705 
5706     @java.lang.Override
buildPartial()5707     public com.google.cloud.vision.v1.WebDetection buildPartial() {
5708       com.google.cloud.vision.v1.WebDetection result =
5709           new com.google.cloud.vision.v1.WebDetection(this);
5710       buildPartialRepeatedFields(result);
5711       if (bitField0_ != 0) {
5712         buildPartial0(result);
5713       }
5714       onBuilt();
5715       return result;
5716     }
5717 
buildPartialRepeatedFields(com.google.cloud.vision.v1.WebDetection result)5718     private void buildPartialRepeatedFields(com.google.cloud.vision.v1.WebDetection result) {
5719       if (webEntitiesBuilder_ == null) {
5720         if (((bitField0_ & 0x00000001) != 0)) {
5721           webEntities_ = java.util.Collections.unmodifiableList(webEntities_);
5722           bitField0_ = (bitField0_ & ~0x00000001);
5723         }
5724         result.webEntities_ = webEntities_;
5725       } else {
5726         result.webEntities_ = webEntitiesBuilder_.build();
5727       }
5728       if (fullMatchingImagesBuilder_ == null) {
5729         if (((bitField0_ & 0x00000002) != 0)) {
5730           fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_);
5731           bitField0_ = (bitField0_ & ~0x00000002);
5732         }
5733         result.fullMatchingImages_ = fullMatchingImages_;
5734       } else {
5735         result.fullMatchingImages_ = fullMatchingImagesBuilder_.build();
5736       }
5737       if (partialMatchingImagesBuilder_ == null) {
5738         if (((bitField0_ & 0x00000004) != 0)) {
5739           partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_);
5740           bitField0_ = (bitField0_ & ~0x00000004);
5741         }
5742         result.partialMatchingImages_ = partialMatchingImages_;
5743       } else {
5744         result.partialMatchingImages_ = partialMatchingImagesBuilder_.build();
5745       }
5746       if (pagesWithMatchingImagesBuilder_ == null) {
5747         if (((bitField0_ & 0x00000008) != 0)) {
5748           pagesWithMatchingImages_ =
5749               java.util.Collections.unmodifiableList(pagesWithMatchingImages_);
5750           bitField0_ = (bitField0_ & ~0x00000008);
5751         }
5752         result.pagesWithMatchingImages_ = pagesWithMatchingImages_;
5753       } else {
5754         result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build();
5755       }
5756       if (visuallySimilarImagesBuilder_ == null) {
5757         if (((bitField0_ & 0x00000010) != 0)) {
5758           visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_);
5759           bitField0_ = (bitField0_ & ~0x00000010);
5760         }
5761         result.visuallySimilarImages_ = visuallySimilarImages_;
5762       } else {
5763         result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build();
5764       }
5765       if (bestGuessLabelsBuilder_ == null) {
5766         if (((bitField0_ & 0x00000020) != 0)) {
5767           bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_);
5768           bitField0_ = (bitField0_ & ~0x00000020);
5769         }
5770         result.bestGuessLabels_ = bestGuessLabels_;
5771       } else {
5772         result.bestGuessLabels_ = bestGuessLabelsBuilder_.build();
5773       }
5774     }
5775 
buildPartial0(com.google.cloud.vision.v1.WebDetection result)5776     private void buildPartial0(com.google.cloud.vision.v1.WebDetection result) {
5777       int from_bitField0_ = bitField0_;
5778     }
5779 
5780     @java.lang.Override
clone()5781     public Builder clone() {
5782       return super.clone();
5783     }
5784 
5785     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)5786     public Builder setField(
5787         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
5788       return super.setField(field, value);
5789     }
5790 
5791     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)5792     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
5793       return super.clearField(field);
5794     }
5795 
5796     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)5797     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
5798       return super.clearOneof(oneof);
5799     }
5800 
5801     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)5802     public Builder setRepeatedField(
5803         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
5804       return super.setRepeatedField(field, index, value);
5805     }
5806 
5807     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)5808     public Builder addRepeatedField(
5809         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
5810       return super.addRepeatedField(field, value);
5811     }
5812 
5813     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)5814     public Builder mergeFrom(com.google.protobuf.Message other) {
5815       if (other instanceof com.google.cloud.vision.v1.WebDetection) {
5816         return mergeFrom((com.google.cloud.vision.v1.WebDetection) other);
5817       } else {
5818         super.mergeFrom(other);
5819         return this;
5820       }
5821     }
5822 
mergeFrom(com.google.cloud.vision.v1.WebDetection other)5823     public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection other) {
5824       if (other == com.google.cloud.vision.v1.WebDetection.getDefaultInstance()) return this;
5825       if (webEntitiesBuilder_ == null) {
5826         if (!other.webEntities_.isEmpty()) {
5827           if (webEntities_.isEmpty()) {
5828             webEntities_ = other.webEntities_;
5829             bitField0_ = (bitField0_ & ~0x00000001);
5830           } else {
5831             ensureWebEntitiesIsMutable();
5832             webEntities_.addAll(other.webEntities_);
5833           }
5834           onChanged();
5835         }
5836       } else {
5837         if (!other.webEntities_.isEmpty()) {
5838           if (webEntitiesBuilder_.isEmpty()) {
5839             webEntitiesBuilder_.dispose();
5840             webEntitiesBuilder_ = null;
5841             webEntities_ = other.webEntities_;
5842             bitField0_ = (bitField0_ & ~0x00000001);
5843             webEntitiesBuilder_ =
5844                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
5845                     ? getWebEntitiesFieldBuilder()
5846                     : null;
5847           } else {
5848             webEntitiesBuilder_.addAllMessages(other.webEntities_);
5849           }
5850         }
5851       }
5852       if (fullMatchingImagesBuilder_ == null) {
5853         if (!other.fullMatchingImages_.isEmpty()) {
5854           if (fullMatchingImages_.isEmpty()) {
5855             fullMatchingImages_ = other.fullMatchingImages_;
5856             bitField0_ = (bitField0_ & ~0x00000002);
5857           } else {
5858             ensureFullMatchingImagesIsMutable();
5859             fullMatchingImages_.addAll(other.fullMatchingImages_);
5860           }
5861           onChanged();
5862         }
5863       } else {
5864         if (!other.fullMatchingImages_.isEmpty()) {
5865           if (fullMatchingImagesBuilder_.isEmpty()) {
5866             fullMatchingImagesBuilder_.dispose();
5867             fullMatchingImagesBuilder_ = null;
5868             fullMatchingImages_ = other.fullMatchingImages_;
5869             bitField0_ = (bitField0_ & ~0x00000002);
5870             fullMatchingImagesBuilder_ =
5871                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
5872                     ? getFullMatchingImagesFieldBuilder()
5873                     : null;
5874           } else {
5875             fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_);
5876           }
5877         }
5878       }
5879       if (partialMatchingImagesBuilder_ == null) {
5880         if (!other.partialMatchingImages_.isEmpty()) {
5881           if (partialMatchingImages_.isEmpty()) {
5882             partialMatchingImages_ = other.partialMatchingImages_;
5883             bitField0_ = (bitField0_ & ~0x00000004);
5884           } else {
5885             ensurePartialMatchingImagesIsMutable();
5886             partialMatchingImages_.addAll(other.partialMatchingImages_);
5887           }
5888           onChanged();
5889         }
5890       } else {
5891         if (!other.partialMatchingImages_.isEmpty()) {
5892           if (partialMatchingImagesBuilder_.isEmpty()) {
5893             partialMatchingImagesBuilder_.dispose();
5894             partialMatchingImagesBuilder_ = null;
5895             partialMatchingImages_ = other.partialMatchingImages_;
5896             bitField0_ = (bitField0_ & ~0x00000004);
5897             partialMatchingImagesBuilder_ =
5898                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
5899                     ? getPartialMatchingImagesFieldBuilder()
5900                     : null;
5901           } else {
5902             partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_);
5903           }
5904         }
5905       }
5906       if (pagesWithMatchingImagesBuilder_ == null) {
5907         if (!other.pagesWithMatchingImages_.isEmpty()) {
5908           if (pagesWithMatchingImages_.isEmpty()) {
5909             pagesWithMatchingImages_ = other.pagesWithMatchingImages_;
5910             bitField0_ = (bitField0_ & ~0x00000008);
5911           } else {
5912             ensurePagesWithMatchingImagesIsMutable();
5913             pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_);
5914           }
5915           onChanged();
5916         }
5917       } else {
5918         if (!other.pagesWithMatchingImages_.isEmpty()) {
5919           if (pagesWithMatchingImagesBuilder_.isEmpty()) {
5920             pagesWithMatchingImagesBuilder_.dispose();
5921             pagesWithMatchingImagesBuilder_ = null;
5922             pagesWithMatchingImages_ = other.pagesWithMatchingImages_;
5923             bitField0_ = (bitField0_ & ~0x00000008);
5924             pagesWithMatchingImagesBuilder_ =
5925                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
5926                     ? getPagesWithMatchingImagesFieldBuilder()
5927                     : null;
5928           } else {
5929             pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_);
5930           }
5931         }
5932       }
5933       if (visuallySimilarImagesBuilder_ == null) {
5934         if (!other.visuallySimilarImages_.isEmpty()) {
5935           if (visuallySimilarImages_.isEmpty()) {
5936             visuallySimilarImages_ = other.visuallySimilarImages_;
5937             bitField0_ = (bitField0_ & ~0x00000010);
5938           } else {
5939             ensureVisuallySimilarImagesIsMutable();
5940             visuallySimilarImages_.addAll(other.visuallySimilarImages_);
5941           }
5942           onChanged();
5943         }
5944       } else {
5945         if (!other.visuallySimilarImages_.isEmpty()) {
5946           if (visuallySimilarImagesBuilder_.isEmpty()) {
5947             visuallySimilarImagesBuilder_.dispose();
5948             visuallySimilarImagesBuilder_ = null;
5949             visuallySimilarImages_ = other.visuallySimilarImages_;
5950             bitField0_ = (bitField0_ & ~0x00000010);
5951             visuallySimilarImagesBuilder_ =
5952                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
5953                     ? getVisuallySimilarImagesFieldBuilder()
5954                     : null;
5955           } else {
5956             visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_);
5957           }
5958         }
5959       }
5960       if (bestGuessLabelsBuilder_ == null) {
5961         if (!other.bestGuessLabels_.isEmpty()) {
5962           if (bestGuessLabels_.isEmpty()) {
5963             bestGuessLabels_ = other.bestGuessLabels_;
5964             bitField0_ = (bitField0_ & ~0x00000020);
5965           } else {
5966             ensureBestGuessLabelsIsMutable();
5967             bestGuessLabels_.addAll(other.bestGuessLabels_);
5968           }
5969           onChanged();
5970         }
5971       } else {
5972         if (!other.bestGuessLabels_.isEmpty()) {
5973           if (bestGuessLabelsBuilder_.isEmpty()) {
5974             bestGuessLabelsBuilder_.dispose();
5975             bestGuessLabelsBuilder_ = null;
5976             bestGuessLabels_ = other.bestGuessLabels_;
5977             bitField0_ = (bitField0_ & ~0x00000020);
5978             bestGuessLabelsBuilder_ =
5979                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
5980                     ? getBestGuessLabelsFieldBuilder()
5981                     : null;
5982           } else {
5983             bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_);
5984           }
5985         }
5986       }
5987       this.mergeUnknownFields(other.getUnknownFields());
5988       onChanged();
5989       return this;
5990     }
5991 
5992     @java.lang.Override
isInitialized()5993     public final boolean isInitialized() {
5994       return true;
5995     }
5996 
5997     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5998     public Builder mergeFrom(
5999         com.google.protobuf.CodedInputStream input,
6000         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6001         throws java.io.IOException {
6002       if (extensionRegistry == null) {
6003         throw new java.lang.NullPointerException();
6004       }
6005       try {
6006         boolean done = false;
6007         while (!done) {
6008           int tag = input.readTag();
6009           switch (tag) {
6010             case 0:
6011               done = true;
6012               break;
6013             case 10:
6014               {
6015                 com.google.cloud.vision.v1.WebDetection.WebEntity m =
6016                     input.readMessage(
6017                         com.google.cloud.vision.v1.WebDetection.WebEntity.parser(),
6018                         extensionRegistry);
6019                 if (webEntitiesBuilder_ == null) {
6020                   ensureWebEntitiesIsMutable();
6021                   webEntities_.add(m);
6022                 } else {
6023                   webEntitiesBuilder_.addMessage(m);
6024                 }
6025                 break;
6026               } // case 10
6027             case 18:
6028               {
6029                 com.google.cloud.vision.v1.WebDetection.WebImage m =
6030                     input.readMessage(
6031                         com.google.cloud.vision.v1.WebDetection.WebImage.parser(),
6032                         extensionRegistry);
6033                 if (fullMatchingImagesBuilder_ == null) {
6034                   ensureFullMatchingImagesIsMutable();
6035                   fullMatchingImages_.add(m);
6036                 } else {
6037                   fullMatchingImagesBuilder_.addMessage(m);
6038                 }
6039                 break;
6040               } // case 18
6041             case 26:
6042               {
6043                 com.google.cloud.vision.v1.WebDetection.WebImage m =
6044                     input.readMessage(
6045                         com.google.cloud.vision.v1.WebDetection.WebImage.parser(),
6046                         extensionRegistry);
6047                 if (partialMatchingImagesBuilder_ == null) {
6048                   ensurePartialMatchingImagesIsMutable();
6049                   partialMatchingImages_.add(m);
6050                 } else {
6051                   partialMatchingImagesBuilder_.addMessage(m);
6052                 }
6053                 break;
6054               } // case 26
6055             case 34:
6056               {
6057                 com.google.cloud.vision.v1.WebDetection.WebPage m =
6058                     input.readMessage(
6059                         com.google.cloud.vision.v1.WebDetection.WebPage.parser(),
6060                         extensionRegistry);
6061                 if (pagesWithMatchingImagesBuilder_ == null) {
6062                   ensurePagesWithMatchingImagesIsMutable();
6063                   pagesWithMatchingImages_.add(m);
6064                 } else {
6065                   pagesWithMatchingImagesBuilder_.addMessage(m);
6066                 }
6067                 break;
6068               } // case 34
6069             case 50:
6070               {
6071                 com.google.cloud.vision.v1.WebDetection.WebImage m =
6072                     input.readMessage(
6073                         com.google.cloud.vision.v1.WebDetection.WebImage.parser(),
6074                         extensionRegistry);
6075                 if (visuallySimilarImagesBuilder_ == null) {
6076                   ensureVisuallySimilarImagesIsMutable();
6077                   visuallySimilarImages_.add(m);
6078                 } else {
6079                   visuallySimilarImagesBuilder_.addMessage(m);
6080                 }
6081                 break;
6082               } // case 50
6083             case 66:
6084               {
6085                 com.google.cloud.vision.v1.WebDetection.WebLabel m =
6086                     input.readMessage(
6087                         com.google.cloud.vision.v1.WebDetection.WebLabel.parser(),
6088                         extensionRegistry);
6089                 if (bestGuessLabelsBuilder_ == null) {
6090                   ensureBestGuessLabelsIsMutable();
6091                   bestGuessLabels_.add(m);
6092                 } else {
6093                   bestGuessLabelsBuilder_.addMessage(m);
6094                 }
6095                 break;
6096               } // case 66
6097             default:
6098               {
6099                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
6100                   done = true; // was an endgroup tag
6101                 }
6102                 break;
6103               } // default:
6104           } // switch (tag)
6105         } // while (!done)
6106       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6107         throw e.unwrapIOException();
6108       } finally {
6109         onChanged();
6110       } // finally
6111       return this;
6112     }
6113 
6114     private int bitField0_;
6115 
6116     private java.util.List<com.google.cloud.vision.v1.WebDetection.WebEntity> webEntities_ =
6117         java.util.Collections.emptyList();
6118 
ensureWebEntitiesIsMutable()6119     private void ensureWebEntitiesIsMutable() {
6120       if (!((bitField0_ & 0x00000001) != 0)) {
6121         webEntities_ =
6122             new java.util.ArrayList<com.google.cloud.vision.v1.WebDetection.WebEntity>(
6123                 webEntities_);
6124         bitField0_ |= 0x00000001;
6125       }
6126     }
6127 
6128     private com.google.protobuf.RepeatedFieldBuilderV3<
6129             com.google.cloud.vision.v1.WebDetection.WebEntity,
6130             com.google.cloud.vision.v1.WebDetection.WebEntity.Builder,
6131             com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder>
6132         webEntitiesBuilder_;
6133 
6134     /**
6135      *
6136      *
6137      * <pre>
6138      * Deduced entities from similar images on the Internet.
6139      * </pre>
6140      *
6141      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6142      */
getWebEntitiesList()6143     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebEntity> getWebEntitiesList() {
6144       if (webEntitiesBuilder_ == null) {
6145         return java.util.Collections.unmodifiableList(webEntities_);
6146       } else {
6147         return webEntitiesBuilder_.getMessageList();
6148       }
6149     }
6150     /**
6151      *
6152      *
6153      * <pre>
6154      * Deduced entities from similar images on the Internet.
6155      * </pre>
6156      *
6157      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6158      */
getWebEntitiesCount()6159     public int getWebEntitiesCount() {
6160       if (webEntitiesBuilder_ == null) {
6161         return webEntities_.size();
6162       } else {
6163         return webEntitiesBuilder_.getCount();
6164       }
6165     }
6166     /**
6167      *
6168      *
6169      * <pre>
6170      * Deduced entities from similar images on the Internet.
6171      * </pre>
6172      *
6173      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6174      */
getWebEntities(int index)6175     public com.google.cloud.vision.v1.WebDetection.WebEntity getWebEntities(int index) {
6176       if (webEntitiesBuilder_ == null) {
6177         return webEntities_.get(index);
6178       } else {
6179         return webEntitiesBuilder_.getMessage(index);
6180       }
6181     }
6182     /**
6183      *
6184      *
6185      * <pre>
6186      * Deduced entities from similar images on the Internet.
6187      * </pre>
6188      *
6189      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6190      */
setWebEntities( int index, com.google.cloud.vision.v1.WebDetection.WebEntity value)6191     public Builder setWebEntities(
6192         int index, com.google.cloud.vision.v1.WebDetection.WebEntity value) {
6193       if (webEntitiesBuilder_ == null) {
6194         if (value == null) {
6195           throw new NullPointerException();
6196         }
6197         ensureWebEntitiesIsMutable();
6198         webEntities_.set(index, value);
6199         onChanged();
6200       } else {
6201         webEntitiesBuilder_.setMessage(index, value);
6202       }
6203       return this;
6204     }
6205     /**
6206      *
6207      *
6208      * <pre>
6209      * Deduced entities from similar images on the Internet.
6210      * </pre>
6211      *
6212      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6213      */
setWebEntities( int index, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue)6214     public Builder setWebEntities(
6215         int index, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue) {
6216       if (webEntitiesBuilder_ == null) {
6217         ensureWebEntitiesIsMutable();
6218         webEntities_.set(index, builderForValue.build());
6219         onChanged();
6220       } else {
6221         webEntitiesBuilder_.setMessage(index, builderForValue.build());
6222       }
6223       return this;
6224     }
6225     /**
6226      *
6227      *
6228      * <pre>
6229      * Deduced entities from similar images on the Internet.
6230      * </pre>
6231      *
6232      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6233      */
addWebEntities(com.google.cloud.vision.v1.WebDetection.WebEntity value)6234     public Builder addWebEntities(com.google.cloud.vision.v1.WebDetection.WebEntity value) {
6235       if (webEntitiesBuilder_ == null) {
6236         if (value == null) {
6237           throw new NullPointerException();
6238         }
6239         ensureWebEntitiesIsMutable();
6240         webEntities_.add(value);
6241         onChanged();
6242       } else {
6243         webEntitiesBuilder_.addMessage(value);
6244       }
6245       return this;
6246     }
6247     /**
6248      *
6249      *
6250      * <pre>
6251      * Deduced entities from similar images on the Internet.
6252      * </pre>
6253      *
6254      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6255      */
addWebEntities( int index, com.google.cloud.vision.v1.WebDetection.WebEntity value)6256     public Builder addWebEntities(
6257         int index, com.google.cloud.vision.v1.WebDetection.WebEntity value) {
6258       if (webEntitiesBuilder_ == null) {
6259         if (value == null) {
6260           throw new NullPointerException();
6261         }
6262         ensureWebEntitiesIsMutable();
6263         webEntities_.add(index, value);
6264         onChanged();
6265       } else {
6266         webEntitiesBuilder_.addMessage(index, value);
6267       }
6268       return this;
6269     }
6270     /**
6271      *
6272      *
6273      * <pre>
6274      * Deduced entities from similar images on the Internet.
6275      * </pre>
6276      *
6277      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6278      */
addWebEntities( com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue)6279     public Builder addWebEntities(
6280         com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue) {
6281       if (webEntitiesBuilder_ == null) {
6282         ensureWebEntitiesIsMutable();
6283         webEntities_.add(builderForValue.build());
6284         onChanged();
6285       } else {
6286         webEntitiesBuilder_.addMessage(builderForValue.build());
6287       }
6288       return this;
6289     }
6290     /**
6291      *
6292      *
6293      * <pre>
6294      * Deduced entities from similar images on the Internet.
6295      * </pre>
6296      *
6297      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6298      */
addWebEntities( int index, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue)6299     public Builder addWebEntities(
6300         int index, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue) {
6301       if (webEntitiesBuilder_ == null) {
6302         ensureWebEntitiesIsMutable();
6303         webEntities_.add(index, builderForValue.build());
6304         onChanged();
6305       } else {
6306         webEntitiesBuilder_.addMessage(index, builderForValue.build());
6307       }
6308       return this;
6309     }
6310     /**
6311      *
6312      *
6313      * <pre>
6314      * Deduced entities from similar images on the Internet.
6315      * </pre>
6316      *
6317      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6318      */
addAllWebEntities( java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebEntity> values)6319     public Builder addAllWebEntities(
6320         java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebEntity> values) {
6321       if (webEntitiesBuilder_ == null) {
6322         ensureWebEntitiesIsMutable();
6323         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webEntities_);
6324         onChanged();
6325       } else {
6326         webEntitiesBuilder_.addAllMessages(values);
6327       }
6328       return this;
6329     }
6330     /**
6331      *
6332      *
6333      * <pre>
6334      * Deduced entities from similar images on the Internet.
6335      * </pre>
6336      *
6337      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6338      */
clearWebEntities()6339     public Builder clearWebEntities() {
6340       if (webEntitiesBuilder_ == null) {
6341         webEntities_ = java.util.Collections.emptyList();
6342         bitField0_ = (bitField0_ & ~0x00000001);
6343         onChanged();
6344       } else {
6345         webEntitiesBuilder_.clear();
6346       }
6347       return this;
6348     }
6349     /**
6350      *
6351      *
6352      * <pre>
6353      * Deduced entities from similar images on the Internet.
6354      * </pre>
6355      *
6356      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6357      */
removeWebEntities(int index)6358     public Builder removeWebEntities(int index) {
6359       if (webEntitiesBuilder_ == null) {
6360         ensureWebEntitiesIsMutable();
6361         webEntities_.remove(index);
6362         onChanged();
6363       } else {
6364         webEntitiesBuilder_.remove(index);
6365       }
6366       return this;
6367     }
6368     /**
6369      *
6370      *
6371      * <pre>
6372      * Deduced entities from similar images on the Internet.
6373      * </pre>
6374      *
6375      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6376      */
getWebEntitiesBuilder( int index)6377     public com.google.cloud.vision.v1.WebDetection.WebEntity.Builder getWebEntitiesBuilder(
6378         int index) {
6379       return getWebEntitiesFieldBuilder().getBuilder(index);
6380     }
6381     /**
6382      *
6383      *
6384      * <pre>
6385      * Deduced entities from similar images on the Internet.
6386      * </pre>
6387      *
6388      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6389      */
getWebEntitiesOrBuilder( int index)6390     public com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder(
6391         int index) {
6392       if (webEntitiesBuilder_ == null) {
6393         return webEntities_.get(index);
6394       } else {
6395         return webEntitiesBuilder_.getMessageOrBuilder(index);
6396       }
6397     }
6398     /**
6399      *
6400      *
6401      * <pre>
6402      * Deduced entities from similar images on the Internet.
6403      * </pre>
6404      *
6405      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6406      */
6407     public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder>
getWebEntitiesOrBuilderList()6408         getWebEntitiesOrBuilderList() {
6409       if (webEntitiesBuilder_ != null) {
6410         return webEntitiesBuilder_.getMessageOrBuilderList();
6411       } else {
6412         return java.util.Collections.unmodifiableList(webEntities_);
6413       }
6414     }
6415     /**
6416      *
6417      *
6418      * <pre>
6419      * Deduced entities from similar images on the Internet.
6420      * </pre>
6421      *
6422      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6423      */
addWebEntitiesBuilder()6424     public com.google.cloud.vision.v1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() {
6425       return getWebEntitiesFieldBuilder()
6426           .addBuilder(com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance());
6427     }
6428     /**
6429      *
6430      *
6431      * <pre>
6432      * Deduced entities from similar images on the Internet.
6433      * </pre>
6434      *
6435      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6436      */
addWebEntitiesBuilder( int index)6437     public com.google.cloud.vision.v1.WebDetection.WebEntity.Builder addWebEntitiesBuilder(
6438         int index) {
6439       return getWebEntitiesFieldBuilder()
6440           .addBuilder(
6441               index, com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance());
6442     }
6443     /**
6444      *
6445      *
6446      * <pre>
6447      * Deduced entities from similar images on the Internet.
6448      * </pre>
6449      *
6450      * <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code>
6451      */
6452     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebEntity.Builder>
getWebEntitiesBuilderList()6453         getWebEntitiesBuilderList() {
6454       return getWebEntitiesFieldBuilder().getBuilderList();
6455     }
6456 
6457     private com.google.protobuf.RepeatedFieldBuilderV3<
6458             com.google.cloud.vision.v1.WebDetection.WebEntity,
6459             com.google.cloud.vision.v1.WebDetection.WebEntity.Builder,
6460             com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder>
getWebEntitiesFieldBuilder()6461         getWebEntitiesFieldBuilder() {
6462       if (webEntitiesBuilder_ == null) {
6463         webEntitiesBuilder_ =
6464             new com.google.protobuf.RepeatedFieldBuilderV3<
6465                 com.google.cloud.vision.v1.WebDetection.WebEntity,
6466                 com.google.cloud.vision.v1.WebDetection.WebEntity.Builder,
6467                 com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder>(
6468                 webEntities_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
6469         webEntities_ = null;
6470       }
6471       return webEntitiesBuilder_;
6472     }
6473 
6474     private java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage> fullMatchingImages_ =
6475         java.util.Collections.emptyList();
6476 
ensureFullMatchingImagesIsMutable()6477     private void ensureFullMatchingImagesIsMutable() {
6478       if (!((bitField0_ & 0x00000002) != 0)) {
6479         fullMatchingImages_ =
6480             new java.util.ArrayList<com.google.cloud.vision.v1.WebDetection.WebImage>(
6481                 fullMatchingImages_);
6482         bitField0_ |= 0x00000002;
6483       }
6484     }
6485 
6486     private com.google.protobuf.RepeatedFieldBuilderV3<
6487             com.google.cloud.vision.v1.WebDetection.WebImage,
6488             com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
6489             com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
6490         fullMatchingImagesBuilder_;
6491 
6492     /**
6493      *
6494      *
6495      * <pre>
6496      * Fully matching images from the Internet.
6497      * Can include resized copies of the query image.
6498      * </pre>
6499      *
6500      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6501      */
6502     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
getFullMatchingImagesList()6503         getFullMatchingImagesList() {
6504       if (fullMatchingImagesBuilder_ == null) {
6505         return java.util.Collections.unmodifiableList(fullMatchingImages_);
6506       } else {
6507         return fullMatchingImagesBuilder_.getMessageList();
6508       }
6509     }
6510     /**
6511      *
6512      *
6513      * <pre>
6514      * Fully matching images from the Internet.
6515      * Can include resized copies of the query image.
6516      * </pre>
6517      *
6518      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6519      */
getFullMatchingImagesCount()6520     public int getFullMatchingImagesCount() {
6521       if (fullMatchingImagesBuilder_ == null) {
6522         return fullMatchingImages_.size();
6523       } else {
6524         return fullMatchingImagesBuilder_.getCount();
6525       }
6526     }
6527     /**
6528      *
6529      *
6530      * <pre>
6531      * Fully matching images from the Internet.
6532      * Can include resized copies of the query image.
6533      * </pre>
6534      *
6535      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6536      */
getFullMatchingImages(int index)6537     public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) {
6538       if (fullMatchingImagesBuilder_ == null) {
6539         return fullMatchingImages_.get(index);
6540       } else {
6541         return fullMatchingImagesBuilder_.getMessage(index);
6542       }
6543     }
6544     /**
6545      *
6546      *
6547      * <pre>
6548      * Fully matching images from the Internet.
6549      * Can include resized copies of the query image.
6550      * </pre>
6551      *
6552      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6553      */
setFullMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage value)6554     public Builder setFullMatchingImages(
6555         int index, com.google.cloud.vision.v1.WebDetection.WebImage value) {
6556       if (fullMatchingImagesBuilder_ == null) {
6557         if (value == null) {
6558           throw new NullPointerException();
6559         }
6560         ensureFullMatchingImagesIsMutable();
6561         fullMatchingImages_.set(index, value);
6562         onChanged();
6563       } else {
6564         fullMatchingImagesBuilder_.setMessage(index, value);
6565       }
6566       return this;
6567     }
6568     /**
6569      *
6570      *
6571      * <pre>
6572      * Fully matching images from the Internet.
6573      * Can include resized copies of the query image.
6574      * </pre>
6575      *
6576      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6577      */
setFullMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)6578     public Builder setFullMatchingImages(
6579         int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
6580       if (fullMatchingImagesBuilder_ == null) {
6581         ensureFullMatchingImagesIsMutable();
6582         fullMatchingImages_.set(index, builderForValue.build());
6583         onChanged();
6584       } else {
6585         fullMatchingImagesBuilder_.setMessage(index, builderForValue.build());
6586       }
6587       return this;
6588     }
6589     /**
6590      *
6591      *
6592      * <pre>
6593      * Fully matching images from the Internet.
6594      * Can include resized copies of the query image.
6595      * </pre>
6596      *
6597      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6598      */
addFullMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value)6599     public Builder addFullMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value) {
6600       if (fullMatchingImagesBuilder_ == null) {
6601         if (value == null) {
6602           throw new NullPointerException();
6603         }
6604         ensureFullMatchingImagesIsMutable();
6605         fullMatchingImages_.add(value);
6606         onChanged();
6607       } else {
6608         fullMatchingImagesBuilder_.addMessage(value);
6609       }
6610       return this;
6611     }
6612     /**
6613      *
6614      *
6615      * <pre>
6616      * Fully matching images from the Internet.
6617      * Can include resized copies of the query image.
6618      * </pre>
6619      *
6620      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6621      */
addFullMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage value)6622     public Builder addFullMatchingImages(
6623         int index, com.google.cloud.vision.v1.WebDetection.WebImage value) {
6624       if (fullMatchingImagesBuilder_ == null) {
6625         if (value == null) {
6626           throw new NullPointerException();
6627         }
6628         ensureFullMatchingImagesIsMutable();
6629         fullMatchingImages_.add(index, value);
6630         onChanged();
6631       } else {
6632         fullMatchingImagesBuilder_.addMessage(index, value);
6633       }
6634       return this;
6635     }
6636     /**
6637      *
6638      *
6639      * <pre>
6640      * Fully matching images from the Internet.
6641      * Can include resized copies of the query image.
6642      * </pre>
6643      *
6644      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6645      */
addFullMatchingImages( com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)6646     public Builder addFullMatchingImages(
6647         com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
6648       if (fullMatchingImagesBuilder_ == null) {
6649         ensureFullMatchingImagesIsMutable();
6650         fullMatchingImages_.add(builderForValue.build());
6651         onChanged();
6652       } else {
6653         fullMatchingImagesBuilder_.addMessage(builderForValue.build());
6654       }
6655       return this;
6656     }
6657     /**
6658      *
6659      *
6660      * <pre>
6661      * Fully matching images from the Internet.
6662      * Can include resized copies of the query image.
6663      * </pre>
6664      *
6665      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6666      */
addFullMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)6667     public Builder addFullMatchingImages(
6668         int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
6669       if (fullMatchingImagesBuilder_ == null) {
6670         ensureFullMatchingImagesIsMutable();
6671         fullMatchingImages_.add(index, builderForValue.build());
6672         onChanged();
6673       } else {
6674         fullMatchingImagesBuilder_.addMessage(index, builderForValue.build());
6675       }
6676       return this;
6677     }
6678     /**
6679      *
6680      *
6681      * <pre>
6682      * Fully matching images from the Internet.
6683      * Can include resized copies of the query image.
6684      * </pre>
6685      *
6686      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6687      */
addAllFullMatchingImages( java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebImage> values)6688     public Builder addAllFullMatchingImages(
6689         java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebImage> values) {
6690       if (fullMatchingImagesBuilder_ == null) {
6691         ensureFullMatchingImagesIsMutable();
6692         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fullMatchingImages_);
6693         onChanged();
6694       } else {
6695         fullMatchingImagesBuilder_.addAllMessages(values);
6696       }
6697       return this;
6698     }
6699     /**
6700      *
6701      *
6702      * <pre>
6703      * Fully matching images from the Internet.
6704      * Can include resized copies of the query image.
6705      * </pre>
6706      *
6707      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6708      */
clearFullMatchingImages()6709     public Builder clearFullMatchingImages() {
6710       if (fullMatchingImagesBuilder_ == null) {
6711         fullMatchingImages_ = java.util.Collections.emptyList();
6712         bitField0_ = (bitField0_ & ~0x00000002);
6713         onChanged();
6714       } else {
6715         fullMatchingImagesBuilder_.clear();
6716       }
6717       return this;
6718     }
6719     /**
6720      *
6721      *
6722      * <pre>
6723      * Fully matching images from the Internet.
6724      * Can include resized copies of the query image.
6725      * </pre>
6726      *
6727      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6728      */
removeFullMatchingImages(int index)6729     public Builder removeFullMatchingImages(int index) {
6730       if (fullMatchingImagesBuilder_ == null) {
6731         ensureFullMatchingImagesIsMutable();
6732         fullMatchingImages_.remove(index);
6733         onChanged();
6734       } else {
6735         fullMatchingImagesBuilder_.remove(index);
6736       }
6737       return this;
6738     }
6739     /**
6740      *
6741      *
6742      * <pre>
6743      * Fully matching images from the Internet.
6744      * Can include resized copies of the query image.
6745      * </pre>
6746      *
6747      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6748      */
getFullMatchingImagesBuilder( int index)6749     public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder(
6750         int index) {
6751       return getFullMatchingImagesFieldBuilder().getBuilder(index);
6752     }
6753     /**
6754      *
6755      *
6756      * <pre>
6757      * Fully matching images from the Internet.
6758      * Can include resized copies of the query image.
6759      * </pre>
6760      *
6761      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6762      */
getFullMatchingImagesOrBuilder( int index)6763     public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder(
6764         int index) {
6765       if (fullMatchingImagesBuilder_ == null) {
6766         return fullMatchingImages_.get(index);
6767       } else {
6768         return fullMatchingImagesBuilder_.getMessageOrBuilder(index);
6769       }
6770     }
6771     /**
6772      *
6773      *
6774      * <pre>
6775      * Fully matching images from the Internet.
6776      * Can include resized copies of the query image.
6777      * </pre>
6778      *
6779      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6780      */
6781     public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getFullMatchingImagesOrBuilderList()6782         getFullMatchingImagesOrBuilderList() {
6783       if (fullMatchingImagesBuilder_ != null) {
6784         return fullMatchingImagesBuilder_.getMessageOrBuilderList();
6785       } else {
6786         return java.util.Collections.unmodifiableList(fullMatchingImages_);
6787       }
6788     }
6789     /**
6790      *
6791      *
6792      * <pre>
6793      * Fully matching images from the Internet.
6794      * Can include resized copies of the query image.
6795      * </pre>
6796      *
6797      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6798      */
addFullMatchingImagesBuilder()6799     public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() {
6800       return getFullMatchingImagesFieldBuilder()
6801           .addBuilder(com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance());
6802     }
6803     /**
6804      *
6805      *
6806      * <pre>
6807      * Fully matching images from the Internet.
6808      * Can include resized copies of the query image.
6809      * </pre>
6810      *
6811      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6812      */
addFullMatchingImagesBuilder( int index)6813     public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder(
6814         int index) {
6815       return getFullMatchingImagesFieldBuilder()
6816           .addBuilder(index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance());
6817     }
6818     /**
6819      *
6820      *
6821      * <pre>
6822      * Fully matching images from the Internet.
6823      * Can include resized copies of the query image.
6824      * </pre>
6825      *
6826      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code>
6827      */
6828     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage.Builder>
getFullMatchingImagesBuilderList()6829         getFullMatchingImagesBuilderList() {
6830       return getFullMatchingImagesFieldBuilder().getBuilderList();
6831     }
6832 
6833     private com.google.protobuf.RepeatedFieldBuilderV3<
6834             com.google.cloud.vision.v1.WebDetection.WebImage,
6835             com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
6836             com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getFullMatchingImagesFieldBuilder()6837         getFullMatchingImagesFieldBuilder() {
6838       if (fullMatchingImagesBuilder_ == null) {
6839         fullMatchingImagesBuilder_ =
6840             new com.google.protobuf.RepeatedFieldBuilderV3<
6841                 com.google.cloud.vision.v1.WebDetection.WebImage,
6842                 com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
6843                 com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>(
6844                 fullMatchingImages_,
6845                 ((bitField0_ & 0x00000002) != 0),
6846                 getParentForChildren(),
6847                 isClean());
6848         fullMatchingImages_ = null;
6849       }
6850       return fullMatchingImagesBuilder_;
6851     }
6852 
6853     private java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
6854         partialMatchingImages_ = java.util.Collections.emptyList();
6855 
ensurePartialMatchingImagesIsMutable()6856     private void ensurePartialMatchingImagesIsMutable() {
6857       if (!((bitField0_ & 0x00000004) != 0)) {
6858         partialMatchingImages_ =
6859             new java.util.ArrayList<com.google.cloud.vision.v1.WebDetection.WebImage>(
6860                 partialMatchingImages_);
6861         bitField0_ |= 0x00000004;
6862       }
6863     }
6864 
6865     private com.google.protobuf.RepeatedFieldBuilderV3<
6866             com.google.cloud.vision.v1.WebDetection.WebImage,
6867             com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
6868             com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
6869         partialMatchingImagesBuilder_;
6870 
6871     /**
6872      *
6873      *
6874      * <pre>
6875      * Partial matching images from the Internet.
6876      * Those images are similar enough to share some key-point features. For
6877      * example an original image will likely have partial matching for its crops.
6878      * </pre>
6879      *
6880      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
6881      * </code>
6882      */
6883     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
getPartialMatchingImagesList()6884         getPartialMatchingImagesList() {
6885       if (partialMatchingImagesBuilder_ == null) {
6886         return java.util.Collections.unmodifiableList(partialMatchingImages_);
6887       } else {
6888         return partialMatchingImagesBuilder_.getMessageList();
6889       }
6890     }
6891     /**
6892      *
6893      *
6894      * <pre>
6895      * Partial matching images from the Internet.
6896      * Those images are similar enough to share some key-point features. For
6897      * example an original image will likely have partial matching for its crops.
6898      * </pre>
6899      *
6900      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
6901      * </code>
6902      */
getPartialMatchingImagesCount()6903     public int getPartialMatchingImagesCount() {
6904       if (partialMatchingImagesBuilder_ == null) {
6905         return partialMatchingImages_.size();
6906       } else {
6907         return partialMatchingImagesBuilder_.getCount();
6908       }
6909     }
6910     /**
6911      *
6912      *
6913      * <pre>
6914      * Partial matching images from the Internet.
6915      * Those images are similar enough to share some key-point features. For
6916      * example an original image will likely have partial matching for its crops.
6917      * </pre>
6918      *
6919      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
6920      * </code>
6921      */
getPartialMatchingImages(int index)6922     public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) {
6923       if (partialMatchingImagesBuilder_ == null) {
6924         return partialMatchingImages_.get(index);
6925       } else {
6926         return partialMatchingImagesBuilder_.getMessage(index);
6927       }
6928     }
6929     /**
6930      *
6931      *
6932      * <pre>
6933      * Partial matching images from the Internet.
6934      * Those images are similar enough to share some key-point features. For
6935      * example an original image will likely have partial matching for its crops.
6936      * </pre>
6937      *
6938      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
6939      * </code>
6940      */
setPartialMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage value)6941     public Builder setPartialMatchingImages(
6942         int index, com.google.cloud.vision.v1.WebDetection.WebImage value) {
6943       if (partialMatchingImagesBuilder_ == null) {
6944         if (value == null) {
6945           throw new NullPointerException();
6946         }
6947         ensurePartialMatchingImagesIsMutable();
6948         partialMatchingImages_.set(index, value);
6949         onChanged();
6950       } else {
6951         partialMatchingImagesBuilder_.setMessage(index, value);
6952       }
6953       return this;
6954     }
6955     /**
6956      *
6957      *
6958      * <pre>
6959      * Partial matching images from the Internet.
6960      * Those images are similar enough to share some key-point features. For
6961      * example an original image will likely have partial matching for its crops.
6962      * </pre>
6963      *
6964      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
6965      * </code>
6966      */
setPartialMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)6967     public Builder setPartialMatchingImages(
6968         int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
6969       if (partialMatchingImagesBuilder_ == null) {
6970         ensurePartialMatchingImagesIsMutable();
6971         partialMatchingImages_.set(index, builderForValue.build());
6972         onChanged();
6973       } else {
6974         partialMatchingImagesBuilder_.setMessage(index, builderForValue.build());
6975       }
6976       return this;
6977     }
6978     /**
6979      *
6980      *
6981      * <pre>
6982      * Partial matching images from the Internet.
6983      * Those images are similar enough to share some key-point features. For
6984      * example an original image will likely have partial matching for its crops.
6985      * </pre>
6986      *
6987      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
6988      * </code>
6989      */
addPartialMatchingImages( com.google.cloud.vision.v1.WebDetection.WebImage value)6990     public Builder addPartialMatchingImages(
6991         com.google.cloud.vision.v1.WebDetection.WebImage value) {
6992       if (partialMatchingImagesBuilder_ == null) {
6993         if (value == null) {
6994           throw new NullPointerException();
6995         }
6996         ensurePartialMatchingImagesIsMutable();
6997         partialMatchingImages_.add(value);
6998         onChanged();
6999       } else {
7000         partialMatchingImagesBuilder_.addMessage(value);
7001       }
7002       return this;
7003     }
7004     /**
7005      *
7006      *
7007      * <pre>
7008      * Partial matching images from the Internet.
7009      * Those images are similar enough to share some key-point features. For
7010      * example an original image will likely have partial matching for its crops.
7011      * </pre>
7012      *
7013      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7014      * </code>
7015      */
addPartialMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage value)7016     public Builder addPartialMatchingImages(
7017         int index, com.google.cloud.vision.v1.WebDetection.WebImage value) {
7018       if (partialMatchingImagesBuilder_ == null) {
7019         if (value == null) {
7020           throw new NullPointerException();
7021         }
7022         ensurePartialMatchingImagesIsMutable();
7023         partialMatchingImages_.add(index, value);
7024         onChanged();
7025       } else {
7026         partialMatchingImagesBuilder_.addMessage(index, value);
7027       }
7028       return this;
7029     }
7030     /**
7031      *
7032      *
7033      * <pre>
7034      * Partial matching images from the Internet.
7035      * Those images are similar enough to share some key-point features. For
7036      * example an original image will likely have partial matching for its crops.
7037      * </pre>
7038      *
7039      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7040      * </code>
7041      */
addPartialMatchingImages( com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)7042     public Builder addPartialMatchingImages(
7043         com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
7044       if (partialMatchingImagesBuilder_ == null) {
7045         ensurePartialMatchingImagesIsMutable();
7046         partialMatchingImages_.add(builderForValue.build());
7047         onChanged();
7048       } else {
7049         partialMatchingImagesBuilder_.addMessage(builderForValue.build());
7050       }
7051       return this;
7052     }
7053     /**
7054      *
7055      *
7056      * <pre>
7057      * Partial matching images from the Internet.
7058      * Those images are similar enough to share some key-point features. For
7059      * example an original image will likely have partial matching for its crops.
7060      * </pre>
7061      *
7062      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7063      * </code>
7064      */
addPartialMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)7065     public Builder addPartialMatchingImages(
7066         int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
7067       if (partialMatchingImagesBuilder_ == null) {
7068         ensurePartialMatchingImagesIsMutable();
7069         partialMatchingImages_.add(index, builderForValue.build());
7070         onChanged();
7071       } else {
7072         partialMatchingImagesBuilder_.addMessage(index, builderForValue.build());
7073       }
7074       return this;
7075     }
7076     /**
7077      *
7078      *
7079      * <pre>
7080      * Partial matching images from the Internet.
7081      * Those images are similar enough to share some key-point features. For
7082      * example an original image will likely have partial matching for its crops.
7083      * </pre>
7084      *
7085      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7086      * </code>
7087      */
addAllPartialMatchingImages( java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebImage> values)7088     public Builder addAllPartialMatchingImages(
7089         java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebImage> values) {
7090       if (partialMatchingImagesBuilder_ == null) {
7091         ensurePartialMatchingImagesIsMutable();
7092         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialMatchingImages_);
7093         onChanged();
7094       } else {
7095         partialMatchingImagesBuilder_.addAllMessages(values);
7096       }
7097       return this;
7098     }
7099     /**
7100      *
7101      *
7102      * <pre>
7103      * Partial matching images from the Internet.
7104      * Those images are similar enough to share some key-point features. For
7105      * example an original image will likely have partial matching for its crops.
7106      * </pre>
7107      *
7108      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7109      * </code>
7110      */
clearPartialMatchingImages()7111     public Builder clearPartialMatchingImages() {
7112       if (partialMatchingImagesBuilder_ == null) {
7113         partialMatchingImages_ = java.util.Collections.emptyList();
7114         bitField0_ = (bitField0_ & ~0x00000004);
7115         onChanged();
7116       } else {
7117         partialMatchingImagesBuilder_.clear();
7118       }
7119       return this;
7120     }
7121     /**
7122      *
7123      *
7124      * <pre>
7125      * Partial matching images from the Internet.
7126      * Those images are similar enough to share some key-point features. For
7127      * example an original image will likely have partial matching for its crops.
7128      * </pre>
7129      *
7130      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7131      * </code>
7132      */
removePartialMatchingImages(int index)7133     public Builder removePartialMatchingImages(int index) {
7134       if (partialMatchingImagesBuilder_ == null) {
7135         ensurePartialMatchingImagesIsMutable();
7136         partialMatchingImages_.remove(index);
7137         onChanged();
7138       } else {
7139         partialMatchingImagesBuilder_.remove(index);
7140       }
7141       return this;
7142     }
7143     /**
7144      *
7145      *
7146      * <pre>
7147      * Partial matching images from the Internet.
7148      * Those images are similar enough to share some key-point features. For
7149      * example an original image will likely have partial matching for its crops.
7150      * </pre>
7151      *
7152      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7153      * </code>
7154      */
getPartialMatchingImagesBuilder( int index)7155     public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder(
7156         int index) {
7157       return getPartialMatchingImagesFieldBuilder().getBuilder(index);
7158     }
7159     /**
7160      *
7161      *
7162      * <pre>
7163      * Partial matching images from the Internet.
7164      * Those images are similar enough to share some key-point features. For
7165      * example an original image will likely have partial matching for its crops.
7166      * </pre>
7167      *
7168      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7169      * </code>
7170      */
7171     public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder
getPartialMatchingImagesOrBuilder(int index)7172         getPartialMatchingImagesOrBuilder(int index) {
7173       if (partialMatchingImagesBuilder_ == null) {
7174         return partialMatchingImages_.get(index);
7175       } else {
7176         return partialMatchingImagesBuilder_.getMessageOrBuilder(index);
7177       }
7178     }
7179     /**
7180      *
7181      *
7182      * <pre>
7183      * Partial matching images from the Internet.
7184      * Those images are similar enough to share some key-point features. For
7185      * example an original image will likely have partial matching for its crops.
7186      * </pre>
7187      *
7188      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7189      * </code>
7190      */
7191     public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getPartialMatchingImagesOrBuilderList()7192         getPartialMatchingImagesOrBuilderList() {
7193       if (partialMatchingImagesBuilder_ != null) {
7194         return partialMatchingImagesBuilder_.getMessageOrBuilderList();
7195       } else {
7196         return java.util.Collections.unmodifiableList(partialMatchingImages_);
7197       }
7198     }
7199     /**
7200      *
7201      *
7202      * <pre>
7203      * Partial matching images from the Internet.
7204      * Those images are similar enough to share some key-point features. For
7205      * example an original image will likely have partial matching for its crops.
7206      * </pre>
7207      *
7208      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7209      * </code>
7210      */
7211     public com.google.cloud.vision.v1.WebDetection.WebImage.Builder
addPartialMatchingImagesBuilder()7212         addPartialMatchingImagesBuilder() {
7213       return getPartialMatchingImagesFieldBuilder()
7214           .addBuilder(com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance());
7215     }
7216     /**
7217      *
7218      *
7219      * <pre>
7220      * Partial matching images from the Internet.
7221      * Those images are similar enough to share some key-point features. For
7222      * example an original image will likely have partial matching for its crops.
7223      * </pre>
7224      *
7225      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7226      * </code>
7227      */
addPartialMatchingImagesBuilder( int index)7228     public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder(
7229         int index) {
7230       return getPartialMatchingImagesFieldBuilder()
7231           .addBuilder(index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance());
7232     }
7233     /**
7234      *
7235      *
7236      * <pre>
7237      * Partial matching images from the Internet.
7238      * Those images are similar enough to share some key-point features. For
7239      * example an original image will likely have partial matching for its crops.
7240      * </pre>
7241      *
7242      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;
7243      * </code>
7244      */
7245     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage.Builder>
getPartialMatchingImagesBuilderList()7246         getPartialMatchingImagesBuilderList() {
7247       return getPartialMatchingImagesFieldBuilder().getBuilderList();
7248     }
7249 
7250     private com.google.protobuf.RepeatedFieldBuilderV3<
7251             com.google.cloud.vision.v1.WebDetection.WebImage,
7252             com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
7253             com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getPartialMatchingImagesFieldBuilder()7254         getPartialMatchingImagesFieldBuilder() {
7255       if (partialMatchingImagesBuilder_ == null) {
7256         partialMatchingImagesBuilder_ =
7257             new com.google.protobuf.RepeatedFieldBuilderV3<
7258                 com.google.cloud.vision.v1.WebDetection.WebImage,
7259                 com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
7260                 com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>(
7261                 partialMatchingImages_,
7262                 ((bitField0_ & 0x00000004) != 0),
7263                 getParentForChildren(),
7264                 isClean());
7265         partialMatchingImages_ = null;
7266       }
7267       return partialMatchingImagesBuilder_;
7268     }
7269 
7270     private java.util.List<com.google.cloud.vision.v1.WebDetection.WebPage>
7271         pagesWithMatchingImages_ = java.util.Collections.emptyList();
7272 
ensurePagesWithMatchingImagesIsMutable()7273     private void ensurePagesWithMatchingImagesIsMutable() {
7274       if (!((bitField0_ & 0x00000008) != 0)) {
7275         pagesWithMatchingImages_ =
7276             new java.util.ArrayList<com.google.cloud.vision.v1.WebDetection.WebPage>(
7277                 pagesWithMatchingImages_);
7278         bitField0_ |= 0x00000008;
7279       }
7280     }
7281 
7282     private com.google.protobuf.RepeatedFieldBuilderV3<
7283             com.google.cloud.vision.v1.WebDetection.WebPage,
7284             com.google.cloud.vision.v1.WebDetection.WebPage.Builder,
7285             com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder>
7286         pagesWithMatchingImagesBuilder_;
7287 
7288     /**
7289      *
7290      *
7291      * <pre>
7292      * Web pages containing the matching images from the Internet.
7293      * </pre>
7294      *
7295      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7296      * </code>
7297      */
7298     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebPage>
getPagesWithMatchingImagesList()7299         getPagesWithMatchingImagesList() {
7300       if (pagesWithMatchingImagesBuilder_ == null) {
7301         return java.util.Collections.unmodifiableList(pagesWithMatchingImages_);
7302       } else {
7303         return pagesWithMatchingImagesBuilder_.getMessageList();
7304       }
7305     }
7306     /**
7307      *
7308      *
7309      * <pre>
7310      * Web pages containing the matching images from the Internet.
7311      * </pre>
7312      *
7313      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7314      * </code>
7315      */
getPagesWithMatchingImagesCount()7316     public int getPagesWithMatchingImagesCount() {
7317       if (pagesWithMatchingImagesBuilder_ == null) {
7318         return pagesWithMatchingImages_.size();
7319       } else {
7320         return pagesWithMatchingImagesBuilder_.getCount();
7321       }
7322     }
7323     /**
7324      *
7325      *
7326      * <pre>
7327      * Web pages containing the matching images from the Internet.
7328      * </pre>
7329      *
7330      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7331      * </code>
7332      */
getPagesWithMatchingImages(int index)7333     public com.google.cloud.vision.v1.WebDetection.WebPage getPagesWithMatchingImages(int index) {
7334       if (pagesWithMatchingImagesBuilder_ == null) {
7335         return pagesWithMatchingImages_.get(index);
7336       } else {
7337         return pagesWithMatchingImagesBuilder_.getMessage(index);
7338       }
7339     }
7340     /**
7341      *
7342      *
7343      * <pre>
7344      * Web pages containing the matching images from the Internet.
7345      * </pre>
7346      *
7347      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7348      * </code>
7349      */
setPagesWithMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebPage value)7350     public Builder setPagesWithMatchingImages(
7351         int index, com.google.cloud.vision.v1.WebDetection.WebPage value) {
7352       if (pagesWithMatchingImagesBuilder_ == null) {
7353         if (value == null) {
7354           throw new NullPointerException();
7355         }
7356         ensurePagesWithMatchingImagesIsMutable();
7357         pagesWithMatchingImages_.set(index, value);
7358         onChanged();
7359       } else {
7360         pagesWithMatchingImagesBuilder_.setMessage(index, value);
7361       }
7362       return this;
7363     }
7364     /**
7365      *
7366      *
7367      * <pre>
7368      * Web pages containing the matching images from the Internet.
7369      * </pre>
7370      *
7371      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7372      * </code>
7373      */
setPagesWithMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue)7374     public Builder setPagesWithMatchingImages(
7375         int index, com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue) {
7376       if (pagesWithMatchingImagesBuilder_ == null) {
7377         ensurePagesWithMatchingImagesIsMutable();
7378         pagesWithMatchingImages_.set(index, builderForValue.build());
7379         onChanged();
7380       } else {
7381         pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build());
7382       }
7383       return this;
7384     }
7385     /**
7386      *
7387      *
7388      * <pre>
7389      * Web pages containing the matching images from the Internet.
7390      * </pre>
7391      *
7392      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7393      * </code>
7394      */
addPagesWithMatchingImages( com.google.cloud.vision.v1.WebDetection.WebPage value)7395     public Builder addPagesWithMatchingImages(
7396         com.google.cloud.vision.v1.WebDetection.WebPage value) {
7397       if (pagesWithMatchingImagesBuilder_ == null) {
7398         if (value == null) {
7399           throw new NullPointerException();
7400         }
7401         ensurePagesWithMatchingImagesIsMutable();
7402         pagesWithMatchingImages_.add(value);
7403         onChanged();
7404       } else {
7405         pagesWithMatchingImagesBuilder_.addMessage(value);
7406       }
7407       return this;
7408     }
7409     /**
7410      *
7411      *
7412      * <pre>
7413      * Web pages containing the matching images from the Internet.
7414      * </pre>
7415      *
7416      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7417      * </code>
7418      */
addPagesWithMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebPage value)7419     public Builder addPagesWithMatchingImages(
7420         int index, com.google.cloud.vision.v1.WebDetection.WebPage value) {
7421       if (pagesWithMatchingImagesBuilder_ == null) {
7422         if (value == null) {
7423           throw new NullPointerException();
7424         }
7425         ensurePagesWithMatchingImagesIsMutable();
7426         pagesWithMatchingImages_.add(index, value);
7427         onChanged();
7428       } else {
7429         pagesWithMatchingImagesBuilder_.addMessage(index, value);
7430       }
7431       return this;
7432     }
7433     /**
7434      *
7435      *
7436      * <pre>
7437      * Web pages containing the matching images from the Internet.
7438      * </pre>
7439      *
7440      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7441      * </code>
7442      */
addPagesWithMatchingImages( com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue)7443     public Builder addPagesWithMatchingImages(
7444         com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue) {
7445       if (pagesWithMatchingImagesBuilder_ == null) {
7446         ensurePagesWithMatchingImagesIsMutable();
7447         pagesWithMatchingImages_.add(builderForValue.build());
7448         onChanged();
7449       } else {
7450         pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build());
7451       }
7452       return this;
7453     }
7454     /**
7455      *
7456      *
7457      * <pre>
7458      * Web pages containing the matching images from the Internet.
7459      * </pre>
7460      *
7461      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7462      * </code>
7463      */
addPagesWithMatchingImages( int index, com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue)7464     public Builder addPagesWithMatchingImages(
7465         int index, com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue) {
7466       if (pagesWithMatchingImagesBuilder_ == null) {
7467         ensurePagesWithMatchingImagesIsMutable();
7468         pagesWithMatchingImages_.add(index, builderForValue.build());
7469         onChanged();
7470       } else {
7471         pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build());
7472       }
7473       return this;
7474     }
7475     /**
7476      *
7477      *
7478      * <pre>
7479      * Web pages containing the matching images from the Internet.
7480      * </pre>
7481      *
7482      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7483      * </code>
7484      */
addAllPagesWithMatchingImages( java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebPage> values)7485     public Builder addAllPagesWithMatchingImages(
7486         java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebPage> values) {
7487       if (pagesWithMatchingImagesBuilder_ == null) {
7488         ensurePagesWithMatchingImagesIsMutable();
7489         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pagesWithMatchingImages_);
7490         onChanged();
7491       } else {
7492         pagesWithMatchingImagesBuilder_.addAllMessages(values);
7493       }
7494       return this;
7495     }
7496     /**
7497      *
7498      *
7499      * <pre>
7500      * Web pages containing the matching images from the Internet.
7501      * </pre>
7502      *
7503      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7504      * </code>
7505      */
clearPagesWithMatchingImages()7506     public Builder clearPagesWithMatchingImages() {
7507       if (pagesWithMatchingImagesBuilder_ == null) {
7508         pagesWithMatchingImages_ = java.util.Collections.emptyList();
7509         bitField0_ = (bitField0_ & ~0x00000008);
7510         onChanged();
7511       } else {
7512         pagesWithMatchingImagesBuilder_.clear();
7513       }
7514       return this;
7515     }
7516     /**
7517      *
7518      *
7519      * <pre>
7520      * Web pages containing the matching images from the Internet.
7521      * </pre>
7522      *
7523      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7524      * </code>
7525      */
removePagesWithMatchingImages(int index)7526     public Builder removePagesWithMatchingImages(int index) {
7527       if (pagesWithMatchingImagesBuilder_ == null) {
7528         ensurePagesWithMatchingImagesIsMutable();
7529         pagesWithMatchingImages_.remove(index);
7530         onChanged();
7531       } else {
7532         pagesWithMatchingImagesBuilder_.remove(index);
7533       }
7534       return this;
7535     }
7536     /**
7537      *
7538      *
7539      * <pre>
7540      * Web pages containing the matching images from the Internet.
7541      * </pre>
7542      *
7543      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7544      * </code>
7545      */
7546     public com.google.cloud.vision.v1.WebDetection.WebPage.Builder
getPagesWithMatchingImagesBuilder(int index)7547         getPagesWithMatchingImagesBuilder(int index) {
7548       return getPagesWithMatchingImagesFieldBuilder().getBuilder(index);
7549     }
7550     /**
7551      *
7552      *
7553      * <pre>
7554      * Web pages containing the matching images from the Internet.
7555      * </pre>
7556      *
7557      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7558      * </code>
7559      */
7560     public com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder
getPagesWithMatchingImagesOrBuilder(int index)7561         getPagesWithMatchingImagesOrBuilder(int index) {
7562       if (pagesWithMatchingImagesBuilder_ == null) {
7563         return pagesWithMatchingImages_.get(index);
7564       } else {
7565         return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index);
7566       }
7567     }
7568     /**
7569      *
7570      *
7571      * <pre>
7572      * Web pages containing the matching images from the Internet.
7573      * </pre>
7574      *
7575      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7576      * </code>
7577      */
7578     public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder>
getPagesWithMatchingImagesOrBuilderList()7579         getPagesWithMatchingImagesOrBuilderList() {
7580       if (pagesWithMatchingImagesBuilder_ != null) {
7581         return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList();
7582       } else {
7583         return java.util.Collections.unmodifiableList(pagesWithMatchingImages_);
7584       }
7585     }
7586     /**
7587      *
7588      *
7589      * <pre>
7590      * Web pages containing the matching images from the Internet.
7591      * </pre>
7592      *
7593      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7594      * </code>
7595      */
7596     public com.google.cloud.vision.v1.WebDetection.WebPage.Builder
addPagesWithMatchingImagesBuilder()7597         addPagesWithMatchingImagesBuilder() {
7598       return getPagesWithMatchingImagesFieldBuilder()
7599           .addBuilder(com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance());
7600     }
7601     /**
7602      *
7603      *
7604      * <pre>
7605      * Web pages containing the matching images from the Internet.
7606      * </pre>
7607      *
7608      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7609      * </code>
7610      */
7611     public com.google.cloud.vision.v1.WebDetection.WebPage.Builder
addPagesWithMatchingImagesBuilder(int index)7612         addPagesWithMatchingImagesBuilder(int index) {
7613       return getPagesWithMatchingImagesFieldBuilder()
7614           .addBuilder(index, com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance());
7615     }
7616     /**
7617      *
7618      *
7619      * <pre>
7620      * Web pages containing the matching images from the Internet.
7621      * </pre>
7622      *
7623      * <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;
7624      * </code>
7625      */
7626     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebPage.Builder>
getPagesWithMatchingImagesBuilderList()7627         getPagesWithMatchingImagesBuilderList() {
7628       return getPagesWithMatchingImagesFieldBuilder().getBuilderList();
7629     }
7630 
7631     private com.google.protobuf.RepeatedFieldBuilderV3<
7632             com.google.cloud.vision.v1.WebDetection.WebPage,
7633             com.google.cloud.vision.v1.WebDetection.WebPage.Builder,
7634             com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder>
getPagesWithMatchingImagesFieldBuilder()7635         getPagesWithMatchingImagesFieldBuilder() {
7636       if (pagesWithMatchingImagesBuilder_ == null) {
7637         pagesWithMatchingImagesBuilder_ =
7638             new com.google.protobuf.RepeatedFieldBuilderV3<
7639                 com.google.cloud.vision.v1.WebDetection.WebPage,
7640                 com.google.cloud.vision.v1.WebDetection.WebPage.Builder,
7641                 com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder>(
7642                 pagesWithMatchingImages_,
7643                 ((bitField0_ & 0x00000008) != 0),
7644                 getParentForChildren(),
7645                 isClean());
7646         pagesWithMatchingImages_ = null;
7647       }
7648       return pagesWithMatchingImagesBuilder_;
7649     }
7650 
7651     private java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
7652         visuallySimilarImages_ = java.util.Collections.emptyList();
7653 
ensureVisuallySimilarImagesIsMutable()7654     private void ensureVisuallySimilarImagesIsMutable() {
7655       if (!((bitField0_ & 0x00000010) != 0)) {
7656         visuallySimilarImages_ =
7657             new java.util.ArrayList<com.google.cloud.vision.v1.WebDetection.WebImage>(
7658                 visuallySimilarImages_);
7659         bitField0_ |= 0x00000010;
7660       }
7661     }
7662 
7663     private com.google.protobuf.RepeatedFieldBuilderV3<
7664             com.google.cloud.vision.v1.WebDetection.WebImage,
7665             com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
7666             com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
7667         visuallySimilarImagesBuilder_;
7668 
7669     /**
7670      *
7671      *
7672      * <pre>
7673      * The visually similar image results.
7674      * </pre>
7675      *
7676      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7677      * </code>
7678      */
7679     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage>
getVisuallySimilarImagesList()7680         getVisuallySimilarImagesList() {
7681       if (visuallySimilarImagesBuilder_ == null) {
7682         return java.util.Collections.unmodifiableList(visuallySimilarImages_);
7683       } else {
7684         return visuallySimilarImagesBuilder_.getMessageList();
7685       }
7686     }
7687     /**
7688      *
7689      *
7690      * <pre>
7691      * The visually similar image results.
7692      * </pre>
7693      *
7694      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7695      * </code>
7696      */
getVisuallySimilarImagesCount()7697     public int getVisuallySimilarImagesCount() {
7698       if (visuallySimilarImagesBuilder_ == null) {
7699         return visuallySimilarImages_.size();
7700       } else {
7701         return visuallySimilarImagesBuilder_.getCount();
7702       }
7703     }
7704     /**
7705      *
7706      *
7707      * <pre>
7708      * The visually similar image results.
7709      * </pre>
7710      *
7711      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7712      * </code>
7713      */
getVisuallySimilarImages(int index)7714     public com.google.cloud.vision.v1.WebDetection.WebImage getVisuallySimilarImages(int index) {
7715       if (visuallySimilarImagesBuilder_ == null) {
7716         return visuallySimilarImages_.get(index);
7717       } else {
7718         return visuallySimilarImagesBuilder_.getMessage(index);
7719       }
7720     }
7721     /**
7722      *
7723      *
7724      * <pre>
7725      * The visually similar image results.
7726      * </pre>
7727      *
7728      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7729      * </code>
7730      */
setVisuallySimilarImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage value)7731     public Builder setVisuallySimilarImages(
7732         int index, com.google.cloud.vision.v1.WebDetection.WebImage value) {
7733       if (visuallySimilarImagesBuilder_ == null) {
7734         if (value == null) {
7735           throw new NullPointerException();
7736         }
7737         ensureVisuallySimilarImagesIsMutable();
7738         visuallySimilarImages_.set(index, value);
7739         onChanged();
7740       } else {
7741         visuallySimilarImagesBuilder_.setMessage(index, value);
7742       }
7743       return this;
7744     }
7745     /**
7746      *
7747      *
7748      * <pre>
7749      * The visually similar image results.
7750      * </pre>
7751      *
7752      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7753      * </code>
7754      */
setVisuallySimilarImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)7755     public Builder setVisuallySimilarImages(
7756         int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
7757       if (visuallySimilarImagesBuilder_ == null) {
7758         ensureVisuallySimilarImagesIsMutable();
7759         visuallySimilarImages_.set(index, builderForValue.build());
7760         onChanged();
7761       } else {
7762         visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build());
7763       }
7764       return this;
7765     }
7766     /**
7767      *
7768      *
7769      * <pre>
7770      * The visually similar image results.
7771      * </pre>
7772      *
7773      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7774      * </code>
7775      */
addVisuallySimilarImages( com.google.cloud.vision.v1.WebDetection.WebImage value)7776     public Builder addVisuallySimilarImages(
7777         com.google.cloud.vision.v1.WebDetection.WebImage value) {
7778       if (visuallySimilarImagesBuilder_ == null) {
7779         if (value == null) {
7780           throw new NullPointerException();
7781         }
7782         ensureVisuallySimilarImagesIsMutable();
7783         visuallySimilarImages_.add(value);
7784         onChanged();
7785       } else {
7786         visuallySimilarImagesBuilder_.addMessage(value);
7787       }
7788       return this;
7789     }
7790     /**
7791      *
7792      *
7793      * <pre>
7794      * The visually similar image results.
7795      * </pre>
7796      *
7797      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7798      * </code>
7799      */
addVisuallySimilarImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage value)7800     public Builder addVisuallySimilarImages(
7801         int index, com.google.cloud.vision.v1.WebDetection.WebImage value) {
7802       if (visuallySimilarImagesBuilder_ == null) {
7803         if (value == null) {
7804           throw new NullPointerException();
7805         }
7806         ensureVisuallySimilarImagesIsMutable();
7807         visuallySimilarImages_.add(index, value);
7808         onChanged();
7809       } else {
7810         visuallySimilarImagesBuilder_.addMessage(index, value);
7811       }
7812       return this;
7813     }
7814     /**
7815      *
7816      *
7817      * <pre>
7818      * The visually similar image results.
7819      * </pre>
7820      *
7821      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7822      * </code>
7823      */
addVisuallySimilarImages( com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)7824     public Builder addVisuallySimilarImages(
7825         com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
7826       if (visuallySimilarImagesBuilder_ == null) {
7827         ensureVisuallySimilarImagesIsMutable();
7828         visuallySimilarImages_.add(builderForValue.build());
7829         onChanged();
7830       } else {
7831         visuallySimilarImagesBuilder_.addMessage(builderForValue.build());
7832       }
7833       return this;
7834     }
7835     /**
7836      *
7837      *
7838      * <pre>
7839      * The visually similar image results.
7840      * </pre>
7841      *
7842      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7843      * </code>
7844      */
addVisuallySimilarImages( int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue)7845     public Builder addVisuallySimilarImages(
7846         int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) {
7847       if (visuallySimilarImagesBuilder_ == null) {
7848         ensureVisuallySimilarImagesIsMutable();
7849         visuallySimilarImages_.add(index, builderForValue.build());
7850         onChanged();
7851       } else {
7852         visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build());
7853       }
7854       return this;
7855     }
7856     /**
7857      *
7858      *
7859      * <pre>
7860      * The visually similar image results.
7861      * </pre>
7862      *
7863      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7864      * </code>
7865      */
addAllVisuallySimilarImages( java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebImage> values)7866     public Builder addAllVisuallySimilarImages(
7867         java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebImage> values) {
7868       if (visuallySimilarImagesBuilder_ == null) {
7869         ensureVisuallySimilarImagesIsMutable();
7870         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, visuallySimilarImages_);
7871         onChanged();
7872       } else {
7873         visuallySimilarImagesBuilder_.addAllMessages(values);
7874       }
7875       return this;
7876     }
7877     /**
7878      *
7879      *
7880      * <pre>
7881      * The visually similar image results.
7882      * </pre>
7883      *
7884      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7885      * </code>
7886      */
clearVisuallySimilarImages()7887     public Builder clearVisuallySimilarImages() {
7888       if (visuallySimilarImagesBuilder_ == null) {
7889         visuallySimilarImages_ = java.util.Collections.emptyList();
7890         bitField0_ = (bitField0_ & ~0x00000010);
7891         onChanged();
7892       } else {
7893         visuallySimilarImagesBuilder_.clear();
7894       }
7895       return this;
7896     }
7897     /**
7898      *
7899      *
7900      * <pre>
7901      * The visually similar image results.
7902      * </pre>
7903      *
7904      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7905      * </code>
7906      */
removeVisuallySimilarImages(int index)7907     public Builder removeVisuallySimilarImages(int index) {
7908       if (visuallySimilarImagesBuilder_ == null) {
7909         ensureVisuallySimilarImagesIsMutable();
7910         visuallySimilarImages_.remove(index);
7911         onChanged();
7912       } else {
7913         visuallySimilarImagesBuilder_.remove(index);
7914       }
7915       return this;
7916     }
7917     /**
7918      *
7919      *
7920      * <pre>
7921      * The visually similar image results.
7922      * </pre>
7923      *
7924      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7925      * </code>
7926      */
getVisuallySimilarImagesBuilder( int index)7927     public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder(
7928         int index) {
7929       return getVisuallySimilarImagesFieldBuilder().getBuilder(index);
7930     }
7931     /**
7932      *
7933      *
7934      * <pre>
7935      * The visually similar image results.
7936      * </pre>
7937      *
7938      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7939      * </code>
7940      */
7941     public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder
getVisuallySimilarImagesOrBuilder(int index)7942         getVisuallySimilarImagesOrBuilder(int index) {
7943       if (visuallySimilarImagesBuilder_ == null) {
7944         return visuallySimilarImages_.get(index);
7945       } else {
7946         return visuallySimilarImagesBuilder_.getMessageOrBuilder(index);
7947       }
7948     }
7949     /**
7950      *
7951      *
7952      * <pre>
7953      * The visually similar image results.
7954      * </pre>
7955      *
7956      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7957      * </code>
7958      */
7959     public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getVisuallySimilarImagesOrBuilderList()7960         getVisuallySimilarImagesOrBuilderList() {
7961       if (visuallySimilarImagesBuilder_ != null) {
7962         return visuallySimilarImagesBuilder_.getMessageOrBuilderList();
7963       } else {
7964         return java.util.Collections.unmodifiableList(visuallySimilarImages_);
7965       }
7966     }
7967     /**
7968      *
7969      *
7970      * <pre>
7971      * The visually similar image results.
7972      * </pre>
7973      *
7974      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7975      * </code>
7976      */
7977     public com.google.cloud.vision.v1.WebDetection.WebImage.Builder
addVisuallySimilarImagesBuilder()7978         addVisuallySimilarImagesBuilder() {
7979       return getVisuallySimilarImagesFieldBuilder()
7980           .addBuilder(com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance());
7981     }
7982     /**
7983      *
7984      *
7985      * <pre>
7986      * The visually similar image results.
7987      * </pre>
7988      *
7989      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
7990      * </code>
7991      */
addVisuallySimilarImagesBuilder( int index)7992     public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder(
7993         int index) {
7994       return getVisuallySimilarImagesFieldBuilder()
7995           .addBuilder(index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance());
7996     }
7997     /**
7998      *
7999      *
8000      * <pre>
8001      * The visually similar image results.
8002      * </pre>
8003      *
8004      * <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;
8005      * </code>
8006      */
8007     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebImage.Builder>
getVisuallySimilarImagesBuilderList()8008         getVisuallySimilarImagesBuilderList() {
8009       return getVisuallySimilarImagesFieldBuilder().getBuilderList();
8010     }
8011 
8012     private com.google.protobuf.RepeatedFieldBuilderV3<
8013             com.google.cloud.vision.v1.WebDetection.WebImage,
8014             com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
8015             com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>
getVisuallySimilarImagesFieldBuilder()8016         getVisuallySimilarImagesFieldBuilder() {
8017       if (visuallySimilarImagesBuilder_ == null) {
8018         visuallySimilarImagesBuilder_ =
8019             new com.google.protobuf.RepeatedFieldBuilderV3<
8020                 com.google.cloud.vision.v1.WebDetection.WebImage,
8021                 com.google.cloud.vision.v1.WebDetection.WebImage.Builder,
8022                 com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>(
8023                 visuallySimilarImages_,
8024                 ((bitField0_ & 0x00000010) != 0),
8025                 getParentForChildren(),
8026                 isClean());
8027         visuallySimilarImages_ = null;
8028       }
8029       return visuallySimilarImagesBuilder_;
8030     }
8031 
8032     private java.util.List<com.google.cloud.vision.v1.WebDetection.WebLabel> bestGuessLabels_ =
8033         java.util.Collections.emptyList();
8034 
ensureBestGuessLabelsIsMutable()8035     private void ensureBestGuessLabelsIsMutable() {
8036       if (!((bitField0_ & 0x00000020) != 0)) {
8037         bestGuessLabels_ =
8038             new java.util.ArrayList<com.google.cloud.vision.v1.WebDetection.WebLabel>(
8039                 bestGuessLabels_);
8040         bitField0_ |= 0x00000020;
8041       }
8042     }
8043 
8044     private com.google.protobuf.RepeatedFieldBuilderV3<
8045             com.google.cloud.vision.v1.WebDetection.WebLabel,
8046             com.google.cloud.vision.v1.WebDetection.WebLabel.Builder,
8047             com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder>
8048         bestGuessLabelsBuilder_;
8049 
8050     /**
8051      *
8052      *
8053      * <pre>
8054      * The service's best guess as to the topic of the request image.
8055      * Inferred from similar images on the open web.
8056      * </pre>
8057      *
8058      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8059      */
8060     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebLabel>
getBestGuessLabelsList()8061         getBestGuessLabelsList() {
8062       if (bestGuessLabelsBuilder_ == null) {
8063         return java.util.Collections.unmodifiableList(bestGuessLabels_);
8064       } else {
8065         return bestGuessLabelsBuilder_.getMessageList();
8066       }
8067     }
8068     /**
8069      *
8070      *
8071      * <pre>
8072      * The service's best guess as to the topic of the request image.
8073      * Inferred from similar images on the open web.
8074      * </pre>
8075      *
8076      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8077      */
getBestGuessLabelsCount()8078     public int getBestGuessLabelsCount() {
8079       if (bestGuessLabelsBuilder_ == null) {
8080         return bestGuessLabels_.size();
8081       } else {
8082         return bestGuessLabelsBuilder_.getCount();
8083       }
8084     }
8085     /**
8086      *
8087      *
8088      * <pre>
8089      * The service's best guess as to the topic of the request image.
8090      * Inferred from similar images on the open web.
8091      * </pre>
8092      *
8093      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8094      */
getBestGuessLabels(int index)8095     public com.google.cloud.vision.v1.WebDetection.WebLabel getBestGuessLabels(int index) {
8096       if (bestGuessLabelsBuilder_ == null) {
8097         return bestGuessLabels_.get(index);
8098       } else {
8099         return bestGuessLabelsBuilder_.getMessage(index);
8100       }
8101     }
8102     /**
8103      *
8104      *
8105      * <pre>
8106      * The service's best guess as to the topic of the request image.
8107      * Inferred from similar images on the open web.
8108      * </pre>
8109      *
8110      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8111      */
setBestGuessLabels( int index, com.google.cloud.vision.v1.WebDetection.WebLabel value)8112     public Builder setBestGuessLabels(
8113         int index, com.google.cloud.vision.v1.WebDetection.WebLabel value) {
8114       if (bestGuessLabelsBuilder_ == null) {
8115         if (value == null) {
8116           throw new NullPointerException();
8117         }
8118         ensureBestGuessLabelsIsMutable();
8119         bestGuessLabels_.set(index, value);
8120         onChanged();
8121       } else {
8122         bestGuessLabelsBuilder_.setMessage(index, value);
8123       }
8124       return this;
8125     }
8126     /**
8127      *
8128      *
8129      * <pre>
8130      * The service's best guess as to the topic of the request image.
8131      * Inferred from similar images on the open web.
8132      * </pre>
8133      *
8134      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8135      */
setBestGuessLabels( int index, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue)8136     public Builder setBestGuessLabels(
8137         int index, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue) {
8138       if (bestGuessLabelsBuilder_ == null) {
8139         ensureBestGuessLabelsIsMutable();
8140         bestGuessLabels_.set(index, builderForValue.build());
8141         onChanged();
8142       } else {
8143         bestGuessLabelsBuilder_.setMessage(index, builderForValue.build());
8144       }
8145       return this;
8146     }
8147     /**
8148      *
8149      *
8150      * <pre>
8151      * The service's best guess as to the topic of the request image.
8152      * Inferred from similar images on the open web.
8153      * </pre>
8154      *
8155      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8156      */
addBestGuessLabels(com.google.cloud.vision.v1.WebDetection.WebLabel value)8157     public Builder addBestGuessLabels(com.google.cloud.vision.v1.WebDetection.WebLabel value) {
8158       if (bestGuessLabelsBuilder_ == null) {
8159         if (value == null) {
8160           throw new NullPointerException();
8161         }
8162         ensureBestGuessLabelsIsMutable();
8163         bestGuessLabels_.add(value);
8164         onChanged();
8165       } else {
8166         bestGuessLabelsBuilder_.addMessage(value);
8167       }
8168       return this;
8169     }
8170     /**
8171      *
8172      *
8173      * <pre>
8174      * The service's best guess as to the topic of the request image.
8175      * Inferred from similar images on the open web.
8176      * </pre>
8177      *
8178      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8179      */
addBestGuessLabels( int index, com.google.cloud.vision.v1.WebDetection.WebLabel value)8180     public Builder addBestGuessLabels(
8181         int index, com.google.cloud.vision.v1.WebDetection.WebLabel value) {
8182       if (bestGuessLabelsBuilder_ == null) {
8183         if (value == null) {
8184           throw new NullPointerException();
8185         }
8186         ensureBestGuessLabelsIsMutable();
8187         bestGuessLabels_.add(index, value);
8188         onChanged();
8189       } else {
8190         bestGuessLabelsBuilder_.addMessage(index, value);
8191       }
8192       return this;
8193     }
8194     /**
8195      *
8196      *
8197      * <pre>
8198      * The service's best guess as to the topic of the request image.
8199      * Inferred from similar images on the open web.
8200      * </pre>
8201      *
8202      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8203      */
addBestGuessLabels( com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue)8204     public Builder addBestGuessLabels(
8205         com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue) {
8206       if (bestGuessLabelsBuilder_ == null) {
8207         ensureBestGuessLabelsIsMutable();
8208         bestGuessLabels_.add(builderForValue.build());
8209         onChanged();
8210       } else {
8211         bestGuessLabelsBuilder_.addMessage(builderForValue.build());
8212       }
8213       return this;
8214     }
8215     /**
8216      *
8217      *
8218      * <pre>
8219      * The service's best guess as to the topic of the request image.
8220      * Inferred from similar images on the open web.
8221      * </pre>
8222      *
8223      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8224      */
addBestGuessLabels( int index, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue)8225     public Builder addBestGuessLabels(
8226         int index, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue) {
8227       if (bestGuessLabelsBuilder_ == null) {
8228         ensureBestGuessLabelsIsMutable();
8229         bestGuessLabels_.add(index, builderForValue.build());
8230         onChanged();
8231       } else {
8232         bestGuessLabelsBuilder_.addMessage(index, builderForValue.build());
8233       }
8234       return this;
8235     }
8236     /**
8237      *
8238      *
8239      * <pre>
8240      * The service's best guess as to the topic of the request image.
8241      * Inferred from similar images on the open web.
8242      * </pre>
8243      *
8244      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8245      */
addAllBestGuessLabels( java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebLabel> values)8246     public Builder addAllBestGuessLabels(
8247         java.lang.Iterable<? extends com.google.cloud.vision.v1.WebDetection.WebLabel> values) {
8248       if (bestGuessLabelsBuilder_ == null) {
8249         ensureBestGuessLabelsIsMutable();
8250         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bestGuessLabels_);
8251         onChanged();
8252       } else {
8253         bestGuessLabelsBuilder_.addAllMessages(values);
8254       }
8255       return this;
8256     }
8257     /**
8258      *
8259      *
8260      * <pre>
8261      * The service's best guess as to the topic of the request image.
8262      * Inferred from similar images on the open web.
8263      * </pre>
8264      *
8265      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8266      */
clearBestGuessLabels()8267     public Builder clearBestGuessLabels() {
8268       if (bestGuessLabelsBuilder_ == null) {
8269         bestGuessLabels_ = java.util.Collections.emptyList();
8270         bitField0_ = (bitField0_ & ~0x00000020);
8271         onChanged();
8272       } else {
8273         bestGuessLabelsBuilder_.clear();
8274       }
8275       return this;
8276     }
8277     /**
8278      *
8279      *
8280      * <pre>
8281      * The service's best guess as to the topic of the request image.
8282      * Inferred from similar images on the open web.
8283      * </pre>
8284      *
8285      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8286      */
removeBestGuessLabels(int index)8287     public Builder removeBestGuessLabels(int index) {
8288       if (bestGuessLabelsBuilder_ == null) {
8289         ensureBestGuessLabelsIsMutable();
8290         bestGuessLabels_.remove(index);
8291         onChanged();
8292       } else {
8293         bestGuessLabelsBuilder_.remove(index);
8294       }
8295       return this;
8296     }
8297     /**
8298      *
8299      *
8300      * <pre>
8301      * The service's best guess as to the topic of the request image.
8302      * Inferred from similar images on the open web.
8303      * </pre>
8304      *
8305      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8306      */
getBestGuessLabelsBuilder( int index)8307     public com.google.cloud.vision.v1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder(
8308         int index) {
8309       return getBestGuessLabelsFieldBuilder().getBuilder(index);
8310     }
8311     /**
8312      *
8313      *
8314      * <pre>
8315      * The service's best guess as to the topic of the request image.
8316      * Inferred from similar images on the open web.
8317      * </pre>
8318      *
8319      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8320      */
getBestGuessLabelsOrBuilder( int index)8321     public com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder(
8322         int index) {
8323       if (bestGuessLabelsBuilder_ == null) {
8324         return bestGuessLabels_.get(index);
8325       } else {
8326         return bestGuessLabelsBuilder_.getMessageOrBuilder(index);
8327       }
8328     }
8329     /**
8330      *
8331      *
8332      * <pre>
8333      * The service's best guess as to the topic of the request image.
8334      * Inferred from similar images on the open web.
8335      * </pre>
8336      *
8337      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8338      */
8339     public java.util.List<? extends com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder>
getBestGuessLabelsOrBuilderList()8340         getBestGuessLabelsOrBuilderList() {
8341       if (bestGuessLabelsBuilder_ != null) {
8342         return bestGuessLabelsBuilder_.getMessageOrBuilderList();
8343       } else {
8344         return java.util.Collections.unmodifiableList(bestGuessLabels_);
8345       }
8346     }
8347     /**
8348      *
8349      *
8350      * <pre>
8351      * The service's best guess as to the topic of the request image.
8352      * Inferred from similar images on the open web.
8353      * </pre>
8354      *
8355      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8356      */
addBestGuessLabelsBuilder()8357     public com.google.cloud.vision.v1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() {
8358       return getBestGuessLabelsFieldBuilder()
8359           .addBuilder(com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance());
8360     }
8361     /**
8362      *
8363      *
8364      * <pre>
8365      * The service's best guess as to the topic of the request image.
8366      * Inferred from similar images on the open web.
8367      * </pre>
8368      *
8369      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8370      */
addBestGuessLabelsBuilder( int index)8371     public com.google.cloud.vision.v1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder(
8372         int index) {
8373       return getBestGuessLabelsFieldBuilder()
8374           .addBuilder(index, com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance());
8375     }
8376     /**
8377      *
8378      *
8379      * <pre>
8380      * The service's best guess as to the topic of the request image.
8381      * Inferred from similar images on the open web.
8382      * </pre>
8383      *
8384      * <code>repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8;</code>
8385      */
8386     public java.util.List<com.google.cloud.vision.v1.WebDetection.WebLabel.Builder>
getBestGuessLabelsBuilderList()8387         getBestGuessLabelsBuilderList() {
8388       return getBestGuessLabelsFieldBuilder().getBuilderList();
8389     }
8390 
8391     private com.google.protobuf.RepeatedFieldBuilderV3<
8392             com.google.cloud.vision.v1.WebDetection.WebLabel,
8393             com.google.cloud.vision.v1.WebDetection.WebLabel.Builder,
8394             com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder>
getBestGuessLabelsFieldBuilder()8395         getBestGuessLabelsFieldBuilder() {
8396       if (bestGuessLabelsBuilder_ == null) {
8397         bestGuessLabelsBuilder_ =
8398             new com.google.protobuf.RepeatedFieldBuilderV3<
8399                 com.google.cloud.vision.v1.WebDetection.WebLabel,
8400                 com.google.cloud.vision.v1.WebDetection.WebLabel.Builder,
8401                 com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder>(
8402                 bestGuessLabels_,
8403                 ((bitField0_ & 0x00000020) != 0),
8404                 getParentForChildren(),
8405                 isClean());
8406         bestGuessLabels_ = null;
8407       }
8408       return bestGuessLabelsBuilder_;
8409     }
8410 
8411     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)8412     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
8413       return super.setUnknownFields(unknownFields);
8414     }
8415 
8416     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)8417     public final Builder mergeUnknownFields(
8418         final com.google.protobuf.UnknownFieldSet unknownFields) {
8419       return super.mergeUnknownFields(unknownFields);
8420     }
8421 
8422     // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection)
8423   }
8424 
8425   // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection)
8426   private static final com.google.cloud.vision.v1.WebDetection DEFAULT_INSTANCE;
8427 
8428   static {
8429     DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection();
8430   }
8431 
getDefaultInstance()8432   public static com.google.cloud.vision.v1.WebDetection getDefaultInstance() {
8433     return DEFAULT_INSTANCE;
8434   }
8435 
8436   private static final com.google.protobuf.Parser<WebDetection> PARSER =
8437       new com.google.protobuf.AbstractParser<WebDetection>() {
8438         @java.lang.Override
8439         public WebDetection parsePartialFrom(
8440             com.google.protobuf.CodedInputStream input,
8441             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8442             throws com.google.protobuf.InvalidProtocolBufferException {
8443           Builder builder = newBuilder();
8444           try {
8445             builder.mergeFrom(input, extensionRegistry);
8446           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
8447             throw e.setUnfinishedMessage(builder.buildPartial());
8448           } catch (com.google.protobuf.UninitializedMessageException e) {
8449             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
8450           } catch (java.io.IOException e) {
8451             throw new com.google.protobuf.InvalidProtocolBufferException(e)
8452                 .setUnfinishedMessage(builder.buildPartial());
8453           }
8454           return builder.buildPartial();
8455         }
8456       };
8457 
parser()8458   public static com.google.protobuf.Parser<WebDetection> parser() {
8459     return PARSER;
8460   }
8461 
8462   @java.lang.Override
getParserForType()8463   public com.google.protobuf.Parser<WebDetection> getParserForType() {
8464     return PARSER;
8465   }
8466 
8467   @java.lang.Override
getDefaultInstanceForType()8468   public com.google.cloud.vision.v1.WebDetection getDefaultInstanceForType() {
8469     return DEFAULT_INSTANCE;
8470   }
8471 }
8472