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 executions
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListExecutionsInput {
    /// The unique identifier for the agent space
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// The unique identifier of the task whose executions to retrieve
    pub task_id: ::std::option::Option<::std::string::String>,
    /// Maximum number of executions to return
    pub limit: ::std::option::Option<i32>,
    /// Token for pagination to retrieve the next set of results
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListExecutionsInput {
    /// The unique identifier for the agent space
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// The unique identifier of the task whose executions to retrieve
    pub fn task_id(&self) -> ::std::option::Option<&str> {
        self.task_id.as_deref()
    }
    /// Maximum number of executions to return
    pub fn limit(&self) -> ::std::option::Option<i32> {
        self.limit
    }
    /// Token for pagination to retrieve the next set of results
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ListExecutionsInput {
    /// Creates a new builder-style object to manufacture [`ListExecutionsInput`](crate::operation::list_executions::ListExecutionsInput).
    pub fn builder() -> crate::operation::list_executions::builders::ListExecutionsInputBuilder {
        crate::operation::list_executions::builders::ListExecutionsInputBuilder::default()
    }
}

/// A builder for [`ListExecutionsInput`](crate::operation::list_executions::ListExecutionsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListExecutionsInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) task_id: ::std::option::Option<::std::string::String>,
    pub(crate) limit: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListExecutionsInputBuilder {
    /// The unique identifier for the agent space
    /// 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 unique identifier for the agent space
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// The unique identifier for the agent space
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// The unique identifier of the task whose executions to retrieve
    /// This field is required.
    pub fn task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique identifier of the task whose executions to retrieve
    pub fn set_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_id = input;
        self
    }
    /// The unique identifier of the task whose executions to retrieve
    pub fn get_task_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_id
    }
    /// Maximum number of executions to return
    pub fn limit(mut self, input: i32) -> Self {
        self.limit = ::std::option::Option::Some(input);
        self
    }
    /// Maximum number of executions to return
    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.limit = input;
        self
    }
    /// Maximum number of executions to return
    pub fn get_limit(&self) -> &::std::option::Option<i32> {
        &self.limit
    }
    /// Token for pagination to retrieve the next set of results
    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 to retrieve the next set of results
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// Token for pagination to retrieve the next set of results
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`ListExecutionsInput`](crate::operation::list_executions::ListExecutionsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_executions::ListExecutionsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_executions::ListExecutionsInput {
            agent_space_id: self.agent_space_id,
            task_id: self.task_id,
            limit: self.limit,
            next_token: self.next_token,
        })
    }
}