Builder
class Builder
kotlin.Any | |
↳ | android.view.textclassifier.ConversationActions.Request.Builder |
Builder object to construct the Request
object.
Summary
Public constructors | |
---|---|
Builder(conversation: MutableList<ConversationActions.Message!>) Constructs a builder. |
Public methods | |
---|---|
ConversationActions.Request |
build() Builds the |
ConversationActions.Request.Builder |
Sets a set of extended data to the request. |
ConversationActions.Request.Builder |
setHints(hints: MutableList<String!>?) Sets the hints to help text classifier to generate actions. |
ConversationActions.Request.Builder |
setMaxSuggestions(maxSuggestions: Int) Sets the maximum number of suggestions you want. |
ConversationActions.Request.Builder |
setTypeConfig(typeConfig: TextClassifier.EntityConfig?) Sets the type config. |
Public constructors
Builder
Builder(conversation: MutableList<ConversationActions.Message!>)
Constructs a builder.
Parameters | |
---|---|
conversation |
MutableList<ConversationActions.Message!>: the conversation that the text classifier is going to generate actions for. This value cannot be null . |
Public methods
build
fun build(): ConversationActions.Request
Builds the Request
object.
Return | |
---|---|
ConversationActions.Request |
This value cannot be null . |
setExtras
fun setExtras(bundle: Bundle?): ConversationActions.Request.Builder
Sets a set of extended data to the request.
Parameters | |
---|---|
bundle |
Bundle?: This value may be null . |
Return | |
---|---|
ConversationActions.Request.Builder |
This value cannot be null . |
setHints
fun setHints(hints: MutableList<String!>?): ConversationActions.Request.Builder
Sets the hints to help text classifier to generate actions. It could be used to help text classifier to infer what types of actions the caller may be interested in.
Parameters | |
---|---|
hints |
MutableList<String!>?: This value may be null . Value is android.view.textclassifier.ConversationActions.Request#HINT_FOR_NOTIFICATION , or android.view.textclassifier.ConversationActions.Request#HINT_FOR_IN_APP |
Return | |
---|---|
ConversationActions.Request.Builder |
This value cannot be null . |
setMaxSuggestions
fun setMaxSuggestions(maxSuggestions: Int): ConversationActions.Request.Builder
Sets the maximum number of suggestions you want. Value -1 means no restriction and this is the default.
Parameters | |
---|---|
maxSuggestions |
Int: Value is -1 or greater |
Return | |
---|---|
ConversationActions.Request.Builder |
This value cannot be null . |
setTypeConfig
fun setTypeConfig(typeConfig: TextClassifier.EntityConfig?): ConversationActions.Request.Builder
Sets the type config.
Parameters | |
---|---|
typeConfig |
TextClassifier.EntityConfig?: This value may be null . |
Return | |
---|---|
ConversationActions.Request.Builder |
This value cannot be null . |