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_router_input::_update_router_input_input::UpdateRouterInputInputBuilder;

pub use crate::operation::update_router_input::_update_router_input_output::UpdateRouterInputOutputBuilder;

impl crate::operation::update_router_input::builders::UpdateRouterInputInputBuilder {
    /// 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_router_input::UpdateRouterInputOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_router_input::UpdateRouterInputError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_router_input();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateRouterInput`.
///
/// <p>Updates the configuration of an existing router input in AWS Elemental MediaConnect.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateRouterInputFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_router_input::builders::UpdateRouterInputInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_router_input::UpdateRouterInputOutput,
        crate::operation::update_router_input::UpdateRouterInputError,
    > for UpdateRouterInputFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_router_input::UpdateRouterInputOutput,
            crate::operation::update_router_input::UpdateRouterInputError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateRouterInputFluentBuilder {
    /// Creates a new `UpdateRouterInputFluentBuilder`.
    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 UpdateRouterInput as a reference.
    pub fn as_input(&self) -> &crate::operation::update_router_input::builders::UpdateRouterInputInputBuilder {
        &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_router_input::UpdateRouterInputOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_router_input::UpdateRouterInputError,
            ::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_router_input::UpdateRouterInput::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_router_input::UpdateRouterInput::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_router_input::UpdateRouterInputOutput,
        crate::operation::update_router_input::UpdateRouterInputError,
        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 router input that you want to update.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the router input that you want to update.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the router input that you want to update.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_arn()
    }
    /// <p>The updated name for the router input.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>The updated name for the router input.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>The updated name for the router input.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>The updated configuration settings for the router input. Changing the type of the configuration is not supported.</p>
    pub fn configuration(mut self, input: crate::types::RouterInputConfiguration) -> Self {
        self.inner = self.inner.configuration(input);
        self
    }
    /// <p>The updated configuration settings for the router input. Changing the type of the configuration is not supported.</p>
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::RouterInputConfiguration>) -> Self {
        self.inner = self.inner.set_configuration(input);
        self
    }
    /// <p>The updated configuration settings for the router input. Changing the type of the configuration is not supported.</p>
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::RouterInputConfiguration> {
        self.inner.get_configuration()
    }
    /// <p>The updated maximum bitrate for the router input.</p>
    pub fn maximum_bitrate(mut self, input: i64) -> Self {
        self.inner = self.inner.maximum_bitrate(input);
        self
    }
    /// <p>The updated maximum bitrate for the router input.</p>
    pub fn set_maximum_bitrate(mut self, input: ::std::option::Option<i64>) -> Self {
        self.inner = self.inner.set_maximum_bitrate(input);
        self
    }
    /// <p>The updated maximum bitrate for the router input.</p>
    pub fn get_maximum_bitrate(&self) -> &::std::option::Option<i64> {
        self.inner.get_maximum_bitrate()
    }
    /// <p>Specifies whether the router input can be assigned to outputs in different Regions. REGIONAL (default) - can be assigned only to outputs in the same Region. GLOBAL - can be assigned to outputs in any Region.</p>
    pub fn routing_scope(mut self, input: crate::types::RoutingScope) -> Self {
        self.inner = self.inner.routing_scope(input);
        self
    }
    /// <p>Specifies whether the router input can be assigned to outputs in different Regions. REGIONAL (default) - can be assigned only to outputs in the same Region. GLOBAL - can be assigned to outputs in any Region.</p>
    pub fn set_routing_scope(mut self, input: ::std::option::Option<crate::types::RoutingScope>) -> Self {
        self.inner = self.inner.set_routing_scope(input);
        self
    }
    /// <p>Specifies whether the router input can be assigned to outputs in different Regions. REGIONAL (default) - can be assigned only to outputs in the same Region. GLOBAL - can be assigned to outputs in any Region.</p>
    pub fn get_routing_scope(&self) -> &::std::option::Option<crate::types::RoutingScope> {
        self.inner.get_routing_scope()
    }
    /// <p>The updated tier level for the router input.</p>
    pub fn tier(mut self, input: crate::types::RouterInputTier) -> Self {
        self.inner = self.inner.tier(input);
        self
    }
    /// <p>The updated tier level for the router input.</p>
    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::RouterInputTier>) -> Self {
        self.inner = self.inner.set_tier(input);
        self
    }
    /// <p>The updated tier level for the router input.</p>
    pub fn get_tier(&self) -> &::std::option::Option<crate::types::RouterInputTier> {
        self.inner.get_tier()
    }
    /// <p>The updated transit encryption settings for the router input.</p>
    pub fn transit_encryption(mut self, input: crate::types::RouterInputTransitEncryption) -> Self {
        self.inner = self.inner.transit_encryption(input);
        self
    }
    /// <p>The updated transit encryption settings for the router input.</p>
    pub fn set_transit_encryption(mut self, input: ::std::option::Option<crate::types::RouterInputTransitEncryption>) -> Self {
        self.inner = self.inner.set_transit_encryption(input);
        self
    }
    /// <p>The updated transit encryption settings for the router input.</p>
    pub fn get_transit_encryption(&self) -> &::std::option::Option<crate::types::RouterInputTransitEncryption> {
        self.inner.get_transit_encryption()
    }
    /// <p>The updated maintenance configuration settings for the router input, including any changes to preferred maintenance windows and schedules.</p>
    pub fn maintenance_configuration(mut self, input: crate::types::MaintenanceConfiguration) -> Self {
        self.inner = self.inner.maintenance_configuration(input);
        self
    }
    /// <p>The updated maintenance configuration settings for the router input, including any changes to preferred maintenance windows and schedules.</p>
    pub fn set_maintenance_configuration(mut self, input: ::std::option::Option<crate::types::MaintenanceConfiguration>) -> Self {
        self.inner = self.inner.set_maintenance_configuration(input);
        self
    }
    /// <p>The updated maintenance configuration settings for the router input, including any changes to preferred maintenance windows and schedules.</p>
    pub fn get_maintenance_configuration(&self) -> &::std::option::Option<crate::types::MaintenanceConfiguration> {
        self.inner.get_maintenance_configuration()
    }
}