# 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 FloatingIP(pulumi.CustomResource):
    """
    Provides a DigitalOcean Floating IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Droplets.
    """
    def __init__(__self__, __name__, __opts__=None, droplet_id=None, ip_address=None, region=None):
        """Create a FloatingIP 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 droplet_id and not isinstance(droplet_id, int):
            raise TypeError('Expected property droplet_id to be a int')
        __self__.droplet_id = droplet_id
        """
        The ID of Droplet that the Floating IP will be assigned to.
        """
        __props__['dropletId'] = droplet_id

        if ip_address and not isinstance(ip_address, basestring):
            raise TypeError('Expected property ip_address to be a basestring')
        __self__.ip_address = ip_address
        """
        The IP Address of the resource
        """
        __props__['ipAddress'] = ip_address

        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 that the Floating IP is reserved to.
        """
        __props__['region'] = region

        super(FloatingIP, __self__).__init__(
            'do:core/floatingIP:FloatingIP',
            __name__,
            __props__,
            __opts__)

    def set_outputs(self, outs):
        if 'dropletId' in outs:
            self.droplet_id = outs['dropletId']
        if 'ipAddress' in outs:
            self.ip_address = outs['ipAddress']
        if 'region' in outs:
            self.region = outs['region']
