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 DescribeExecutionOutput {
    /// <p>The ID of the task being executed on the device.</p>
    #[doc(hidden)]
    pub task_id: std::option::Option<std::string::String>,
    /// <p>The ID of the execution.</p>
    #[doc(hidden)]
    pub execution_id: std::option::Option<std::string::String>,
    /// <p>The ID of the managed device that the task is being executed on.</p>
    #[doc(hidden)]
    pub managed_device_id: std::option::Option<std::string::String>,
    /// <p>The current state of the execution.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::types::ExecutionState>,
    /// <p>When the execution began.</p>
    #[doc(hidden)]
    pub started_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>When the status of the execution was last updated.</p>
    #[doc(hidden)]
    pub last_updated_at: std::option::Option<aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl DescribeExecutionOutput {
    /// <p>The ID of the task being executed on the device.</p>
    pub fn task_id(&self) -> std::option::Option<&str> {
        self.task_id.as_deref()
    }
    /// <p>The ID of the execution.</p>
    pub fn execution_id(&self) -> std::option::Option<&str> {
        self.execution_id.as_deref()
    }
    /// <p>The ID of the managed device that the task is being executed on.</p>
    pub fn managed_device_id(&self) -> std::option::Option<&str> {
        self.managed_device_id.as_deref()
    }
    /// <p>The current state of the execution.</p>
    pub fn state(&self) -> std::option::Option<&crate::types::ExecutionState> {
        self.state.as_ref()
    }
    /// <p>When the execution began.</p>
    pub fn started_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.started_at.as_ref()
    }
    /// <p>When the status of the execution was last updated.</p>
    pub fn last_updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.last_updated_at.as_ref()
    }
}
impl aws_http::request_id::RequestId for DescribeExecutionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeExecutionOutput {
    /// Creates a new builder-style object to manufacture [`DescribeExecutionOutput`](crate::operation::describe_execution::DescribeExecutionOutput).
    pub fn builder(
    ) -> crate::operation::describe_execution::builders::DescribeExecutionOutputBuilder {
        crate::operation::describe_execution::builders::DescribeExecutionOutputBuilder::default()
    }
}

/// A builder for [`DescribeExecutionOutput`](crate::operation::describe_execution::DescribeExecutionOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DescribeExecutionOutputBuilder {
    pub(crate) task_id: std::option::Option<std::string::String>,
    pub(crate) execution_id: std::option::Option<std::string::String>,
    pub(crate) managed_device_id: std::option::Option<std::string::String>,
    pub(crate) state: std::option::Option<crate::types::ExecutionState>,
    pub(crate) started_at: std::option::Option<aws_smithy_types::DateTime>,
    pub(crate) last_updated_at: std::option::Option<aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl DescribeExecutionOutputBuilder {
    /// <p>The ID of the task being executed on the device.</p>
    pub fn task_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.task_id = Some(input.into());
        self
    }
    /// <p>The ID of the task being executed on the device.</p>
    pub fn set_task_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.task_id = input;
        self
    }
    /// <p>The ID of the execution.</p>
    pub fn execution_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.execution_id = Some(input.into());
        self
    }
    /// <p>The ID of the execution.</p>
    pub fn set_execution_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.execution_id = input;
        self
    }
    /// <p>The ID of the managed device that the task is being executed on.</p>
    pub fn managed_device_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.managed_device_id = Some(input.into());
        self
    }
    /// <p>The ID of the managed device that the task is being executed on.</p>
    pub fn set_managed_device_id(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.managed_device_id = input;
        self
    }
    /// <p>The current state of the execution.</p>
    pub fn state(mut self, input: crate::types::ExecutionState) -> Self {
        self.state = Some(input);
        self
    }
    /// <p>The current state of the execution.</p>
    pub fn set_state(mut self, input: std::option::Option<crate::types::ExecutionState>) -> Self {
        self.state = input;
        self
    }
    /// <p>When the execution began.</p>
    pub fn started_at(mut self, input: aws_smithy_types::DateTime) -> Self {
        self.started_at = Some(input);
        self
    }
    /// <p>When the execution began.</p>
    pub fn set_started_at(
        mut self,
        input: std::option::Option<aws_smithy_types::DateTime>,
    ) -> Self {
        self.started_at = input;
        self
    }
    /// <p>When the status of the execution was last updated.</p>
    pub fn last_updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
        self.last_updated_at = Some(input);
        self
    }
    /// <p>When the status of the execution was last updated.</p>
    pub fn set_last_updated_at(
        mut self,
        input: std::option::Option<aws_smithy_types::DateTime>,
    ) -> Self {
        self.last_updated_at = 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 [`DescribeExecutionOutput`](crate::operation::describe_execution::DescribeExecutionOutput).
    pub fn build(self) -> crate::operation::describe_execution::DescribeExecutionOutput {
        crate::operation::describe_execution::DescribeExecutionOutput {
            task_id: self.task_id,
            execution_id: self.execution_id,
            managed_device_id: self.managed_device_id,
            state: self.state,
            started_at: self.started_at,
            last_updated_at: self.last_updated_at,
            _request_id: self._request_id,
        }
    }
}