aws-sdk-b2bi 1.37.0

AWS SDK for AWS B2B Data Interchange
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_capability::_update_capability_output::UpdateCapabilityOutputBuilder;

pub use crate::operation::update_capability::_update_capability_input::UpdateCapabilityInputBuilder;

impl crate::operation::update_capability::builders::UpdateCapabilityInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_capability::UpdateCapabilityOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_capability::UpdateCapabilityError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_capability();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateCapability`.
///
/// <p>Updates some of the parameters for a capability, based on the specified parameters. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateCapabilityFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_capability::builders::UpdateCapabilityInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_capability::UpdateCapabilityOutput,
        crate::operation::update_capability::UpdateCapabilityError,
    > for UpdateCapabilityFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_capability::UpdateCapabilityOutput,
            crate::operation::update_capability::UpdateCapabilityError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateCapabilityFluentBuilder {
    /// Creates a new `UpdateCapabilityFluentBuilder`.
    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 UpdateCapability as a reference.
    pub fn as_input(&self) -> &crate::operation::update_capability::builders::UpdateCapabilityInputBuilder {
        &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::update_capability::UpdateCapabilityOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_capability::UpdateCapabilityError,
            ::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::update_capability::UpdateCapability::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_capability::UpdateCapability::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::update_capability::UpdateCapabilityOutput,
        crate::operation::update_capability::UpdateCapabilityError,
        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>Specifies a system-assigned unique identifier for the capability.</p>
    pub fn capability_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.capability_id(input.into());
        self
    }
    /// <p>Specifies a system-assigned unique identifier for the capability.</p>
    pub fn set_capability_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_capability_id(input);
        self
    }
    /// <p>Specifies a system-assigned unique identifier for the capability.</p>
    pub fn get_capability_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_capability_id()
    }
    /// <p>Specifies a new name for the capability, to replace the existing name.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>Specifies a new name for the capability, to replace the existing name.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>Specifies a new name for the capability, to replace the existing name.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>Specifies a structure that contains the details for a capability.</p>
    pub fn configuration(mut self, input: crate::types::CapabilityConfiguration) -> Self {
        self.inner = self.inner.configuration(input);
        self
    }
    /// <p>Specifies a structure that contains the details for a capability.</p>
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::CapabilityConfiguration>) -> Self {
        self.inner = self.inner.set_configuration(input);
        self
    }
    /// <p>Specifies a structure that contains the details for a capability.</p>
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::CapabilityConfiguration> {
        self.inner.get_configuration()
    }
    ///
    /// Appends an item to `instructionsDocuments`.
    ///
    /// To override the contents of this collection use [`set_instructions_documents`](Self::set_instructions_documents).
    ///
    /// <p>Specifies one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document's location.</p>
    pub fn instructions_documents(mut self, input: crate::types::S3Location) -> Self {
        self.inner = self.inner.instructions_documents(input);
        self
    }
    /// <p>Specifies one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document's location.</p>
    pub fn set_instructions_documents(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::S3Location>>) -> Self {
        self.inner = self.inner.set_instructions_documents(input);
        self
    }
    /// <p>Specifies one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document's location.</p>
    pub fn get_instructions_documents(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::S3Location>> {
        self.inner.get_instructions_documents()
    }
}