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>Deletes an archive rule.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteArchiveRuleInput {
    /// <p>The name of the analyzer that associated with the archive rule to delete.</p>
    pub analyzer_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the rule to delete.</p>
    pub rule_name: ::std::option::Option<::std::string::String>,
    /// <p>A client token.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl DeleteArchiveRuleInput {
    /// <p>The name of the analyzer that associated with the archive rule to delete.</p>
    pub fn analyzer_name(&self) -> ::std::option::Option<&str> {
        self.analyzer_name.as_deref()
    }
    /// <p>The name of the rule to delete.</p>
    pub fn rule_name(&self) -> ::std::option::Option<&str> {
        self.rule_name.as_deref()
    }
    /// <p>A client token.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl DeleteArchiveRuleInput {
    /// Creates a new builder-style object to manufacture [`DeleteArchiveRuleInput`](crate::operation::delete_archive_rule::DeleteArchiveRuleInput).
    pub fn builder() -> crate::operation::delete_archive_rule::builders::DeleteArchiveRuleInputBuilder {
        crate::operation::delete_archive_rule::builders::DeleteArchiveRuleInputBuilder::default()
    }
}

/// A builder for [`DeleteArchiveRuleInput`](crate::operation::delete_archive_rule::DeleteArchiveRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteArchiveRuleInputBuilder {
    pub(crate) analyzer_name: ::std::option::Option<::std::string::String>,
    pub(crate) rule_name: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl DeleteArchiveRuleInputBuilder {
    /// <p>The name of the analyzer that associated with the archive rule to delete.</p>
    /// This field is required.
    pub fn analyzer_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.analyzer_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the analyzer that associated with the archive rule to delete.</p>
    pub fn set_analyzer_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.analyzer_name = input;
        self
    }
    /// <p>The name of the analyzer that associated with the archive rule to delete.</p>
    pub fn get_analyzer_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.analyzer_name
    }
    /// <p>The name of the rule to delete.</p>
    /// This field is required.
    pub fn rule_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the rule to delete.</p>
    pub fn set_rule_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_name = input;
        self
    }
    /// <p>The name of the rule to delete.</p>
    pub fn get_rule_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_name
    }
    /// <p>A client token.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A client token.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A client token.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`DeleteArchiveRuleInput`](crate::operation::delete_archive_rule::DeleteArchiveRuleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_archive_rule::DeleteArchiveRuleInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_archive_rule::DeleteArchiveRuleInput {
            analyzer_name: self.analyzer_name,
            rule_name: self.rule_name,
            client_token: self.client_token,
        })
    }
}