# Copyright (c) 2012-2022, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***


from . import AWSObject, AWSProperty, PropsDictType
from .validators import integer


class BridgeNetworkOutput(AWSProperty):
    """
    `BridgeNetworkOutput <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-bridgeoutput-bridgenetworkoutput.html>`__
    """

    props: PropsDictType = {
        "IpAddress": (str, True),
        "NetworkName": (str, True),
        "Port": (integer, True),
        "Protocol": (str, True),
        "Ttl": (integer, True),
    }


class BridgeOutputProperty(AWSProperty):
    """
    `BridgeOutputProperty <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-bridge-bridgeoutput.html>`__
    """

    props: PropsDictType = {
        "NetworkOutput": (BridgeNetworkOutput, False),
    }


class VpcInterfaceAttachment(AWSProperty):
    """
    `VpcInterfaceAttachment <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flowsource-vpcinterfaceattachment.html>`__
    """

    props: PropsDictType = {
        "VpcInterfaceName": (str, False),
    }


class BridgeFlowSource(AWSProperty):
    """
    `BridgeFlowSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-bridgesource-bridgeflowsource.html>`__
    """

    props: PropsDictType = {
        "FlowArn": (str, True),
        "FlowVpcInterfaceAttachment": (VpcInterfaceAttachment, False),
    }


class BridgeNetworkSource(AWSProperty):
    """
    `BridgeNetworkSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-bridgesource-bridgenetworksource.html>`__
    """

    props: PropsDictType = {
        "MulticastIp": (str, True),
        "NetworkName": (str, True),
        "Port": (integer, True),
        "Protocol": (str, True),
    }


class BridgeSourceProperty(AWSProperty):
    """
    `BridgeSourceProperty <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-bridge-bridgesource.html>`__
    """

    props: PropsDictType = {
        "FlowSource": (BridgeFlowSource, False),
        "NetworkSource": (BridgeNetworkSource, False),
    }


class EgressGatewayBridge(AWSProperty):
    """
    `EgressGatewayBridge <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-bridge-egressgatewaybridge.html>`__
    """

    props: PropsDictType = {
        "MaxBitrate": (integer, True),
    }


class SourcePriority(AWSProperty):
    """
    `SourcePriority <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flow-sourcepriority.html>`__
    """

    props: PropsDictType = {
        "PrimarySource": (str, True),
    }


class FailoverConfig(AWSProperty):
    """
    `FailoverConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flow-failoverconfig.html>`__
    """

    props: PropsDictType = {
        "FailoverMode": (str, False),
        "RecoveryWindow": (integer, False),
        "SourcePriority": (SourcePriority, False),
        "State": (str, False),
    }


class IngressGatewayBridge(AWSProperty):
    """
    `IngressGatewayBridge <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-bridge-ingressgatewaybridge.html>`__
    """

    props: PropsDictType = {
        "MaxBitrate": (integer, True),
        "MaxOutputs": (integer, True),
    }


class Bridge(AWSObject):
    """
    `Bridge <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-bridge.html>`__
    """

    resource_type = "AWS::MediaConnect::Bridge"

    props: PropsDictType = {
        "EgressGatewayBridge": (EgressGatewayBridge, False),
        "IngressGatewayBridge": (IngressGatewayBridge, False),
        "Name": (str, True),
        "Outputs": ([BridgeOutputProperty], False),
        "PlacementArn": (str, True),
        "SourceFailoverConfig": (FailoverConfig, False),
        "Sources": ([BridgeSourceProperty], True),
    }


class BridgeOutput(AWSObject):
    """
    `BridgeOutput <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-bridgeoutput.html>`__
    """

    resource_type = "AWS::MediaConnect::BridgeOutput"

    props: PropsDictType = {
        "BridgeArn": (str, True),
        "Name": (str, True),
        "NetworkOutput": (BridgeNetworkOutput, True),
    }


class BridgeSource(AWSObject):
    """
    `BridgeSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-bridgesource.html>`__
    """

    resource_type = "AWS::MediaConnect::BridgeSource"

    props: PropsDictType = {
        "BridgeArn": (str, True),
        "FlowSource": (BridgeFlowSource, False),
        "Name": (str, True),
        "NetworkSource": (BridgeNetworkSource, False),
    }


class Encryption(AWSProperty):
    """
    `Encryption <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flowsource-encryption.html>`__
    """

    props: PropsDictType = {
        "Algorithm": (str, False),
        "ConstantInitializationVector": (str, False),
        "DeviceId": (str, False),
        "KeyType": (str, False),
        "Region": (str, False),
        "ResourceId": (str, False),
        "RoleArn": (str, True),
        "SecretArn": (str, False),
        "Url": (str, False),
    }


class GatewayBridgeSource(AWSProperty):
    """
    `GatewayBridgeSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flowsource-gatewaybridgesource.html>`__
    """

    props: PropsDictType = {
        "BridgeArn": (str, True),
        "VpcInterfaceAttachment": (VpcInterfaceAttachment, False),
    }


class Source(AWSProperty):
    """
    `Source <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flow-source.html>`__
    """

    props: PropsDictType = {
        "Decryption": (Encryption, False),
        "Description": (str, False),
        "EntitlementArn": (str, False),
        "GatewayBridgeSource": (GatewayBridgeSource, False),
        "IngestIp": (str, False),
        "IngestPort": (integer, False),
        "MaxBitrate": (integer, False),
        "MaxLatency": (integer, False),
        "MinLatency": (integer, False),
        "Name": (str, False),
        "Protocol": (str, False),
        "SenderControlPort": (integer, False),
        "SenderIpAddress": (str, False),
        "SourceArn": (str, False),
        "SourceIngestPort": (str, False),
        "SourceListenerAddress": (str, False),
        "SourceListenerPort": (integer, False),
        "StreamId": (str, False),
        "VpcInterfaceName": (str, False),
        "WhitelistCidr": (str, False),
    }


class Flow(AWSObject):
    """
    `Flow <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flow.html>`__
    """

    resource_type = "AWS::MediaConnect::Flow"

    props: PropsDictType = {
        "AvailabilityZone": (str, False),
        "Name": (str, True),
        "Source": (Source, True),
        "SourceFailoverConfig": (FailoverConfig, False),
    }


class FlowEntitlement(AWSObject):
    """
    `FlowEntitlement <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowentitlement.html>`__
    """

    resource_type = "AWS::MediaConnect::FlowEntitlement"

    props: PropsDictType = {
        "DataTransferSubscriberFeePercent": (integer, False),
        "Description": (str, True),
        "Encryption": (Encryption, False),
        "EntitlementStatus": (str, False),
        "FlowArn": (str, True),
        "Name": (str, True),
        "Subscribers": ([str], True),
    }


class FlowOutputEncryption(AWSProperty):
    """
    `FlowOutputEncryption <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flowoutput-encryption.html>`__
    """

    props: PropsDictType = {
        "Algorithm": (str, False),
        "KeyType": (str, False),
        "RoleArn": (str, True),
        "SecretArn": (str, True),
    }


class FlowOutput(AWSObject):
    """
    `FlowOutput <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowoutput.html>`__
    """

    resource_type = "AWS::MediaConnect::FlowOutput"

    props: PropsDictType = {
        "CidrAllowList": ([str], False),
        "Description": (str, False),
        "Destination": (str, False),
        "Encryption": (FlowOutputEncryption, False),
        "FlowArn": (str, True),
        "MaxLatency": (integer, False),
        "MinLatency": (integer, False),
        "Name": (str, False),
        "Port": (integer, False),
        "Protocol": (str, True),
        "RemoteId": (str, False),
        "SmoothingLatency": (integer, False),
        "StreamId": (str, False),
        "VpcInterfaceAttachment": (VpcInterfaceAttachment, False),
    }


class FlowSource(AWSObject):
    """
    `FlowSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowsource.html>`__
    """

    resource_type = "AWS::MediaConnect::FlowSource"

    props: PropsDictType = {
        "Decryption": (Encryption, False),
        "Description": (str, True),
        "EntitlementArn": (str, False),
        "FlowArn": (str, False),
        "GatewayBridgeSource": (GatewayBridgeSource, False),
        "IngestPort": (integer, False),
        "MaxBitrate": (integer, False),
        "MaxLatency": (integer, False),
        "MinLatency": (integer, False),
        "Name": (str, True),
        "Protocol": (str, False),
        "SenderControlPort": (integer, False),
        "SenderIpAddress": (str, False),
        "SourceListenerAddress": (str, False),
        "SourceListenerPort": (integer, False),
        "StreamId": (str, False),
        "VpcInterfaceName": (str, False),
        "WhitelistCidr": (str, False),
    }


class FlowVpcInterface(AWSObject):
    """
    `FlowVpcInterface <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowvpcinterface.html>`__
    """

    resource_type = "AWS::MediaConnect::FlowVpcInterface"

    props: PropsDictType = {
        "FlowArn": (str, True),
        "Name": (str, True),
        "RoleArn": (str, True),
        "SecurityGroupIds": ([str], True),
        "SubnetId": (str, True),
    }


class GatewayNetwork(AWSProperty):
    """
    `GatewayNetwork <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-gateway-gatewaynetwork.html>`__
    """

    props: PropsDictType = {
        "CidrBlock": (str, True),
        "Name": (str, True),
    }


class Gateway(AWSObject):
    """
    `Gateway <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-gateway.html>`__
    """

    resource_type = "AWS::MediaConnect::Gateway"

    props: PropsDictType = {
        "EgressCidrBlocks": ([str], True),
        "Name": (str, True),
        "Networks": ([GatewayNetwork], True),
    }
