• 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/image_annotator.proto
18 
19 package com.google.cloud.vision.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * The Google Cloud Storage location where the output will be written to.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.vision.v1.GcsDestination}
29  */
30 public final class GcsDestination extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.GcsDestination)
33     GcsDestinationOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use GcsDestination.newBuilder() to construct.
GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
GcsDestination()40   private GcsDestination() {
41     uri_ = "";
42   }
43 
44   @java.lang.Override
45   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)46   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
47     return new GcsDestination();
48   }
49 
50   @java.lang.Override
getUnknownFields()51   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
52     return this.unknownFields;
53   }
54 
getDescriptor()55   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
56     return com.google.cloud.vision.v1.ImageAnnotatorProto
57         .internal_static_google_cloud_vision_v1_GcsDestination_descriptor;
58   }
59 
60   @java.lang.Override
61   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()62       internalGetFieldAccessorTable() {
63     return com.google.cloud.vision.v1.ImageAnnotatorProto
64         .internal_static_google_cloud_vision_v1_GcsDestination_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             com.google.cloud.vision.v1.GcsDestination.class,
67             com.google.cloud.vision.v1.GcsDestination.Builder.class);
68   }
69 
70   public static final int URI_FIELD_NUMBER = 1;
71 
72   @SuppressWarnings("serial")
73   private volatile java.lang.Object uri_ = "";
74   /**
75    *
76    *
77    * <pre>
78    * Google Cloud Storage URI prefix where the results will be stored. Results
79    * will be in JSON format and preceded by its corresponding input URI prefix.
80    * This field can either represent a gcs file prefix or gcs directory. In
81    * either case, the uri should be unique because in order to get all of the
82    * output files, you will need to do a wildcard gcs search on the uri prefix
83    * you provide.
84    * Examples:
85    * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
86    * will be created in gs://bucket-name/here/ and the names of the
87    * output files will begin with "filenameprefix".
88    * *    Directory Prefix: gs://bucket-name/some/location/   The output files
89    * will be created in gs://bucket-name/some/location/ and the names of the
90    * output files could be anything because there was no filename prefix
91    * specified.
92    * If multiple outputs, each response is still AnnotateFileResponse, each of
93    * which contains some subset of the full list of AnnotateImageResponse.
94    * Multiple outputs can happen if, for example, the output JSON is too large
95    * and overflows into multiple sharded files.
96    * </pre>
97    *
98    * <code>string uri = 1;</code>
99    *
100    * @return The uri.
101    */
102   @java.lang.Override
getUri()103   public java.lang.String getUri() {
104     java.lang.Object ref = uri_;
105     if (ref instanceof java.lang.String) {
106       return (java.lang.String) ref;
107     } else {
108       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
109       java.lang.String s = bs.toStringUtf8();
110       uri_ = s;
111       return s;
112     }
113   }
114   /**
115    *
116    *
117    * <pre>
118    * Google Cloud Storage URI prefix where the results will be stored. Results
119    * will be in JSON format and preceded by its corresponding input URI prefix.
120    * This field can either represent a gcs file prefix or gcs directory. In
121    * either case, the uri should be unique because in order to get all of the
122    * output files, you will need to do a wildcard gcs search on the uri prefix
123    * you provide.
124    * Examples:
125    * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
126    * will be created in gs://bucket-name/here/ and the names of the
127    * output files will begin with "filenameprefix".
128    * *    Directory Prefix: gs://bucket-name/some/location/   The output files
129    * will be created in gs://bucket-name/some/location/ and the names of the
130    * output files could be anything because there was no filename prefix
131    * specified.
132    * If multiple outputs, each response is still AnnotateFileResponse, each of
133    * which contains some subset of the full list of AnnotateImageResponse.
134    * Multiple outputs can happen if, for example, the output JSON is too large
135    * and overflows into multiple sharded files.
136    * </pre>
137    *
138    * <code>string uri = 1;</code>
139    *
140    * @return The bytes for uri.
141    */
142   @java.lang.Override
getUriBytes()143   public com.google.protobuf.ByteString getUriBytes() {
144     java.lang.Object ref = uri_;
145     if (ref instanceof java.lang.String) {
146       com.google.protobuf.ByteString b =
147           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
148       uri_ = b;
149       return b;
150     } else {
151       return (com.google.protobuf.ByteString) ref;
152     }
153   }
154 
155   private byte memoizedIsInitialized = -1;
156 
157   @java.lang.Override
isInitialized()158   public final boolean isInitialized() {
159     byte isInitialized = memoizedIsInitialized;
160     if (isInitialized == 1) return true;
161     if (isInitialized == 0) return false;
162 
163     memoizedIsInitialized = 1;
164     return true;
165   }
166 
167   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)168   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
169     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
170       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_);
171     }
172     getUnknownFields().writeTo(output);
173   }
174 
175   @java.lang.Override
getSerializedSize()176   public int getSerializedSize() {
177     int size = memoizedSize;
178     if (size != -1) return size;
179 
180     size = 0;
181     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
182       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_);
183     }
184     size += getUnknownFields().getSerializedSize();
185     memoizedSize = size;
186     return size;
187   }
188 
189   @java.lang.Override
equals(final java.lang.Object obj)190   public boolean equals(final java.lang.Object obj) {
191     if (obj == this) {
192       return true;
193     }
194     if (!(obj instanceof com.google.cloud.vision.v1.GcsDestination)) {
195       return super.equals(obj);
196     }
197     com.google.cloud.vision.v1.GcsDestination other =
198         (com.google.cloud.vision.v1.GcsDestination) obj;
199 
200     if (!getUri().equals(other.getUri())) return false;
201     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
202     return true;
203   }
204 
205   @java.lang.Override
hashCode()206   public int hashCode() {
207     if (memoizedHashCode != 0) {
208       return memoizedHashCode;
209     }
210     int hash = 41;
211     hash = (19 * hash) + getDescriptor().hashCode();
212     hash = (37 * hash) + URI_FIELD_NUMBER;
213     hash = (53 * hash) + getUri().hashCode();
214     hash = (29 * hash) + getUnknownFields().hashCode();
215     memoizedHashCode = hash;
216     return hash;
217   }
218 
parseFrom(java.nio.ByteBuffer data)219   public static com.google.cloud.vision.v1.GcsDestination parseFrom(java.nio.ByteBuffer data)
220       throws com.google.protobuf.InvalidProtocolBufferException {
221     return PARSER.parseFrom(data);
222   }
223 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)224   public static com.google.cloud.vision.v1.GcsDestination parseFrom(
225       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
226       throws com.google.protobuf.InvalidProtocolBufferException {
227     return PARSER.parseFrom(data, extensionRegistry);
228   }
229 
parseFrom( com.google.protobuf.ByteString data)230   public static com.google.cloud.vision.v1.GcsDestination parseFrom(
231       com.google.protobuf.ByteString data)
232       throws com.google.protobuf.InvalidProtocolBufferException {
233     return PARSER.parseFrom(data);
234   }
235 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)236   public static com.google.cloud.vision.v1.GcsDestination parseFrom(
237       com.google.protobuf.ByteString data,
238       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
239       throws com.google.protobuf.InvalidProtocolBufferException {
240     return PARSER.parseFrom(data, extensionRegistry);
241   }
242 
parseFrom(byte[] data)243   public static com.google.cloud.vision.v1.GcsDestination parseFrom(byte[] data)
244       throws com.google.protobuf.InvalidProtocolBufferException {
245     return PARSER.parseFrom(data);
246   }
247 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)248   public static com.google.cloud.vision.v1.GcsDestination parseFrom(
249       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
250       throws com.google.protobuf.InvalidProtocolBufferException {
251     return PARSER.parseFrom(data, extensionRegistry);
252   }
253 
parseFrom(java.io.InputStream input)254   public static com.google.cloud.vision.v1.GcsDestination parseFrom(java.io.InputStream input)
255       throws java.io.IOException {
256     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
257   }
258 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)259   public static com.google.cloud.vision.v1.GcsDestination parseFrom(
260       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
261       throws java.io.IOException {
262     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
263         PARSER, input, extensionRegistry);
264   }
265 
parseDelimitedFrom( java.io.InputStream input)266   public static com.google.cloud.vision.v1.GcsDestination parseDelimitedFrom(
267       java.io.InputStream input) throws java.io.IOException {
268     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
269   }
270 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)271   public static com.google.cloud.vision.v1.GcsDestination parseDelimitedFrom(
272       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
273       throws java.io.IOException {
274     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
275         PARSER, input, extensionRegistry);
276   }
277 
parseFrom( com.google.protobuf.CodedInputStream input)278   public static com.google.cloud.vision.v1.GcsDestination parseFrom(
279       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
280     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
281   }
282 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)283   public static com.google.cloud.vision.v1.GcsDestination parseFrom(
284       com.google.protobuf.CodedInputStream input,
285       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
286       throws java.io.IOException {
287     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
288         PARSER, input, extensionRegistry);
289   }
290 
291   @java.lang.Override
newBuilderForType()292   public Builder newBuilderForType() {
293     return newBuilder();
294   }
295 
newBuilder()296   public static Builder newBuilder() {
297     return DEFAULT_INSTANCE.toBuilder();
298   }
299 
newBuilder(com.google.cloud.vision.v1.GcsDestination prototype)300   public static Builder newBuilder(com.google.cloud.vision.v1.GcsDestination prototype) {
301     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
302   }
303 
304   @java.lang.Override
toBuilder()305   public Builder toBuilder() {
306     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
307   }
308 
309   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)310   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
311     Builder builder = new Builder(parent);
312     return builder;
313   }
314   /**
315    *
316    *
317    * <pre>
318    * The Google Cloud Storage location where the output will be written to.
319    * </pre>
320    *
321    * Protobuf type {@code google.cloud.vision.v1.GcsDestination}
322    */
323   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
324       implements
325       // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.GcsDestination)
326       com.google.cloud.vision.v1.GcsDestinationOrBuilder {
getDescriptor()327     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
328       return com.google.cloud.vision.v1.ImageAnnotatorProto
329           .internal_static_google_cloud_vision_v1_GcsDestination_descriptor;
330     }
331 
332     @java.lang.Override
333     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()334         internalGetFieldAccessorTable() {
335       return com.google.cloud.vision.v1.ImageAnnotatorProto
336           .internal_static_google_cloud_vision_v1_GcsDestination_fieldAccessorTable
337           .ensureFieldAccessorsInitialized(
338               com.google.cloud.vision.v1.GcsDestination.class,
339               com.google.cloud.vision.v1.GcsDestination.Builder.class);
340     }
341 
342     // Construct using com.google.cloud.vision.v1.GcsDestination.newBuilder()
Builder()343     private Builder() {}
344 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)345     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
346       super(parent);
347     }
348 
349     @java.lang.Override
clear()350     public Builder clear() {
351       super.clear();
352       bitField0_ = 0;
353       uri_ = "";
354       return this;
355     }
356 
357     @java.lang.Override
getDescriptorForType()358     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
359       return com.google.cloud.vision.v1.ImageAnnotatorProto
360           .internal_static_google_cloud_vision_v1_GcsDestination_descriptor;
361     }
362 
363     @java.lang.Override
getDefaultInstanceForType()364     public com.google.cloud.vision.v1.GcsDestination getDefaultInstanceForType() {
365       return com.google.cloud.vision.v1.GcsDestination.getDefaultInstance();
366     }
367 
368     @java.lang.Override
build()369     public com.google.cloud.vision.v1.GcsDestination build() {
370       com.google.cloud.vision.v1.GcsDestination result = buildPartial();
371       if (!result.isInitialized()) {
372         throw newUninitializedMessageException(result);
373       }
374       return result;
375     }
376 
377     @java.lang.Override
buildPartial()378     public com.google.cloud.vision.v1.GcsDestination buildPartial() {
379       com.google.cloud.vision.v1.GcsDestination result =
380           new com.google.cloud.vision.v1.GcsDestination(this);
381       if (bitField0_ != 0) {
382         buildPartial0(result);
383       }
384       onBuilt();
385       return result;
386     }
387 
buildPartial0(com.google.cloud.vision.v1.GcsDestination result)388     private void buildPartial0(com.google.cloud.vision.v1.GcsDestination result) {
389       int from_bitField0_ = bitField0_;
390       if (((from_bitField0_ & 0x00000001) != 0)) {
391         result.uri_ = uri_;
392       }
393     }
394 
395     @java.lang.Override
clone()396     public Builder clone() {
397       return super.clone();
398     }
399 
400     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)401     public Builder setField(
402         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
403       return super.setField(field, value);
404     }
405 
406     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)407     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
408       return super.clearField(field);
409     }
410 
411     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)412     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
413       return super.clearOneof(oneof);
414     }
415 
416     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)417     public Builder setRepeatedField(
418         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
419       return super.setRepeatedField(field, index, value);
420     }
421 
422     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)423     public Builder addRepeatedField(
424         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
425       return super.addRepeatedField(field, value);
426     }
427 
428     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)429     public Builder mergeFrom(com.google.protobuf.Message other) {
430       if (other instanceof com.google.cloud.vision.v1.GcsDestination) {
431         return mergeFrom((com.google.cloud.vision.v1.GcsDestination) other);
432       } else {
433         super.mergeFrom(other);
434         return this;
435       }
436     }
437 
mergeFrom(com.google.cloud.vision.v1.GcsDestination other)438     public Builder mergeFrom(com.google.cloud.vision.v1.GcsDestination other) {
439       if (other == com.google.cloud.vision.v1.GcsDestination.getDefaultInstance()) return this;
440       if (!other.getUri().isEmpty()) {
441         uri_ = other.uri_;
442         bitField0_ |= 0x00000001;
443         onChanged();
444       }
445       this.mergeUnknownFields(other.getUnknownFields());
446       onChanged();
447       return this;
448     }
449 
450     @java.lang.Override
isInitialized()451     public final boolean isInitialized() {
452       return true;
453     }
454 
455     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)456     public Builder mergeFrom(
457         com.google.protobuf.CodedInputStream input,
458         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
459         throws java.io.IOException {
460       if (extensionRegistry == null) {
461         throw new java.lang.NullPointerException();
462       }
463       try {
464         boolean done = false;
465         while (!done) {
466           int tag = input.readTag();
467           switch (tag) {
468             case 0:
469               done = true;
470               break;
471             case 10:
472               {
473                 uri_ = input.readStringRequireUtf8();
474                 bitField0_ |= 0x00000001;
475                 break;
476               } // case 10
477             default:
478               {
479                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
480                   done = true; // was an endgroup tag
481                 }
482                 break;
483               } // default:
484           } // switch (tag)
485         } // while (!done)
486       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
487         throw e.unwrapIOException();
488       } finally {
489         onChanged();
490       } // finally
491       return this;
492     }
493 
494     private int bitField0_;
495 
496     private java.lang.Object uri_ = "";
497     /**
498      *
499      *
500      * <pre>
501      * Google Cloud Storage URI prefix where the results will be stored. Results
502      * will be in JSON format and preceded by its corresponding input URI prefix.
503      * This field can either represent a gcs file prefix or gcs directory. In
504      * either case, the uri should be unique because in order to get all of the
505      * output files, you will need to do a wildcard gcs search on the uri prefix
506      * you provide.
507      * Examples:
508      * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
509      * will be created in gs://bucket-name/here/ and the names of the
510      * output files will begin with "filenameprefix".
511      * *    Directory Prefix: gs://bucket-name/some/location/   The output files
512      * will be created in gs://bucket-name/some/location/ and the names of the
513      * output files could be anything because there was no filename prefix
514      * specified.
515      * If multiple outputs, each response is still AnnotateFileResponse, each of
516      * which contains some subset of the full list of AnnotateImageResponse.
517      * Multiple outputs can happen if, for example, the output JSON is too large
518      * and overflows into multiple sharded files.
519      * </pre>
520      *
521      * <code>string uri = 1;</code>
522      *
523      * @return The uri.
524      */
getUri()525     public java.lang.String getUri() {
526       java.lang.Object ref = uri_;
527       if (!(ref instanceof java.lang.String)) {
528         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
529         java.lang.String s = bs.toStringUtf8();
530         uri_ = s;
531         return s;
532       } else {
533         return (java.lang.String) ref;
534       }
535     }
536     /**
537      *
538      *
539      * <pre>
540      * Google Cloud Storage URI prefix where the results will be stored. Results
541      * will be in JSON format and preceded by its corresponding input URI prefix.
542      * This field can either represent a gcs file prefix or gcs directory. In
543      * either case, the uri should be unique because in order to get all of the
544      * output files, you will need to do a wildcard gcs search on the uri prefix
545      * you provide.
546      * Examples:
547      * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
548      * will be created in gs://bucket-name/here/ and the names of the
549      * output files will begin with "filenameprefix".
550      * *    Directory Prefix: gs://bucket-name/some/location/   The output files
551      * will be created in gs://bucket-name/some/location/ and the names of the
552      * output files could be anything because there was no filename prefix
553      * specified.
554      * If multiple outputs, each response is still AnnotateFileResponse, each of
555      * which contains some subset of the full list of AnnotateImageResponse.
556      * Multiple outputs can happen if, for example, the output JSON is too large
557      * and overflows into multiple sharded files.
558      * </pre>
559      *
560      * <code>string uri = 1;</code>
561      *
562      * @return The bytes for uri.
563      */
getUriBytes()564     public com.google.protobuf.ByteString getUriBytes() {
565       java.lang.Object ref = uri_;
566       if (ref instanceof String) {
567         com.google.protobuf.ByteString b =
568             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
569         uri_ = b;
570         return b;
571       } else {
572         return (com.google.protobuf.ByteString) ref;
573       }
574     }
575     /**
576      *
577      *
578      * <pre>
579      * Google Cloud Storage URI prefix where the results will be stored. Results
580      * will be in JSON format and preceded by its corresponding input URI prefix.
581      * This field can either represent a gcs file prefix or gcs directory. In
582      * either case, the uri should be unique because in order to get all of the
583      * output files, you will need to do a wildcard gcs search on the uri prefix
584      * you provide.
585      * Examples:
586      * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
587      * will be created in gs://bucket-name/here/ and the names of the
588      * output files will begin with "filenameprefix".
589      * *    Directory Prefix: gs://bucket-name/some/location/   The output files
590      * will be created in gs://bucket-name/some/location/ and the names of the
591      * output files could be anything because there was no filename prefix
592      * specified.
593      * If multiple outputs, each response is still AnnotateFileResponse, each of
594      * which contains some subset of the full list of AnnotateImageResponse.
595      * Multiple outputs can happen if, for example, the output JSON is too large
596      * and overflows into multiple sharded files.
597      * </pre>
598      *
599      * <code>string uri = 1;</code>
600      *
601      * @param value The uri to set.
602      * @return This builder for chaining.
603      */
setUri(java.lang.String value)604     public Builder setUri(java.lang.String value) {
605       if (value == null) {
606         throw new NullPointerException();
607       }
608       uri_ = value;
609       bitField0_ |= 0x00000001;
610       onChanged();
611       return this;
612     }
613     /**
614      *
615      *
616      * <pre>
617      * Google Cloud Storage URI prefix where the results will be stored. Results
618      * will be in JSON format and preceded by its corresponding input URI prefix.
619      * This field can either represent a gcs file prefix or gcs directory. In
620      * either case, the uri should be unique because in order to get all of the
621      * output files, you will need to do a wildcard gcs search on the uri prefix
622      * you provide.
623      * Examples:
624      * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
625      * will be created in gs://bucket-name/here/ and the names of the
626      * output files will begin with "filenameprefix".
627      * *    Directory Prefix: gs://bucket-name/some/location/   The output files
628      * will be created in gs://bucket-name/some/location/ and the names of the
629      * output files could be anything because there was no filename prefix
630      * specified.
631      * If multiple outputs, each response is still AnnotateFileResponse, each of
632      * which contains some subset of the full list of AnnotateImageResponse.
633      * Multiple outputs can happen if, for example, the output JSON is too large
634      * and overflows into multiple sharded files.
635      * </pre>
636      *
637      * <code>string uri = 1;</code>
638      *
639      * @return This builder for chaining.
640      */
clearUri()641     public Builder clearUri() {
642       uri_ = getDefaultInstance().getUri();
643       bitField0_ = (bitField0_ & ~0x00000001);
644       onChanged();
645       return this;
646     }
647     /**
648      *
649      *
650      * <pre>
651      * Google Cloud Storage URI prefix where the results will be stored. Results
652      * will be in JSON format and preceded by its corresponding input URI prefix.
653      * This field can either represent a gcs file prefix or gcs directory. In
654      * either case, the uri should be unique because in order to get all of the
655      * output files, you will need to do a wildcard gcs search on the uri prefix
656      * you provide.
657      * Examples:
658      * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
659      * will be created in gs://bucket-name/here/ and the names of the
660      * output files will begin with "filenameprefix".
661      * *    Directory Prefix: gs://bucket-name/some/location/   The output files
662      * will be created in gs://bucket-name/some/location/ and the names of the
663      * output files could be anything because there was no filename prefix
664      * specified.
665      * If multiple outputs, each response is still AnnotateFileResponse, each of
666      * which contains some subset of the full list of AnnotateImageResponse.
667      * Multiple outputs can happen if, for example, the output JSON is too large
668      * and overflows into multiple sharded files.
669      * </pre>
670      *
671      * <code>string uri = 1;</code>
672      *
673      * @param value The bytes for uri to set.
674      * @return This builder for chaining.
675      */
setUriBytes(com.google.protobuf.ByteString value)676     public Builder setUriBytes(com.google.protobuf.ByteString value) {
677       if (value == null) {
678         throw new NullPointerException();
679       }
680       checkByteStringIsUtf8(value);
681       uri_ = value;
682       bitField0_ |= 0x00000001;
683       onChanged();
684       return this;
685     }
686 
687     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)688     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
689       return super.setUnknownFields(unknownFields);
690     }
691 
692     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)693     public final Builder mergeUnknownFields(
694         final com.google.protobuf.UnknownFieldSet unknownFields) {
695       return super.mergeUnknownFields(unknownFields);
696     }
697 
698     // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.GcsDestination)
699   }
700 
701   // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GcsDestination)
702   private static final com.google.cloud.vision.v1.GcsDestination DEFAULT_INSTANCE;
703 
704   static {
705     DEFAULT_INSTANCE = new com.google.cloud.vision.v1.GcsDestination();
706   }
707 
getDefaultInstance()708   public static com.google.cloud.vision.v1.GcsDestination getDefaultInstance() {
709     return DEFAULT_INSTANCE;
710   }
711 
712   private static final com.google.protobuf.Parser<GcsDestination> PARSER =
713       new com.google.protobuf.AbstractParser<GcsDestination>() {
714         @java.lang.Override
715         public GcsDestination parsePartialFrom(
716             com.google.protobuf.CodedInputStream input,
717             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
718             throws com.google.protobuf.InvalidProtocolBufferException {
719           Builder builder = newBuilder();
720           try {
721             builder.mergeFrom(input, extensionRegistry);
722           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
723             throw e.setUnfinishedMessage(builder.buildPartial());
724           } catch (com.google.protobuf.UninitializedMessageException e) {
725             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
726           } catch (java.io.IOException e) {
727             throw new com.google.protobuf.InvalidProtocolBufferException(e)
728                 .setUnfinishedMessage(builder.buildPartial());
729           }
730           return builder.buildPartial();
731         }
732       };
733 
parser()734   public static com.google.protobuf.Parser<GcsDestination> parser() {
735     return PARSER;
736   }
737 
738   @java.lang.Override
getParserForType()739   public com.google.protobuf.Parser<GcsDestination> getParserForType() {
740     return PARSER;
741   }
742 
743   @java.lang.Override
getDefaultInstanceForType()744   public com.google.cloud.vision.v1.GcsDestination getDefaultInstanceForType() {
745     return DEFAULT_INSTANCE;
746   }
747 }
748