Interface PutSessionRequest.Builder

All Superinterfaces:
AwsRequest.Builder, Buildable, CopyableBuilder<PutSessionRequest.Builder,PutSessionRequest>, LexRuntimeRequest.Builder, SdkBuilder<PutSessionRequest.Builder,PutSessionRequest>, SdkPojo, SdkRequest.Builder
Enclosing class:
PutSessionRequest

public static interface PutSessionRequest.Builder extends LexRuntimeRequest.Builder, SdkPojo, CopyableBuilder<PutSessionRequest.Builder,PutSessionRequest>
  • Method Details

    • botName

      The name of the bot that contains the session data.

      Parameters:
      botName - The name of the bot that contains the session data.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • botAlias

      PutSessionRequest.Builder botAlias(String botAlias)

      The alias in use for the bot that contains the session data.

      Parameters:
      botAlias - The alias in use for the bot that contains the session data.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • userId

      The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.

      Parameters:
      userId - The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sessionAttributes

      PutSessionRequest.Builder sessionAttributes(Map<String,String> sessionAttributes)

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

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

      PutSessionRequest.Builder dialogAction(DialogAction dialogAction)

      Sets the next action that the bot should take to fulfill the conversation.

      Parameters:
      dialogAction - Sets the next action that the bot should take to fulfill the conversation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dialogAction

      default PutSessionRequest.Builder dialogAction(Consumer<DialogAction.Builder> dialogAction)

      Sets the next action that the bot should take to fulfill the conversation.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to dialogAction(DialogAction).

      Parameters:
      dialogAction - a consumer that will call methods on DialogAction.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • recentIntentSummaryView

      PutSessionRequest.Builder recentIntentSummaryView(Collection<IntentSummary> recentIntentSummaryView)

      A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.

      An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:

      • intentName

      • slot names

      • slotToElict

      If you send the recentIntentSummaryView parameter in a PutSession request, the contents of the new summary view replaces the old summary view. For example, if a GetSession request returns three intents in the summary view and you call PutSession with one intent in the summary view, the next call to GetSession will only return one intent.

      Parameters:
      recentIntentSummaryView - A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.

      An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:

      • intentName

      • slot names

      • slotToElict

      If you send the recentIntentSummaryView parameter in a PutSession request, the contents of the new summary view replaces the old summary view. For example, if a GetSession request returns three intents in the summary view and you call PutSession with one intent in the summary view, the next call to GetSession will only return one intent.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • recentIntentSummaryView

      PutSessionRequest.Builder recentIntentSummaryView(IntentSummary... recentIntentSummaryView)

      A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.

      An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:

      • intentName

      • slot names

      • slotToElict

      If you send the recentIntentSummaryView parameter in a PutSession request, the contents of the new summary view replaces the old summary view. For example, if a GetSession request returns three intents in the summary view and you call PutSession with one intent in the summary view, the next call to GetSession will only return one intent.

      Parameters:
      recentIntentSummaryView - A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.

      An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:

      • intentName

      • slot names

      • slotToElict

      If you send the recentIntentSummaryView parameter in a PutSession request, the contents of the new summary view replaces the old summary view. For example, if a GetSession request returns three intents in the summary view and you call PutSession with one intent in the summary view, the next call to GetSession will only return one intent.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • recentIntentSummaryView

      PutSessionRequest.Builder recentIntentSummaryView(Consumer<IntentSummary.Builder>... recentIntentSummaryView)

      A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.

      An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:

      • intentName

      • slot names

      • slotToElict

      If you send the recentIntentSummaryView parameter in a PutSession request, the contents of the new summary view replaces the old summary view. For example, if a GetSession request returns three intents in the summary view and you call PutSession with one intent in the summary view, the next call to GetSession will only return one intent.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to recentIntentSummaryView(List<IntentSummary>).

      Parameters:
      recentIntentSummaryView - a consumer that will call methods on IntentSummary.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • accept

      The message that Amazon Lex returns in the response can be either text or speech based depending on the value of this field.

      • If the value is text/plain; charset=utf-8, Amazon Lex returns text in the response.

      • If the value begins with audio/, Amazon Lex returns speech in the response. Amazon Lex uses Amazon Polly to generate the speech in the configuration that you specify. For example, if you specify audio/mpeg as the value, Amazon Lex returns speech in the MPEG format.

      • If the value is audio/pcm, the speech is returned as audio/pcm in 16-bit, little endian format.

      • The following are the accepted values:

        • audio/mpeg

        • audio/ogg

        • audio/pcm

        • audio/* (defaults to mpeg)

        • text/plain; charset=utf-8

      Parameters:
      accept - The message that Amazon Lex returns in the response can be either text or speech based depending on the value of this field.

      • If the value is text/plain; charset=utf-8, Amazon Lex returns text in the response.

      • If the value begins with audio/, Amazon Lex returns speech in the response. Amazon Lex uses Amazon Polly to generate the speech in the configuration that you specify. For example, if you specify audio/mpeg as the value, Amazon Lex returns speech in the MPEG format.

      • If the value is audio/pcm, the speech is returned as audio/pcm in 16-bit, little endian format.

      • The following are the accepted values:

        • audio/mpeg

        • audio/ogg

        • audio/pcm

        • audio/* (defaults to mpeg)

        • text/plain; charset=utf-8

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • activeContexts

      PutSessionRequest.Builder activeContexts(Collection<ActiveContext> activeContexts)

      A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request,

      If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.

      Parameters:
      activeContexts - A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request,

      If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • activeContexts

      PutSessionRequest.Builder activeContexts(ActiveContext... activeContexts)

      A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request,

      If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.

      Parameters:
      activeContexts - A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request,

      If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • activeContexts

      PutSessionRequest.Builder activeContexts(Consumer<ActiveContext.Builder>... activeContexts)

      A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request,

      If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.

      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<ActiveContext>).

      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:
    • overrideConfiguration

      PutSessionRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.