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

See Also:
    `AWS developer guide for Batch
    <https://docs.aws.amazon.com/batch/latest/userguide/what-is-batch.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__ = [
    "ComputeEnvironment",
    "ComputeEnvironmentProperties",
    "JobDefinition",
    "JobDefinitionProperties",
    "JobQueue",
    "JobQueueProperties",
]


@attrs(**ATTRSCONFIG)
class ComputeEnvironmentProperties(ResourceProperties):
    ComputeEnvironmentName = attrib(default=None)
    ComputeResources = attrib(default=None)
    ServiceRole = attrib(default=None)
    State = attrib(default=None)
    Type = attrib(default=None)


@attrs(**ATTRSCONFIG)
class ComputeEnvironment(Resource):
    """A Compute Environment for Batch.

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

    RESOURCE_TYPE = "AWS::Batch::ComputeEnvironment"

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


@attrs(**ATTRSCONFIG)
class JobDefinitionProperties(ResourceProperties):
    ContainerProperties = attrib(default=None)
    JobDefinitionName = attrib(default=None)
    NodeProperties = attrib(default=None)
    Parameters = attrib(default=None)
    RetryStrategy = attrib(default=None)
    Timeout = attrib(default=None)
    Type = attrib(default=None)


@attrs(**ATTRSCONFIG)
class JobDefinition(Resource):
    """A Job Definition for Batch.

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

    RESOURCE_TYPE = "AWS::Batch::JobDefinition"

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


@attrs(**ATTRSCONFIG)
class JobQueueProperties(ResourceProperties):
    ComputeEnvironmentOrder = attrib(default=None)
    JobQueueName = attrib(default=None)
    Priority = attrib(default=None)
    State = attrib(default=None)


@attrs(**ATTRSCONFIG)
class JobQueue(Resource):
    """A Job Queue for Batch.

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

    RESOURCE_TYPE = "AWS::Batch::JobQueue"

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