@@ -38,7 +38,9 @@ private TextDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder<?> bu
38
38
super (builder );
39
39
}
40
40
41
- private TextDetectionParams () {}
41
+ private TextDetectionParams () {
42
+ advancedOcrOptions_ = com .google .protobuf .LazyStringArrayList .EMPTY ;
43
+ }
42
44
43
45
@ java .lang .Override
44
46
@ SuppressWarnings ({"unused" })
@@ -59,6 +61,7 @@ private TextDetectionParams(
59
61
if (extensionRegistry == null ) {
60
62
throw new java .lang .NullPointerException ();
61
63
}
64
+ int mutable_bitField0_ = 0 ;
62
65
com .google .protobuf .UnknownFieldSet .Builder unknownFields =
63
66
com .google .protobuf .UnknownFieldSet .newBuilder ();
64
67
try {
@@ -74,6 +77,16 @@ private TextDetectionParams(
74
77
enableTextDetectionConfidenceScore_ = input .readBool ();
75
78
break ;
76
79
}
80
+ case 90 :
81
+ {
82
+ java .lang .String s = input .readStringRequireUtf8 ();
83
+ if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
84
+ advancedOcrOptions_ = new com .google .protobuf .LazyStringArrayList ();
85
+ mutable_bitField0_ |= 0x00000001 ;
86
+ }
87
+ advancedOcrOptions_ .add (s );
88
+ break ;
89
+ }
77
90
default :
78
91
{
79
92
if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
@@ -90,6 +103,9 @@ private TextDetectionParams(
90
103
} catch (java .io .IOException e ) {
91
104
throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
92
105
} finally {
106
+ if (((mutable_bitField0_ & 0x00000001 ) != 0 )) {
107
+ advancedOcrOptions_ = advancedOcrOptions_ .getUnmodifiableView ();
108
+ }
93
109
this .unknownFields = unknownFields .build ();
94
110
makeExtensionsImmutable ();
95
111
}
@@ -130,6 +146,67 @@ public boolean getEnableTextDetectionConfidenceScore() {
130
146
return enableTextDetectionConfidenceScore_ ;
131
147
}
132
148
149
+ public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 11 ;
150
+ private com .google .protobuf .LazyStringList advancedOcrOptions_ ;
151
+ /**
152
+ *
153
+ *
154
+ * <pre>
155
+ * A list of advanced OCR options to fine-tune OCR behavior.
156
+ * </pre>
157
+ *
158
+ * <code>repeated string advanced_ocr_options = 11;</code>
159
+ *
160
+ * @return A list containing the advancedOcrOptions.
161
+ */
162
+ public com .google .protobuf .ProtocolStringList getAdvancedOcrOptionsList () {
163
+ return advancedOcrOptions_ ;
164
+ }
165
+ /**
166
+ *
167
+ *
168
+ * <pre>
169
+ * A list of advanced OCR options to fine-tune OCR behavior.
170
+ * </pre>
171
+ *
172
+ * <code>repeated string advanced_ocr_options = 11;</code>
173
+ *
174
+ * @return The count of advancedOcrOptions.
175
+ */
176
+ public int getAdvancedOcrOptionsCount () {
177
+ return advancedOcrOptions_ .size ();
178
+ }
179
+ /**
180
+ *
181
+ *
182
+ * <pre>
183
+ * A list of advanced OCR options to fine-tune OCR behavior.
184
+ * </pre>
185
+ *
186
+ * <code>repeated string advanced_ocr_options = 11;</code>
187
+ *
188
+ * @param index The index of the element to return.
189
+ * @return The advancedOcrOptions at the given index.
190
+ */
191
+ public java .lang .String getAdvancedOcrOptions (int index ) {
192
+ return advancedOcrOptions_ .get (index );
193
+ }
194
+ /**
195
+ *
196
+ *
197
+ * <pre>
198
+ * A list of advanced OCR options to fine-tune OCR behavior.
199
+ * </pre>
200
+ *
201
+ * <code>repeated string advanced_ocr_options = 11;</code>
202
+ *
203
+ * @param index The index of the value to return.
204
+ * @return The bytes of the advancedOcrOptions at the given index.
205
+ */
206
+ public com .google .protobuf .ByteString getAdvancedOcrOptionsBytes (int index ) {
207
+ return advancedOcrOptions_ .getByteString (index );
208
+ }
209
+
133
210
private byte memoizedIsInitialized = -1 ;
134
211
135
212
@ java .lang .Override
@@ -147,6 +224,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
147
224
if (enableTextDetectionConfidenceScore_ != false ) {
148
225
output .writeBool (9 , enableTextDetectionConfidenceScore_ );
149
226
}
227
+ for (int i = 0 ; i < advancedOcrOptions_ .size (); i ++) {
228
+ com .google .protobuf .GeneratedMessageV3 .writeString (output , 11 , advancedOcrOptions_ .getRaw (i ));
229
+ }
150
230
unknownFields .writeTo (output );
151
231
}
152
232
@@ -161,6 +241,14 @@ public int getSerializedSize() {
161
241
com .google .protobuf .CodedOutputStream .computeBoolSize (
162
242
9 , enableTextDetectionConfidenceScore_ );
163
243
}
244
+ {
245
+ int dataSize = 0 ;
246
+ for (int i = 0 ; i < advancedOcrOptions_ .size (); i ++) {
247
+ dataSize += computeStringSizeNoTag (advancedOcrOptions_ .getRaw (i ));
248
+ }
249
+ size += dataSize ;
250
+ size += 1 * getAdvancedOcrOptionsList ().size ();
251
+ }
164
252
size += unknownFields .getSerializedSize ();
165
253
memoizedSize = size ;
166
254
return size ;
@@ -179,6 +267,7 @@ public boolean equals(final java.lang.Object obj) {
179
267
180
268
if (getEnableTextDetectionConfidenceScore () != other .getEnableTextDetectionConfidenceScore ())
181
269
return false ;
270
+ if (!getAdvancedOcrOptionsList ().equals (other .getAdvancedOcrOptionsList ())) return false ;
182
271
if (!unknownFields .equals (other .unknownFields )) return false ;
183
272
return true ;
184
273
}
@@ -194,6 +283,10 @@ public int hashCode() {
194
283
hash =
195
284
(53 * hash )
196
285
+ com .google .protobuf .Internal .hashBoolean (getEnableTextDetectionConfidenceScore ());
286
+ if (getAdvancedOcrOptionsCount () > 0 ) {
287
+ hash = (37 * hash ) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER ;
288
+ hash = (53 * hash ) + getAdvancedOcrOptionsList ().hashCode ();
289
+ }
197
290
hash = (29 * hash ) + unknownFields .hashCode ();
198
291
memoizedHashCode = hash ;
199
292
return hash ;
@@ -342,6 +435,8 @@ public Builder clear() {
342
435
super .clear ();
343
436
enableTextDetectionConfidenceScore_ = false ;
344
437
438
+ advancedOcrOptions_ = com .google .protobuf .LazyStringArrayList .EMPTY ;
439
+ bitField0_ = (bitField0_ & ~0x00000001 );
345
440
return this ;
346
441
}
347
442
@@ -369,7 +464,13 @@ public com.google.cloud.vision.v1.TextDetectionParams build() {
369
464
public com .google .cloud .vision .v1 .TextDetectionParams buildPartial () {
370
465
com .google .cloud .vision .v1 .TextDetectionParams result =
371
466
new com .google .cloud .vision .v1 .TextDetectionParams (this );
467
+ int from_bitField0_ = bitField0_ ;
372
468
result .enableTextDetectionConfidenceScore_ = enableTextDetectionConfidenceScore_ ;
469
+ if (((bitField0_ & 0x00000001 ) != 0 )) {
470
+ advancedOcrOptions_ = advancedOcrOptions_ .getUnmodifiableView ();
471
+ bitField0_ = (bitField0_ & ~0x00000001 );
472
+ }
473
+ result .advancedOcrOptions_ = advancedOcrOptions_ ;
373
474
onBuilt ();
374
475
return result ;
375
476
}
@@ -422,6 +523,16 @@ public Builder mergeFrom(com.google.cloud.vision.v1.TextDetectionParams other) {
422
523
if (other .getEnableTextDetectionConfidenceScore () != false ) {
423
524
setEnableTextDetectionConfidenceScore (other .getEnableTextDetectionConfidenceScore ());
424
525
}
526
+ if (!other .advancedOcrOptions_ .isEmpty ()) {
527
+ if (advancedOcrOptions_ .isEmpty ()) {
528
+ advancedOcrOptions_ = other .advancedOcrOptions_ ;
529
+ bitField0_ = (bitField0_ & ~0x00000001 );
530
+ } else {
531
+ ensureAdvancedOcrOptionsIsMutable ();
532
+ advancedOcrOptions_ .addAll (other .advancedOcrOptions_ );
533
+ }
534
+ onChanged ();
535
+ }
425
536
this .mergeUnknownFields (other .unknownFields );
426
537
onChanged ();
427
538
return this ;
@@ -451,6 +562,8 @@ public Builder mergeFrom(
451
562
return this ;
452
563
}
453
564
565
+ private int bitField0_ ;
566
+
454
567
private boolean enableTextDetectionConfidenceScore_ ;
455
568
/**
456
569
*
@@ -509,6 +622,174 @@ public Builder clearEnableTextDetectionConfidenceScore() {
509
622
return this ;
510
623
}
511
624
625
+ private com .google .protobuf .LazyStringList advancedOcrOptions_ =
626
+ com .google .protobuf .LazyStringArrayList .EMPTY ;
627
+
628
+ private void ensureAdvancedOcrOptionsIsMutable () {
629
+ if (!((bitField0_ & 0x00000001 ) != 0 )) {
630
+ advancedOcrOptions_ = new com .google .protobuf .LazyStringArrayList (advancedOcrOptions_ );
631
+ bitField0_ |= 0x00000001 ;
632
+ }
633
+ }
634
+ /**
635
+ *
636
+ *
637
+ * <pre>
638
+ * A list of advanced OCR options to fine-tune OCR behavior.
639
+ * </pre>
640
+ *
641
+ * <code>repeated string advanced_ocr_options = 11;</code>
642
+ *
643
+ * @return A list containing the advancedOcrOptions.
644
+ */
645
+ public com .google .protobuf .ProtocolStringList getAdvancedOcrOptionsList () {
646
+ return advancedOcrOptions_ .getUnmodifiableView ();
647
+ }
648
+ /**
649
+ *
650
+ *
651
+ * <pre>
652
+ * A list of advanced OCR options to fine-tune OCR behavior.
653
+ * </pre>
654
+ *
655
+ * <code>repeated string advanced_ocr_options = 11;</code>
656
+ *
657
+ * @return The count of advancedOcrOptions.
658
+ */
659
+ public int getAdvancedOcrOptionsCount () {
660
+ return advancedOcrOptions_ .size ();
661
+ }
662
+ /**
663
+ *
664
+ *
665
+ * <pre>
666
+ * A list of advanced OCR options to fine-tune OCR behavior.
667
+ * </pre>
668
+ *
669
+ * <code>repeated string advanced_ocr_options = 11;</code>
670
+ *
671
+ * @param index The index of the element to return.
672
+ * @return The advancedOcrOptions at the given index.
673
+ */
674
+ public java .lang .String getAdvancedOcrOptions (int index ) {
675
+ return advancedOcrOptions_ .get (index );
676
+ }
677
+ /**
678
+ *
679
+ *
680
+ * <pre>
681
+ * A list of advanced OCR options to fine-tune OCR behavior.
682
+ * </pre>
683
+ *
684
+ * <code>repeated string advanced_ocr_options = 11;</code>
685
+ *
686
+ * @param index The index of the value to return.
687
+ * @return The bytes of the advancedOcrOptions at the given index.
688
+ */
689
+ public com .google .protobuf .ByteString getAdvancedOcrOptionsBytes (int index ) {
690
+ return advancedOcrOptions_ .getByteString (index );
691
+ }
692
+ /**
693
+ *
694
+ *
695
+ * <pre>
696
+ * A list of advanced OCR options to fine-tune OCR behavior.
697
+ * </pre>
698
+ *
699
+ * <code>repeated string advanced_ocr_options = 11;</code>
700
+ *
701
+ * @param index The index to set the value at.
702
+ * @param value The advancedOcrOptions to set.
703
+ * @return This builder for chaining.
704
+ */
705
+ public Builder setAdvancedOcrOptions (int index , java .lang .String value ) {
706
+ if (value == null ) {
707
+ throw new NullPointerException ();
708
+ }
709
+ ensureAdvancedOcrOptionsIsMutable ();
710
+ advancedOcrOptions_ .set (index , value );
711
+ onChanged ();
712
+ return this ;
713
+ }
714
+ /**
715
+ *
716
+ *
717
+ * <pre>
718
+ * A list of advanced OCR options to fine-tune OCR behavior.
719
+ * </pre>
720
+ *
721
+ * <code>repeated string advanced_ocr_options = 11;</code>
722
+ *
723
+ * @param value The advancedOcrOptions to add.
724
+ * @return This builder for chaining.
725
+ */
726
+ public Builder addAdvancedOcrOptions (java .lang .String value ) {
727
+ if (value == null ) {
728
+ throw new NullPointerException ();
729
+ }
730
+ ensureAdvancedOcrOptionsIsMutable ();
731
+ advancedOcrOptions_ .add (value );
732
+ onChanged ();
733
+ return this ;
734
+ }
735
+ /**
736
+ *
737
+ *
738
+ * <pre>
739
+ * A list of advanced OCR options to fine-tune OCR behavior.
740
+ * </pre>
741
+ *
742
+ * <code>repeated string advanced_ocr_options = 11;</code>
743
+ *
744
+ * @param values The advancedOcrOptions to add.
745
+ * @return This builder for chaining.
746
+ */
747
+ public Builder addAllAdvancedOcrOptions (java .lang .Iterable <java .lang .String > values ) {
748
+ ensureAdvancedOcrOptionsIsMutable ();
749
+ com .google .protobuf .AbstractMessageLite .Builder .addAll (values , advancedOcrOptions_ );
750
+ onChanged ();
751
+ return this ;
752
+ }
753
+ /**
754
+ *
755
+ *
756
+ * <pre>
757
+ * A list of advanced OCR options to fine-tune OCR behavior.
758
+ * </pre>
759
+ *
760
+ * <code>repeated string advanced_ocr_options = 11;</code>
761
+ *
762
+ * @return This builder for chaining.
763
+ */
764
+ public Builder clearAdvancedOcrOptions () {
765
+ advancedOcrOptions_ = com .google .protobuf .LazyStringArrayList .EMPTY ;
766
+ bitField0_ = (bitField0_ & ~0x00000001 );
767
+ onChanged ();
768
+ return this ;
769
+ }
770
+ /**
771
+ *
772
+ *
773
+ * <pre>
774
+ * A list of advanced OCR options to fine-tune OCR behavior.
775
+ * </pre>
776
+ *
777
+ * <code>repeated string advanced_ocr_options = 11;</code>
778
+ *
779
+ * @param value The bytes of the advancedOcrOptions to add.
780
+ * @return This builder for chaining.
781
+ */
782
+ public Builder addAdvancedOcrOptionsBytes (com .google .protobuf .ByteString value ) {
783
+ if (value == null ) {
784
+ throw new NullPointerException ();
785
+ }
786
+ checkByteStringIsUtf8 (value );
787
+ ensureAdvancedOcrOptionsIsMutable ();
788
+ advancedOcrOptions_ .add (value );
789
+ onChanged ();
790
+ return this ;
791
+ }
792
+
512
793
@ java .lang .Override
513
794
public final Builder setUnknownFields (final com .google .protobuf .UnknownFieldSet unknownFields ) {
514
795
return super .setUnknownFields (unknownFields );
0 commit comments