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

See Also:
    `AWS developer guide for Glue
    <https://docs.aws.amazon.com/glue/latest/dg/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__ = [
    "Classifier",
    "ClassifierProperties",
    "Connection",
    "ConnectionProperties",
    "Crawler",
    "CrawlerProperties",
    "Database",
    "DatabaseProperties",
    "DevEndpoint",
    "DevEndpointProperties",
    "Job",
    "JobProperties",
    "Partition",
    "PartitionProperties",
    "Table",
    "TableProperties",
    "Trigger",
    "TriggerProperties",
]


@attrs(**ATTRSCONFIG)
class ClassifierProperties(ResourceProperties):
    GrokClassifier = attrib(default=None)
    JsonClassifier = attrib(default=None)
    XMLClassifier = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Classifier(Resource):
    """A Classifier for Glue.

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

    RESOURCE_TYPE = "AWS::Glue::Classifier"

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


@attrs(**ATTRSCONFIG)
class ConnectionProperties(ResourceProperties):
    CatalogId = attrib(default=None)
    ConnectionInput = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Connection(Resource):
    """A Connection for Glue.

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

    RESOURCE_TYPE = "AWS::Glue::Connection"

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


@attrs(**ATTRSCONFIG)
class CrawlerProperties(ResourceProperties):
    Classifiers = attrib(default=None)
    Configuration = attrib(default=None)
    DatabaseName = attrib(default=None)
    Description = attrib(default=None)
    Name = attrib(default=None)
    Role = attrib(default=None)
    Schedule = attrib(default=None)
    SchemaChangePolicy = attrib(default=None)
    TablePrefix = attrib(default=None)
    Targets = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Crawler(Resource):
    """A Crawler for Glue.

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

    RESOURCE_TYPE = "AWS::Glue::Crawler"

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


@attrs(**ATTRSCONFIG)
class DatabaseProperties(ResourceProperties):
    CatalogId = attrib(default=None)
    DatabaseInput = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Database(Resource):
    """A Database for Glue.

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

    RESOURCE_TYPE = "AWS::Glue::Database"

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


@attrs(**ATTRSCONFIG)
class DevEndpointProperties(ResourceProperties):
    EndpointName = attrib(default=None)
    ExtraJarsS3Path = attrib(default=None)
    ExtraPythonLibsS3Path = attrib(default=None)
    NumberOfNodes = attrib(default=None)
    PublicKey = attrib(default=None)
    RoleArn = attrib(default=None)
    SecurityGroupIds = attrib(default=None)
    SubnetId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class DevEndpoint(Resource):
    """A Dev Endpoint for Glue.

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

    RESOURCE_TYPE = "AWS::Glue::DevEndpoint"

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


@attrs(**ATTRSCONFIG)
class JobProperties(ResourceProperties):
    AllocatedCapacity = attrib(default=None)
    Command = attrib(default=None)
    Connections = attrib(default=None)
    DefaultArguments = attrib(default=None)
    Description = attrib(default=None)
    ExecutionProperty = attrib(default=None)
    LogUri = attrib(default=None)
    MaxRetries = attrib(default=None)
    Name = attrib(default=None)
    Role = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Job(Resource):
    """A Job for Glue.

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

    RESOURCE_TYPE = "AWS::Glue::Job"

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


@attrs(**ATTRSCONFIG)
class PartitionProperties(ResourceProperties):
    CatalogId = attrib(default=None)
    DatabaseName = attrib(default=None)
    PartitionInput = attrib(default=None)
    TableName = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Partition(Resource):
    """A Partition for Glue.

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

    RESOURCE_TYPE = "AWS::Glue::Partition"

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


@attrs(**ATTRSCONFIG)
class TableProperties(ResourceProperties):
    CatalogId = attrib(default=None)
    DatabaseName = attrib(default=None)
    TableInput = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Table(Resource):
    """A Table for Glue.

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

    RESOURCE_TYPE = "AWS::Glue::Table"

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


@attrs(**ATTRSCONFIG)
class TriggerProperties(ResourceProperties):
    Actions = attrib(default=None)
    Description = attrib(default=None)
    Name = attrib(default=None)
    Predicate = attrib(default=None)
    Schedule = attrib(default=None)
    Type = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Trigger(Resource):
    """A Trigger for Glue.

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

    RESOURCE_TYPE = "AWS::Glue::Trigger"

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