aws-sdk-appconfig 1.98.0

AWS SDK for Amazon AppConfig
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_extension::_update_extension_output::UpdateExtensionOutputBuilder;

pub use crate::operation::update_extension::_update_extension_input::UpdateExtensionInputBuilder;

impl crate::operation::update_extension::builders::UpdateExtensionInputBuilder {
    /// 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_extension::UpdateExtensionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_extension::UpdateExtensionError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_extension();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateExtension`.
///
/// <p>Updates an AppConfig extension. For more information about extensions, see <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/working-with-appconfig-extensions.html">Extending workflows</a> in the <i>AppConfig User Guide</i>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateExtensionFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_extension::builders::UpdateExtensionInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_extension::UpdateExtensionOutput,
        crate::operation::update_extension::UpdateExtensionError,
    > for UpdateExtensionFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_extension::UpdateExtensionOutput,
            crate::operation::update_extension::UpdateExtensionError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateExtensionFluentBuilder {
    /// Creates a new `UpdateExtensionFluentBuilder`.
    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 UpdateExtension as a reference.
    pub fn as_input(&self) -> &crate::operation::update_extension::builders::UpdateExtensionInputBuilder {
        &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_extension::UpdateExtensionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_extension::UpdateExtensionError,
            ::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_extension::UpdateExtension::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_extension::UpdateExtension::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_extension::UpdateExtensionOutput,
        crate::operation::update_extension::UpdateExtensionError,
        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 name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
    pub fn extension_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.extension_identifier(input.into());
        self
    }
    /// <p>The name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
    pub fn set_extension_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_extension_identifier(input);
        self
    }
    /// <p>The name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
    pub fn get_extension_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_extension_identifier()
    }
    /// <p>Information about the extension.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.description(input.into());
        self
    }
    /// <p>Information about the extension.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_description(input);
        self
    }
    /// <p>Information about the extension.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_description()
    }
    ///
    /// Adds a key-value pair to `Actions`.
    ///
    /// To override the contents of this collection use [`set_actions`](Self::set_actions).
    ///
    /// <p>The actions defined in the extension.</p>
    pub fn actions(mut self, k: crate::types::ActionPoint, v: ::std::vec::Vec<crate::types::Action>) -> Self {
        self.inner = self.inner.actions(k, v);
        self
    }
    /// <p>The actions defined in the extension.</p>
    pub fn set_actions(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>>,
    ) -> Self {
        self.inner = self.inner.set_actions(input);
        self
    }
    /// <p>The actions defined in the extension.</p>
    pub fn get_actions(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>> {
        self.inner.get_actions()
    }
    ///
    /// Adds a key-value pair to `Parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>One or more parameters for the actions called by the extension.</p>
    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Parameter) -> Self {
        self.inner = self.inner.parameters(k.into(), v);
        self
    }
    /// <p>One or more parameters for the actions called by the extension.</p>
    pub fn set_parameters(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>>,
    ) -> Self {
        self.inner = self.inner.set_parameters(input);
        self
    }
    /// <p>One or more parameters for the actions called by the extension.</p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>> {
        self.inner.get_parameters()
    }
    /// <p>The extension version number.</p>
    pub fn version_number(mut self, input: i32) -> Self {
        self.inner = self.inner.version_number(input);
        self
    }
    /// <p>The extension version number.</p>
    pub fn set_version_number(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_version_number(input);
        self
    }
    /// <p>The extension version number.</p>
    pub fn get_version_number(&self) -> &::std::option::Option<i32> {
        self.inner.get_version_number()
    }
}