Class SpeechContext.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
- com.google.cloud.dialogflow.v2beta1.SpeechContext.Builder
-
- All Implemented Interfaces:
SpeechContextOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- SpeechContext
public static final class SpeechContext.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder> implements SpeechContextOrBuilder
Hints for the speech recognizer to help with recognition in a specific conversation state.
Protobuf typegoogle.cloud.dialogflow.v2beta1.SpeechContext
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SpeechContext.Builder
addAllPhrases(Iterable<String> values)
Optional.SpeechContext.Builder
addPhrases(String value)
Optional.SpeechContext.Builder
addPhrasesBytes(com.google.protobuf.ByteString value)
Optional.SpeechContext.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SpeechContext
build()
SpeechContext
buildPartial()
SpeechContext.Builder
clear()
SpeechContext.Builder
clearBoost()
Optional.SpeechContext.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
SpeechContext.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
SpeechContext.Builder
clearPhrases()
Optional.SpeechContext.Builder
clone()
float
getBoost()
Optional.SpeechContext
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getPhrases(int index)
Optional.com.google.protobuf.ByteString
getPhrasesBytes(int index)
Optional.int
getPhrasesCount()
Optional.com.google.protobuf.ProtocolStringList
getPhrasesList()
Optional.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
SpeechContext.Builder
mergeFrom(SpeechContext other)
SpeechContext.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
SpeechContext.Builder
mergeFrom(com.google.protobuf.Message other)
SpeechContext.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
SpeechContext.Builder
setBoost(float value)
Optional.SpeechContext.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SpeechContext.Builder
setPhrases(int index, String value)
Optional.SpeechContext.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
SpeechContext.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
clear
public SpeechContext.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
getDefaultInstanceForType
public SpeechContext getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public SpeechContext build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SpeechContext buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SpeechContext.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
setField
public SpeechContext.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
clearField
public SpeechContext.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
clearOneof
public SpeechContext.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
setRepeatedField
public SpeechContext.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
addRepeatedField
public SpeechContext.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
mergeFrom
public SpeechContext.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SpeechContext.Builder>
-
mergeFrom
public SpeechContext.Builder mergeFrom(SpeechContext other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
mergeFrom
public SpeechContext.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SpeechContext.Builder>
- Throws:
IOException
-
getPhrasesList
public com.google.protobuf.ProtocolStringList getPhrasesList()
Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. This list can be used to: * improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent * add additional words to the speech recognizer vocabulary * ... See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/quotas) for usage limits.
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getPhrasesList
in interfaceSpeechContextOrBuilder
- Returns:
- A list containing the phrases.
-
getPhrasesCount
public int getPhrasesCount()
Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. This list can be used to: * improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent * add additional words to the speech recognizer vocabulary * ... See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/quotas) for usage limits.
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getPhrasesCount
in interfaceSpeechContextOrBuilder
- Returns:
- The count of phrases.
-
getPhrases
public String getPhrases(int index)
Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. This list can be used to: * improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent * add additional words to the speech recognizer vocabulary * ... See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/quotas) for usage limits.
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getPhrases
in interfaceSpeechContextOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The phrases at the given index.
-
getPhrasesBytes
public com.google.protobuf.ByteString getPhrasesBytes(int index)
Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. This list can be used to: * improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent * add additional words to the speech recognizer vocabulary * ... See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/quotas) for usage limits.
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getPhrasesBytes
in interfaceSpeechContextOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the phrases at the given index.
-
setPhrases
public SpeechContext.Builder setPhrases(int index, String value)
Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. This list can be used to: * improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent * add additional words to the speech recognizer vocabulary * ... See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/quotas) for usage limits.
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
index
- The index to set the value at.value
- The phrases to set.- Returns:
- This builder for chaining.
-
addPhrases
public SpeechContext.Builder addPhrases(String value)
Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. This list can be used to: * improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent * add additional words to the speech recognizer vocabulary * ... See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/quotas) for usage limits.
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The phrases to add.- Returns:
- This builder for chaining.
-
addAllPhrases
public SpeechContext.Builder addAllPhrases(Iterable<String> values)
Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. This list can be used to: * improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent * add additional words to the speech recognizer vocabulary * ... See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/quotas) for usage limits.
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
values
- The phrases to add.- Returns:
- This builder for chaining.
-
clearPhrases
public SpeechContext.Builder clearPhrases()
Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. This list can be used to: * improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent * add additional words to the speech recognizer vocabulary * ... See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/quotas) for usage limits.
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- This builder for chaining.
-
addPhrasesBytes
public SpeechContext.Builder addPhrasesBytes(com.google.protobuf.ByteString value)
Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. This list can be used to: * improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent * add additional words to the speech recognizer vocabulary * ... See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/quotas) for usage limits.
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The bytes of the phrases to add.- Returns:
- This builder for chaining.
-
getBoost
public float getBoost()
Optional. Boost for this context compared to other contexts: * If the boost is positive, Dialogflow will increase the probability that the phrases in this context are recognized over similar sounding phrases. * If the boost is unspecified or non-positive, Dialogflow will not apply any boost. Dialogflow recommends that you use boosts in the range (0, 20] and that you find a value that fits your use case with binary search.
float boost = 2 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getBoost
in interfaceSpeechContextOrBuilder
- Returns:
- The boost.
-
setBoost
public SpeechContext.Builder setBoost(float value)
Optional. Boost for this context compared to other contexts: * If the boost is positive, Dialogflow will increase the probability that the phrases in this context are recognized over similar sounding phrases. * If the boost is unspecified or non-positive, Dialogflow will not apply any boost. Dialogflow recommends that you use boosts in the range (0, 20] and that you find a value that fits your use case with binary search.
float boost = 2 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The boost to set.- Returns:
- This builder for chaining.
-
clearBoost
public SpeechContext.Builder clearBoost()
Optional. Boost for this context compared to other contexts: * If the boost is positive, Dialogflow will increase the probability that the phrases in this context are recognized over similar sounding phrases. * If the boost is unspecified or non-positive, Dialogflow will not apply any boost. Dialogflow recommends that you use boosts in the range (0, 20] and that you find a value that fits your use case with binary search.
float boost = 2 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- This builder for chaining.
-
setUnknownFields
public final SpeechContext.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
mergeUnknownFields
public final SpeechContext.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
-