# Copyright (c) 2012-2022, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***


from . import AWSObject, AWSProperty, PropsDictType, Tags
from .validators import boolean


class IntermediateSourceConfiguration(AWSProperty):
    """
    `IntermediateSourceConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-matchingworkflow-intermediatesourceconfiguration.html>`__
    """

    props: PropsDictType = {
        "IntermediateS3Path": (str, True),
    }


class ProviderProperties(AWSProperty):
    """
    `ProviderProperties <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-matchingworkflow-providerproperties.html>`__
    """

    props: PropsDictType = {
        "IntermediateSourceConfiguration": (IntermediateSourceConfiguration, False),
        "ProviderConfiguration": (dict, False),
        "ProviderServiceArn": (str, True),
    }


class IdMappingTechniques(AWSProperty):
    """
    `IdMappingTechniques <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-idmappingworkflow-idmappingtechniques.html>`__
    """

    props: PropsDictType = {
        "IdMappingType": (str, False),
        "ProviderProperties": (ProviderProperties, False),
    }


class IdMappingWorkflowInputSource(AWSProperty):
    """
    `IdMappingWorkflowInputSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-idmappingworkflow-idmappingworkflowinputsource.html>`__
    """

    props: PropsDictType = {
        "InputSourceARN": (str, True),
        "SchemaArn": (str, True),
    }


class IdMappingWorkflowOutputSource(AWSProperty):
    """
    `IdMappingWorkflowOutputSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-idmappingworkflow-idmappingworkflowoutputsource.html>`__
    """

    props: PropsDictType = {
        "KMSArn": (str, False),
        "OutputS3Path": (str, True),
    }


class IdMappingWorkflow(AWSObject):
    """
    `IdMappingWorkflow <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-entityresolution-idmappingworkflow.html>`__
    """

    resource_type = "AWS::EntityResolution::IdMappingWorkflow"

    props: PropsDictType = {
        "Description": (str, False),
        "IdMappingTechniques": (IdMappingTechniques, True),
        "InputSourceConfig": ([IdMappingWorkflowInputSource], True),
        "OutputSourceConfig": ([IdMappingWorkflowOutputSource], True),
        "RoleArn": (str, True),
        "Tags": (Tags, False),
        "WorkflowName": (str, True),
    }


class InputSource(AWSProperty):
    """
    `InputSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-matchingworkflow-inputsource.html>`__
    """

    props: PropsDictType = {
        "ApplyNormalization": (boolean, False),
        "InputSourceARN": (str, True),
        "SchemaArn": (str, True),
    }


class OutputAttribute(AWSProperty):
    """
    `OutputAttribute <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-matchingworkflow-outputattribute.html>`__
    """

    props: PropsDictType = {
        "Hashed": (boolean, False),
        "Name": (str, True),
    }


class OutputSource(AWSProperty):
    """
    `OutputSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-matchingworkflow-outputsource.html>`__
    """

    props: PropsDictType = {
        "ApplyNormalization": (boolean, False),
        "KMSArn": (str, False),
        "Output": ([OutputAttribute], True),
        "OutputS3Path": (str, True),
    }


class Rule(AWSProperty):
    """
    `Rule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-matchingworkflow-rule.html>`__
    """

    props: PropsDictType = {
        "MatchingKeys": ([str], True),
        "RuleName": (str, True),
    }


class RuleBasedProperties(AWSProperty):
    """
    `RuleBasedProperties <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-matchingworkflow-rulebasedproperties.html>`__
    """

    props: PropsDictType = {
        "AttributeMatchingModel": (str, True),
        "Rules": ([Rule], True),
    }


class ResolutionTechniques(AWSProperty):
    """
    `ResolutionTechniques <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-matchingworkflow-resolutiontechniques.html>`__
    """

    props: PropsDictType = {
        "ProviderProperties": (ProviderProperties, False),
        "ResolutionType": (str, False),
        "RuleBasedProperties": (RuleBasedProperties, False),
    }


class MatchingWorkflow(AWSObject):
    """
    `MatchingWorkflow <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-entityresolution-matchingworkflow.html>`__
    """

    resource_type = "AWS::EntityResolution::MatchingWorkflow"

    props: PropsDictType = {
        "Description": (str, False),
        "InputSourceConfig": ([InputSource], True),
        "OutputSourceConfig": ([OutputSource], True),
        "ResolutionTechniques": (ResolutionTechniques, True),
        "RoleArn": (str, True),
        "Tags": (Tags, False),
        "WorkflowName": (str, True),
    }


class SchemaInputAttribute(AWSProperty):
    """
    `SchemaInputAttribute <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-entityresolution-schemamapping-schemainputattribute.html>`__
    """

    props: PropsDictType = {
        "FieldName": (str, True),
        "GroupName": (str, False),
        "MatchKey": (str, False),
        "SubType": (str, False),
        "Type": (str, True),
    }


class SchemaMapping(AWSObject):
    """
    `SchemaMapping <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-entityresolution-schemamapping.html>`__
    """

    resource_type = "AWS::EntityResolution::SchemaMapping"

    props: PropsDictType = {
        "Description": (str, False),
        "MappedInputFields": ([SchemaInputAttribute], True),
        "SchemaName": (str, True),
        "Tags": (Tags, False),
    }
