aws-sdk-bedrockagentruntime 1.126.0

AWS SDK for Agents for Amazon Bedrock Runtime
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteSessionInput {
    /// <p>The unique identifier for the session to be deleted. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
    pub session_identifier: ::std::option::Option<::std::string::String>,
}
impl DeleteSessionInput {
    /// <p>The unique identifier for the session to be deleted. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
    pub fn session_identifier(&self) -> ::std::option::Option<&str> {
        self.session_identifier.as_deref()
    }
}
impl DeleteSessionInput {
    /// Creates a new builder-style object to manufacture [`DeleteSessionInput`](crate::operation::delete_session::DeleteSessionInput).
    pub fn builder() -> crate::operation::delete_session::builders::DeleteSessionInputBuilder {
        crate::operation::delete_session::builders::DeleteSessionInputBuilder::default()
    }
}

/// A builder for [`DeleteSessionInput`](crate::operation::delete_session::DeleteSessionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteSessionInputBuilder {
    pub(crate) session_identifier: ::std::option::Option<::std::string::String>,
}
impl DeleteSessionInputBuilder {
    /// <p>The unique identifier for the session to be deleted. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
    /// This field is required.
    pub fn session_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.session_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the session to be deleted. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
    pub fn set_session_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.session_identifier = input;
        self
    }
    /// <p>The unique identifier for the session to be deleted. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
    pub fn get_session_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.session_identifier
    }
    /// Consumes the builder and constructs a [`DeleteSessionInput`](crate::operation::delete_session::DeleteSessionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_session::DeleteSessionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_session::DeleteSessionInput {
            session_identifier: self.session_identifier,
        })
    }
}