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

See Also:
    `AWS developer guide for CodeDeploy
    <https://docs.aws.amazon.com/codedeploy/latest/userguide/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",
    "DeploymentConfig",
    "DeploymentConfigProperties",
    "DeploymentGroup",
    "DeploymentGroupProperties",
]


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


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

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

    RESOURCE_TYPE = "AWS::CodeDeploy::Application"

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


@attrs(**ATTRSCONFIG)
class DeploymentConfigProperties(ResourceProperties):
    DeploymentConfigName = attrib(default=None)
    MinimumHealthyHosts = attrib(default=None)


@attrs(**ATTRSCONFIG)
class DeploymentConfig(Resource):
    """A Deployment Config for CodeDeploy.

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

    RESOURCE_TYPE = "AWS::CodeDeploy::DeploymentConfig"

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


@attrs(**ATTRSCONFIG)
class DeploymentGroupProperties(ResourceProperties):
    AlarmConfiguration = attrib(default=None)
    ApplicationName = attrib(default=None)
    AutoRollbackConfiguration = attrib(default=None)
    AutoScalingGroups = attrib(default=None)
    Deployment = attrib(default=None)
    DeploymentConfigName = attrib(default=None)
    DeploymentGroupName = attrib(default=None)
    DeploymentStyle = attrib(default=None)
    Ec2TagFilters = attrib(default=None)
    Ec2TagSet = attrib(default=None)
    LoadBalancerInfo = attrib(default=None)
    OnPremisesInstanceTagFilters = attrib(default=None)
    OnPremisesTagSet = attrib(default=None)
    ServiceRoleArn = attrib(default=None)
    TriggerConfigurations = attrib(default=None)


@attrs(**ATTRSCONFIG)
class DeploymentGroup(Resource):
    """A Deployment Group for CodeDeploy.

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

    RESOURCE_TYPE = "AWS::CodeDeploy::DeploymentGroup"

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