Interface SessionState.Builder

    • Method Detail

      • dialogAction

        SessionState.Builder dialogAction​(DialogAction dialogAction)

        The next step that Amazon Lex V2 should take in the conversation with a user.

        Parameters:
        dialogAction - The next step that Amazon Lex V2 should take in the conversation with a user.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • intent

        SessionState.Builder intent​(Intent intent)

        The active intent that Amazon Lex V2 is processing.

        Parameters:
        intent - The active intent that Amazon Lex V2 is processing.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • activeContexts

        SessionState.Builder activeContexts​(Collection<ActiveContext> activeContexts)

        One or more contexts that indicate to Amazon Lex V2 the context of a request. When a context is active, Amazon Lex V2 considers intents with the matching context as a trigger as the next intent in a session.

        Parameters:
        activeContexts - One or more contexts that indicate to Amazon Lex V2 the context of a request. When a context is active, Amazon Lex V2 considers intents with the matching context as a trigger as the next intent in a session.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • activeContexts

        SessionState.Builder activeContexts​(ActiveContext... activeContexts)

        One or more contexts that indicate to Amazon Lex V2 the context of a request. When a context is active, Amazon Lex V2 considers intents with the matching context as a trigger as the next intent in a session.

        Parameters:
        activeContexts - One or more contexts that indicate to Amazon Lex V2 the context of a request. When a context is active, Amazon Lex V2 considers intents with the matching context as a trigger as the next intent in a session.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • activeContexts

        SessionState.Builder activeContexts​(Consumer<ActiveContext.Builder>... activeContexts)

        One or more contexts that indicate to Amazon Lex V2 the context of a request. When a context is active, Amazon Lex V2 considers intents with the matching context as a trigger as the next intent in a session.

        This is a convenience method that creates an instance of the ActiveContext.Builder avoiding the need to create one manually via ActiveContext.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #activeContexts(List).

        Parameters:
        activeContexts - a consumer that will call methods on ActiveContext.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #activeContexts(java.util.Collection)
      • sessionAttributes

        SessionState.Builder sessionAttributes​(Map<String,​String> sessionAttributes)

        Map of key/value pairs representing session-specific context information. It contains application information passed between Amazon Lex V2 and a client application.

        Parameters:
        sessionAttributes - Map of key/value pairs representing session-specific context information. It contains application information passed between Amazon Lex V2 and a client application.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • originatingRequestId

        SessionState.Builder originatingRequestId​(String originatingRequestId)

        A unique identifier for a specific request.

        Parameters:
        originatingRequestId - A unique identifier for a specific request.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • runtimeHints

        SessionState.Builder runtimeHints​(RuntimeHints runtimeHints)

        Hints for phrases that a customer is likely to use for a slot. Amazon Lex V2 uses the hints to help determine the correct value of a slot.

        Parameters:
        runtimeHints - Hints for phrases that a customer is likely to use for a slot. Amazon Lex V2 uses the hints to help determine the correct value of a slot.
        Returns:
        Returns a reference to this object so that method calls can be chained together.