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

See Also:
    `AWS developer guide for ElasticBeanstalk
    <https://docs.aws.amazon.com/elasticbeanstalk/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__ = [
    "Application",
    "ApplicationProperties",
    "ApplicationVersion",
    "ApplicationVersionProperties",
    "ConfigurationTemplate",
    "ConfigurationTemplateProperties",
    "Environment",
    "EnvironmentProperties",
]


@attrs(**ATTRSCONFIG)
class ApplicationProperties(ResourceProperties):
    ApplicationName = attrib(default=None)
    Description = attrib(default=None)
    ResourceLifecycleConfig = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Application(Resource):
    """A Application for ElasticBeanstalk.

    See Also:
        `AWS Cloud Formation documentation for Application
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk.html>`_
    """

    RESOURCE_TYPE = "AWS::ElasticBeanstalk::Application"

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


@attrs(**ATTRSCONFIG)
class ApplicationVersionProperties(ResourceProperties):
    ApplicationName = attrib(default=None)
    Description = attrib(default=None)
    SourceBundle = attrib(default=None)


@attrs(**ATTRSCONFIG)
class ApplicationVersion(Resource):
    """A Application Version for ElasticBeanstalk.

    See Also:
        `AWS Cloud Formation documentation for ApplicationVersion
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk-version.html>`_
    """

    RESOURCE_TYPE = "AWS::ElasticBeanstalk::ApplicationVersion"

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


@attrs(**ATTRSCONFIG)
class ConfigurationTemplateProperties(ResourceProperties):
    ApplicationName = attrib(default=None)
    Description = attrib(default=None)
    EnvironmentId = attrib(default=None)
    OptionSettings = attrib(default=None)
    PlatformArn = attrib(default=None)
    SolutionStackName = attrib(default=None)
    SourceConfiguration = attrib(default=None)


@attrs(**ATTRSCONFIG)
class ConfigurationTemplate(Resource):
    """A Configuration Template for ElasticBeanstalk.

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

    RESOURCE_TYPE = "AWS::ElasticBeanstalk::ConfigurationTemplate"

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


@attrs(**ATTRSCONFIG)
class EnvironmentProperties(ResourceProperties):
    ApplicationName = attrib(default=None)
    CNAMEPrefix = attrib(default=None)
    Description = attrib(default=None)
    EnvironmentName = attrib(default=None)
    OptionSettings = attrib(default=None)
    PlatformArn = attrib(default=None)
    SolutionStackName = attrib(default=None)
    Tags = attrib(default=None)
    TemplateName = attrib(default=None)
    Tier = attrib(default=None)
    VersionLabel = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Environment(Resource):
    """A Environment for ElasticBeanstalk.

    See Also:
        `AWS Cloud Formation documentation for Environment
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk-environment.html>`_
    """

    RESOURCE_TYPE = "AWS::ElasticBeanstalk::Environment"

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