aws-sdk-securityir 1.47.0

AWS SDK for Security Incident Response
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::send_feedback::_send_feedback_output::SendFeedbackOutputBuilder;

pub use crate::operation::send_feedback::_send_feedback_input::SendFeedbackInputBuilder;

impl crate::operation::send_feedback::builders::SendFeedbackInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::send_feedback::SendFeedbackOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::send_feedback::SendFeedbackError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.send_feedback();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `SendFeedback`.
///
/// <p>Send feedback based on response investigation action</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct SendFeedbackFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::send_feedback::builders::SendFeedbackInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::send_feedback::SendFeedbackOutput,
        crate::operation::send_feedback::SendFeedbackError,
    > for SendFeedbackFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::send_feedback::SendFeedbackOutput,
            crate::operation::send_feedback::SendFeedbackError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl SendFeedbackFluentBuilder {
    /// Creates a new `SendFeedbackFluentBuilder`.
    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 SendFeedback as a reference.
    pub fn as_input(&self) -> &crate::operation::send_feedback::builders::SendFeedbackInputBuilder {
        &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::send_feedback::SendFeedbackOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::send_feedback::SendFeedbackError,
            ::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::send_feedback::SendFeedback::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::send_feedback::SendFeedback::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::send_feedback::SendFeedbackOutput,
        crate::operation::send_feedback::SendFeedbackError,
        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>Send feedback based on request caseID</p>
    pub fn case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.case_id(input.into());
        self
    }
    /// <p>Send feedback based on request caseID</p>
    pub fn set_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_case_id(input);
        self
    }
    /// <p>Send feedback based on request caseID</p>
    pub fn get_case_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_case_id()
    }
    /// <p>Send feedback based on request result ID</p>
    pub fn result_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.result_id(input.into());
        self
    }
    /// <p>Send feedback based on request result ID</p>
    pub fn set_result_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_result_id(input);
        self
    }
    /// <p>Send feedback based on request result ID</p>
    pub fn get_result_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_result_id()
    }
    /// <p>Required enum value indicating user assessment of result q.....</p>
    pub fn usefulness(mut self, input: crate::types::UsefulnessRating) -> Self {
        self.inner = self.inner.usefulness(input);
        self
    }
    /// <p>Required enum value indicating user assessment of result q.....</p>
    pub fn set_usefulness(mut self, input: ::std::option::Option<crate::types::UsefulnessRating>) -> Self {
        self.inner = self.inner.set_usefulness(input);
        self
    }
    /// <p>Required enum value indicating user assessment of result q.....</p>
    pub fn get_usefulness(&self) -> &::std::option::Option<crate::types::UsefulnessRating> {
        self.inner.get_usefulness()
    }
    /// <p>Send feedback based on request comments</p>
    pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.comment(input.into());
        self
    }
    /// <p>Send feedback based on request comments</p>
    pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_comment(input);
        self
    }
    /// <p>Send feedback based on request comments</p>
    pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_comment()
    }
}