# Copyright (c) 2012-2025, 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 PublicAccessBlockConfiguration(AWSProperty):
    """
    `PublicAccessBlockConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-accesspoint-publicaccessblockconfiguration.html>`__
    """

    props: PropsDictType = {
        "BlockPublicAcls": (boolean, False),
        "BlockPublicPolicy": (boolean, False),
        "IgnorePublicAcls": (boolean, False),
        "RestrictPublicBuckets": (boolean, False),
    }


class Scope(AWSProperty):
    """
    `Scope <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-accesspoint-scope.html>`__
    """

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


class VpcConfiguration(AWSProperty):
    """
    `VpcConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-accesspoint-vpcconfiguration.html>`__
    """

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


class AccessPoint(AWSObject):
    """
    `AccessPoint <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3express-accesspoint.html>`__
    """

    resource_type = "AWS::S3Express::AccessPoint"

    props: PropsDictType = {
        "Bucket": (str, True),
        "BucketAccountId": (str, False),
        "Name": (str, False),
        "Policy": (dict, False),
        "PublicAccessBlockConfiguration": (PublicAccessBlockConfiguration, False),
        "Scope": (Scope, False),
        "Tags": (Tags, False),
        "VpcConfiguration": (VpcConfiguration, False),
    }


class BucketPolicy(AWSObject):
    """
    `BucketPolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3express-bucketpolicy.html>`__
    """

    resource_type = "AWS::S3Express::BucketPolicy"

    props: PropsDictType = {
        "Bucket": (str, True),
        "PolicyDocument": (dict, True),
    }


class ServerSideEncryptionByDefault(AWSProperty):
    """
    `ServerSideEncryptionByDefault <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-directorybucket-serversideencryptionbydefault.html>`__
    """

    props: PropsDictType = {
        "KMSMasterKeyID": (str, False),
        "SSEAlgorithm": (str, True),
    }


class ServerSideEncryptionRule(AWSProperty):
    """
    `ServerSideEncryptionRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-directorybucket-serversideencryptionrule.html>`__
    """

    props: PropsDictType = {
        "BucketKeyEnabled": (boolean, False),
        "ServerSideEncryptionByDefault": (ServerSideEncryptionByDefault, False),
    }


class BucketEncryption(AWSProperty):
    """
    `BucketEncryption <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-directorybucket-bucketencryption.html>`__
    """

    props: PropsDictType = {
        "ServerSideEncryptionConfiguration": ([ServerSideEncryptionRule], True),
    }


class AbortIncompleteMultipartUpload(AWSProperty):
    """
    `AbortIncompleteMultipartUpload <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-directorybucket-abortincompletemultipartupload.html>`__
    """

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


class Rule(AWSProperty):
    """
    `Rule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-directorybucket-rule.html>`__
    """

    props: PropsDictType = {
        "AbortIncompleteMultipartUpload": (AbortIncompleteMultipartUpload, False),
        "ExpirationInDays": (integer, False),
        "Id": (str, False),
        "ObjectSizeGreaterThan": (str, False),
        "ObjectSizeLessThan": (str, False),
        "Prefix": (str, False),
        "Status": (str, True),
    }


class LifecycleConfiguration(AWSProperty):
    """
    `LifecycleConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-directorybucket-lifecycleconfiguration.html>`__
    """

    props: PropsDictType = {
        "Rules": ([Rule], True),
    }


class DirectoryBucket(AWSObject):
    """
    `DirectoryBucket <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3express-directorybucket.html>`__
    """

    resource_type = "AWS::S3Express::DirectoryBucket"

    props: PropsDictType = {
        "BucketEncryption": (BucketEncryption, False),
        "BucketName": (str, False),
        "DataRedundancy": (str, True),
        "LifecycleConfiguration": (LifecycleConfiguration, False),
        "LocationName": (str, True),
        "Tags": (Tags, False),
    }
