Class SpeechAdaptation.Builder (4.17.0)

public static final class SpeechAdaptation.Builder extends GeneratedMessageV3.Builder<SpeechAdaptation.Builder> implements SpeechAdaptationOrBuilder

Provides "hints" to the speech recognizer to favor specific words and phrases in the results. PhraseSets can be specified as an inline resource, or a reference to an existing PhraseSet resource.

Protobuf type google.cloud.speech.v2.SpeechAdaptation

Static Methods

getDescriptor()

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

Methods

addAllCustomClasses(Iterable<? extends CustomClass> values)

public SpeechAdaptation.Builder addAllCustomClasses(Iterable<? extends CustomClass> values)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.speech.v2.CustomClass>
Returns
TypeDescription
SpeechAdaptation.Builder

addAllPhraseSets(Iterable<? extends SpeechAdaptation.AdaptationPhraseSet> values)

public SpeechAdaptation.Builder addAllPhraseSets(Iterable<? extends SpeechAdaptation.AdaptationPhraseSet> values)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet>
Returns
TypeDescription
SpeechAdaptation.Builder

addCustomClasses(CustomClass value)

public SpeechAdaptation.Builder addCustomClasses(CustomClass value)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
NameDescription
valueCustomClass
Returns
TypeDescription
SpeechAdaptation.Builder

addCustomClasses(CustomClass.Builder builderForValue)

public SpeechAdaptation.Builder addCustomClasses(CustomClass.Builder builderForValue)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
NameDescription
builderForValueCustomClass.Builder
Returns
TypeDescription
SpeechAdaptation.Builder

addCustomClasses(int index, CustomClass value)

public SpeechAdaptation.Builder addCustomClasses(int index, CustomClass value)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameters
NameDescription
indexint
valueCustomClass
Returns
TypeDescription
SpeechAdaptation.Builder

addCustomClasses(int index, CustomClass.Builder builderForValue)

public SpeechAdaptation.Builder addCustomClasses(int index, CustomClass.Builder builderForValue)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameters
NameDescription
indexint
builderForValueCustomClass.Builder
Returns
TypeDescription
SpeechAdaptation.Builder

addCustomClassesBuilder()

public CustomClass.Builder addCustomClassesBuilder()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
TypeDescription
CustomClass.Builder

addCustomClassesBuilder(int index)

public CustomClass.Builder addCustomClassesBuilder(int index)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
CustomClass.Builder

addPhraseSets(SpeechAdaptation.AdaptationPhraseSet value)

public SpeechAdaptation.Builder addPhraseSets(SpeechAdaptation.AdaptationPhraseSet value)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
NameDescription
valueSpeechAdaptation.AdaptationPhraseSet
Returns
TypeDescription
SpeechAdaptation.Builder

addPhraseSets(SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

public SpeechAdaptation.Builder addPhraseSets(SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
NameDescription
builderForValueSpeechAdaptation.AdaptationPhraseSet.Builder
Returns
TypeDescription
SpeechAdaptation.Builder

addPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet value)

public SpeechAdaptation.Builder addPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet value)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameters
NameDescription
indexint
valueSpeechAdaptation.AdaptationPhraseSet
Returns
TypeDescription
SpeechAdaptation.Builder

addPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

public SpeechAdaptation.Builder addPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameters
NameDescription
indexint
builderForValueSpeechAdaptation.AdaptationPhraseSet.Builder
Returns
TypeDescription
SpeechAdaptation.Builder

addPhraseSetsBuilder()

public SpeechAdaptation.AdaptationPhraseSet.Builder addPhraseSetsBuilder()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
TypeDescription
SpeechAdaptation.AdaptationPhraseSet.Builder

addPhraseSetsBuilder(int index)

public SpeechAdaptation.AdaptationPhraseSet.Builder addPhraseSetsBuilder(int index)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechAdaptation.AdaptationPhraseSet.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SpeechAdaptation build()
Returns
TypeDescription
SpeechAdaptation

buildPartial()

public SpeechAdaptation buildPartial()
Returns
TypeDescription
SpeechAdaptation

clear()

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

clearCustomClasses()

public SpeechAdaptation.Builder clearCustomClasses()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
TypeDescription
SpeechAdaptation.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPhraseSets()

public SpeechAdaptation.Builder clearPhraseSets()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
TypeDescription
SpeechAdaptation.Builder

clone()

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

getCustomClasses(int index)

public CustomClass getCustomClasses(int index)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
CustomClass

getCustomClassesBuilder(int index)

public CustomClass.Builder getCustomClassesBuilder(int index)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
CustomClass.Builder

getCustomClassesBuilderList()

public List<CustomClass.Builder> getCustomClassesBuilderList()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
TypeDescription
List<Builder>

getCustomClassesCount()

public int getCustomClassesCount()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
TypeDescription
int

getCustomClassesList()

public List<CustomClass> getCustomClassesList()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
TypeDescription
List<CustomClass>

getCustomClassesOrBuilder(int index)

public CustomClassOrBuilder getCustomClassesOrBuilder(int index)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
CustomClassOrBuilder

getCustomClassesOrBuilderList()

public List<? extends CustomClassOrBuilder> getCustomClassesOrBuilderList()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
TypeDescription
List<? extends com.google.cloud.speech.v2.CustomClassOrBuilder>

getDefaultInstanceForType()

public SpeechAdaptation getDefaultInstanceForType()
Returns
TypeDescription
SpeechAdaptation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getPhraseSets(int index)

public SpeechAdaptation.AdaptationPhraseSet getPhraseSets(int index)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechAdaptation.AdaptationPhraseSet

getPhraseSetsBuilder(int index)

public SpeechAdaptation.AdaptationPhraseSet.Builder getPhraseSetsBuilder(int index)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechAdaptation.AdaptationPhraseSet.Builder

getPhraseSetsBuilderList()

public List<SpeechAdaptation.AdaptationPhraseSet.Builder> getPhraseSetsBuilderList()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
TypeDescription
List<Builder>

getPhraseSetsCount()

public int getPhraseSetsCount()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
TypeDescription
int

getPhraseSetsList()

public List<SpeechAdaptation.AdaptationPhraseSet> getPhraseSetsList()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
TypeDescription
List<AdaptationPhraseSet>

getPhraseSetsOrBuilder(int index)

public SpeechAdaptation.AdaptationPhraseSetOrBuilder getPhraseSetsOrBuilder(int index)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechAdaptation.AdaptationPhraseSetOrBuilder

getPhraseSetsOrBuilderList()

public List<? extends SpeechAdaptation.AdaptationPhraseSetOrBuilder> getPhraseSetsOrBuilderList()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
TypeDescription
List<? extends com.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSetOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SpeechAdaptation other)

public SpeechAdaptation.Builder mergeFrom(SpeechAdaptation other)
Parameter
NameDescription
otherSpeechAdaptation
Returns
TypeDescription
SpeechAdaptation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeCustomClasses(int index)

public SpeechAdaptation.Builder removeCustomClasses(int index)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechAdaptation.Builder

removePhraseSets(int index)

public SpeechAdaptation.Builder removePhraseSets(int index)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechAdaptation.Builder

setCustomClasses(int index, CustomClass value)

public SpeechAdaptation.Builder setCustomClasses(int index, CustomClass value)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameters
NameDescription
indexint
valueCustomClass
Returns
TypeDescription
SpeechAdaptation.Builder

setCustomClasses(int index, CustomClass.Builder builderForValue)

public SpeechAdaptation.Builder setCustomClasses(int index, CustomClass.Builder builderForValue)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameters
NameDescription
indexint
builderForValueCustomClass.Builder
Returns
TypeDescription
SpeechAdaptation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet value)

public SpeechAdaptation.Builder setPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet value)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameters
NameDescription
indexint
valueSpeechAdaptation.AdaptationPhraseSet
Returns
TypeDescription
SpeechAdaptation.Builder

setPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

public SpeechAdaptation.Builder setPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameters
NameDescription
indexint
builderForValueSpeechAdaptation.AdaptationPhraseSet.Builder
Returns
TypeDescription
SpeechAdaptation.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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