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

See Also:
    `AWS developer guide for SecretsManager
    <https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.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__ = [
    "ResourcePolicy",
    "ResourcePolicyProperties",
    "RotationSchedule",
    "RotationScheduleProperties",
    "Secret",
    "SecretProperties",
    "SecretTargetAttachment",
    "SecretTargetAttachmentProperties",
]


@attrs(**ATTRSCONFIG)
class ResourcePolicyProperties(ResourceProperties):
    ResourcePolicy = attrib(default=None)
    SecretId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class ResourcePolicy(Resource):
    """A Resource Policy for SecretsManager.

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

    RESOURCE_TYPE = "AWS::SecretsManager::ResourcePolicy"

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


@attrs(**ATTRSCONFIG)
class RotationScheduleProperties(ResourceProperties):
    RotationLambdaARN = attrib(default=None)
    RotationRules = attrib(default=None)
    SecretId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class RotationSchedule(Resource):
    """A Rotation Schedule for SecretsManager.

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

    RESOURCE_TYPE = "AWS::SecretsManager::RotationSchedule"

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


@attrs(**ATTRSCONFIG)
class SecretProperties(ResourceProperties):
    Description = attrib(default=None)
    GenerateSecretString = attrib(default=None)
    KmsKeyId = attrib(default=None)
    Name = attrib(default=None)
    SecretString = attrib(default=None)
    Tags = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Secret(Resource):
    """A Secret for SecretsManager.

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

    RESOURCE_TYPE = "AWS::SecretsManager::Secret"

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


@attrs(**ATTRSCONFIG)
class SecretTargetAttachmentProperties(ResourceProperties):
    SecretId = attrib(default=None)
    TargetId = attrib(default=None)
    TargetType = attrib(default=None)


@attrs(**ATTRSCONFIG)
class SecretTargetAttachment(Resource):
    """A Secret Target Attachment for SecretsManager.

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

    RESOURCE_TYPE = "AWS::SecretsManager::SecretTargetAttachment"

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