ConversationAction.Builder


public final class ConversationAction.Builder


Builder class to construct ConversationAction.

Summary

Public constructors

Builder(@NonNull String actionType)

Public methods

@NonNull ConversationAction

Builds the ConversationAction object.

@NonNull ConversationAction.Builder

Sets an action that may be performed on the given conversation.

@NonNull ConversationAction.Builder
setConfidenceScore(@FloatRange(from = 0, to = 1) float score)

Sets the confident score.

@NonNull ConversationAction.Builder

Sets the extended data for the conversation action object.

@NonNull ConversationAction.Builder

Sets a text reply that may be performed on the given conversation.

Public constructors

Builder

public Builder(@NonNull String actionType)

Public methods

build

public @NonNull ConversationAction build()

Builds the ConversationAction object.

setAction

public @NonNull ConversationAction.Builder setAction(@Nullable RemoteActionCompat action)

Sets an action that may be performed on the given conversation.

setConfidenceScore

public @NonNull ConversationAction.Builder setConfidenceScore(@FloatRange(from = 0, to = 1) float score)

Sets the confident score.

setExtras

public @NonNull ConversationAction.Builder setExtras(@Nullable Bundle extras)

Sets the extended data for the conversation action object.

setTextReply

public @NonNull ConversationAction.Builder setTextReply(@Nullable CharSequence textReply)

Sets a text reply that may be performed on the given conversation.