Interface CreateEventRequest.Builder

  • Method Details

    • spaceId

      The ID of the space that owns the event, for example sp-02864597b164.

      Parameters:
      spaceId - The ID of the space that owns the event, for example sp-02864597b164.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • actorId

      The ID of the actor (end user or agent) that the event belongs to.

      Parameters:
      actorId - The ID of the actor (end user or agent) that the event belongs to.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sessionId

      CreateEventRequest.Builder sessionId(String sessionId)

      The session the event belongs to. Send every event of one conversation with the same session ID, so that SUMMARY strategies summarize the conversation as one session. If you omit it, the service generates a session ID and returns it.

      Parameters:
      sessionId - The session the event belongs to. Send every event of one conversation with the same session ID, so that SUMMARY strategies summarize the conversation as one session. If you omit it, the service generates a session ID and returns it.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • eventTimestamp

      CreateEventRequest.Builder eventTimestamp(Instant eventTimestamp)

      When the event occurred. The default is the time that the service receives the request.

      Parameters:
      eventTimestamp - When the event occurred. The default is the time that the service receives the request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • payload

      The event content. Set exactly one union member.

      Parameters:
      payload - The event content. Set exactly one union member.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • payload

      The event content. Set exactly one union member.

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

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

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

      Metadata tags to store with the event. Memories derived from the event carry the same tags. Keys that begin with x-amz-, the keys documentS3Source and documentS3Url, and other keys that the service uses internally are reserved: a request that sets one fails with ValidationException, and the message names the key.

      A space can use at most 50 distinct metadata keys across all of its events and memories. A request that would add a key beyond that fails with ValidationException. Reuse an existing key instead.

      Parameters:
      metadata - Metadata tags to store with the event. Memories derived from the event carry the same tags. Keys that begin with x-amz-, the keys documentS3Source and documentS3Url, and other keys that the service uses internally are reserved: a request that sets one fails with ValidationException, and the message names the key.

      A space can use at most 50 distinct metadata keys across all of its events and memories. A request that would add a key beyond that fails with ValidationException. Reuse an existing key instead.

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

      CreateEventRequest.Builder clientToken(String clientToken)

      A unique, case-sensitive identifier that makes the request idempotent. Within 2 hours of the first request, a retry with the same token and the same request, including the same sessionId, returns the same event. If you omit sessionId, the service generates a new one on each attempt, so a retry fails with ConflictException. Reusing the token with different request content also fails with ConflictException. eventTimestamp isn't compared. After 2 hours, the token starts a new event.

      Parameters:
      clientToken - A unique, case-sensitive identifier that makes the request idempotent. Within 2 hours of the first request, a retry with the same token and the same request, including the same sessionId, returns the same event. If you omit sessionId, the service generates a new one on each attempt, so a retry fails with ConflictException. Reusing the token with different request content also fails with ConflictException. eventTimestamp isn't compared. After 2 hours, the token starts a new event.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • infer

      Specifies whether to extract memories from this event. The default is true. Set it to false to store the event without extraction: the service skips strategies that infer memories, and still indexes the event's turns for SearchEvents. A document submitted as a blob is still extracted.

      Parameters:
      infer - Specifies whether to extract memories from this event. The default is true. Set it to false to store the event without extraction: the service skips strategies that infer memories, and still indexes the event's turns for SearchEvents. A document submitted as a blob is still extracted.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      CreateEventRequest.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.