# 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 Droplet(pulumi.CustomResource):
    """
    Provides a DigitalOcean Droplet resource. This can be used to create,
    modify, and delete Droplets. Droplets also support
    [provisioning](https://www.terraform.io/docs/provisioners/index.html).
    """
    def __init__(__self__, __name__, __opts__=None, backups=None, image=None, ipv6=None, monitoring=None, name=None, private_networking=None, region=None, resize_disk=None, size=None, ssh_keys=None, tags=None, user_data=None, volume_ids=None):
        """Create a Droplet 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 backups and not isinstance(backups, bool):
            raise TypeError('Expected property backups to be a bool')
        __self__.backups = backups
        """
        Boolean controlling if backups are made. Defaults to
        false.
        """
        __props__['backups'] = backups

        if not image:
            raise TypeError('Missing required property image')
        elif not isinstance(image, basestring):
            raise TypeError('Expected property image to be a basestring')
        __self__.image = image
        """
        The Droplet image ID or slug.
        """
        __props__['image'] = image

        if ipv6 and not isinstance(ipv6, bool):
            raise TypeError('Expected property ipv6 to be a bool')
        __self__.ipv6 = ipv6
        """
        Boolean controlling if IPv6 is enabled. Defaults to false.
        """
        __props__['ipv6'] = ipv6

        if monitoring and not isinstance(monitoring, bool):
            raise TypeError('Expected property monitoring to be a bool')
        __self__.monitoring = monitoring
        """
        Boolean controlling whether monitoring agent is installed.
        Defaults to false.
        """
        __props__['monitoring'] = monitoring

        if name and not isinstance(name, basestring):
            raise TypeError('Expected property name to be a basestring')
        __self__.name = name
        """
        The Droplet name
        """
        __props__['name'] = name

        if private_networking and not isinstance(private_networking, bool):
            raise TypeError('Expected property private_networking to be a bool')
        __self__.private_networking = private_networking
        """
        Boolean controlling if private networks are
        enabled. Defaults to false.
        """
        __props__['privateNetworking'] = private_networking

        if not region:
            raise TypeError('Missing required property region')
        elif not isinstance(region, basestring):
            raise TypeError('Expected property region to be a basestring')
        __self__.region = region
        """
        The region to start in
        """
        __props__['region'] = region

        if resize_disk and not isinstance(resize_disk, bool):
            raise TypeError('Expected property resize_disk to be a bool')
        __self__.resize_disk = resize_disk
        """
        Boolean controlling whether to increase the disk
        size when resizing a Droplet. It defaults to `true`. When set to `false`,
        only the Droplet's RAM and CPU will be resized. **Increasing a Droplet's disk
        size is a permanent change**. Increasing only RAM and CPU is reversible.
        """
        __props__['resizeDisk'] = resize_disk

        if not size:
            raise TypeError('Missing required property size')
        elif not isinstance(size, basestring):
            raise TypeError('Expected property size to be a basestring')
        __self__.size = size
        """
        The unique slug that indentifies the type of Droplet. You can find a list of available slugs on [DigitalOcean API documentation](https://developers.digitalocean.com/documentation/v2/#list-all-sizes)
        """
        __props__['size'] = size

        if ssh_keys and not isinstance(ssh_keys, list):
            raise TypeError('Expected property ssh_keys to be a list')
        __self__.ssh_keys = ssh_keys
        """
        A list of SSH IDs or fingerprints to enable in
        the format `[12345, 123456]`. To retrieve this info, use a tool such
        as `curl` with the [DigitalOcean API](https://developers.digitalocean.com/#keys),
        to retrieve them.
        """
        __props__['sshKeys'] = ssh_keys

        if tags and not isinstance(tags, list):
            raise TypeError('Expected property tags to be a list')
        __self__.tags = tags
        """
        A list of the tags to label this droplet. A tag resource
        must exist before it can be associated with a droplet.
        """
        __props__['tags'] = tags

        if user_data and not isinstance(user_data, basestring):
            raise TypeError('Expected property user_data to be a basestring')
        __self__.user_data = user_data
        """
        A string of the desired User Data for the Droplet.
        """
        __props__['userData'] = user_data

        if volume_ids and not isinstance(volume_ids, list):
            raise TypeError('Expected property volume_ids to be a list')
        __self__.volume_ids = volume_ids
        """
        A list of the IDs of each [block storage volume](https://www.terraform.io/docs/providers/do/r/volume.html) to be attached to the Droplet.
        """
        __props__['volumeIds'] = volume_ids

        __self__.disk = pulumi.runtime.UNKNOWN
        """
        The size of the instance's disk in GB
        """
        __self__.ipv4_address = pulumi.runtime.UNKNOWN
        """
        The IPv4 address
        """
        __self__.ipv4_address_private = pulumi.runtime.UNKNOWN
        """
        The private networking IPv4 address
        """
        __self__.ipv6_address = pulumi.runtime.UNKNOWN
        """
        The IPv6 address
        """
        __self__.ipv6_address_private = pulumi.runtime.UNKNOWN
        """
        The private networking IPv6 address
        """
        __self__.locked = pulumi.runtime.UNKNOWN
        """
        Is the Droplet locked
        """
        __self__.memory = pulumi.runtime.UNKNOWN
        __self__.price_hourly = pulumi.runtime.UNKNOWN
        """
        Droplet hourly price
        """
        __self__.price_monthly = pulumi.runtime.UNKNOWN
        """
        Droplet monthly price
        """
        __self__.status = pulumi.runtime.UNKNOWN
        """
        The status of the droplet
        """
        __self__.vcpus = pulumi.runtime.UNKNOWN
        """
        The number of the instance's virtual CPUs
        """

        super(Droplet, __self__).__init__(
            'do:core/droplet:Droplet',
            __name__,
            __props__,
            __opts__)

    def set_outputs(self, outs):
        if 'backups' in outs:
            self.backups = outs['backups']
        if 'disk' in outs:
            self.disk = outs['disk']
        if 'image' in outs:
            self.image = outs['image']
        if 'ipv4Address' in outs:
            self.ipv4_address = outs['ipv4Address']
        if 'ipv4AddressPrivate' in outs:
            self.ipv4_address_private = outs['ipv4AddressPrivate']
        if 'ipv6' in outs:
            self.ipv6 = outs['ipv6']
        if 'ipv6Address' in outs:
            self.ipv6_address = outs['ipv6Address']
        if 'ipv6AddressPrivate' in outs:
            self.ipv6_address_private = outs['ipv6AddressPrivate']
        if 'locked' in outs:
            self.locked = outs['locked']
        if 'memory' in outs:
            self.memory = outs['memory']
        if 'monitoring' in outs:
            self.monitoring = outs['monitoring']
        if 'name' in outs:
            self.name = outs['name']
        if 'priceHourly' in outs:
            self.price_hourly = outs['priceHourly']
        if 'priceMonthly' in outs:
            self.price_monthly = outs['priceMonthly']
        if 'privateNetworking' in outs:
            self.private_networking = outs['privateNetworking']
        if 'region' in outs:
            self.region = outs['region']
        if 'resizeDisk' in outs:
            self.resize_disk = outs['resizeDisk']
        if 'size' in outs:
            self.size = outs['size']
        if 'sshKeys' in outs:
            self.ssh_keys = outs['sshKeys']
        if 'status' in outs:
            self.status = outs['status']
        if 'tags' in outs:
            self.tags = outs['tags']
        if 'userData' in outs:
            self.user_data = outs['userData']
        if 'vcpus' in outs:
            self.vcpus = outs['vcpus']
        if 'volumeIds' in outs:
            self.volume_ids = outs['volumeIds']
