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


class Alarm(AWSObject):
    """
    `Alarm <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html>`__
    """

    resource_type = "AWS::Lightsail::Alarm"

    props: PropsDictType = {
        "AlarmName": (str, True),
        "ComparisonOperator": (str, True),
        "ContactProtocols": ([str], False),
        "DatapointsToAlarm": (integer, False),
        "EvaluationPeriods": (integer, True),
        "MetricName": (str, True),
        "MonitoredResourceName": (str, True),
        "NotificationEnabled": (boolean, False),
        "NotificationTriggers": ([str], False),
        "Threshold": (double, True),
        "TreatMissingData": (str, False),
    }


class AccessRules(AWSProperty):
    """
    `AccessRules <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-bucket-accessrules.html>`__
    """

    props: PropsDictType = {
        "AllowPublicOverrides": (boolean, False),
        "GetObject": (str, False),
    }


class Bucket(AWSObject):
    """
    `Bucket <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-bucket.html>`__
    """

    resource_type = "AWS::Lightsail::Bucket"

    props: PropsDictType = {
        "AccessRules": (AccessRules, False),
        "BucketName": (str, True),
        "BundleId": (str, True),
        "ObjectVersioning": (boolean, False),
        "ReadOnlyAccessAccounts": ([str], False),
        "ResourcesReceivingAccess": ([str], False),
        "Tags": (Tags, False),
    }


class RelationalDatabaseParameter(AWSProperty):
    """
    `RelationalDatabaseParameter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-database-relationaldatabaseparameter.html>`__
    """

    props: PropsDictType = {
        "AllowedValues": (str, False),
        "ApplyMethod": (str, False),
        "ApplyType": (str, False),
        "DataType": (str, False),
        "Description": (str, False),
        "IsModifiable": (boolean, False),
        "ParameterName": (str, False),
        "ParameterValue": (str, False),
    }


class Database(AWSObject):
    """
    `Database <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-database.html>`__
    """

    resource_type = "AWS::Lightsail::Database"

    props: PropsDictType = {
        "AvailabilityZone": (str, False),
        "BackupRetention": (boolean, False),
        "CaCertificateIdentifier": (str, False),
        "MasterDatabaseName": (str, True),
        "MasterUserPassword": (str, False),
        "MasterUsername": (str, True),
        "PreferredBackupWindow": (str, False),
        "PreferredMaintenanceWindow": (str, False),
        "PubliclyAccessible": (boolean, False),
        "RelationalDatabaseBlueprintId": (str, True),
        "RelationalDatabaseBundleId": (str, True),
        "RelationalDatabaseName": (str, True),
        "RelationalDatabaseParameters": ([RelationalDatabaseParameter], False),
        "RotateMasterUserPassword": (boolean, False),
        "Tags": (Tags, False),
    }


class AutoSnapshotAddOn(AWSProperty):
    """
    `AutoSnapshotAddOn <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-autosnapshotaddon.html>`__
    """

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


class AddOn(AWSProperty):
    """
    `AddOn <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-addon.html>`__
    """

    props: PropsDictType = {
        "AddOnType": (str, True),
        "AutoSnapshotAddOnRequest": (AutoSnapshotAddOn, False),
        "Status": (str, False),
    }


class Disk(AWSObject):
    """
    `Disk <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-disk.html>`__
    """

    resource_type = "AWS::Lightsail::Disk"

    props: PropsDictType = {
        "AddOns": ([AddOn], False),
        "AvailabilityZone": (str, False),
        "DiskName": (str, True),
        "SizeInGb": (integer, True),
        "Tags": (Tags, False),
    }


class DiskProperty(AWSProperty):
    """
    `DiskProperty <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-disk.html>`__
    """

    props: PropsDictType = {
        "AttachedTo": (str, False),
        "AttachmentState": (str, False),
        "DiskName": (str, True),
        "IOPS": (integer, False),
        "IsSystemDisk": (boolean, False),
        "Path": (str, True),
        "SizeInGb": (str, False),
    }


class Hardware(AWSProperty):
    """
    `Hardware <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-hardware.html>`__
    """

    props: PropsDictType = {
        "CpuCount": (integer, False),
        "Disks": ([DiskProperty], False),
        "RamSizeInGb": (integer, False),
    }


class MonthlyTransfer(AWSProperty):
    """
    `MonthlyTransfer <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-monthlytransfer.html>`__
    """

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


class Port(AWSProperty):
    """
    `Port <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.html>`__
    """

    props: PropsDictType = {
        "AccessDirection": (str, False),
        "AccessFrom": (str, False),
        "AccessType": (str, False),
        "CidrListAliases": ([str], False),
        "Cidrs": ([str], False),
        "CommonName": (str, False),
        "FromPort": (integer, False),
        "Ipv6Cidrs": ([str], False),
        "Protocol": (str, False),
        "ToPort": (integer, False),
    }


class Networking(AWSProperty):
    """
    `Networking <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-networking.html>`__
    """

    props: PropsDictType = {
        "MonthlyTransfer": (MonthlyTransfer, False),
        "Ports": ([Port], True),
    }


class Instance(AWSObject):
    """
    `Instance <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html>`__
    """

    resource_type = "AWS::Lightsail::Instance"

    props: PropsDictType = {
        "AddOns": ([AddOn], False),
        "AvailabilityZone": (str, False),
        "BlueprintId": (str, True),
        "BundleId": (str, True),
        "Hardware": (Hardware, False),
        "InstanceName": (str, True),
        "KeyPairName": (str, False),
        "Networking": (Networking, False),
        "Tags": (Tags, False),
        "UserData": (str, False),
    }


class LoadBalancer(AWSObject):
    """
    `LoadBalancer <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-loadbalancer.html>`__
    """

    resource_type = "AWS::Lightsail::LoadBalancer"

    props: PropsDictType = {
        "AttachedInstances": ([str], False),
        "HealthCheckPath": (str, False),
        "InstancePort": (integer, True),
        "IpAddressType": (str, False),
        "LoadBalancerName": (str, True),
        "SessionStickinessEnabled": (boolean, False),
        "SessionStickinessLBCookieDurationSeconds": (str, False),
        "Tags": (Tags, False),
    }


class LoadBalancerTlsCertificate(AWSObject):
    """
    `LoadBalancerTlsCertificate <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-loadbalancertlscertificate.html>`__
    """

    resource_type = "AWS::Lightsail::LoadBalancerTlsCertificate"

    props: PropsDictType = {
        "CertificateAlternativeNames": ([str], False),
        "CertificateDomainName": (str, True),
        "CertificateName": (str, True),
        "IsAttached": (boolean, False),
        "LoadBalancerName": (str, True),
    }


class StaticIp(AWSObject):
    """
    `StaticIp <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-staticip.html>`__
    """

    resource_type = "AWS::Lightsail::StaticIp"

    props: PropsDictType = {
        "AttachedTo": (str, False),
        "StaticIpName": (str, True),
    }
