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


from . import AWSObject
from . import AWSProperty
from troposphere import Tags
from .validators import boolean
from .validators import integer


class Dataset(AWSObject):
    resource_type = "AWS::DataBrew::Dataset"

    props = {
        'Format': (basestring, False),
        'FormatOptions': (dict, False),
        'Input': (dict, True),
        'Name': (basestring, True),
        'Tags': (Tags, False),
    }


class CsvOutputOptions(AWSProperty):
    props = {
        'Delimiter': (basestring, False),
    }


class OutputFormatOptions(AWSProperty):
    props = {
        'Csv': (CsvOutputOptions, False),
    }


class S3Location(AWSProperty):
    props = {
        'Bucket': (basestring, True),
        'Key': (basestring, False),
    }


class Output(AWSProperty):
    props = {
        'CompressionFormat': (basestring, False),
        'Format': (basestring, False),
        'FormatOptions': (OutputFormatOptions, False),
        'Location': (S3Location, True),
        'Overwrite': (boolean, False),
        'PartitionColumns': ([basestring], False),
    }


class Job(AWSObject):
    resource_type = "AWS::DataBrew::Job"

    props = {
        'DatasetName': (basestring, False),
        'EncryptionKeyArn': (basestring, False),
        'EncryptionMode': (basestring, False),
        'JobSample': (dict, False),
        'LogSubscription': (basestring, False),
        'MaxCapacity': (integer, False),
        'MaxRetries': (integer, False),
        'Name': (basestring, True),
        'OutputLocation': (dict, False),
        'Outputs': ([Output], False),
        'ProjectName': (basestring, False),
        'Recipe': (dict, False),
        'RoleArn': (basestring, True),
        'Tags': (Tags, False),
        'Timeout': (integer, False),
        'Type': (basestring, True),
    }


class Project(AWSObject):
    resource_type = "AWS::DataBrew::Project"

    props = {
        'DatasetName': (basestring, True),
        'Name': (basestring, True),
        'RecipeName': (basestring, True),
        'RoleArn': (basestring, True),
        'Sample': (dict, False),
        'Tags': (Tags, False),
    }


class DataCatalogInputDefinition(AWSProperty):
    props = {
        'CatalogId': (basestring, False),
        'DatabaseName': (basestring, False),
        'TableName': (basestring, False),
        'TempDirectory': (S3Location, False),
    }


class SecondaryInput(AWSProperty):
    props = {
        'DataCatalogInputDefinition': (DataCatalogInputDefinition, False),
        'S3InputDefinition': (S3Location, False),
    }


class RecipeParameters(AWSProperty):
    props = {
        'AggregateFunction': (basestring, False),
        'Base': (basestring, False),
        'CaseStatement': (basestring, False),
        'CategoryMap': (basestring, False),
        'CharsToRemove': (basestring, False),
        'CollapseConsecutiveWhitespace': (basestring, False),
        'ColumnDataType': (basestring, False),
        'ColumnRange': (basestring, False),
        'Count': (basestring, False),
        'CustomCharacters': (basestring, False),
        'CustomStopWords': (basestring, False),
        'CustomValue': (basestring, False),
        'DatasetsColumns': (basestring, False),
        'DateAddValue': (basestring, False),
        'DateTimeFormat': (basestring, False),
        'DateTimeParameters': (basestring, False),
        'DeleteOtherRows': (basestring, False),
        'Delimiter': (basestring, False),
        'EndPattern': (basestring, False),
        'EndPosition': (basestring, False),
        'EndValue': (basestring, False),
        'ExpandContractions': (basestring, False),
        'Exponent': (basestring, False),
        'FalseString': (basestring, False),
        'GroupByAggFunctionOptions': (basestring, False),
        'GroupByColumns': (basestring, False),
        'HiddenColumns': (basestring, False),
        'IgnoreCase': (basestring, False),
        'IncludeInSplit': (basestring, False),
        'Input': (dict, False),
        'Interval': (basestring, False),
        'IsText': (basestring, False),
        'JoinKeys': (basestring, False),
        'JoinType': (basestring, False),
        'LeftColumns': (basestring, False),
        'Limit': (basestring, False),
        'LowerBound': (basestring, False),
        'MapType': (basestring, False),
        'ModeType': (basestring, False),
        'MultiLine': (boolean, False),
        'NumRows': (basestring, False),
        'NumRowsAfter': (basestring, False),
        'NumRowsBefore': (basestring, False),
        'OrderByColumn': (basestring, False),
        'OrderByColumns': (basestring, False),
        'Other': (basestring, False),
        'Pattern': (basestring, False),
        'PatternOption1': (basestring, False),
        'PatternOption2': (basestring, False),
        'PatternOptions': (basestring, False),
        'Period': (basestring, False),
        'Position': (basestring, False),
        'RemoveAllPunctuation': (basestring, False),
        'RemoveAllQuotes': (basestring, False),
        'RemoveAllWhitespace': (basestring, False),
        'RemoveCustomCharacters': (basestring, False),
        'RemoveCustomValue': (basestring, False),
        'RemoveLeadingAndTrailingPunctuation': (basestring, False),
        'RemoveLeadingAndTrailingQuotes': (basestring, False),
        'RemoveLeadingAndTrailingWhitespace': (basestring, False),
        'RemoveLetters': (basestring, False),
        'RemoveNumbers': (basestring, False),
        'RemoveSourceColumn': (basestring, False),
        'RemoveSpecialCharacters': (basestring, False),
        'RightColumns': (basestring, False),
        'SampleSize': (basestring, False),
        'SampleType': (basestring, False),
        'SecondInput': (basestring, False),
        'SecondaryInputs': ([SecondaryInput], False),
        'SheetIndexes': ([integer], False),
        'SheetNames': ([basestring], False),
        'SourceColumn': (basestring, False),
        'SourceColumn1': (basestring, False),
        'SourceColumn2': (basestring, False),
        'SourceColumns': (basestring, False),
        'StartColumnIndex': (basestring, False),
        'StartPattern': (basestring, False),
        'StartPosition': (basestring, False),
        'StartValue': (basestring, False),
        'StemmingMode': (basestring, False),
        'StepCount': (basestring, False),
        'StepIndex': (basestring, False),
        'StopWordsMode': (basestring, False),
        'Strategy': (basestring, False),
        'TargetColumn': (basestring, False),
        'TargetColumnNames': (basestring, False),
        'TargetDateFormat': (basestring, False),
        'TargetIndex': (basestring, False),
        'TimeZone': (basestring, False),
        'TokenizerPattern': (basestring, False),
        'TrueString': (basestring, False),
        'UdfLang': (basestring, False),
        'Units': (basestring, False),
        'UnpivotColumn': (basestring, False),
        'UpperBound': (basestring, False),
        'UseNewDataFrame': (basestring, False),
        'Value': (basestring, False),
        'Value1': (basestring, False),
        'Value2': (basestring, False),
        'ValueColumn': (basestring, False),
        'ViewFrame': (basestring, False),
    }


class Action(AWSProperty):
    props = {
        'Operation': (basestring, True),
        'Parameters': (RecipeParameters, False),
    }


class ConditionExpression(AWSProperty):
    props = {
        'Condition': (basestring, True),
        'TargetColumn': (basestring, True),
        'Value': (basestring, False),
    }


class RecipeStep(AWSProperty):
    props = {
        'Action': (Action, True),
        'ConditionExpressions': ([ConditionExpression], False),
    }


class Recipe(AWSObject):
    resource_type = "AWS::DataBrew::Recipe"

    props = {
        'Description': (basestring, False),
        'Name': (basestring, True),
        'Steps': ([RecipeStep], True),
        'Tags': (Tags, False),
    }


class Schedule(AWSObject):
    resource_type = "AWS::DataBrew::Schedule"

    props = {
        'CronExpression': (basestring, True),
        'JobNames': ([basestring], False),
        'Name': (basestring, True),
        'Tags': (Tags, False),
    }
