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 listing chats
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListChatsInput {
    /// Unique identifier for an agent space (allows alphanumeric characters and hyphens; 1-64 characters)
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// The user identifier to list chats for. 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>,
    /// Maximum number of results to return
    pub max_results: ::std::option::Option<i32>,
    /// Token for pagination
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListChatsInput {
    /// Unique identifier for an agent space (allows alphanumeric characters and hyphens; 1-64 characters)
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// The user identifier to list chats for. 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()
    }
    /// Maximum number of results to return
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// Token for pagination
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ListChatsInput {
    /// Creates a new builder-style object to manufacture [`ListChatsInput`](crate::operation::list_chats::ListChatsInput).
    pub fn builder() -> crate::operation::list_chats::builders::ListChatsInputBuilder {
        crate::operation::list_chats::builders::ListChatsInputBuilder::default()
    }
}

/// A builder for [`ListChatsInput`](crate::operation::list_chats::ListChatsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListChatsInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) user_id: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListChatsInputBuilder {
    /// Unique identifier for an agent space (allows alphanumeric characters and hyphens; 1-64 characters)
    /// 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
    }
    /// Unique identifier for an agent space (allows alphanumeric characters and hyphens; 1-64 characters)
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// Unique identifier for an agent space (allows alphanumeric characters and hyphens; 1-64 characters)
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// The user identifier to list chats for. 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
    }
    /// The user identifier to list chats for. 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
    }
    /// The user identifier to list chats for. 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
    }
    /// Maximum number of results to return
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// Maximum number of results to return
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// Maximum number of results to return
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Token for pagination
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// Token for pagination
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// Token for pagination
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`ListChatsInput`](crate::operation::list_chats::ListChatsInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::list_chats::ListChatsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_chats::ListChatsInput {
            agent_space_id: self.agent_space_id,
            user_id: self.user_id,
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}