# 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 json
import warnings
import pulumi
import pulumi.runtime
from . import utilities, tables

class StackScript(pulumi.CustomResource):
    created: pulumi.Output[str]
    deployments_active: pulumi.Output[float]
    deployments_total: pulumi.Output[float]
    description: pulumi.Output[str]
    """
    A description for the StackScript.
    """
    images: pulumi.Output[list]
    """
    An array of Image IDs representing the Images that this StackScript is compatible for deploying with.
    """
    is_public: pulumi.Output[bool]
    """
    This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private. *Changing `is_public` forces the creation of a new StackScript*
    """
    label: pulumi.Output[str]
    """
    The StackScript's label is for display purposes only.
    """
    rev_note: pulumi.Output[str]
    """
    This field allows you to add notes for the set of revisions made to this StackScript.
    """
    script: pulumi.Output[str]
    """
    The script to execute when provisioning a new Linode with this StackScript.
    """
    updated: pulumi.Output[str]
    user_defined_fields: pulumi.Output[list]
    user_gravatar_id: pulumi.Output[str]
    username: pulumi.Output[str]
    def __init__(__self__, resource_name, opts=None, description=None, images=None, is_public=None, label=None, rev_note=None, script=None, user_defined_fields=None, __name__=None, __opts__=None):
        """
        Create a StackScript resource with the given unique name, props, and options.
        
        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] description: A description for the StackScript.
        :param pulumi.Input[list] images: An array of Image IDs representing the Images that this StackScript is compatible for deploying with.
        :param pulumi.Input[bool] is_public: This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private. *Changing `is_public` forces the creation of a new StackScript*
        :param pulumi.Input[str] label: The StackScript's label is for display purposes only.
        :param pulumi.Input[str] rev_note: This field allows you to add notes for the set of revisions made to this StackScript.
        :param pulumi.Input[str] script: The script to execute when provisioning a new Linode with this StackScript.

        > This content is derived from https://github.com/terraform-providers/terraform-provider-linode/blob/master/website/docs/r/stackscript.html.markdown.
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if not resource_name:
            raise TypeError('Missing resource name argument (for URN creation)')
        if not isinstance(resource_name, str):
            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 description is None:
            raise TypeError("Missing required property 'description'")
        __props__['description'] = description

        if images is None:
            raise TypeError("Missing required property 'images'")
        __props__['images'] = images

        __props__['is_public'] = is_public

        if label is None:
            raise TypeError("Missing required property 'label'")
        __props__['label'] = label

        __props__['rev_note'] = rev_note

        if script is None:
            raise TypeError("Missing required property 'script'")
        __props__['script'] = script

        __props__['user_defined_fields'] = user_defined_fields

        __props__['created'] = None
        __props__['deployments_active'] = None
        __props__['deployments_total'] = None
        __props__['updated'] = None
        __props__['user_gravatar_id'] = None
        __props__['username'] = None

        super(StackScript, __self__).__init__(
            'linode:index/stackScript:StackScript',
            resource_name,
            __props__,
            opts)


    def translate_output_property(self, prop):
        return tables._CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return tables._SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

