// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreateEvent`](crate::operation::create_event::builders::CreateEventFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`space_id(impl Into<String>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::space_id) / [`set_space_id(Option<String>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::set_space_id):<br>required: **true**<br><p>The ID of the space that owns the event, for example <code>sp-02864597b164</code>.</p><br>
/// - [`actor_id(impl Into<String>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::actor_id) / [`set_actor_id(Option<String>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::set_actor_id):<br>required: **true**<br><p>The ID of the actor (end user or agent) that the event belongs to.</p><br>
/// - [`session_id(impl Into<String>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::session_id) / [`set_session_id(Option<String>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::set_session_id):<br>required: **false**<br><p>The session the event belongs to. Send every event of one conversation with the same session ID, so that <code>SUMMARY</code> strategies summarize the conversation as one session. If you omit it, the service generates a session ID and returns it.</p><br>
/// - [`event_timestamp(DateTime)`](crate::operation::create_event::builders::CreateEventFluentBuilder::event_timestamp) / [`set_event_timestamp(Option<DateTime>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::set_event_timestamp):<br>required: **false**<br><p>When the event occurred. The default is the time that the service receives the request.</p><br>
/// - [`payload(EventPayload)`](crate::operation::create_event::builders::CreateEventFluentBuilder::payload) / [`set_payload(Option<EventPayload>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::set_payload):<br>required: **true**<br><p>The event content. Set exactly one union member.</p><br>
/// - [`metadata(impl Into<String>, impl Into<String>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::metadata) / [`set_metadata(Option<HashMap::<String, String>>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::set_metadata):<br>required: **false**<br><p>Metadata tags to store with the event. Memories derived from the event carry the same tags. Keys that begin with <code>x-amz-</code>, the keys <code>documentS3Source</code> and <code>documentS3Url</code>, and other keys that the service uses internally are reserved: a request that sets one fails with <code>ValidationException</code>, and the message names the key.</p> <p>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 <code>ValidationException</code>. Reuse an existing key instead.</p><br>
/// - [`client_token(impl Into<String>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::set_client_token):<br>required: **false**<br><p>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 <code>sessionId</code>, returns the same event. If you omit <code>sessionId</code>, the service generates a new one on each attempt, so a retry fails with <code>ConflictException</code>. Reusing the token with different request content also fails with <code>ConflictException</code>. <code>eventTimestamp</code> isn't compared. After 2 hours, the token starts a new event.</p><br>
/// - [`infer(bool)`](crate::operation::create_event::builders::CreateEventFluentBuilder::infer) / [`set_infer(Option<bool>)`](crate::operation::create_event::builders::CreateEventFluentBuilder::set_infer):<br>required: **false**<br><p>Specifies whether to extract memories from this event. The default is <code>true</code>. Set it to <code>false</code> to store the event without extraction: the service skips strategies that infer memories, and still indexes the event's turns for <code>SearchEvents</code>. A document submitted as a <code>blob</code> is still extracted.</p><br>
/// - On success, responds with [`CreateEventOutput`](crate::operation::create_event::CreateEventOutput) with field(s):
/// - [`event(Option<EventDetail>)`](crate::operation::create_event::CreateEventOutput::event): <p>The stored event's identifiers: its ID, session, and timestamp.</p>
/// - On failure, responds with [`SdkError<CreateEventError>`](crate::operation::create_event::CreateEventError)
pub fn create_event(&self) -> crate::operation::create_event::builders::CreateEventFluentBuilder {
crate::operation::create_event::builders::CreateEventFluentBuilder::new(self.handle.clone())
}
}