aws-sdk-mediaconnect 1.52.0

AWS SDK for AWS MediaConnect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// The settings for the source of the flow.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Source {
    /// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
    pub data_transfer_subscriber_fee_percent: ::std::option::Option<i32>,
    /// The type of encryption that is used on the content ingested from this source.
    pub decryption: ::std::option::Option<crate::types::Encryption>,
    /// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
    pub description: ::std::option::Option<::std::string::String>,
    /// The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow.
    pub entitlement_arn: ::std::option::Option<::std::string::String>,
    /// The IP address that the flow will be listening on for incoming content.
    pub ingest_ip: ::std::option::Option<::std::string::String>,
    /// The port that the flow will be listening on for incoming content.
    pub ingest_port: ::std::option::Option<i32>,
    /// The media streams that are associated with the source, and the parameters for those associations.
    pub media_stream_source_configurations: ::std::option::Option<::std::vec::Vec<crate::types::MediaStreamSourceConfiguration>>,
    /// The name of the source.
    pub name: ::std::option::Option<::std::string::String>,
    /// The port that the flow uses to send outbound requests to initiate connection with the sender.
    pub sender_control_port: ::std::option::Option<i32>,
    /// The IP address that the flow communicates with to initiate connection with the sender.
    pub sender_ip_address: ::std::option::Option<::std::string::String>,
    /// The ARN of the source.
    pub source_arn: ::std::option::Option<::std::string::String>,
    /// Attributes related to the transport stream that are used in the source.
    pub transport: ::std::option::Option<crate::types::Transport>,
    /// The name of the VPC interface that is used for this source.
    pub vpc_interface_name: ::std::option::Option<::std::string::String>,
    /// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
    pub whitelist_cidr: ::std::option::Option<::std::string::String>,
    /// The source configuration for cloud flows receiving a stream from a bridge.
    pub gateway_bridge_source: ::std::option::Option<crate::types::GatewayBridgeSource>,
}
impl Source {
    /// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
    pub fn data_transfer_subscriber_fee_percent(&self) -> ::std::option::Option<i32> {
        self.data_transfer_subscriber_fee_percent
    }
    /// The type of encryption that is used on the content ingested from this source.
    pub fn decryption(&self) -> ::std::option::Option<&crate::types::Encryption> {
        self.decryption.as_ref()
    }
    /// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow.
    pub fn entitlement_arn(&self) -> ::std::option::Option<&str> {
        self.entitlement_arn.as_deref()
    }
    /// The IP address that the flow will be listening on for incoming content.
    pub fn ingest_ip(&self) -> ::std::option::Option<&str> {
        self.ingest_ip.as_deref()
    }
    /// The port that the flow will be listening on for incoming content.
    pub fn ingest_port(&self) -> ::std::option::Option<i32> {
        self.ingest_port
    }
    /// The media streams that are associated with the source, and the parameters for those associations.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.media_stream_source_configurations.is_none()`.
    pub fn media_stream_source_configurations(&self) -> &[crate::types::MediaStreamSourceConfiguration] {
        self.media_stream_source_configurations.as_deref().unwrap_or_default()
    }
    /// The name of the source.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// The port that the flow uses to send outbound requests to initiate connection with the sender.
    pub fn sender_control_port(&self) -> ::std::option::Option<i32> {
        self.sender_control_port
    }
    /// The IP address that the flow communicates with to initiate connection with the sender.
    pub fn sender_ip_address(&self) -> ::std::option::Option<&str> {
        self.sender_ip_address.as_deref()
    }
    /// The ARN of the source.
    pub fn source_arn(&self) -> ::std::option::Option<&str> {
        self.source_arn.as_deref()
    }
    /// Attributes related to the transport stream that are used in the source.
    pub fn transport(&self) -> ::std::option::Option<&crate::types::Transport> {
        self.transport.as_ref()
    }
    /// The name of the VPC interface that is used for this source.
    pub fn vpc_interface_name(&self) -> ::std::option::Option<&str> {
        self.vpc_interface_name.as_deref()
    }
    /// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
    pub fn whitelist_cidr(&self) -> ::std::option::Option<&str> {
        self.whitelist_cidr.as_deref()
    }
    /// The source configuration for cloud flows receiving a stream from a bridge.
    pub fn gateway_bridge_source(&self) -> ::std::option::Option<&crate::types::GatewayBridgeSource> {
        self.gateway_bridge_source.as_ref()
    }
}
impl Source {
    /// Creates a new builder-style object to manufacture [`Source`](crate::types::Source).
    pub fn builder() -> crate::types::builders::SourceBuilder {
        crate::types::builders::SourceBuilder::default()
    }
}

/// A builder for [`Source`](crate::types::Source).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SourceBuilder {
    pub(crate) data_transfer_subscriber_fee_percent: ::std::option::Option<i32>,
    pub(crate) decryption: ::std::option::Option<crate::types::Encryption>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) entitlement_arn: ::std::option::Option<::std::string::String>,
    pub(crate) ingest_ip: ::std::option::Option<::std::string::String>,
    pub(crate) ingest_port: ::std::option::Option<i32>,
    pub(crate) media_stream_source_configurations: ::std::option::Option<::std::vec::Vec<crate::types::MediaStreamSourceConfiguration>>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) sender_control_port: ::std::option::Option<i32>,
    pub(crate) sender_ip_address: ::std::option::Option<::std::string::String>,
    pub(crate) source_arn: ::std::option::Option<::std::string::String>,
    pub(crate) transport: ::std::option::Option<crate::types::Transport>,
    pub(crate) vpc_interface_name: ::std::option::Option<::std::string::String>,
    pub(crate) whitelist_cidr: ::std::option::Option<::std::string::String>,
    pub(crate) gateway_bridge_source: ::std::option::Option<crate::types::GatewayBridgeSource>,
}
impl SourceBuilder {
    /// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
    pub fn data_transfer_subscriber_fee_percent(mut self, input: i32) -> Self {
        self.data_transfer_subscriber_fee_percent = ::std::option::Option::Some(input);
        self
    }
    /// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
    pub fn set_data_transfer_subscriber_fee_percent(mut self, input: ::std::option::Option<i32>) -> Self {
        self.data_transfer_subscriber_fee_percent = input;
        self
    }
    /// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
    pub fn get_data_transfer_subscriber_fee_percent(&self) -> &::std::option::Option<i32> {
        &self.data_transfer_subscriber_fee_percent
    }
    /// The type of encryption that is used on the content ingested from this source.
    pub fn decryption(mut self, input: crate::types::Encryption) -> Self {
        self.decryption = ::std::option::Option::Some(input);
        self
    }
    /// The type of encryption that is used on the content ingested from this source.
    pub fn set_decryption(mut self, input: ::std::option::Option<crate::types::Encryption>) -> Self {
        self.decryption = input;
        self
    }
    /// The type of encryption that is used on the content ingested from this source.
    pub fn get_decryption(&self) -> &::std::option::Option<crate::types::Encryption> {
        &self.decryption
    }
    /// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow.
    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
    }
    /// The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow.
    pub fn set_entitlement_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.entitlement_arn = input;
        self
    }
    /// The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow.
    pub fn get_entitlement_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.entitlement_arn
    }
    /// The IP address that the flow will be listening on for incoming content.
    pub fn ingest_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ingest_ip = ::std::option::Option::Some(input.into());
        self
    }
    /// The IP address that the flow will be listening on for incoming content.
    pub fn set_ingest_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ingest_ip = input;
        self
    }
    /// The IP address that the flow will be listening on for incoming content.
    pub fn get_ingest_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.ingest_ip
    }
    /// The port that the flow will be listening on for incoming content.
    pub fn ingest_port(mut self, input: i32) -> Self {
        self.ingest_port = ::std::option::Option::Some(input);
        self
    }
    /// The port that the flow will be listening on for incoming content.
    pub fn set_ingest_port(mut self, input: ::std::option::Option<i32>) -> Self {
        self.ingest_port = input;
        self
    }
    /// The port that the flow will be listening on for incoming content.
    pub fn get_ingest_port(&self) -> &::std::option::Option<i32> {
        &self.ingest_port
    }
    /// Appends an item to `media_stream_source_configurations`.
    ///
    /// To override the contents of this collection use [`set_media_stream_source_configurations`](Self::set_media_stream_source_configurations).
    ///
    /// The media streams that are associated with the source, and the parameters for those associations.
    pub fn media_stream_source_configurations(mut self, input: crate::types::MediaStreamSourceConfiguration) -> Self {
        let mut v = self.media_stream_source_configurations.unwrap_or_default();
        v.push(input);
        self.media_stream_source_configurations = ::std::option::Option::Some(v);
        self
    }
    /// The media streams that are associated with the source, and the parameters for those associations.
    pub fn set_media_stream_source_configurations(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::MediaStreamSourceConfiguration>>,
    ) -> Self {
        self.media_stream_source_configurations = input;
        self
    }
    /// The media streams that are associated with the source, and the parameters for those associations.
    pub fn get_media_stream_source_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MediaStreamSourceConfiguration>> {
        &self.media_stream_source_configurations
    }
    /// The name of the source.
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// The name of the source.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The name of the source.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// The port that the flow uses to send outbound requests to initiate connection with the sender.
    pub fn sender_control_port(mut self, input: i32) -> Self {
        self.sender_control_port = ::std::option::Option::Some(input);
        self
    }
    /// The port that the flow uses to send outbound requests to initiate connection with the sender.
    pub fn set_sender_control_port(mut self, input: ::std::option::Option<i32>) -> Self {
        self.sender_control_port = input;
        self
    }
    /// The port that the flow uses to send outbound requests to initiate connection with the sender.
    pub fn get_sender_control_port(&self) -> &::std::option::Option<i32> {
        &self.sender_control_port
    }
    /// The IP address that the flow communicates with to initiate connection with the sender.
    pub fn sender_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sender_ip_address = ::std::option::Option::Some(input.into());
        self
    }
    /// The IP address that the flow communicates with to initiate connection with the sender.
    pub fn set_sender_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sender_ip_address = input;
        self
    }
    /// The IP address that the flow communicates with to initiate connection with the sender.
    pub fn get_sender_ip_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.sender_ip_address
    }
    /// The ARN of the source.
    /// This field is required.
    pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The ARN of the source.
    pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_arn = input;
        self
    }
    /// The ARN of the source.
    pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_arn
    }
    /// Attributes related to the transport stream that are used in the source.
    pub fn transport(mut self, input: crate::types::Transport) -> Self {
        self.transport = ::std::option::Option::Some(input);
        self
    }
    /// Attributes related to the transport stream that are used in the source.
    pub fn set_transport(mut self, input: ::std::option::Option<crate::types::Transport>) -> Self {
        self.transport = input;
        self
    }
    /// Attributes related to the transport stream that are used in the source.
    pub fn get_transport(&self) -> &::std::option::Option<crate::types::Transport> {
        &self.transport
    }
    /// The name of the VPC interface that is used for this source.
    pub fn vpc_interface_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_interface_name = ::std::option::Option::Some(input.into());
        self
    }
    /// The name of the VPC interface that is used for this source.
    pub fn set_vpc_interface_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_interface_name = input;
        self
    }
    /// The name of the VPC interface that is used for this source.
    pub fn get_vpc_interface_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_interface_name
    }
    /// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
    pub fn whitelist_cidr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.whitelist_cidr = ::std::option::Option::Some(input.into());
        self
    }
    /// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
    pub fn set_whitelist_cidr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.whitelist_cidr = input;
        self
    }
    /// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
    pub fn get_whitelist_cidr(&self) -> &::std::option::Option<::std::string::String> {
        &self.whitelist_cidr
    }
    /// The source configuration for cloud flows receiving a stream from a bridge.
    pub fn gateway_bridge_source(mut self, input: crate::types::GatewayBridgeSource) -> Self {
        self.gateway_bridge_source = ::std::option::Option::Some(input);
        self
    }
    /// The source configuration for cloud flows receiving a stream from a bridge.
    pub fn set_gateway_bridge_source(mut self, input: ::std::option::Option<crate::types::GatewayBridgeSource>) -> Self {
        self.gateway_bridge_source = input;
        self
    }
    /// The source configuration for cloud flows receiving a stream from a bridge.
    pub fn get_gateway_bridge_source(&self) -> &::std::option::Option<crate::types::GatewayBridgeSource> {
        &self.gateway_bridge_source
    }
    /// Consumes the builder and constructs a [`Source`](crate::types::Source).
    pub fn build(self) -> crate::types::Source {
        crate::types::Source {
            data_transfer_subscriber_fee_percent: self.data_transfer_subscriber_fee_percent,
            decryption: self.decryption,
            description: self.description,
            entitlement_arn: self.entitlement_arn,
            ingest_ip: self.ingest_ip,
            ingest_port: self.ingest_port,
            media_stream_source_configurations: self.media_stream_source_configurations,
            name: self.name,
            sender_control_port: self.sender_control_port,
            sender_ip_address: self.sender_ip_address,
            source_arn: self.source_arn,
            transport: self.transport,
            vpc_interface_name: self.vpc_interface_name,
            whitelist_cidr: self.whitelist_cidr,
            gateway_bridge_source: self.gateway_bridge_source,
        }
    }
}