aws-sdk-mediaconnect 1.108.0

AWS SDK for AWS MediaConnect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateFlowEntitlementInput {
    /// <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 description: ::std::option::Option<::std::string::String>,
    /// <p>The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.</p>
    pub encryption: ::std::option::Option<crate::types::UpdateEncryption>,
    /// <p>The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
    pub entitlement_arn: ::std::option::Option<::std::string::String>,
    /// <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 entitlement_status: ::std::option::Option<crate::types::EntitlementStatus>,
    /// <p>The ARN of the flow that is associated with the entitlement that you want to update.</p>
    pub flow_arn: ::std::option::Option<::std::string::String>,
    /// <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 subscribers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateFlowEntitlementInput {
    /// <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(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <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(&self) -> ::std::option::Option<&crate::types::UpdateEncryption> {
        self.encryption.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
    pub fn entitlement_arn(&self) -> ::std::option::Option<&str> {
        self.entitlement_arn.as_deref()
    }
    /// <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(&self) -> ::std::option::Option<&crate::types::EntitlementStatus> {
        self.entitlement_status.as_ref()
    }
    /// <p>The ARN of the flow that is associated with the entitlement that you want to update.</p>
    pub fn flow_arn(&self) -> ::std::option::Option<&str> {
        self.flow_arn.as_deref()
    }
    /// <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>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subscribers.is_none()`.
    pub fn subscribers(&self) -> &[::std::string::String] {
        self.subscribers.as_deref().unwrap_or_default()
    }
}
impl UpdateFlowEntitlementInput {
    /// Creates a new builder-style object to manufacture [`UpdateFlowEntitlementInput`](crate::operation::update_flow_entitlement::UpdateFlowEntitlementInput).
    pub fn builder() -> crate::operation::update_flow_entitlement::builders::UpdateFlowEntitlementInputBuilder {
        crate::operation::update_flow_entitlement::builders::UpdateFlowEntitlementInputBuilder::default()
    }
}

/// A builder for [`UpdateFlowEntitlementInput`](crate::operation::update_flow_entitlement::UpdateFlowEntitlementInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateFlowEntitlementInputBuilder {
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) encryption: ::std::option::Option<crate::types::UpdateEncryption>,
    pub(crate) entitlement_arn: ::std::option::Option<::std::string::String>,
    pub(crate) entitlement_status: ::std::option::Option<crate::types::EntitlementStatus>,
    pub(crate) flow_arn: ::std::option::Option<::std::string::String>,
    pub(crate) subscribers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateFlowEntitlementInputBuilder {
    /// <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.description = ::std::option::Option::Some(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.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.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.encryption = ::std::option::Option::Some(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.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.encryption
    }
    /// <p>The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
    /// This field is required.
    pub fn entitlement_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.entitlement_arn = ::std::option::Option::Some(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.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.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.entitlement_status = ::std::option::Option::Some(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.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.entitlement_status
    }
    /// <p>The ARN of the flow that is associated with the entitlement that you want to update.</p>
    /// This field is required.
    pub fn flow_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flow_arn = ::std::option::Option::Some(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.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.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 {
        let mut v = self.subscribers.unwrap_or_default();
        v.push(input.into());
        self.subscribers = ::std::option::Option::Some(v);
        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.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.subscribers
    }
    /// Consumes the builder and constructs a [`UpdateFlowEntitlementInput`](crate::operation::update_flow_entitlement::UpdateFlowEntitlementInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_flow_entitlement::UpdateFlowEntitlementInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_flow_entitlement::UpdateFlowEntitlementInput {
            description: self.description,
            encryption: self.encryption,
            entitlement_arn: self.entitlement_arn,
            entitlement_status: self.entitlement_status,
            flow_arn: self.flow_arn,
            subscribers: self.subscribers,
        })
    }
}