"""Raw representations of every data type in the AWS Backup service.

See Also:
    `AWS developer guide for Backup
    <https://docs.aws.amazon.com/aws-backup/latest/devguide/index.html>`_

This file is automatically generated, and should not be directly edited.
"""

from attr import attrib
from attr import attrs

from ..core import ATTRSCONFIG
from ..core import Resource
from ..core import ResourceProperties
from ..core import create_object_converter

__all__ = [
    "BackupPlan",
    "BackupPlanProperties",
    "BackupSelection",
    "BackupSelectionProperties",
    "BackupVault",
    "BackupVaultProperties",
]


@attrs(**ATTRSCONFIG)
class BackupPlanProperties(ResourceProperties):
    BackupPlan = attrib(default=None)
    BackupPlanTags = attrib(default=None)


@attrs(**ATTRSCONFIG)
class BackupPlan(Resource):
    """A Backup Plan for Backup.

    See Also:
        `AWS Cloud Formation documentation for BackupPlan
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupplan.html>`_
    """

    RESOURCE_TYPE = "AWS::Backup::BackupPlan"

    Properties: BackupPlanProperties = attrib(
        factory=BackupPlanProperties,
        converter=create_object_converter(BackupPlanProperties),
    )


@attrs(**ATTRSCONFIG)
class BackupSelectionProperties(ResourceProperties):
    BackupPlanId = attrib(default=None)
    BackupSelection = attrib(default=None)


@attrs(**ATTRSCONFIG)
class BackupSelection(Resource):
    """A Backup Selection for Backup.

    See Also:
        `AWS Cloud Formation documentation for BackupSelection
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupselection.html>`_
    """

    RESOURCE_TYPE = "AWS::Backup::BackupSelection"

    Properties: BackupSelectionProperties = attrib(
        factory=BackupSelectionProperties,
        converter=create_object_converter(BackupSelectionProperties),
    )


@attrs(**ATTRSCONFIG)
class BackupVaultProperties(ResourceProperties):
    AccessPolicy = attrib(default=None)
    BackupVaultName = attrib(default=None)
    BackupVaultTags = attrib(default=None)
    EncryptionKeyArn = attrib(default=None)
    Notifications = attrib(default=None)


@attrs(**ATTRSCONFIG)
class BackupVault(Resource):
    """A Backup Vault for Backup.

    See Also:
        `AWS Cloud Formation documentation for BackupVault
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupvault.html>`_
    """

    RESOURCE_TYPE = "AWS::Backup::BackupVault"

    Properties: BackupVaultProperties = attrib(
        factory=BackupVaultProperties,
        converter=create_object_converter(BackupVaultProperties),
    )
