from . import AWSObject, AWSProperty, Tags
from .compat import policytypes


class LifecyclePolicy(AWSProperty):
    props = {
        'LifecyclePolicyText': (basestring, False),
        'RegistryId': (basestring, False),
    }


class Repository(AWSObject):
    resource_type = "AWS::ECR::Repository"

    props = {
        'ImageScanningConfiguration': (dict, False),
        'ImageTagMutability': (basestring, False),
        'LifecyclePolicy': (LifecyclePolicy, False),
        'RepositoryName': (basestring, False),
        'RepositoryPolicyText': (policytypes, False),
        'Tags': (Tags, False),
    }

# 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, AWSProperty, Tags
from .compat import policytypes


class PublicRepository(AWSObject):
    resource_type = "AWS::ECR::PublicRepository"

    props = {
        'RepositoryCatalogData': (dict, False),
        'RepositoryName': (basestring, False),
        'RepositoryPolicyText': (policytypes, False),
        'Tags': (Tags, False),
    }


class RegistryPolicy(AWSObject):
    resource_type = "AWS::ECR::RegistryPolicy"

    props = {
        'PolicyText': (policytypes, True),
    }


class ReplicationDestination(AWSProperty):
    props = {
        'Region': (basestring, True),
        'RegistryId': (basestring, True),
    }


class ReplicationRule(AWSProperty):
    props = {
        'Destinations': ([ReplicationDestination], True),
    }


class ReplicationConfigurationProperty(AWSProperty):
    props = {
        'Rules': ([ReplicationRule], True),
    }


class ReplicationConfiguration(AWSObject):
    resource_type = "AWS::ECR::Repository"

    props = {
        'ReplicationConfigurationProperty':
            (ReplicationConfigurationProperty, True),
    }


class LifecyclePolicy(AWSProperty):
    props = {
        'LifecyclePolicyText': (basestring, False),
        'RegistryId': (basestring, False),
    }


class Repository(AWSObject):
    resource_type = "AWS::ECR::Repository"

    props = {
        'ImageScanningConfiguration': (dict, False),
        'ImageTagMutability': (basestring, False),
        'LifecyclePolicy': (LifecyclePolicy, False),
        'RepositoryName': (basestring, False),
        'RepositoryPolicyText': (policytypes, False),
        'Tags': (Tags, False),
    }

Update ECR per 2020-12-18 and 2021-02-04 changes
Update ECR per 2020-12-18 and 2021-02-04 changes
