aws-sdk-osis 1.99.0

AWS SDK for Amazon OpenSearch Ingestion
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_pipeline::_update_pipeline_input::UpdatePipelineInputBuilder;

pub use crate::operation::update_pipeline::_update_pipeline_output::UpdatePipelineOutputBuilder;

impl crate::operation::update_pipeline::builders::UpdatePipelineInputBuilder {
    /// 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_pipeline::UpdatePipelineOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_pipeline::UpdatePipelineError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_pipeline();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdatePipeline`.
///
/// <p>Updates an OpenSearch Ingestion pipeline. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/update-pipeline.html">Updating Amazon OpenSearch Ingestion pipelines</a>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdatePipelineFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_pipeline::builders::UpdatePipelineInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_pipeline::UpdatePipelineOutput,
        crate::operation::update_pipeline::UpdatePipelineError,
    > for UpdatePipelineFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_pipeline::UpdatePipelineOutput,
            crate::operation::update_pipeline::UpdatePipelineError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdatePipelineFluentBuilder {
    /// Creates a new `UpdatePipelineFluentBuilder`.
    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 UpdatePipeline as a reference.
    pub fn as_input(&self) -> &crate::operation::update_pipeline::builders::UpdatePipelineInputBuilder {
        &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_pipeline::UpdatePipelineOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_pipeline::UpdatePipelineError,
            ::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_pipeline::UpdatePipeline::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_pipeline::UpdatePipeline::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_pipeline::UpdatePipelineOutput,
        crate::operation::update_pipeline::UpdatePipelineError,
        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 of the pipeline to update.</p>
    pub fn pipeline_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.pipeline_name(input.into());
        self
    }
    /// <p>The name of the pipeline to update.</p>
    pub fn set_pipeline_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_pipeline_name(input);
        self
    }
    /// <p>The name of the pipeline to update.</p>
    pub fn get_pipeline_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_pipeline_name()
    }
    /// <p>The minimum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
    pub fn min_units(mut self, input: i32) -> Self {
        self.inner = self.inner.min_units(input);
        self
    }
    /// <p>The minimum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
    pub fn set_min_units(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_min_units(input);
        self
    }
    /// <p>The minimum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
    pub fn get_min_units(&self) -> &::std::option::Option<i32> {
        self.inner.get_min_units()
    }
    /// <p>The maximum pipeline capacity, in Ingestion Compute Units (ICUs)</p>
    pub fn max_units(mut self, input: i32) -> Self {
        self.inner = self.inner.max_units(input);
        self
    }
    /// <p>The maximum pipeline capacity, in Ingestion Compute Units (ICUs)</p>
    pub fn set_max_units(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_max_units(input);
        self
    }
    /// <p>The maximum pipeline capacity, in Ingestion Compute Units (ICUs)</p>
    pub fn get_max_units(&self) -> &::std::option::Option<i32> {
        self.inner.get_max_units()
    }
    /// <p>The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with <code>\n</code>.</p>
    pub fn pipeline_configuration_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.pipeline_configuration_body(input.into());
        self
    }
    /// <p>The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with <code>\n</code>.</p>
    pub fn set_pipeline_configuration_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_pipeline_configuration_body(input);
        self
    }
    /// <p>The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with <code>\n</code>.</p>
    pub fn get_pipeline_configuration_body(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_pipeline_configuration_body()
    }
    /// <p>Key-value pairs to configure log publishing.</p>
    pub fn log_publishing_options(mut self, input: crate::types::LogPublishingOptions) -> Self {
        self.inner = self.inner.log_publishing_options(input);
        self
    }
    /// <p>Key-value pairs to configure log publishing.</p>
    pub fn set_log_publishing_options(mut self, input: ::std::option::Option<crate::types::LogPublishingOptions>) -> Self {
        self.inner = self.inner.set_log_publishing_options(input);
        self
    }
    /// <p>Key-value pairs to configure log publishing.</p>
    pub fn get_log_publishing_options(&self) -> &::std::option::Option<crate::types::LogPublishingOptions> {
        self.inner.get_log_publishing_options()
    }
    /// <p>Key-value pairs to configure persistent buffering for the pipeline.</p>
    pub fn buffer_options(mut self, input: crate::types::BufferOptions) -> Self {
        self.inner = self.inner.buffer_options(input);
        self
    }
    /// <p>Key-value pairs to configure persistent buffering for the pipeline.</p>
    pub fn set_buffer_options(mut self, input: ::std::option::Option<crate::types::BufferOptions>) -> Self {
        self.inner = self.inner.set_buffer_options(input);
        self
    }
    /// <p>Key-value pairs to configure persistent buffering for the pipeline.</p>
    pub fn get_buffer_options(&self) -> &::std::option::Option<crate::types::BufferOptions> {
        self.inner.get_buffer_options()
    }
    /// <p>Key-value pairs to configure encryption for data that is written to a persistent buffer.</p>
    pub fn encryption_at_rest_options(mut self, input: crate::types::EncryptionAtRestOptions) -> Self {
        self.inner = self.inner.encryption_at_rest_options(input);
        self
    }
    /// <p>Key-value pairs to configure encryption for data that is written to a persistent buffer.</p>
    pub fn set_encryption_at_rest_options(mut self, input: ::std::option::Option<crate::types::EncryptionAtRestOptions>) -> Self {
        self.inner = self.inner.set_encryption_at_rest_options(input);
        self
    }
    /// <p>Key-value pairs to configure encryption for data that is written to a persistent buffer.</p>
    pub fn get_encryption_at_rest_options(&self) -> &::std::option::Option<crate::types::EncryptionAtRestOptions> {
        self.inner.get_encryption_at_rest_options()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that grants the pipeline permission to access Amazon Web Services resources.</p>
    pub fn pipeline_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.pipeline_role_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that grants the pipeline permission to access Amazon Web Services resources.</p>
    pub fn set_pipeline_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_pipeline_role_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that grants the pipeline permission to access Amazon Web Services resources.</p>
    pub fn get_pipeline_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_pipeline_role_arn()
    }
}