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

See Also:
    `AWS developer guide for Cognito
    <https://docs.aws.amazon.com/cognito/latest/developerguide/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__ = [
    "IdentityPool",
    "IdentityPoolProperties",
    "IdentityPoolRoleAttachment",
    "IdentityPoolRoleAttachmentProperties",
    "UserPool",
    "UserPoolProperties",
    "UserPoolClient",
    "UserPoolClientProperties",
    "UserPoolGroup",
    "UserPoolGroupProperties",
    "UserPoolUser",
    "UserPoolUserProperties",
    "UserPoolUserToGroupAttachment",
    "UserPoolUserToGroupAttachmentProperties",
]


@attrs(**ATTRSCONFIG)
class IdentityPoolProperties(ResourceProperties):
    AllowUnauthenticatedIdentities = attrib(default=None)
    CognitoEvents = attrib(default=None)
    CognitoIdentityProviders = attrib(default=None)
    CognitoStreams = attrib(default=None)
    DeveloperProviderName = attrib(default=None)
    IdentityPoolName = attrib(default=None)
    OpenIdConnectProviderARNs = attrib(default=None)
    PushSync = attrib(default=None)
    SamlProviderARNs = attrib(default=None)
    SupportedLoginProviders = attrib(default=None)


@attrs(**ATTRSCONFIG)
class IdentityPool(Resource):
    """A Identity Pool for Cognito.

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

    RESOURCE_TYPE = "AWS::Cognito::IdentityPool"

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


@attrs(**ATTRSCONFIG)
class IdentityPoolRoleAttachmentProperties(ResourceProperties):
    IdentityPoolId = attrib(default=None)
    RoleMappings = attrib(default=None)
    Roles = attrib(default=None)


@attrs(**ATTRSCONFIG)
class IdentityPoolRoleAttachment(Resource):
    """A Identity Pool Role Attachment for Cognito.

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

    RESOURCE_TYPE = "AWS::Cognito::IdentityPoolRoleAttachment"

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


@attrs(**ATTRSCONFIG)
class UserPoolProperties(ResourceProperties):
    AdminCreateUserConfig = attrib(default=None)
    AliasAttributes = attrib(default=None)
    AutoVerifiedAttributes = attrib(default=None)
    DeviceConfiguration = attrib(default=None)
    EmailConfiguration = attrib(default=None)
    EmailVerificationMessage = attrib(default=None)
    EmailVerificationSubject = attrib(default=None)
    LambdaConfig = attrib(default=None)
    MfaConfiguration = attrib(default=None)
    Policies = attrib(default=None)
    Schema = attrib(default=None)
    SmsAuthenticationMessage = attrib(default=None)
    SmsConfiguration = attrib(default=None)
    SmsVerificationMessage = attrib(default=None)
    UsernameAttributes = attrib(default=None)
    UserPoolName = attrib(default=None)
    UserPoolTags = attrib(default=None)


@attrs(**ATTRSCONFIG)
class UserPool(Resource):
    """A User Pool for Cognito.

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

    RESOURCE_TYPE = "AWS::Cognito::UserPool"

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


@attrs(**ATTRSCONFIG)
class UserPoolClientProperties(ResourceProperties):
    ClientName = attrib(default=None)
    ExplicitAuthFlows = attrib(default=None)
    GenerateSecret = attrib(default=None)
    ReadAttributes = attrib(default=None)
    RefreshTokenValidity = attrib(default=None)
    UserPoolId = attrib(default=None)
    WriteAttributes = attrib(default=None)


@attrs(**ATTRSCONFIG)
class UserPoolClient(Resource):
    """A User Pool Client for Cognito.

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

    RESOURCE_TYPE = "AWS::Cognito::UserPoolClient"

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


@attrs(**ATTRSCONFIG)
class UserPoolGroupProperties(ResourceProperties):
    Description = attrib(default=None)
    GroupName = attrib(default=None)
    Precedence = attrib(default=None)
    RoleArn = attrib(default=None)
    UserPoolId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class UserPoolGroup(Resource):
    """A User Pool Group for Cognito.

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

    RESOURCE_TYPE = "AWS::Cognito::UserPoolGroup"

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


@attrs(**ATTRSCONFIG)
class UserPoolUserProperties(ResourceProperties):
    DesiredDeliveryMediums = attrib(default=None)
    ForceAliasCreation = attrib(default=None)
    MessageAction = attrib(default=None)
    UserAttributes = attrib(default=None)
    Username = attrib(default=None)
    UserPoolId = attrib(default=None)
    ValidationData = attrib(default=None)


@attrs(**ATTRSCONFIG)
class UserPoolUser(Resource):
    """A User Pool User for Cognito.

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

    RESOURCE_TYPE = "AWS::Cognito::UserPoolUser"

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


@attrs(**ATTRSCONFIG)
class UserPoolUserToGroupAttachmentProperties(ResourceProperties):
    GroupName = attrib(default=None)
    Username = attrib(default=None)
    UserPoolId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class UserPoolUserToGroupAttachment(Resource):
    """A User Pool User To Group Attachment for Cognito.

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

    RESOURCE_TYPE = "AWS::Cognito::UserPoolUserToGroupAttachment"

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