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


from . import AWSObject
from . import AWSProperty
from .validators import integer


class FailoverConfig(AWSProperty):
    props = {
        'RecoveryWindow': (integer, False),
        'State': (basestring, False),
    }


class Encryption(AWSProperty):
    props = {
        'Algorithm': (basestring, True),
        'ConstantInitializationVector': (basestring, False),
        'DeviceId': (basestring, False),
        'KeyType': (basestring, False),
        'Region': (basestring, False),
        'ResourceId': (basestring, False),
        'RoleArn': (basestring, True),
        'SecretArn': (basestring, False),
        'Url': (basestring, False),
    }


class Source(AWSProperty):
    props = {
        'Decryption': (Encryption, False),
        'Description': (basestring, False),
        'EntitlementArn': (basestring, False),
        'IngestIp': (basestring, False),
        'IngestPort': (integer, False),
        'MaxBitrate': (integer, False),
        'MaxLatency': (integer, False),
        'Name': (basestring, False),
        'Protocol': (basestring, False),
        'SourceArn': (basestring, False),
        'StreamId': (basestring, False),
        'VpcInterfaceName': (basestring, False),
        'WhitelistCidr': (basestring, False),
    }


class Flow(AWSObject):
    resource_type = "AWS::MediaConnect::Flow"

    props = {
        'AvailabilityZone': (basestring, False),
        'Name': (basestring, True),
        'Source': (Source, True),
        'SourceFailoverConfig': (FailoverConfig, False),
    }


class FlowEntitlement(AWSObject):
    resource_type = "AWS::MediaConnect::FlowEntitlement"

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


class VpcInterfaceAttachment(AWSProperty):
    props = {
        'VpcInterfaceName': (basestring, False),
    }


class FlowOutput(AWSObject):
    resource_type = "AWS::MediaConnect::FlowOutput"

    props = {
        'CidrAllowList': ([basestring], False),
        'Description': (basestring, False),
        'Destination': (basestring, False),
        'Encryption': (Encryption, False),
        'FlowArn': (basestring, True),
        'MaxLatency': (integer, False),
        'Name': (basestring, False),
        'Port': (integer, False),
        'Protocol': (basestring, True),
        'RemoteId': (basestring, False),
        'SmoothingLatency': (integer, False),
        'StreamId': (basestring, False),
        'VpcInterfaceAttachment': (VpcInterfaceAttachment, False),
    }


class FlowSource(AWSObject):
    resource_type = "AWS::MediaConnect::FlowSource"

    props = {
        'Decryption': (Encryption, False),
        'Description': (basestring, True),
        'EntitlementArn': (basestring, False),
        'FlowArn': (basestring, False),
        'IngestPort': (integer, False),
        'MaxBitrate': (integer, False),
        'MaxLatency': (integer, False),
        'Name': (basestring, True),
        'Protocol': (basestring, False),
        'StreamId': (basestring, False),
        'VpcInterfaceName': (basestring, False),
        'WhitelistCidr': (basestring, False),
    }


class FlowVpcInterface(AWSObject):
    resource_type = "AWS::MediaConnect::FlowVpcInterface"

    props = {
        'FlowArn': (basestring, True),
        'Name': (basestring, True),
        'RoleArn': (basestring, True),
        'SecurityGroupIds': ([basestring], True),
        'SubnetId': (basestring, True),
    }
