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

See Also:
    `AWS developer guide for EventSchemas
    <https://docs.aws.amazon.com/eventbridge/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__ = [
    "Discoverer",
    "DiscovererProperties",
    "Registry",
    "RegistryProperties",
    "Schema",
    "SchemaProperties",
]


@attrs(**ATTRSCONFIG)
class DiscovererProperties(ResourceProperties):
    Description = attrib(default=None)
    SourceArn = attrib(default=None)
    Tags = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Discoverer(Resource):
    """A Discoverer for EventSchemas.

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

    RESOURCE_TYPE = "AWS::EventSchemas::Discoverer"

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


@attrs(**ATTRSCONFIG)
class RegistryProperties(ResourceProperties):
    Description = attrib(default=None)
    RegistryName = attrib(default=None)
    Tags = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Registry(Resource):
    """A Registry for EventSchemas.

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

    RESOURCE_TYPE = "AWS::EventSchemas::Registry"

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


@attrs(**ATTRSCONFIG)
class SchemaProperties(ResourceProperties):
    Content = attrib(default=None)
    Description = attrib(default=None)
    RegistryName = attrib(default=None)
    SchemaName = attrib(default=None)
    Tags = attrib(default=None)
    Type = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Schema(Resource):
    """A Schema for EventSchemas.

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

    RESOURCE_TYPE = "AWS::EventSchemas::Schema"

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