aws-sdk-devopsagent 1.4.0

AWS SDK for AWS DevOps Agent Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Request structure for sending a chat message
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SendMessageInput {
    /// The agent space identifier
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// The execution identifier for the chat session
    pub execution_id: ::std::option::Option<::std::string::String>,
    /// The user message content
    pub content: ::std::option::Option<::std::string::String>,
    /// Optional context for the message
    pub context: ::std::option::Option<crate::types::SendMessageContext>,
    /// User identifier. This field is deprecated and will be ignored — the service resolves user identity from the authenticated session.
    #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
    pub user_id: ::std::option::Option<::std::string::String>,
}
impl SendMessageInput {
    /// The agent space identifier
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// The execution identifier for the chat session
    pub fn execution_id(&self) -> ::std::option::Option<&str> {
        self.execution_id.as_deref()
    }
    /// The user message content
    pub fn content(&self) -> ::std::option::Option<&str> {
        self.content.as_deref()
    }
    /// Optional context for the message
    pub fn context(&self) -> ::std::option::Option<&crate::types::SendMessageContext> {
        self.context.as_ref()
    }
    /// User identifier. This field is deprecated and will be ignored — the service resolves user identity from the authenticated session.
    #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
    pub fn user_id(&self) -> ::std::option::Option<&str> {
        self.user_id.as_deref()
    }
}
impl SendMessageInput {
    /// Creates a new builder-style object to manufacture [`SendMessageInput`](crate::operation::send_message::SendMessageInput).
    pub fn builder() -> crate::operation::send_message::builders::SendMessageInputBuilder {
        crate::operation::send_message::builders::SendMessageInputBuilder::default()
    }
}

/// A builder for [`SendMessageInput`](crate::operation::send_message::SendMessageInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SendMessageInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) execution_id: ::std::option::Option<::std::string::String>,
    pub(crate) content: ::std::option::Option<::std::string::String>,
    pub(crate) context: ::std::option::Option<crate::types::SendMessageContext>,
    pub(crate) user_id: ::std::option::Option<::std::string::String>,
}
impl SendMessageInputBuilder {
    /// The agent space identifier
    /// This field is required.
    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The agent space identifier
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// The agent space identifier
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// The execution identifier for the chat session
    /// This field is required.
    pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.execution_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The execution identifier for the chat session
    pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.execution_id = input;
        self
    }
    /// The execution identifier for the chat session
    pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.execution_id
    }
    /// The user message content
    /// This field is required.
    pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.content = ::std::option::Option::Some(input.into());
        self
    }
    /// The user message content
    pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.content = input;
        self
    }
    /// The user message content
    pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
        &self.content
    }
    /// Optional context for the message
    pub fn context(mut self, input: crate::types::SendMessageContext) -> Self {
        self.context = ::std::option::Option::Some(input);
        self
    }
    /// Optional context for the message
    pub fn set_context(mut self, input: ::std::option::Option<crate::types::SendMessageContext>) -> Self {
        self.context = input;
        self
    }
    /// Optional context for the message
    pub fn get_context(&self) -> &::std::option::Option<crate::types::SendMessageContext> {
        &self.context
    }
    /// User identifier. This field is deprecated and will be ignored — the service resolves user identity from the authenticated session.
    #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_id = ::std::option::Option::Some(input.into());
        self
    }
    /// User identifier. This field is deprecated and will be ignored — the service resolves user identity from the authenticated session.
    #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_id = input;
        self
    }
    /// User identifier. This field is deprecated and will be ignored — the service resolves user identity from the authenticated session.
    #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_id
    }
    /// Consumes the builder and constructs a [`SendMessageInput`](crate::operation::send_message::SendMessageInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::send_message::SendMessageInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::send_message::SendMessageInput {
            agent_space_id: self.agent_space_id,
            execution_id: self.execution_id,
            content: self.content,
            context: self.context,
            user_id: self.user_id,
        })
    }
}