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

See Also:
    `AWS developer guide for Route53Resolver
    <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/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__ = [
    "ResolverEndpoint",
    "ResolverEndpointProperties",
    "ResolverRule",
    "ResolverRuleProperties",
    "ResolverRuleAssociation",
    "ResolverRuleAssociationProperties",
]


@attrs(**ATTRSCONFIG)
class ResolverEndpointProperties(ResourceProperties):
    Direction = attrib(default=None)
    IpAddresses = attrib(default=None)
    Name = attrib(default=None)
    SecurityGroupIds = attrib(default=None)
    Tags = attrib(default=None)


@attrs(**ATTRSCONFIG)
class ResolverEndpoint(Resource):
    """A Resolver Endpoint for Route53Resolver.

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

    RESOURCE_TYPE = "AWS::Route53Resolver::ResolverEndpoint"

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


@attrs(**ATTRSCONFIG)
class ResolverRuleProperties(ResourceProperties):
    DomainName = attrib(default=None)
    Name = attrib(default=None)
    ResolverEndpointId = attrib(default=None)
    RuleType = attrib(default=None)
    Tags = attrib(default=None)
    TargetIps = attrib(default=None)


@attrs(**ATTRSCONFIG)
class ResolverRule(Resource):
    """A Resolver Rule for Route53Resolver.

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

    RESOURCE_TYPE = "AWS::Route53Resolver::ResolverRule"

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


@attrs(**ATTRSCONFIG)
class ResolverRuleAssociationProperties(ResourceProperties):
    Name = attrib(default=None)
    ResolverRuleId = attrib(default=None)
    VPCId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class ResolverRuleAssociation(Resource):
    """A Resolver Rule Association for Route53Resolver.

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

    RESOURCE_TYPE = "AWS::Route53Resolver::ResolverRuleAssociation"

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