# 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, Tags
from .validators import boolean, integer


class Channel(AWSObject):
    """
    `Channel <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackagev2-channel.html>`__
    """

    resource_type = "AWS::MediaPackageV2::Channel"

    props: PropsDictType = {
        "ChannelGroupName": (str, False),
        "ChannelName": (str, False),
        "Description": (str, False),
        "Tags": (Tags, False),
    }


class ChannelGroup(AWSObject):
    """
    `ChannelGroup <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackagev2-channelgroup.html>`__
    """

    resource_type = "AWS::MediaPackageV2::ChannelGroup"

    props: PropsDictType = {
        "ChannelGroupName": (str, False),
        "Description": (str, False),
        "Tags": (Tags, False),
    }


class ChannelPolicy(AWSObject):
    """
    `ChannelPolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackagev2-channelpolicy.html>`__
    """

    resource_type = "AWS::MediaPackageV2::ChannelPolicy"

    props: PropsDictType = {
        "ChannelGroupName": (str, False),
        "ChannelName": (str, False),
        "Policy": (dict, True),
    }


class FilterConfiguration(AWSProperty):
    """
    `FilterConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-filterconfiguration.html>`__
    """

    props: PropsDictType = {
        "End": (str, False),
        "ManifestFilter": (str, False),
        "Start": (str, False),
        "TimeDelaySeconds": (integer, False),
    }


class ScteHls(AWSProperty):
    """
    `ScteHls <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-sctehls.html>`__
    """

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


class HlsManifestConfiguration(AWSProperty):
    """
    `HlsManifestConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-hlsmanifestconfiguration.html>`__
    """

    props: PropsDictType = {
        "ChildManifestName": (str, False),
        "FilterConfiguration": (FilterConfiguration, False),
        "ManifestName": (str, True),
        "ManifestWindowSeconds": (integer, False),
        "ProgramDateTimeIntervalSeconds": (integer, False),
        "ScteHls": (ScteHls, False),
        "Url": (str, False),
    }


class LowLatencyHlsManifestConfiguration(AWSProperty):
    """
    `LowLatencyHlsManifestConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-lowlatencyhlsmanifestconfiguration.html>`__
    """

    props: PropsDictType = {
        "ChildManifestName": (str, False),
        "FilterConfiguration": (FilterConfiguration, False),
        "ManifestName": (str, True),
        "ManifestWindowSeconds": (integer, False),
        "ProgramDateTimeIntervalSeconds": (integer, False),
        "ScteHls": (ScteHls, False),
        "Url": (str, False),
    }


class EncryptionMethod(AWSProperty):
    """
    `EncryptionMethod <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-encryptionmethod.html>`__
    """

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


class EncryptionContractConfiguration(AWSProperty):
    """
    `EncryptionContractConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-encryptioncontractconfiguration.html>`__
    """

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


class SpekeKeyProvider(AWSProperty):
    """
    `SpekeKeyProvider <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-spekekeyprovider.html>`__
    """

    props: PropsDictType = {
        "DrmSystems": ([str], True),
        "EncryptionContractConfiguration": (EncryptionContractConfiguration, True),
        "ResourceId": (str, True),
        "RoleArn": (str, True),
        "Url": (str, True),
    }


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

    props: PropsDictType = {
        "ConstantInitializationVector": (str, False),
        "EncryptionMethod": (EncryptionMethod, True),
        "KeyRotationIntervalSeconds": (integer, False),
        "SpekeKeyProvider": (SpekeKeyProvider, True),
    }


class Scte(AWSProperty):
    """
    `Scte <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-scte.html>`__
    """

    props: PropsDictType = {
        "ScteFilter": ([str], False),
    }


class Segment(AWSProperty):
    """
    `Segment <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-segment.html>`__
    """

    props: PropsDictType = {
        "Encryption": (Encryption, False),
        "IncludeIframeOnlyStreams": (boolean, False),
        "Scte": (Scte, False),
        "SegmentDurationSeconds": (integer, False),
        "SegmentName": (str, False),
        "TsIncludeDvbSubtitles": (boolean, False),
        "TsUseAudioRenditionGroup": (boolean, False),
    }


class OriginEndpoint(AWSObject):
    """
    `OriginEndpoint <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackagev2-originendpoint.html>`__
    """

    resource_type = "AWS::MediaPackageV2::OriginEndpoint"

    props: PropsDictType = {
        "ChannelGroupName": (str, False),
        "ChannelName": (str, False),
        "ContainerType": (str, True),
        "Description": (str, False),
        "HlsManifests": ([HlsManifestConfiguration], False),
        "LowLatencyHlsManifests": ([LowLatencyHlsManifestConfiguration], False),
        "OriginEndpointName": (str, False),
        "Segment": (Segment, False),
        "StartoverWindowSeconds": (integer, False),
        "Tags": (Tags, False),
    }


class OriginEndpointPolicy(AWSObject):
    """
    `OriginEndpointPolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackagev2-originendpointpolicy.html>`__
    """

    resource_type = "AWS::MediaPackageV2::OriginEndpointPolicy"

    props: PropsDictType = {
        "ChannelGroupName": (str, False),
        "ChannelName": (str, False),
        "OriginEndpointName": (str, False),
        "Policy": (dict, True),
    }


class IngestEndpoint(AWSProperty):
    """
    `IngestEndpoint <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-channel-ingestendpoint.html>`__
    """

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