aws-sdk-inspector 1.99.0

AWS SDK for Amazon Inspector
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::remove_attributes_from_findings::_remove_attributes_from_findings_input::RemoveAttributesFromFindingsInputBuilder;

pub use crate::operation::remove_attributes_from_findings::_remove_attributes_from_findings_output::RemoveAttributesFromFindingsOutputBuilder;

impl crate::operation::remove_attributes_from_findings::builders::RemoveAttributesFromFindingsInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::remove_attributes_from_findings::RemoveAttributesFromFindingsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::remove_attributes_from_findings::RemoveAttributesFromFindingsError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.remove_attributes_from_findings();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `RemoveAttributesFromFindings`.
///
/// <p>Removes entire attributes (key and value pairs) from the findings that are specified by the ARNs of the findings where an attribute with the specified key exists.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct RemoveAttributesFromFindingsFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::remove_attributes_from_findings::builders::RemoveAttributesFromFindingsInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::remove_attributes_from_findings::RemoveAttributesFromFindingsOutput,
        crate::operation::remove_attributes_from_findings::RemoveAttributesFromFindingsError,
    > for RemoveAttributesFromFindingsFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::remove_attributes_from_findings::RemoveAttributesFromFindingsOutput,
            crate::operation::remove_attributes_from_findings::RemoveAttributesFromFindingsError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl RemoveAttributesFromFindingsFluentBuilder {
    /// Creates a new `RemoveAttributesFromFindingsFluentBuilder`.
    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 RemoveAttributesFromFindings as a reference.
    pub fn as_input(&self) -> &crate::operation::remove_attributes_from_findings::builders::RemoveAttributesFromFindingsInputBuilder {
        &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::remove_attributes_from_findings::RemoveAttributesFromFindingsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::remove_attributes_from_findings::RemoveAttributesFromFindingsError,
            ::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::remove_attributes_from_findings::RemoveAttributesFromFindings::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::remove_attributes_from_findings::RemoveAttributesFromFindings::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::remove_attributes_from_findings::RemoveAttributesFromFindingsOutput,
        crate::operation::remove_attributes_from_findings::RemoveAttributesFromFindingsError,
        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
    }
    ///
    /// Appends an item to `findingArns`.
    ///
    /// To override the contents of this collection use [`set_finding_arns`](Self::set_finding_arns).
    ///
    /// <p>The ARNs that specify the findings that you want to remove attributes from.</p>
    pub fn finding_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.finding_arns(input.into());
        self
    }
    /// <p>The ARNs that specify the findings that you want to remove attributes from.</p>
    pub fn set_finding_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_finding_arns(input);
        self
    }
    /// <p>The ARNs that specify the findings that you want to remove attributes from.</p>
    pub fn get_finding_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_finding_arns()
    }
    ///
    /// Appends an item to `attributeKeys`.
    ///
    /// To override the contents of this collection use [`set_attribute_keys`](Self::set_attribute_keys).
    ///
    /// <p>The array of attribute keys that you want to remove from specified findings.</p>
    pub fn attribute_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.attribute_keys(input.into());
        self
    }
    /// <p>The array of attribute keys that you want to remove from specified findings.</p>
    pub fn set_attribute_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_attribute_keys(input);
        self
    }
    /// <p>The array of attribute keys that you want to remove from specified findings.</p>
    pub fn get_attribute_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_attribute_keys()
    }
}