aws-sdk-accessanalyzer 1.106.0

AWS SDK for Access Analyzer
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The response to the request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetArchiveRuleOutput {
    /// <p>Contains information about an archive rule. Archive rules automatically archive new findings that meet the criteria you define when you create the rule.</p>
    pub archive_rule: ::std::option::Option<crate::types::ArchiveRuleSummary>,
    _request_id: Option<String>,
}
impl GetArchiveRuleOutput {
    /// <p>Contains information about an archive rule. Archive rules automatically archive new findings that meet the criteria you define when you create the rule.</p>
    pub fn archive_rule(&self) -> ::std::option::Option<&crate::types::ArchiveRuleSummary> {
        self.archive_rule.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetArchiveRuleOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetArchiveRuleOutput {
    /// Creates a new builder-style object to manufacture [`GetArchiveRuleOutput`](crate::operation::get_archive_rule::GetArchiveRuleOutput).
    pub fn builder() -> crate::operation::get_archive_rule::builders::GetArchiveRuleOutputBuilder {
        crate::operation::get_archive_rule::builders::GetArchiveRuleOutputBuilder::default()
    }
}

/// A builder for [`GetArchiveRuleOutput`](crate::operation::get_archive_rule::GetArchiveRuleOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetArchiveRuleOutputBuilder {
    pub(crate) archive_rule: ::std::option::Option<crate::types::ArchiveRuleSummary>,
    _request_id: Option<String>,
}
impl GetArchiveRuleOutputBuilder {
    /// <p>Contains information about an archive rule. Archive rules automatically archive new findings that meet the criteria you define when you create the rule.</p>
    /// This field is required.
    pub fn archive_rule(mut self, input: crate::types::ArchiveRuleSummary) -> Self {
        self.archive_rule = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains information about an archive rule. Archive rules automatically archive new findings that meet the criteria you define when you create the rule.</p>
    pub fn set_archive_rule(mut self, input: ::std::option::Option<crate::types::ArchiveRuleSummary>) -> Self {
        self.archive_rule = input;
        self
    }
    /// <p>Contains information about an archive rule. Archive rules automatically archive new findings that meet the criteria you define when you create the rule.</p>
    pub fn get_archive_rule(&self) -> &::std::option::Option<crate::types::ArchiveRuleSummary> {
        &self.archive_rule
    }
    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 [`GetArchiveRuleOutput`](crate::operation::get_archive_rule::GetArchiveRuleOutput).
    pub fn build(self) -> crate::operation::get_archive_rule::GetArchiveRuleOutput {
        crate::operation::get_archive_rule::GetArchiveRuleOutput {
            archive_rule: self.archive_rule,
            _request_id: self._request_id,
        }
    }
}