# 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
from .validators import boolean, double, integer


class NoteUpdate(AWSProperty):
    """
    `NoteUpdate <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-noteupdate.html>`__
    """

    props: PropsDictType = {
        "Text": (str, True),
        "UpdatedBy": (dict, True),
    }


class RelatedFinding(AWSProperty):
    """
    `RelatedFinding <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-relatedfinding.html>`__
    """

    props: PropsDictType = {
        "Id": (dict, True),
        "ProductArn": (str, True),
    }


class SeverityUpdate(AWSProperty):
    """
    `SeverityUpdate <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-severityupdate.html>`__
    """

    props: PropsDictType = {
        "Label": (str, False),
        "Normalized": (integer, False),
        "Product": (double, False),
    }


class WorkflowUpdate(AWSProperty):
    """
    `WorkflowUpdate <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-workflowupdate.html>`__
    """

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


class AutomationRulesFindingFieldsUpdate(AWSProperty):
    """
    `AutomationRulesFindingFieldsUpdate <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-automationrulesfindingfieldsupdate.html>`__
    """

    props: PropsDictType = {
        "Confidence": (integer, False),
        "Criticality": (integer, False),
        "Note": (NoteUpdate, False),
        "RelatedFindings": ([RelatedFinding], False),
        "Severity": (SeverityUpdate, False),
        "Types": ([str], False),
        "UserDefinedFields": (dict, False),
        "VerificationState": (str, False),
        "Workflow": (WorkflowUpdate, False),
    }


class AutomationRulesAction(AWSProperty):
    """
    `AutomationRulesAction <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-automationrulesaction.html>`__
    """

    props: PropsDictType = {
        "FindingFieldsUpdate": (AutomationRulesFindingFieldsUpdate, True),
        "Type": (str, True),
    }


class DateRange(AWSProperty):
    """
    `DateRange <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-daterange.html>`__
    """

    props: PropsDictType = {
        "Unit": (str, True),
        "Value": (double, True),
    }


class DateFilter(AWSProperty):
    """
    `DateFilter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-datefilter.html>`__
    """

    props: PropsDictType = {
        "DateRange": (DateRange, False),
        "End": (str, False),
        "Start": (str, False),
    }


class MapFilter(AWSProperty):
    """
    `MapFilter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-mapfilter.html>`__
    """

    props: PropsDictType = {
        "Comparison": (str, True),
        "Key": (str, True),
        "Value": (str, True),
    }


class NumberFilter(AWSProperty):
    """
    `NumberFilter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-numberfilter.html>`__
    """

    props: PropsDictType = {
        "Eq": (double, False),
        "Gte": (double, False),
        "Lte": (double, False),
    }


class StringFilter(AWSProperty):
    """
    `StringFilter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-stringfilter.html>`__
    """

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


class AutomationRulesFindingFilters(AWSProperty):
    """
    `AutomationRulesFindingFilters <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrule-automationrulesfindingfilters.html>`__
    """

    props: PropsDictType = {
        "AwsAccountId": ([StringFilter], False),
        "CompanyName": ([StringFilter], False),
        "ComplianceAssociatedStandardsId": ([StringFilter], False),
        "ComplianceSecurityControlId": ([StringFilter], False),
        "ComplianceStatus": ([StringFilter], False),
        "Confidence": ([NumberFilter], False),
        "CreatedAt": ([DateFilter], False),
        "Criticality": ([NumberFilter], False),
        "Description": ([StringFilter], False),
        "FirstObservedAt": ([DateFilter], False),
        "GeneratorId": ([StringFilter], False),
        "Id": ([StringFilter], False),
        "LastObservedAt": ([DateFilter], False),
        "NoteText": ([StringFilter], False),
        "NoteUpdatedAt": ([DateFilter], False),
        "NoteUpdatedBy": ([StringFilter], False),
        "ProductArn": ([StringFilter], False),
        "ProductName": ([StringFilter], False),
        "RecordState": ([StringFilter], False),
        "RelatedFindingsId": ([StringFilter], False),
        "RelatedFindingsProductArn": ([StringFilter], False),
        "ResourceDetailsOther": ([MapFilter], False),
        "ResourceId": ([StringFilter], False),
        "ResourcePartition": ([StringFilter], False),
        "ResourceRegion": ([StringFilter], False),
        "ResourceTags": ([MapFilter], False),
        "ResourceType": ([StringFilter], False),
        "SeverityLabel": ([StringFilter], False),
        "SourceUrl": ([StringFilter], False),
        "Title": ([StringFilter], False),
        "Type": ([StringFilter], False),
        "UpdatedAt": ([DateFilter], False),
        "UserDefinedFields": ([MapFilter], False),
        "VerificationState": ([StringFilter], False),
        "WorkflowStatus": ([StringFilter], False),
    }


class AutomationRule(AWSObject):
    """
    `AutomationRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-automationrule.html>`__
    """

    resource_type = "AWS::SecurityHub::AutomationRule"

    props: PropsDictType = {
        "Actions": ([AutomationRulesAction], False),
        "Criteria": (AutomationRulesFindingFilters, False),
        "Description": (str, False),
        "IsTerminal": (boolean, False),
        "RuleName": (str, False),
        "RuleOrder": (integer, False),
        "RuleStatus": (str, False),
        "Tags": (dict, False),
    }


class Hub(AWSObject):
    """
    `Hub <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-hub.html>`__
    """

    resource_type = "AWS::SecurityHub::Hub"

    props: PropsDictType = {
        "AutoEnableControls": (boolean, False),
        "ControlFindingGenerator": (str, False),
        "EnableDefaultStandards": (boolean, False),
        "Tags": (dict, False),
    }


class StandardsControl(AWSProperty):
    """
    `StandardsControl <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-standard-standardscontrol.html>`__
    """

    props: PropsDictType = {
        "Reason": (str, False),
        "StandardsControlArn": (str, True),
    }


class Standard(AWSObject):
    """
    `Standard <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-standard.html>`__
    """

    resource_type = "AWS::SecurityHub::Standard"

    props: PropsDictType = {
        "DisabledStandardsControls": ([StandardsControl], False),
        "StandardsArn": (str, True),
    }
