@@ -53,86 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
53
53
return this .unknownFields ;
54
54
}
55
55
56
- private AudioConfig (
57
- com .google .protobuf .CodedInputStream input ,
58
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
59
- throws com .google .protobuf .InvalidProtocolBufferException {
60
- this ();
61
- if (extensionRegistry == null ) {
62
- throw new java .lang .NullPointerException ();
63
- }
64
- int mutable_bitField0_ = 0 ;
65
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
66
- com .google .protobuf .UnknownFieldSet .newBuilder ();
67
- try {
68
- boolean done = false ;
69
- while (!done ) {
70
- int tag = input .readTag ();
71
- switch (tag ) {
72
- case 0 :
73
- done = true ;
74
- break ;
75
- case 8 :
76
- {
77
- int rawValue = input .readEnum ();
78
-
79
- audioEncoding_ = rawValue ;
80
- break ;
81
- }
82
- case 17 :
83
- {
84
- speakingRate_ = input .readDouble ();
85
- break ;
86
- }
87
- case 25 :
88
- {
89
- pitch_ = input .readDouble ();
90
- break ;
91
- }
92
- case 33 :
93
- {
94
- volumeGainDb_ = input .readDouble ();
95
- break ;
96
- }
97
- case 40 :
98
- {
99
- sampleRateHertz_ = input .readInt32 ();
100
- break ;
101
- }
102
- case 50 :
103
- {
104
- java .lang .String s = input .readStringRequireUtf8 ();
105
- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
106
- effectsProfileId_ = new com .google .protobuf .LazyStringArrayList ();
107
- mutable_bitField0_ |= 0x00000001 ;
108
- }
109
- effectsProfileId_ .add (s );
110
- break ;
111
- }
112
- default :
113
- {
114
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
115
- done = true ;
116
- }
117
- break ;
118
- }
119
- }
120
- }
121
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
122
- throw e .setUnfinishedMessage (this );
123
- } catch (com .google .protobuf .UninitializedMessageException e ) {
124
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
125
- } catch (java .io .IOException e ) {
126
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
127
- } finally {
128
- if (((mutable_bitField0_ & 0x00000001 ) != 0 )) {
129
- effectsProfileId_ = effectsProfileId_ .getUnmodifiableView ();
130
- }
131
- this .unknownFields = unknownFields .build ();
132
- makeExtensionsImmutable ();
133
- }
134
- }
135
-
136
56
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
137
57
return com .google .cloud .texttospeech .v1 .TextToSpeechProto
138
58
.internal_static_google_cloud_texttospeech_v1_AudioConfig_descriptor ;
@@ -406,7 +326,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
406
326
for (int i = 0 ; i < effectsProfileId_ .size (); i ++) {
407
327
com .google .protobuf .GeneratedMessageV3 .writeString (output , 6 , effectsProfileId_ .getRaw (i ));
408
328
}
409
- unknownFields .writeTo (output );
329
+ getUnknownFields () .writeTo (output );
410
330
}
411
331
412
332
@ java .lang .Override
@@ -439,7 +359,7 @@ public int getSerializedSize() {
439
359
size += dataSize ;
440
360
size += 1 * getEffectsProfileIdList ().size ();
441
361
}
442
- size += unknownFields .getSerializedSize ();
362
+ size += getUnknownFields () .getSerializedSize ();
443
363
memoizedSize = size ;
444
364
return size ;
445
365
}
@@ -464,7 +384,7 @@ public boolean equals(final java.lang.Object obj) {
464
384
!= java .lang .Double .doubleToLongBits (other .getVolumeGainDb ())) return false ;
465
385
if (getSampleRateHertz () != other .getSampleRateHertz ()) return false ;
466
386
if (!getEffectsProfileIdList ().equals (other .getEffectsProfileIdList ())) return false ;
467
- if (!unknownFields .equals (other .unknownFields )) return false ;
387
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
468
388
return true ;
469
389
}
470
390
@@ -497,7 +417,7 @@ public int hashCode() {
497
417
hash = (37 * hash ) + EFFECTS_PROFILE_ID_FIELD_NUMBER ;
498
418
hash = (53 * hash ) + getEffectsProfileIdList ().hashCode ();
499
419
}
500
- hash = (29 * hash ) + unknownFields .hashCode ();
420
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
501
421
memoizedHashCode = hash ;
502
422
return hash ;
503
423
}
@@ -626,17 +546,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
626
546
}
627
547
628
548
// Construct using com.google.cloud.texttospeech.v1.AudioConfig.newBuilder()
629
- private Builder () {
630
- maybeForceBuilderInitialization ();
631
- }
549
+ private Builder () {}
632
550
633
551
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
634
552
super (parent );
635
- maybeForceBuilderInitialization ();
636
- }
637
-
638
- private void maybeForceBuilderInitialization () {
639
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
640
553
}
641
554
642
555
@ java .lang .Override
@@ -766,7 +679,7 @@ public Builder mergeFrom(com.google.cloud.texttospeech.v1.AudioConfig other) {
766
679
}
767
680
onChanged ();
768
681
}
769
- this .mergeUnknownFields (other .unknownFields );
682
+ this .mergeUnknownFields (other .getUnknownFields () );
770
683
onChanged ();
771
684
return this ;
772
685
}
@@ -781,17 +694,68 @@ public Builder mergeFrom(
781
694
com .google .protobuf .CodedInputStream input ,
782
695
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
783
696
throws java .io .IOException {
784
- com .google .cloud .texttospeech .v1 .AudioConfig parsedMessage = null ;
697
+ if (extensionRegistry == null ) {
698
+ throw new java .lang .NullPointerException ();
699
+ }
785
700
try {
786
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
701
+ boolean done = false ;
702
+ while (!done ) {
703
+ int tag = input .readTag ();
704
+ switch (tag ) {
705
+ case 0 :
706
+ done = true ;
707
+ break ;
708
+ case 8 :
709
+ {
710
+ audioEncoding_ = input .readEnum ();
711
+
712
+ break ;
713
+ } // case 8
714
+ case 17 :
715
+ {
716
+ speakingRate_ = input .readDouble ();
717
+
718
+ break ;
719
+ } // case 17
720
+ case 25 :
721
+ {
722
+ pitch_ = input .readDouble ();
723
+
724
+ break ;
725
+ } // case 25
726
+ case 33 :
727
+ {
728
+ volumeGainDb_ = input .readDouble ();
729
+
730
+ break ;
731
+ } // case 33
732
+ case 40 :
733
+ {
734
+ sampleRateHertz_ = input .readInt32 ();
735
+
736
+ break ;
737
+ } // case 40
738
+ case 50 :
739
+ {
740
+ java .lang .String s = input .readStringRequireUtf8 ();
741
+ ensureEffectsProfileIdIsMutable ();
742
+ effectsProfileId_ .add (s );
743
+ break ;
744
+ } // case 50
745
+ default :
746
+ {
747
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
748
+ done = true ; // was an endgroup tag
749
+ }
750
+ break ;
751
+ } // default:
752
+ } // switch (tag)
753
+ } // while (!done)
787
754
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
788
- parsedMessage = (com .google .cloud .texttospeech .v1 .AudioConfig ) e .getUnfinishedMessage ();
789
755
throw e .unwrapIOException ();
790
756
} finally {
791
- if (parsedMessage != null ) {
792
- mergeFrom (parsedMessage );
793
- }
794
- }
757
+ onChanged ();
758
+ } // finally
795
759
return this ;
796
760
}
797
761
@@ -1441,7 +1405,18 @@ public AudioConfig parsePartialFrom(
1441
1405
com .google .protobuf .CodedInputStream input ,
1442
1406
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1443
1407
throws com .google .protobuf .InvalidProtocolBufferException {
1444
- return new AudioConfig (input , extensionRegistry );
1408
+ Builder builder = newBuilder ();
1409
+ try {
1410
+ builder .mergeFrom (input , extensionRegistry );
1411
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1412
+ throw e .setUnfinishedMessage (builder .buildPartial ());
1413
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
1414
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
1415
+ } catch (java .io .IOException e ) {
1416
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
1417
+ .setUnfinishedMessage (builder .buildPartial ());
1418
+ }
1419
+ return builder .buildPartial ();
1445
1420
}
1446
1421
};
1447
1422
0 commit comments