Added in API level 29

Builder


class Builder
kotlin.Any
   ↳ android.view.textclassifier.ConversationActions.Request.Builder

Builder object to construct the Request object.

Summary

Public constructors

Constructs a builder.

Public methods
ConversationActions.Request

Builds the Request object.

ConversationActions.Request.Builder
setExtras(bundle: Bundle?)

Sets a set of extended data to the request.

ConversationActions.Request.Builder

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

Sets the type config.

Public constructors

Builder

Added in API level 29
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

Added in API level 29
fun build(): ConversationActions.Request

Builds the Request object.

Return
ConversationActions.Request This value cannot be null.

setExtras

Added in API level 29
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

Added in API level 29
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

Added in API level 29
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

Added in API level 29
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.