# 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 double


class AnalysisError(AWSProperty):
    props = {
        'Message': (basestring, False),
        'Type': (basestring, False),
    }


class DataSetReference(AWSProperty):
    props = {
        'DataSetArn': (basestring, True),
        'DataSetPlaceholder': (basestring, True),
    }


class AnalysisSourceTemplate(AWSProperty):
    props = {
        'Arn': (basestring, True),
        'DataSetReferences': ([DataSetReference], True),
    }


class AnalysisSourceEntity(AWSProperty):
    props = {
        'SourceTemplate': (AnalysisSourceTemplate, False),
    }


class DateTimeParameter(AWSProperty):
    props = {
        'Name': (basestring, True),
        'Values': ([basestring], True),
    }


class DecimalParameter(AWSProperty):
    props = {
        'Name': (basestring, True),
        'Values': ([double], True),
    }


class IntegerParameter(AWSProperty):
    props = {
        'Name': (basestring, True),
        'Values': ([double], True),
    }


class StringParameter(AWSProperty):
    props = {
        'Name': (basestring, True),
        'Values': ([basestring], True),
    }


class Parameters(AWSProperty):
    props = {
        'DateTimeParameters': ([DateTimeParameter], False),
        'DecimalParameters': ([DecimalParameter], False),
        'IntegerParameters': ([IntegerParameter], False),
        'StringParameters': ([StringParameter], False),
    }


class ResourcePermission(AWSProperty):
    props = {
        'Actions': ([basestring], True),
        'Principal': (basestring, True),
    }


class Analysis(AWSObject):
    resource_type = "AWS::QuickSight::Analysis"

    props = {
        'AnalysisId': (basestring, True),
        'AwsAccountId': (basestring, True),
        'Errors': ([AnalysisError], False),
        'Name': (basestring, False),
        'Parameters': (Parameters, False),
        'Permissions': ([ResourcePermission], False),
        'SourceEntity': (AnalysisSourceEntity, False),
        'Tags': (Tags, False),
        'ThemeArn': (basestring, False),
    }


class AdHocFilteringOption(AWSProperty):
    props = {
        'AvailabilityStatus': (basestring, False),
    }


class ExportToCSVOption(AWSProperty):
    props = {
        'AvailabilityStatus': (basestring, False),
    }


class SheetControlsOption(AWSProperty):
    props = {
        'VisibilityState': (basestring, False),
    }


class DashboardPublishOptions(AWSProperty):
    props = {
        'AdHocFilteringOption': (AdHocFilteringOption, False),
        'ExportToCSVOption': (ExportToCSVOption, False),
        'SheetControlsOption': (SheetControlsOption, False),
    }


class DashboardSourceTemplate(AWSProperty):
    props = {
        'Arn': (basestring, True),
        'DataSetReferences': ([DataSetReference], True),
    }


class DashboardSourceEntity(AWSProperty):
    props = {
        'SourceTemplate': (DashboardSourceTemplate, False),
    }


class Dashboard(AWSObject):
    resource_type = "AWS::QuickSight::Dashboard"

    props = {
        'AwsAccountId': (basestring, True),
        'DashboardId': (basestring, True),
        'DashboardPublishOptions': (DashboardPublishOptions, False),
        'Name': (basestring, False),
        'Parameters': (Parameters, False),
        'Permissions': ([ResourcePermission], False),
        'SourceEntity': (DashboardSourceEntity, False),
        'Tags': (Tags, False),
        'ThemeArn': (basestring, False),
        'VersionDescription': (basestring, False),
    }


class TemplateSourceAnalysis(AWSProperty):
    props = {
        'Arn': (basestring, True),
        'DataSetReferences': ([DataSetReference], True),
    }


class TemplateSourceTemplate(AWSProperty):
    props = {
        'Arn': (basestring, True),
    }


class TemplateSourceEntity(AWSProperty):
    props = {
        'SourceAnalysis': (TemplateSourceAnalysis, False),
        'SourceTemplate': (TemplateSourceTemplate, False),
    }


class Template(AWSObject):
    resource_type = "AWS::QuickSight::Template"

    props = {
        'AwsAccountId': (basestring, True),
        'Name': (basestring, False),
        'Permissions': ([ResourcePermission], False),
        'SourceEntity': (TemplateSourceEntity, False),
        'Tags': (Tags, False),
        'TemplateId': (basestring, True),
        'VersionDescription': (basestring, False),
    }


class DataColorPalette(AWSProperty):
    props = {
        'Colors': ([basestring], False),
        'EmptyFillColor': (basestring, False),
        'MinMaxGradient': ([basestring], False),
    }


class GutterStyle(AWSProperty):
    props = {
        'Show': (boolean, False),
    }


class MarginStyle(AWSProperty):
    props = {
        'Show': (boolean, False),
    }


class TileLayoutStyle(AWSProperty):
    props = {
        'Gutter': (GutterStyle, False),
        'Margin': (MarginStyle, False),
    }


class BorderStyle(AWSProperty):
    props = {
        'Show': (boolean, False),
    }


class TileStyle(AWSProperty):
    props = {
        'Border': (BorderStyle, False),
    }


class SheetStyle(AWSProperty):
    props = {
        'Tile': (TileStyle, False),
        'TileLayout': (TileLayoutStyle, False),
    }


class Font(AWSProperty):
    props = {
        'FontFamily': (basestring, False),
    }


class Typography(AWSProperty):
    props = {
        'FontFamilies': ([Font], False),
    }


class UIColorPalette(AWSProperty):
    props = {
        'Accent': (basestring, False),
        'AccentForeground': (basestring, False),
        'Danger': (basestring, False),
        'DangerForeground': (basestring, False),
        'Dimension': (basestring, False),
        'DimensionForeground': (basestring, False),
        'Measure': (basestring, False),
        'MeasureForeground': (basestring, False),
        'PrimaryBackground': (basestring, False),
        'PrimaryForeground': (basestring, False),
        'SecondaryBackground': (basestring, False),
        'SecondaryForeground': (basestring, False),
        'Success': (basestring, False),
        'SuccessForeground': (basestring, False),
        'Warning': (basestring, False),
        'WarningForeground': (basestring, False),
    }


class ThemeConfiguration(AWSProperty):
    props = {
        'DataColorPalette': (DataColorPalette, False),
        'Sheet': (SheetStyle, False),
        'Typography': (Typography, False),
        'UIColorPalette': (UIColorPalette, False),
    }


class Theme(AWSObject):
    resource_type = "AWS::QuickSight::Theme"

    props = {
        'AwsAccountId': (basestring, True),
        'BaseThemeId': (basestring, False),
        'Configuration': (ThemeConfiguration, False),
        'Name': (basestring, False),
        'Permissions': ([ResourcePermission], False),
        'Tags': (Tags, False),
        'ThemeId': (basestring, True),
        'VersionDescription': (basestring, False),
    }
