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_entitlement::_update_flow_entitlement_input::UpdateFlowEntitlementInputBuilder;

pub use crate::operation::update_flow_entitlement::_update_flow_entitlement_output::UpdateFlowEntitlementOutputBuilder;

impl crate::operation::update_flow_entitlement::builders::UpdateFlowEntitlementInputBuilder {
    /// 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_entitlement::UpdateFlowEntitlementOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_flow_entitlement::UpdateFlowEntitlementError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_flow_entitlement();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateFlowEntitlement`.
///
/// <p>Updates an entitlement. You can change an entitlement's description, subscribers, and encryption. If you change the subscribers, the service will remove the outputs that are are used by the subscribers that are removed.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateFlowEntitlementFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_flow_entitlement::builders::UpdateFlowEntitlementInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_flow_entitlement::UpdateFlowEntitlementOutput,
        crate::operation::update_flow_entitlement::UpdateFlowEntitlementError,
    > for UpdateFlowEntitlementFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_flow_entitlement::UpdateFlowEntitlementOutput,
            crate::operation::update_flow_entitlement::UpdateFlowEntitlementError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateFlowEntitlementFluentBuilder {
    /// Creates a new `UpdateFlowEntitlementFluentBuilder`.
    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 UpdateFlowEntitlement as a reference.
    pub fn as_input(&self) -> &crate::operation::update_flow_entitlement::builders::UpdateFlowEntitlementInputBuilder {
        &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_entitlement::UpdateFlowEntitlementOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_flow_entitlement::UpdateFlowEntitlementError,
            ::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_entitlement::UpdateFlowEntitlement::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_flow_entitlement::UpdateFlowEntitlement::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_entitlement::UpdateFlowEntitlementOutput,
        crate::operation::update_flow_entitlement::UpdateFlowEntitlementError,
        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>A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.description(input.into());
        self
    }
    /// <p>A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_description(input);
        self
    }
    /// <p>A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_description()
    }
    /// <p>The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.</p>
    pub fn encryption(mut self, input: crate::types::UpdateEncryption) -> Self {
        self.inner = self.inner.encryption(input);
        self
    }
    /// <p>The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.</p>
    pub fn set_encryption(mut self, input: ::std::option::Option<crate::types::UpdateEncryption>) -> Self {
        self.inner = self.inner.set_encryption(input);
        self
    }
    /// <p>The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.</p>
    pub fn get_encryption(&self) -> &::std::option::Option<crate::types::UpdateEncryption> {
        self.inner.get_encryption()
    }
    /// <p>The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
    pub fn entitlement_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.entitlement_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
    pub fn set_entitlement_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_entitlement_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
    pub fn get_entitlement_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_entitlement_arn()
    }
    /// <p>An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the <code>entitlementStatus</code> field in your request, MediaConnect leaves the value unchanged.</p>
    pub fn entitlement_status(mut self, input: crate::types::EntitlementStatus) -> Self {
        self.inner = self.inner.entitlement_status(input);
        self
    }
    /// <p>An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the <code>entitlementStatus</code> field in your request, MediaConnect leaves the value unchanged.</p>
    pub fn set_entitlement_status(mut self, input: ::std::option::Option<crate::types::EntitlementStatus>) -> Self {
        self.inner = self.inner.set_entitlement_status(input);
        self
    }
    /// <p>An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the <code>entitlementStatus</code> field in your request, MediaConnect leaves the value unchanged.</p>
    pub fn get_entitlement_status(&self) -> &::std::option::Option<crate::types::EntitlementStatus> {
        self.inner.get_entitlement_status()
    }
    /// <p>The ARN of the flow that is associated with the entitlement 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 ARN of the flow that is associated with the entitlement 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 ARN of the flow that is associated with the entitlement that you want to update.</p>
    pub fn get_flow_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_flow_arn()
    }
    ///
    /// Appends an item to `Subscribers`.
    ///
    /// To override the contents of this collection use [`set_subscribers`](Self::set_subscribers).
    ///
    /// <p>The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.</p>
    pub fn subscribers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.subscribers(input.into());
        self
    }
    /// <p>The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.</p>
    pub fn set_subscribers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_subscribers(input);
        self
    }
    /// <p>The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.</p>
    pub fn get_subscribers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_subscribers()
    }
}