Class LongRunningRecognizeResponse.Builder (4.9.0)

public static final class LongRunningRecognizeResponse.Builder extends GeneratedMessageV3.Builder<LongRunningRecognizeResponse.Builder> implements LongRunningRecognizeResponseOrBuilder

The only message returned to the client by the LongRunningRecognize method. 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.v1.LongRunningRecognizeResponse

Static Methods

getDescriptor()

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

Methods

addAllResults(Iterable<? extends SpeechRecognitionResult> values)

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

Sequential list of transcription results corresponding to sequential portions of audio.

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

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addResults(SpeechRecognitionResult value)

public LongRunningRecognizeResponse.Builder addResults(SpeechRecognitionResult value)

Sequential list of transcription results corresponding to sequential portions of audio.

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

Parameter
NameDescription
valueSpeechRecognitionResult
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

addResults(SpeechRecognitionResult.Builder builderForValue)

public LongRunningRecognizeResponse.Builder addResults(SpeechRecognitionResult.Builder builderForValue)

Sequential list of transcription results corresponding to sequential portions of audio.

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

Parameter
NameDescription
builderForValueSpeechRecognitionResult.Builder
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

addResults(int index, SpeechRecognitionResult value)

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

Sequential list of transcription results corresponding to sequential portions of audio.

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

Parameters
NameDescription
indexint
valueSpeechRecognitionResult
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

addResults(int index, SpeechRecognitionResult.Builder builderForValue)

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

Sequential list of transcription results corresponding to sequential portions of audio.

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

Parameters
NameDescription
indexint
builderForValueSpeechRecognitionResult.Builder
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

addResultsBuilder()

public SpeechRecognitionResult.Builder addResultsBuilder()

Sequential list of transcription results corresponding to sequential portions of audio.

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

Returns
TypeDescription
SpeechRecognitionResult.Builder

addResultsBuilder(int index)

public SpeechRecognitionResult.Builder addResultsBuilder(int index)

Sequential list of transcription results corresponding to sequential portions of audio.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionResult.Builder

build()

public LongRunningRecognizeResponse build()
Returns
TypeDescription
LongRunningRecognizeResponse

buildPartial()

public LongRunningRecognizeResponse buildPartial()
Returns
TypeDescription
LongRunningRecognizeResponse

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOutputConfig()

public LongRunningRecognizeResponse.Builder clearOutputConfig()

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Returns
TypeDescription
LongRunningRecognizeResponse.Builder

clearOutputError()

public LongRunningRecognizeResponse.Builder clearOutputError()

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Returns
TypeDescription
LongRunningRecognizeResponse.Builder

clearRequestId()

public LongRunningRecognizeResponse.Builder clearRequestId()

The ID associated with the request. This is a unique ID specific only to the given request.

int64 request_id = 9;

Returns
TypeDescription
LongRunningRecognizeResponse.Builder

This builder for chaining.

clearResults()

public LongRunningRecognizeResponse.Builder clearResults()

Sequential list of transcription results corresponding to sequential portions of audio.

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

Returns
TypeDescription
LongRunningRecognizeResponse.Builder

clearSpeechAdaptationInfo()

public LongRunningRecognizeResponse.Builder clearSpeechAdaptationInfo()

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Returns
TypeDescription
LongRunningRecognizeResponse.Builder

clearTotalBilledTime()

public LongRunningRecognizeResponse.Builder clearTotalBilledTime()

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Returns
TypeDescription
LongRunningRecognizeResponse.Builder

clone()

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

getDefaultInstanceForType()

public LongRunningRecognizeResponse getDefaultInstanceForType()
Returns
TypeDescription
LongRunningRecognizeResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getOutputConfig()

public TranscriptOutputConfig getOutputConfig()

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Returns
TypeDescription
TranscriptOutputConfig

The outputConfig.

getOutputConfigBuilder()

public TranscriptOutputConfig.Builder getOutputConfigBuilder()

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Returns
TypeDescription
TranscriptOutputConfig.Builder

getOutputConfigOrBuilder()

public TranscriptOutputConfigOrBuilder getOutputConfigOrBuilder()

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Returns
TypeDescription
TranscriptOutputConfigOrBuilder

getOutputError()

public Status getOutputError()

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Returns
TypeDescription
com.google.rpc.Status

The outputError.

getOutputErrorBuilder()

public Status.Builder getOutputErrorBuilder()

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Returns
TypeDescription
com.google.rpc.Status.Builder

getOutputErrorOrBuilder()

public StatusOrBuilder getOutputErrorOrBuilder()

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Returns
TypeDescription
com.google.rpc.StatusOrBuilder

getRequestId()

public long getRequestId()

The ID associated with the request. This is a unique ID specific only to the given request.

int64 request_id = 9;

Returns
TypeDescription
long

The requestId.

getResults(int index)

public SpeechRecognitionResult getResults(int index)

Sequential list of transcription results corresponding to sequential portions of audio.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionResult

getResultsBuilder(int index)

public SpeechRecognitionResult.Builder getResultsBuilder(int index)

Sequential list of transcription results corresponding to sequential portions of audio.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionResult.Builder

getResultsBuilderList()

public List<SpeechRecognitionResult.Builder> getResultsBuilderList()

Sequential list of transcription results corresponding to sequential portions of audio.

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

Returns
TypeDescription
List<Builder>

getResultsCount()

public int getResultsCount()

Sequential list of transcription results corresponding to sequential portions of audio.

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

Returns
TypeDescription
int

getResultsList()

public List<SpeechRecognitionResult> getResultsList()

Sequential list of transcription results corresponding to sequential portions of audio.

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

Returns
TypeDescription
List<SpeechRecognitionResult>

getResultsOrBuilder(int index)

public SpeechRecognitionResultOrBuilder getResultsOrBuilder(int index)

Sequential list of transcription results corresponding to sequential portions of audio.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionResultOrBuilder

getResultsOrBuilderList()

public List<? extends SpeechRecognitionResultOrBuilder> getResultsOrBuilderList()

Sequential list of transcription results corresponding to sequential portions of audio.

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

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

getSpeechAdaptationInfo()

public SpeechAdaptationInfo getSpeechAdaptationInfo()

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Returns
TypeDescription
SpeechAdaptationInfo

The speechAdaptationInfo.

getSpeechAdaptationInfoBuilder()

public SpeechAdaptationInfo.Builder getSpeechAdaptationInfoBuilder()

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Returns
TypeDescription
SpeechAdaptationInfo.Builder

getSpeechAdaptationInfoOrBuilder()

public SpeechAdaptationInfoOrBuilder getSpeechAdaptationInfoOrBuilder()

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Returns
TypeDescription
SpeechAdaptationInfoOrBuilder

getTotalBilledTime()

public Duration getTotalBilledTime()

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Returns
TypeDescription
Duration

The totalBilledTime.

getTotalBilledTimeBuilder()

public Duration.Builder getTotalBilledTimeBuilder()

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Returns
TypeDescription
Builder

getTotalBilledTimeOrBuilder()

public DurationOrBuilder getTotalBilledTimeOrBuilder()

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Returns
TypeDescription
DurationOrBuilder

hasOutputConfig()

public boolean hasOutputConfig()

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Returns
TypeDescription
boolean

Whether the outputConfig field is set.

hasOutputError()

public boolean hasOutputError()

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Returns
TypeDescription
boolean

Whether the outputError field is set.

hasSpeechAdaptationInfo()

public boolean hasSpeechAdaptationInfo()

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Returns
TypeDescription
boolean

Whether the speechAdaptationInfo field is set.

hasTotalBilledTime()

public boolean hasTotalBilledTime()

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Returns
TypeDescription
boolean

Whether the totalBilledTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(LongRunningRecognizeResponse other)

public LongRunningRecognizeResponse.Builder mergeFrom(LongRunningRecognizeResponse other)
Parameter
NameDescription
otherLongRunningRecognizeResponse
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeOutputConfig(TranscriptOutputConfig value)

public LongRunningRecognizeResponse.Builder mergeOutputConfig(TranscriptOutputConfig value)

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Parameter
NameDescription
valueTranscriptOutputConfig
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

mergeOutputError(Status value)

public LongRunningRecognizeResponse.Builder mergeOutputError(Status value)

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Parameter
NameDescription
valuecom.google.rpc.Status
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

mergeSpeechAdaptationInfo(SpeechAdaptationInfo value)

public LongRunningRecognizeResponse.Builder mergeSpeechAdaptationInfo(SpeechAdaptationInfo value)

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Parameter
NameDescription
valueSpeechAdaptationInfo
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

mergeTotalBilledTime(Duration value)

public LongRunningRecognizeResponse.Builder mergeTotalBilledTime(Duration value)

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeResults(int index)

public LongRunningRecognizeResponse.Builder removeResults(int index)

Sequential list of transcription results corresponding to sequential portions of audio.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setOutputConfig(TranscriptOutputConfig value)

public LongRunningRecognizeResponse.Builder setOutputConfig(TranscriptOutputConfig value)

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Parameter
NameDescription
valueTranscriptOutputConfig
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

setOutputConfig(TranscriptOutputConfig.Builder builderForValue)

public LongRunningRecognizeResponse.Builder setOutputConfig(TranscriptOutputConfig.Builder builderForValue)

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Parameter
NameDescription
builderForValueTranscriptOutputConfig.Builder
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

setOutputError(Status value)

public LongRunningRecognizeResponse.Builder setOutputError(Status value)

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Parameter
NameDescription
valuecom.google.rpc.Status
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

setOutputError(Status.Builder builderForValue)

public LongRunningRecognizeResponse.Builder setOutputError(Status.Builder builderForValue)

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Parameter
NameDescription
builderForValuecom.google.rpc.Status.Builder
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

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

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

setRequestId(long value)

public LongRunningRecognizeResponse.Builder setRequestId(long value)

The ID associated with the request. This is a unique ID specific only to the given request.

int64 request_id = 9;

Parameter
NameDescription
valuelong

The requestId to set.

Returns
TypeDescription
LongRunningRecognizeResponse.Builder

This builder for chaining.

setResults(int index, SpeechRecognitionResult value)

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

Sequential list of transcription results corresponding to sequential portions of audio.

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

Parameters
NameDescription
indexint
valueSpeechRecognitionResult
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

setResults(int index, SpeechRecognitionResult.Builder builderForValue)

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

Sequential list of transcription results corresponding to sequential portions of audio.

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

Parameters
NameDescription
indexint
builderForValueSpeechRecognitionResult.Builder
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

setSpeechAdaptationInfo(SpeechAdaptationInfo value)

public LongRunningRecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo value)

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Parameter
NameDescription
valueSpeechAdaptationInfo
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue)

public LongRunningRecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue)

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Parameter
NameDescription
builderForValueSpeechAdaptationInfo.Builder
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

setTotalBilledTime(Duration value)

public LongRunningRecognizeResponse.Builder setTotalBilledTime(Duration value)

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

setTotalBilledTime(Duration.Builder builderForValue)

public LongRunningRecognizeResponse.Builder setTotalBilledTime(Duration.Builder builderForValue)

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
LongRunningRecognizeResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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