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 UpdateScheduledAuditInput {
    /// <p>How often the scheduled audit takes place, either <code>DAILY</code>, <code>WEEKLY</code>, <code>BIWEEKLY</code>, or <code>MONTHLY</code>. The start time of each audit is determined by the system.</p>
    pub frequency: ::std::option::Option<crate::types::AuditFrequency>,
    /// <p>The day of the month on which the scheduled audit takes place. This can be <code>1</code> through <code>31</code> or <code>LAST</code>. This field is required if the <code>frequency</code> parameter is set to <code>MONTHLY</code>. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.</p>
    pub day_of_month: ::std::option::Option<::std::string::String>,
    /// <p>The day of the week on which the scheduled audit takes place. This can be one of <code>SUN</code>, <code>MON</code>, <code>TUE</code>, <code>WED</code>, <code>THU</code>, <code>FRI</code>, or <code>SAT</code>. This field is required if the "frequency" parameter is set to <code>WEEKLY</code> or <code>BIWEEKLY</code>.</p>
    pub day_of_week: ::std::option::Option<crate::types::DayOfWeek>,
    /// <p>Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use <code>DescribeAccountAuditConfiguration</code> to see the list of all checks, including those that are enabled or use <code>UpdateAccountAuditConfiguration</code> to select which checks are enabled.)</p>
    pub target_check_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The name of the scheduled audit. (Max. 128 chars)</p>
    pub scheduled_audit_name: ::std::option::Option<::std::string::String>,
}
impl UpdateScheduledAuditInput {
    /// <p>How often the scheduled audit takes place, either <code>DAILY</code>, <code>WEEKLY</code>, <code>BIWEEKLY</code>, or <code>MONTHLY</code>. The start time of each audit is determined by the system.</p>
    pub fn frequency(&self) -> ::std::option::Option<&crate::types::AuditFrequency> {
        self.frequency.as_ref()
    }
    /// <p>The day of the month on which the scheduled audit takes place. This can be <code>1</code> through <code>31</code> or <code>LAST</code>. This field is required if the <code>frequency</code> parameter is set to <code>MONTHLY</code>. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.</p>
    pub fn day_of_month(&self) -> ::std::option::Option<&str> {
        self.day_of_month.as_deref()
    }
    /// <p>The day of the week on which the scheduled audit takes place. This can be one of <code>SUN</code>, <code>MON</code>, <code>TUE</code>, <code>WED</code>, <code>THU</code>, <code>FRI</code>, or <code>SAT</code>. This field is required if the "frequency" parameter is set to <code>WEEKLY</code> or <code>BIWEEKLY</code>.</p>
    pub fn day_of_week(&self) -> ::std::option::Option<&crate::types::DayOfWeek> {
        self.day_of_week.as_ref()
    }
    /// <p>Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use <code>DescribeAccountAuditConfiguration</code> to see the list of all checks, including those that are enabled or use <code>UpdateAccountAuditConfiguration</code> to select which checks are enabled.)</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_check_names.is_none()`.
    pub fn target_check_names(&self) -> &[::std::string::String] {
        self.target_check_names.as_deref().unwrap_or_default()
    }
    /// <p>The name of the scheduled audit. (Max. 128 chars)</p>
    pub fn scheduled_audit_name(&self) -> ::std::option::Option<&str> {
        self.scheduled_audit_name.as_deref()
    }
}
impl UpdateScheduledAuditInput {
    /// Creates a new builder-style object to manufacture [`UpdateScheduledAuditInput`](crate::operation::update_scheduled_audit::UpdateScheduledAuditInput).
    pub fn builder() -> crate::operation::update_scheduled_audit::builders::UpdateScheduledAuditInputBuilder {
        crate::operation::update_scheduled_audit::builders::UpdateScheduledAuditInputBuilder::default()
    }
}

/// A builder for [`UpdateScheduledAuditInput`](crate::operation::update_scheduled_audit::UpdateScheduledAuditInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateScheduledAuditInputBuilder {
    pub(crate) frequency: ::std::option::Option<crate::types::AuditFrequency>,
    pub(crate) day_of_month: ::std::option::Option<::std::string::String>,
    pub(crate) day_of_week: ::std::option::Option<crate::types::DayOfWeek>,
    pub(crate) target_check_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) scheduled_audit_name: ::std::option::Option<::std::string::String>,
}
impl UpdateScheduledAuditInputBuilder {
    /// <p>How often the scheduled audit takes place, either <code>DAILY</code>, <code>WEEKLY</code>, <code>BIWEEKLY</code>, or <code>MONTHLY</code>. The start time of each audit is determined by the system.</p>
    pub fn frequency(mut self, input: crate::types::AuditFrequency) -> Self {
        self.frequency = ::std::option::Option::Some(input);
        self
    }
    /// <p>How often the scheduled audit takes place, either <code>DAILY</code>, <code>WEEKLY</code>, <code>BIWEEKLY</code>, or <code>MONTHLY</code>. The start time of each audit is determined by the system.</p>
    pub fn set_frequency(mut self, input: ::std::option::Option<crate::types::AuditFrequency>) -> Self {
        self.frequency = input;
        self
    }
    /// <p>How often the scheduled audit takes place, either <code>DAILY</code>, <code>WEEKLY</code>, <code>BIWEEKLY</code>, or <code>MONTHLY</code>. The start time of each audit is determined by the system.</p>
    pub fn get_frequency(&self) -> &::std::option::Option<crate::types::AuditFrequency> {
        &self.frequency
    }
    /// <p>The day of the month on which the scheduled audit takes place. This can be <code>1</code> through <code>31</code> or <code>LAST</code>. This field is required if the <code>frequency</code> parameter is set to <code>MONTHLY</code>. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.</p>
    pub fn day_of_month(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.day_of_month = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The day of the month on which the scheduled audit takes place. This can be <code>1</code> through <code>31</code> or <code>LAST</code>. This field is required if the <code>frequency</code> parameter is set to <code>MONTHLY</code>. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.</p>
    pub fn set_day_of_month(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.day_of_month = input;
        self
    }
    /// <p>The day of the month on which the scheduled audit takes place. This can be <code>1</code> through <code>31</code> or <code>LAST</code>. This field is required if the <code>frequency</code> parameter is set to <code>MONTHLY</code>. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.</p>
    pub fn get_day_of_month(&self) -> &::std::option::Option<::std::string::String> {
        &self.day_of_month
    }
    /// <p>The day of the week on which the scheduled audit takes place. This can be one of <code>SUN</code>, <code>MON</code>, <code>TUE</code>, <code>WED</code>, <code>THU</code>, <code>FRI</code>, or <code>SAT</code>. This field is required if the "frequency" parameter is set to <code>WEEKLY</code> or <code>BIWEEKLY</code>.</p>
    pub fn day_of_week(mut self, input: crate::types::DayOfWeek) -> Self {
        self.day_of_week = ::std::option::Option::Some(input);
        self
    }
    /// <p>The day of the week on which the scheduled audit takes place. This can be one of <code>SUN</code>, <code>MON</code>, <code>TUE</code>, <code>WED</code>, <code>THU</code>, <code>FRI</code>, or <code>SAT</code>. This field is required if the "frequency" parameter is set to <code>WEEKLY</code> or <code>BIWEEKLY</code>.</p>
    pub fn set_day_of_week(mut self, input: ::std::option::Option<crate::types::DayOfWeek>) -> Self {
        self.day_of_week = input;
        self
    }
    /// <p>The day of the week on which the scheduled audit takes place. This can be one of <code>SUN</code>, <code>MON</code>, <code>TUE</code>, <code>WED</code>, <code>THU</code>, <code>FRI</code>, or <code>SAT</code>. This field is required if the "frequency" parameter is set to <code>WEEKLY</code> or <code>BIWEEKLY</code>.</p>
    pub fn get_day_of_week(&self) -> &::std::option::Option<crate::types::DayOfWeek> {
        &self.day_of_week
    }
    /// Appends an item to `target_check_names`.
    ///
    /// To override the contents of this collection use [`set_target_check_names`](Self::set_target_check_names).
    ///
    /// <p>Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use <code>DescribeAccountAuditConfiguration</code> to see the list of all checks, including those that are enabled or use <code>UpdateAccountAuditConfiguration</code> to select which checks are enabled.)</p>
    pub fn target_check_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.target_check_names.unwrap_or_default();
        v.push(input.into());
        self.target_check_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use <code>DescribeAccountAuditConfiguration</code> to see the list of all checks, including those that are enabled or use <code>UpdateAccountAuditConfiguration</code> to select which checks are enabled.)</p>
    pub fn set_target_check_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.target_check_names = input;
        self
    }
    /// <p>Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use <code>DescribeAccountAuditConfiguration</code> to see the list of all checks, including those that are enabled or use <code>UpdateAccountAuditConfiguration</code> to select which checks are enabled.)</p>
    pub fn get_target_check_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.target_check_names
    }
    /// <p>The name of the scheduled audit. (Max. 128 chars)</p>
    /// This field is required.
    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. (Max. 128 chars)</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. (Max. 128 chars)</p>
    pub fn get_scheduled_audit_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.scheduled_audit_name
    }
    /// Consumes the builder and constructs a [`UpdateScheduledAuditInput`](crate::operation::update_scheduled_audit::UpdateScheduledAuditInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_scheduled_audit::UpdateScheduledAuditInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_scheduled_audit::UpdateScheduledAuditInput {
            frequency: self.frequency,
            day_of_month: self.day_of_month,
            day_of_week: self.day_of_week,
            target_check_names: self.target_check_names,
            scheduled_audit_name: self.scheduled_audit_name,
        })
    }
}