aws-sdk-networkfirewall 1.111.0

AWS SDK for AWS Network Firewall
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::describe_rule_group_summary::_describe_rule_group_summary_input::DescribeRuleGroupSummaryInputBuilder;

pub use crate::operation::describe_rule_group_summary::_describe_rule_group_summary_output::DescribeRuleGroupSummaryOutputBuilder;

impl crate::operation::describe_rule_group_summary::builders::DescribeRuleGroupSummaryInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::describe_rule_group_summary::DescribeRuleGroupSummaryOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::describe_rule_group_summary::DescribeRuleGroupSummaryError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.describe_rule_group_summary();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `DescribeRuleGroupSummary`.
///
/// <p>Returns detailed information for a stateful rule group.</p>
/// <p>For active threat defense Amazon Web Services managed rule groups, this operation provides insight into the protections enabled by the rule group, based on Suricata rule metadata fields. Summaries are available for rule groups you manage and for active threat defense Amazon Web Services managed rule groups.</p>
/// <p>To modify how threat information appears in summaries, use the <code>SummaryConfiguration</code> parameter in <code>UpdateRuleGroup</code>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct DescribeRuleGroupSummaryFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::describe_rule_group_summary::builders::DescribeRuleGroupSummaryInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::describe_rule_group_summary::DescribeRuleGroupSummaryOutput,
        crate::operation::describe_rule_group_summary::DescribeRuleGroupSummaryError,
    > for DescribeRuleGroupSummaryFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::describe_rule_group_summary::DescribeRuleGroupSummaryOutput,
            crate::operation::describe_rule_group_summary::DescribeRuleGroupSummaryError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl DescribeRuleGroupSummaryFluentBuilder {
    /// Creates a new `DescribeRuleGroupSummaryFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the DescribeRuleGroupSummary as a reference.
    pub fn as_input(&self) -> &crate::operation::describe_rule_group_summary::builders::DescribeRuleGroupSummaryInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::describe_rule_group_summary::DescribeRuleGroupSummaryOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::describe_rule_group_summary::DescribeRuleGroupSummaryError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::describe_rule_group_summary::DescribeRuleGroupSummary::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::describe_rule_group_summary::DescribeRuleGroupSummary::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::describe_rule_group_summary::DescribeRuleGroupSummaryOutput,
        crate::operation::describe_rule_group_summary::DescribeRuleGroupSummaryError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The descriptive name of the rule group. You can't change the name of a rule group after you create it.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn rule_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.rule_group_name(input.into());
        self
    }
    /// <p>The descriptive name of the rule group. You can't change the name of a rule group after you create it.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn set_rule_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_rule_group_name(input);
        self
    }
    /// <p>The descriptive name of the rule group. You can't change the name of a rule group after you create it.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn get_rule_group_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_rule_group_name()
    }
    /// <p>Required. The Amazon Resource Name (ARN) of the rule group.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn rule_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.rule_group_arn(input.into());
        self
    }
    /// <p>Required. The Amazon Resource Name (ARN) of the rule group.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn set_rule_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_rule_group_arn(input);
        self
    }
    /// <p>Required. The Amazon Resource Name (ARN) of the rule group.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn get_rule_group_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_rule_group_arn()
    }
    /// <p>The type of rule group you want a summary for. This is a required field.</p>
    /// <p>Valid value: <code>STATEFUL</code></p>
    /// <p>Note that <code>STATELESS</code> exists but is not currently supported. If you provide <code>STATELESS</code>, an exception is returned.</p>
    pub fn r#type(mut self, input: crate::types::RuleGroupType) -> Self {
        self.inner = self.inner.r#type(input);
        self
    }
    /// <p>The type of rule group you want a summary for. This is a required field.</p>
    /// <p>Valid value: <code>STATEFUL</code></p>
    /// <p>Note that <code>STATELESS</code> exists but is not currently supported. If you provide <code>STATELESS</code>, an exception is returned.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::RuleGroupType>) -> Self {
        self.inner = self.inner.set_type(input);
        self
    }
    /// <p>The type of rule group you want a summary for. This is a required field.</p>
    /// <p>Valid value: <code>STATEFUL</code></p>
    /// <p>Note that <code>STATELESS</code> exists but is not currently supported. If you provide <code>STATELESS</code>, an exception is returned.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::RuleGroupType> {
        self.inner.get_type()
    }
}