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

See Also:
    `AWS developer guide for CodeBuild
    <https://docs.aws.amazon.com/codebuild/latest/userguide/welcome.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__ = [
    "Project",
    "ProjectProperties",
    "SourceCredential",
    "SourceCredentialProperties",
]


@attrs(**ATTRSCONFIG)
class ProjectProperties(ResourceProperties):
    Artifacts = attrib(default=None)
    BadgeEnabled = attrib(default=None)
    Cache = attrib(default=None)
    Description = attrib(default=None)
    EncryptionKey = attrib(default=None)
    Environment = attrib(default=None)
    LogsConfig = attrib(default=None)
    Name = attrib(default=None)
    QueuedTimeoutInMinutes = attrib(default=None)
    SecondaryArtifacts = attrib(default=None)
    SecondarySources = attrib(default=None)
    SecondarySourceVersions = attrib(default=None)
    ServiceRole = attrib(default=None)
    Source = attrib(default=None)
    SourceVersion = attrib(default=None)
    Tags = attrib(default=None)
    TimeoutInMinutes = attrib(default=None)
    Triggers = attrib(default=None)
    VpcConfig = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Project(Resource):
    """A Project for CodeBuild.

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

    RESOURCE_TYPE = "AWS::CodeBuild::Project"

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


@attrs(**ATTRSCONFIG)
class SourceCredentialProperties(ResourceProperties):
    AuthType = attrib(default=None)
    ServerType = attrib(default=None)
    Token = attrib(default=None)
    Username = attrib(default=None)


@attrs(**ATTRSCONFIG)
class SourceCredential(Resource):
    """A Source Credential for CodeBuild.

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

    RESOURCE_TYPE = "AWS::CodeBuild::SourceCredential"

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