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

See Also:
    `AWS developer guide for CodePipeline
    <https://docs.aws.amazon.com/codepipeline/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__ = [
    "CustomActionType",
    "CustomActionTypeProperties",
    "Pipeline",
    "PipelineProperties",
    "Webhook",
    "WebhookProperties",
]


@attrs(**ATTRSCONFIG)
class CustomActionTypeProperties(ResourceProperties):
    Category = attrib(default=None)
    ConfigurationProperties = attrib(default=None)
    InputArtifactDetails = attrib(default=None)
    OutputArtifactDetails = attrib(default=None)
    Provider = attrib(default=None)
    Settings = attrib(default=None)
    Version = attrib(default=None)


@attrs(**ATTRSCONFIG)
class CustomActionType(Resource):
    """A Custom Action Type for CodePipeline.

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

    RESOURCE_TYPE = "AWS::CodePipeline::CustomActionType"

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


@attrs(**ATTRSCONFIG)
class PipelineProperties(ResourceProperties):
    ArtifactStore = attrib(default=None)
    ArtifactStores = attrib(default=None)
    DisableInboundStageTransitions = attrib(default=None)
    Name = attrib(default=None)
    RestartExecutionOnUpdate = attrib(default=None)
    RoleArn = attrib(default=None)
    Stages = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Pipeline(Resource):
    """A Pipeline for CodePipeline.

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

    RESOURCE_TYPE = "AWS::CodePipeline::Pipeline"

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


@attrs(**ATTRSCONFIG)
class WebhookProperties(ResourceProperties):
    Authentication = attrib(default=None)
    AuthenticationConfiguration = attrib(default=None)
    Filters = attrib(default=None)
    Name = attrib(default=None)
    RegisterWithThirdParty = attrib(default=None)
    TargetAction = attrib(default=None)
    TargetPipeline = attrib(default=None)
    TargetPipelineVersion = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Webhook(Resource):
    """A Webhook for CodePipeline.

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

    RESOURCE_TYPE = "AWS::CodePipeline::Webhook"

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