Class AsyncRecognizeResponse.Builder (4.29.0)

public static final class AsyncRecognizeResponse.Builder extends GeneratedMessageV3.Builder<AsyncRecognizeResponse.Builder> implements AsyncRecognizeResponseOrBuilder

The only message returned to the client by AsyncRecognize. It contains the result as zero or more sequential SpeechRecognitionResult messages. It is included in the result.response field of the Operation returned by the GetOperation call of the google::longrunning::Operations service.

Protobuf type google.cloud.speech.v1beta1.AsyncRecognizeResponse

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllResults(Iterable<? extends SpeechRecognitionResult> values)

public AsyncRecognizeResponse.Builder addAllResults(Iterable<? extends SpeechRecognitionResult> values)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.speech.v1beta1.SpeechRecognitionResult>
Returns
TypeDescription
AsyncRecognizeResponse.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AsyncRecognizeResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AsyncRecognizeResponse.Builder
Overrides

addResults(SpeechRecognitionResult value)

public AsyncRecognizeResponse.Builder addResults(SpeechRecognitionResult value)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameter
NameDescription
valueSpeechRecognitionResult
Returns
TypeDescription
AsyncRecognizeResponse.Builder

addResults(SpeechRecognitionResult.Builder builderForValue)

public AsyncRecognizeResponse.Builder addResults(SpeechRecognitionResult.Builder builderForValue)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameter
NameDescription
builderForValueSpeechRecognitionResult.Builder
Returns
TypeDescription
AsyncRecognizeResponse.Builder

addResults(int index, SpeechRecognitionResult value)

public AsyncRecognizeResponse.Builder addResults(int index, SpeechRecognitionResult value)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameters
NameDescription
indexint
valueSpeechRecognitionResult
Returns
TypeDescription
AsyncRecognizeResponse.Builder

addResults(int index, SpeechRecognitionResult.Builder builderForValue)

public AsyncRecognizeResponse.Builder addResults(int index, SpeechRecognitionResult.Builder builderForValue)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameters
NameDescription
indexint
builderForValueSpeechRecognitionResult.Builder
Returns
TypeDescription
AsyncRecognizeResponse.Builder

addResultsBuilder()

public SpeechRecognitionResult.Builder addResultsBuilder()

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Returns
TypeDescription
SpeechRecognitionResult.Builder

addResultsBuilder(int index)

public SpeechRecognitionResult.Builder addResultsBuilder(int index)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionResult.Builder

build()

public AsyncRecognizeResponse build()
Returns
TypeDescription
AsyncRecognizeResponse

buildPartial()

public AsyncRecognizeResponse buildPartial()
Returns
TypeDescription
AsyncRecognizeResponse

clear()

public AsyncRecognizeResponse.Builder clear()
Returns
TypeDescription
AsyncRecognizeResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public AsyncRecognizeResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
AsyncRecognizeResponse.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public AsyncRecognizeResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
AsyncRecognizeResponse.Builder
Overrides

clearResults()

public AsyncRecognizeResponse.Builder clearResults()

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Returns
TypeDescription
AsyncRecognizeResponse.Builder

clone()

public AsyncRecognizeResponse.Builder clone()
Returns
TypeDescription
AsyncRecognizeResponse.Builder
Overrides

getDefaultInstanceForType()

public AsyncRecognizeResponse getDefaultInstanceForType()
Returns
TypeDescription
AsyncRecognizeResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getResults(int index)

public SpeechRecognitionResult getResults(int index)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionResult

getResultsBuilder(int index)

public SpeechRecognitionResult.Builder getResultsBuilder(int index)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionResult.Builder

getResultsBuilderList()

public List<SpeechRecognitionResult.Builder> getResultsBuilderList()

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Returns
TypeDescription
List<Builder>

getResultsCount()

public int getResultsCount()

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Returns
TypeDescription
int

getResultsList()

public List<SpeechRecognitionResult> getResultsList()

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Returns
TypeDescription
List<SpeechRecognitionResult>

getResultsOrBuilder(int index)

public SpeechRecognitionResultOrBuilder getResultsOrBuilder(int index)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionResultOrBuilder

getResultsOrBuilderList()

public List<? extends SpeechRecognitionResultOrBuilder> getResultsOrBuilderList()

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Returns
TypeDescription
List<? extends com.google.cloud.speech.v1beta1.SpeechRecognitionResultOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(AsyncRecognizeResponse other)

public AsyncRecognizeResponse.Builder mergeFrom(AsyncRecognizeResponse other)
Parameter
NameDescription
otherAsyncRecognizeResponse
Returns
TypeDescription
AsyncRecognizeResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AsyncRecognizeResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AsyncRecognizeResponse.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public AsyncRecognizeResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
AsyncRecognizeResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AsyncRecognizeResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AsyncRecognizeResponse.Builder
Overrides

removeResults(int index)

public AsyncRecognizeResponse.Builder removeResults(int index)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
AsyncRecognizeResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public AsyncRecognizeResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AsyncRecognizeResponse.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AsyncRecognizeResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AsyncRecognizeResponse.Builder
Overrides

setResults(int index, SpeechRecognitionResult value)

public AsyncRecognizeResponse.Builder setResults(int index, SpeechRecognitionResult value)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameters
NameDescription
indexint
valueSpeechRecognitionResult
Returns
TypeDescription
AsyncRecognizeResponse.Builder

setResults(int index, SpeechRecognitionResult.Builder builderForValue)

public AsyncRecognizeResponse.Builder setResults(int index, SpeechRecognitionResult.Builder builderForValue)

Output-only Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v1beta1.SpeechRecognitionResult results = 2;

Parameters
NameDescription
indexint
builderForValueSpeechRecognitionResult.Builder
Returns
TypeDescription
AsyncRecognizeResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final AsyncRecognizeResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AsyncRecognizeResponse.Builder
Overrides