aws-sdk-mediaconnect 1.109.0

AWS SDK for AWS MediaConnect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_flow::_update_flow_input::UpdateFlowInputBuilder;

pub use crate::operation::update_flow::_update_flow_output::UpdateFlowOutputBuilder;

impl crate::operation::update_flow::builders::UpdateFlowInputBuilder {
    /// 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_flow::UpdateFlowOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_flow::UpdateFlowError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_flow();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateFlow`.
///
/// <p>Updates an existing flow.</p><note>
/// <p>Because <code>UpdateFlowSources</code> and <code>UpdateFlow</code> are separate operations, you can't change both the source type AND the flow size in a single request.</p>
/// <ul>
/// <li>
/// <p>If you have a <code>MEDIUM</code> flow and you want to change the flow source to NDI®:</p>
/// <ul>
/// <li>
/// <p>First, use the <code>UpdateFlow</code> operation to upgrade the flow size to <code>LARGE</code>.</p></li>
/// <li>
/// <p>After that, you can then use the <code>UpdateFlowSource</code> operation to configure the NDI source.</p></li>
/// </ul></li>
/// <li>
/// <p>If you're switching from an NDI source to a transport stream (TS) source and want to downgrade the flow size:</p>
/// <ul>
/// <li>
/// <p>First, use the <code>UpdateFlowSource</code> operation to change the flow source type.</p></li>
/// <li>
/// <p>After that, you can then use the <code>UpdateFlow</code> operation to downgrade the flow size to <code>MEDIUM</code>.</p></li>
/// </ul></li>
/// </ul>
/// </note>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateFlowFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_flow::builders::UpdateFlowInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_flow::UpdateFlowOutput,
        crate::operation::update_flow::UpdateFlowError,
    > for UpdateFlowFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_flow::UpdateFlowOutput,
            crate::operation::update_flow::UpdateFlowError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateFlowFluentBuilder {
    /// Creates a new `UpdateFlowFluentBuilder`.
    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 UpdateFlow as a reference.
    pub fn as_input(&self) -> &crate::operation::update_flow::builders::UpdateFlowInputBuilder {
        &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_flow::UpdateFlowOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_flow::UpdateFlowError,
            ::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_flow::UpdateFlow::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_flow::UpdateFlow::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_flow::UpdateFlowOutput,
        crate::operation::update_flow::UpdateFlowError,
        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 Amazon Resource Name (ARN) of the flow that you want to update.</p>
    pub fn flow_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.flow_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the flow that you want to update.</p>
    pub fn set_flow_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_flow_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the flow that you want to update.</p>
    pub fn get_flow_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_flow_arn()
    }
    /// <p>The settings for source failover.</p>
    pub fn source_failover_config(mut self, input: crate::types::UpdateFailoverConfig) -> Self {
        self.inner = self.inner.source_failover_config(input);
        self
    }
    /// <p>The settings for source failover.</p>
    pub fn set_source_failover_config(mut self, input: ::std::option::Option<crate::types::UpdateFailoverConfig>) -> Self {
        self.inner = self.inner.set_source_failover_config(input);
        self
    }
    /// <p>The settings for source failover.</p>
    pub fn get_source_failover_config(&self) -> &::std::option::Option<crate::types::UpdateFailoverConfig> {
        self.inner.get_source_failover_config()
    }
    /// <p>The maintenance setting of the flow.</p>
    pub fn maintenance(mut self, input: crate::types::UpdateMaintenance) -> Self {
        self.inner = self.inner.maintenance(input);
        self
    }
    /// <p>The maintenance setting of the flow.</p>
    pub fn set_maintenance(mut self, input: ::std::option::Option<crate::types::UpdateMaintenance>) -> Self {
        self.inner = self.inner.set_maintenance(input);
        self
    }
    /// <p>The maintenance setting of the flow.</p>
    pub fn get_maintenance(&self) -> &::std::option::Option<crate::types::UpdateMaintenance> {
        self.inner.get_maintenance()
    }
    /// <p>The settings for source monitoring.</p>
    pub fn source_monitoring_config(mut self, input: crate::types::MonitoringConfig) -> Self {
        self.inner = self.inner.source_monitoring_config(input);
        self
    }
    /// <p>The settings for source monitoring.</p>
    pub fn set_source_monitoring_config(mut self, input: ::std::option::Option<crate::types::MonitoringConfig>) -> Self {
        self.inner = self.inner.set_source_monitoring_config(input);
        self
    }
    /// <p>The settings for source monitoring.</p>
    pub fn get_source_monitoring_config(&self) -> &::std::option::Option<crate::types::MonitoringConfig> {
        self.inner.get_source_monitoring_config()
    }
    /// <p>Specifies the configuration settings for a flow's NDI source or output. Required when the flow includes an NDI source or output.</p>
    pub fn ndi_config(mut self, input: crate::types::NdiConfig) -> Self {
        self.inner = self.inner.ndi_config(input);
        self
    }
    /// <p>Specifies the configuration settings for a flow's NDI source or output. Required when the flow includes an NDI source or output.</p>
    pub fn set_ndi_config(mut self, input: ::std::option::Option<crate::types::NdiConfig>) -> Self {
        self.inner = self.inner.set_ndi_config(input);
        self
    }
    /// <p>Specifies the configuration settings for a flow's NDI source or output. Required when the flow includes an NDI source or output.</p>
    pub fn get_ndi_config(&self) -> &::std::option::Option<crate::types::NdiConfig> {
        self.inner.get_ndi_config()
    }
    /// <p>Determines the processing capacity and feature set of the flow.</p>
    pub fn flow_size(mut self, input: crate::types::FlowSize) -> Self {
        self.inner = self.inner.flow_size(input);
        self
    }
    /// <p>Determines the processing capacity and feature set of the flow.</p>
    pub fn set_flow_size(mut self, input: ::std::option::Option<crate::types::FlowSize>) -> Self {
        self.inner = self.inner.set_flow_size(input);
        self
    }
    /// <p>Determines the processing capacity and feature set of the flow.</p>
    pub fn get_flow_size(&self) -> &::std::option::Option<crate::types::FlowSize> {
        self.inner.get_flow_size()
    }
    /// <p>The encoding configuration to apply to the NDI® source when transcoding it to a transport stream for downstream distribution. You can choose between several predefined encoding profiles based on common use cases.</p>
    pub fn encoding_config(mut self, input: crate::types::EncodingConfig) -> Self {
        self.inner = self.inner.encoding_config(input);
        self
    }
    /// <p>The encoding configuration to apply to the NDI® source when transcoding it to a transport stream for downstream distribution. You can choose between several predefined encoding profiles based on common use cases.</p>
    pub fn set_encoding_config(mut self, input: ::std::option::Option<crate::types::EncodingConfig>) -> Self {
        self.inner = self.inner.set_encoding_config(input);
        self
    }
    /// <p>The encoding configuration to apply to the NDI® source when transcoding it to a transport stream for downstream distribution. You can choose between several predefined encoding profiles based on common use cases.</p>
    pub fn get_encoding_config(&self) -> &::std::option::Option<crate::types::EncodingConfig> {
        self.inner.get_encoding_config()
    }
}