aws-sdk-iot 1.112.0

AWS SDK for AWS IoT
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 DescribeAuditTaskOutput {
    /// <p>The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".</p>
    pub task_status: ::std::option::Option<crate::types::AuditTaskStatus>,
    /// <p>The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".</p>
    pub task_type: ::std::option::Option<crate::types::AuditTaskType>,
    /// <p>The time the audit started.</p>
    pub task_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Statistical information about the audit.</p>
    pub task_statistics: ::std::option::Option<crate::types::TaskStatistics>,
    /// <p>The name of the scheduled audit (only if the audit was a scheduled audit).</p>
    pub scheduled_audit_name: ::std::option::Option<::std::string::String>,
    /// <p>Detailed information about each check performed during this audit.</p>
    pub audit_details: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AuditCheckDetails>>,
    _request_id: Option<String>,
}
impl DescribeAuditTaskOutput {
    /// <p>The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".</p>
    pub fn task_status(&self) -> ::std::option::Option<&crate::types::AuditTaskStatus> {
        self.task_status.as_ref()
    }
    /// <p>The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".</p>
    pub fn task_type(&self) -> ::std::option::Option<&crate::types::AuditTaskType> {
        self.task_type.as_ref()
    }
    /// <p>The time the audit started.</p>
    pub fn task_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.task_start_time.as_ref()
    }
    /// <p>Statistical information about the audit.</p>
    pub fn task_statistics(&self) -> ::std::option::Option<&crate::types::TaskStatistics> {
        self.task_statistics.as_ref()
    }
    /// <p>The name of the scheduled audit (only if the audit was a scheduled audit).</p>
    pub fn scheduled_audit_name(&self) -> ::std::option::Option<&str> {
        self.scheduled_audit_name.as_deref()
    }
    /// <p>Detailed information about each check performed during this audit.</p>
    pub fn audit_details(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::AuditCheckDetails>> {
        self.audit_details.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeAuditTaskOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeAuditTaskOutput {
    /// Creates a new builder-style object to manufacture [`DescribeAuditTaskOutput`](crate::operation::describe_audit_task::DescribeAuditTaskOutput).
    pub fn builder() -> crate::operation::describe_audit_task::builders::DescribeAuditTaskOutputBuilder {
        crate::operation::describe_audit_task::builders::DescribeAuditTaskOutputBuilder::default()
    }
}

/// A builder for [`DescribeAuditTaskOutput`](crate::operation::describe_audit_task::DescribeAuditTaskOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeAuditTaskOutputBuilder {
    pub(crate) task_status: ::std::option::Option<crate::types::AuditTaskStatus>,
    pub(crate) task_type: ::std::option::Option<crate::types::AuditTaskType>,
    pub(crate) task_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) task_statistics: ::std::option::Option<crate::types::TaskStatistics>,
    pub(crate) scheduled_audit_name: ::std::option::Option<::std::string::String>,
    pub(crate) audit_details: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AuditCheckDetails>>,
    _request_id: Option<String>,
}
impl DescribeAuditTaskOutputBuilder {
    /// <p>The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".</p>
    pub fn task_status(mut self, input: crate::types::AuditTaskStatus) -> Self {
        self.task_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".</p>
    pub fn set_task_status(mut self, input: ::std::option::Option<crate::types::AuditTaskStatus>) -> Self {
        self.task_status = input;
        self
    }
    /// <p>The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".</p>
    pub fn get_task_status(&self) -> &::std::option::Option<crate::types::AuditTaskStatus> {
        &self.task_status
    }
    /// <p>The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".</p>
    pub fn task_type(mut self, input: crate::types::AuditTaskType) -> Self {
        self.task_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".</p>
    pub fn set_task_type(mut self, input: ::std::option::Option<crate::types::AuditTaskType>) -> Self {
        self.task_type = input;
        self
    }
    /// <p>The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".</p>
    pub fn get_task_type(&self) -> &::std::option::Option<crate::types::AuditTaskType> {
        &self.task_type
    }
    /// <p>The time the audit started.</p>
    pub fn task_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.task_start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time the audit started.</p>
    pub fn set_task_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.task_start_time = input;
        self
    }
    /// <p>The time the audit started.</p>
    pub fn get_task_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.task_start_time
    }
    /// <p>Statistical information about the audit.</p>
    pub fn task_statistics(mut self, input: crate::types::TaskStatistics) -> Self {
        self.task_statistics = ::std::option::Option::Some(input);
        self
    }
    /// <p>Statistical information about the audit.</p>
    pub fn set_task_statistics(mut self, input: ::std::option::Option<crate::types::TaskStatistics>) -> Self {
        self.task_statistics = input;
        self
    }
    /// <p>Statistical information about the audit.</p>
    pub fn get_task_statistics(&self) -> &::std::option::Option<crate::types::TaskStatistics> {
        &self.task_statistics
    }
    /// <p>The name of the scheduled audit (only if the audit was a scheduled audit).</p>
    pub fn scheduled_audit_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.scheduled_audit_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the scheduled audit (only if the audit was a scheduled audit).</p>
    pub fn set_scheduled_audit_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.scheduled_audit_name = input;
        self
    }
    /// <p>The name of the scheduled audit (only if the audit was a scheduled audit).</p>
    pub fn get_scheduled_audit_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.scheduled_audit_name
    }
    /// Adds a key-value pair to `audit_details`.
    ///
    /// To override the contents of this collection use [`set_audit_details`](Self::set_audit_details).
    ///
    /// <p>Detailed information about each check performed during this audit.</p>
    pub fn audit_details(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AuditCheckDetails) -> Self {
        let mut hash_map = self.audit_details.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.audit_details = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Detailed information about each check performed during this audit.</p>
    pub fn set_audit_details(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AuditCheckDetails>>,
    ) -> Self {
        self.audit_details = input;
        self
    }
    /// <p>Detailed information about each check performed during this audit.</p>
    pub fn get_audit_details(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AuditCheckDetails>> {
        &self.audit_details
    }
    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 [`DescribeAuditTaskOutput`](crate::operation::describe_audit_task::DescribeAuditTaskOutput).
    pub fn build(self) -> crate::operation::describe_audit_task::DescribeAuditTaskOutput {
        crate::operation::describe_audit_task::DescribeAuditTaskOutput {
            task_status: self.task_status,
            task_type: self.task_type,
            task_start_time: self.task_start_time,
            task_statistics: self.task_statistics,
            scheduled_audit_name: self.scheduled_audit_name,
            audit_details: self.audit_details,
            _request_id: self._request_id,
        }
    }
}