Interface CreateEventRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<CreateEventRequest.Builder,,CreateEventRequest> OpenSearchMemoryRequest.Builder,SdkBuilder<CreateEventRequest.Builder,,CreateEventRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
CreateEventRequest
-
Method Summary
Modifier and TypeMethodDescriptionThe ID of the actor (end user or agent) that the event belongs to.clientToken(String clientToken) A unique, case-sensitive identifier that makes the request idempotent.eventTimestamp(Instant eventTimestamp) When the event occurred.Specifies whether to extract memories from this event.Metadata tags to store with the event.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.default CreateEventRequest.Builderpayload(Consumer<EventPayload.Builder> payload) The event content.payload(EventPayload payload) The event content.The session the event belongs to.The ID of the space that owns the event, for examplesp-02864597b164.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.services.opensearchmemory.model.OpenSearchMemoryRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
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 examplesp-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
The session the event belongs to. Send every event of one conversation with the same session ID, so that
SUMMARYstrategies 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 thatSUMMARYstrategies 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
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 theEventPayload.Builderavoiding the need to create one manually viaEventPayload.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed topayload(EventPayload).- Parameters:
payload- a consumer that will call methods onEventPayload.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 keysdocumentS3SourceanddocumentS3Url, and other keys that the service uses internally are reserved: a request that sets one fails withValidationException, 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 withx-amz-, the keysdocumentS3SourceanddocumentS3Url, and other keys that the service uses internally are reserved: a request that sets one fails withValidationException, 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
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 omitsessionId, the service generates a new one on each attempt, so a retry fails withConflictException. Reusing the token with different request content also fails withConflictException.eventTimestampisn'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 samesessionId, returns the same event. If you omitsessionId, the service generates a new one on each attempt, so a retry fails withConflictException. Reusing the token with different request content also fails withConflictException.eventTimestampisn'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 tofalseto store the event without extraction: the service skips strategies that infer memories, and still indexes the event's turns forSearchEvents. A document submitted as ablobis still extracted.- Parameters:
infer- Specifies whether to extract memories from this event. The default istrue. Set it tofalseto store the event without extraction: the service skips strategies that infer memories, and still indexes the event's turns forSearchEvents. A document submitted as ablobis 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.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreateEventRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-