aws-sdk-snowdevicemanagement 0.26.0

AWS SDK for AWS Snow Device Management
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 ListExecutionsOutput {
    /// <p>A list of executions. Each execution contains the task ID, the device that the task is executing on, the execution ID, and the status of the execution.</p>
    #[doc(hidden)]
    pub executions: std::option::Option<std::vec::Vec<crate::types::ExecutionSummary>>,
    /// <p>A pagination token to continue to the next page of executions.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListExecutionsOutput {
    /// <p>A list of executions. Each execution contains the task ID, the device that the task is executing on, the execution ID, and the status of the execution.</p>
    pub fn executions(&self) -> std::option::Option<&[crate::types::ExecutionSummary]> {
        self.executions.as_deref()
    }
    /// <p>A pagination token to continue to the next page of executions.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl aws_http::request_id::RequestId for ListExecutionsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListExecutionsOutput {
    /// Creates a new builder-style object to manufacture [`ListExecutionsOutput`](crate::operation::list_executions::ListExecutionsOutput).
    pub fn builder() -> crate::operation::list_executions::builders::ListExecutionsOutputBuilder {
        crate::operation::list_executions::builders::ListExecutionsOutputBuilder::default()
    }
}

/// A builder for [`ListExecutionsOutput`](crate::operation::list_executions::ListExecutionsOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ListExecutionsOutputBuilder {
    pub(crate) executions: std::option::Option<std::vec::Vec<crate::types::ExecutionSummary>>,
    pub(crate) next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListExecutionsOutputBuilder {
    /// Appends an item to `executions`.
    ///
    /// To override the contents of this collection use [`set_executions`](Self::set_executions).
    ///
    /// <p>A list of executions. Each execution contains the task ID, the device that the task is executing on, the execution ID, and the status of the execution.</p>
    pub fn executions(mut self, input: crate::types::ExecutionSummary) -> Self {
        let mut v = self.executions.unwrap_or_default();
        v.push(input);
        self.executions = Some(v);
        self
    }
    /// <p>A list of executions. Each execution contains the task ID, the device that the task is executing on, the execution ID, and the status of the execution.</p>
    pub fn set_executions(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::ExecutionSummary>>,
    ) -> Self {
        self.executions = input;
        self
    }
    /// <p>A pagination token to continue to the next page of executions.</p>
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.next_token = Some(input.into());
        self
    }
    /// <p>A pagination token to continue to the next page of executions.</p>
    pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`ListExecutionsOutput`](crate::operation::list_executions::ListExecutionsOutput).
    pub fn build(self) -> crate::operation::list_executions::ListExecutionsOutput {
        crate::operation::list_executions::ListExecutionsOutput {
            executions: self.executions,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}