# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import pulumi
import pulumi.runtime
from . import utilities

class RandomString(pulumi.CustomResource):
    """
    The resource `random_string` generates a random permutation of alphanumeric
    characters and optionally special characters.
    
    This resource *does* use a cryptographic random number generator.
    """
    def __init__(__self__, __name__, __opts__=None, keepers=None, length=None, lower=None, min_lower=None, min_numeric=None, min_special=None, min_upper=None, number=None, override_special=None, special=None, upper=None):
        """Create a RandomString resource with the given unique name, props, and options."""
        if not __name__:
            raise TypeError('Missing resource name argument (for URN creation)')
        if not isinstance(__name__, basestring):
            raise TypeError('Expected resource name to be a string')
        if __opts__ and not isinstance(__opts__, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        if keepers and not isinstance(keepers, dict):
            raise TypeError('Expected property keepers to be a dict')
        __self__.keepers = keepers
        """
        Arbitrary map of values that, when changed, will
        trigger a new id to be generated. See
        the main provider documentation for more information.
        """
        __props__['keepers'] = keepers

        if not length:
            raise TypeError('Missing required property length')
        elif not isinstance(length, int):
            raise TypeError('Expected property length to be a int')
        __self__.length = length
        """
        The length of the string desired
        """
        __props__['length'] = length

        if lower and not isinstance(lower, bool):
            raise TypeError('Expected property lower to be a bool')
        __self__.lower = lower
        """
        (default true) Include lowercase alphabet characters
        in random string.
        """
        __props__['lower'] = lower

        if min_lower and not isinstance(min_lower, int):
            raise TypeError('Expected property min_lower to be a int')
        __self__.min_lower = min_lower
        """
        (default 0) Minimum number of lowercase alphabet
        characters in random string.
        """
        __props__['minLower'] = min_lower

        if min_numeric and not isinstance(min_numeric, int):
            raise TypeError('Expected property min_numeric to be a int')
        __self__.min_numeric = min_numeric
        """
        (default 0) Minimum number of numeric characters
        in random string.
        """
        __props__['minNumeric'] = min_numeric

        if min_special and not isinstance(min_special, int):
            raise TypeError('Expected property min_special to be a int')
        __self__.min_special = min_special
        """
        (default 0) Minimum number of special characters
        in random string.
        """
        __props__['minSpecial'] = min_special

        if min_upper and not isinstance(min_upper, int):
            raise TypeError('Expected property min_upper to be a int')
        __self__.min_upper = min_upper
        """
        (default 0) Minimum number of uppercase alphabet
        characters in random string.
        """
        __props__['minUpper'] = min_upper

        if number and not isinstance(number, bool):
            raise TypeError('Expected property number to be a bool')
        __self__.number = number
        """
        (default true) Include numeric characters in random
        string.
        """
        __props__['number'] = number

        if override_special and not isinstance(override_special, basestring):
            raise TypeError('Expected property override_special to be a basestring')
        __self__.override_special = override_special
        """
        Supply your own list of special characters to
        use for string generation.  This overrides characters list in the special
        argument.  The special argument must still be set to true for any overwritten
        characters to be used in generation.
        """
        __props__['overrideSpecial'] = override_special

        if special and not isinstance(special, bool):
            raise TypeError('Expected property special to be a bool')
        __self__.special = special
        """
        (default true) Include special characters in random
        string. These are '!@#$%&*()-_=+[]{}<>:?'
        """
        __props__['special'] = special

        if upper and not isinstance(upper, bool):
            raise TypeError('Expected property upper to be a bool')
        __self__.upper = upper
        """
        (default true) Include uppercase alphabet characters
        in random string.
        """
        __props__['upper'] = upper

        __self__.result = pulumi.runtime.UNKNOWN
        """
        Random string generated.
        """

        super(RandomString, __self__).__init__(
            'random:index/randomString:RandomString',
            __name__,
            __props__,
            __opts__)

    def set_outputs(self, outs):
        if 'keepers' in outs:
            self.keepers = outs['keepers']
        if 'length' in outs:
            self.length = outs['length']
        if 'lower' in outs:
            self.lower = outs['lower']
        if 'minLower' in outs:
            self.min_lower = outs['minLower']
        if 'minNumeric' in outs:
            self.min_numeric = outs['minNumeric']
        if 'minSpecial' in outs:
            self.min_special = outs['minSpecial']
        if 'minUpper' in outs:
            self.min_upper = outs['minUpper']
        if 'number' in outs:
            self.number = outs['number']
        if 'overrideSpecial' in outs:
            self.override_special = outs['overrideSpecial']
        if 'result' in outs:
            self.result = outs['result']
        if 'special' in outs:
            self.special = outs['special']
        if 'upper' in outs:
            self.upper = outs['upper']
