# 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 GetPrecreatedIpBlockResult:
    """
    A collection of values returned by getPrecreatedIpBlock.
    """
    def __init__(__self__, address=None, cidr=None, cidr_notation=None, gateway=None, manageable=None, management=None, netmask=None, network=None, quantity=None, id=None):
        if address and not isinstance(address, str):
            raise TypeError('Expected argument address to be a str')
        __self__.address = address
        if cidr and not isinstance(cidr, int):
            raise TypeError('Expected argument cidr to be a int')
        __self__.cidr = cidr
        if cidr_notation and not isinstance(cidr_notation, str):
            raise TypeError('Expected argument cidr_notation to be a str')
        __self__.cidr_notation = cidr_notation
        """
        CIDR notation of the looked up block.
        """
        if gateway and not isinstance(gateway, str):
            raise TypeError('Expected argument gateway to be a str')
        __self__.gateway = gateway
        if manageable and not isinstance(manageable, bool):
            raise TypeError('Expected argument manageable to be a bool')
        __self__.manageable = manageable
        if management and not isinstance(management, bool):
            raise TypeError('Expected argument management to be a bool')
        __self__.management = management
        if netmask and not isinstance(netmask, str):
            raise TypeError('Expected argument netmask to be a str')
        __self__.netmask = netmask
        if network and not isinstance(network, str):
            raise TypeError('Expected argument network to be a str')
        __self__.network = network
        if quantity and not isinstance(quantity, int):
            raise TypeError('Expected argument quantity to be a int')
        __self__.quantity = quantity
        if id and not isinstance(id, str):
            raise TypeError('Expected argument id to be a str')
        __self__.id = id
        """
        id is the provider-assigned unique ID for this managed resource.
        """

async def get_precreated_ip_block(address_family=None,facility=None,global_=None,project_id=None,public=None,opts=None):
    """
    Use this data source to get CIDR expression for precreated IPv6 and IPv4 blocks in Packet.
    You can then use the cidrsubnet TF builtin function to derive subnets.
    """
    __args__ = dict()

    __args__['addressFamily'] = address_family
    __args__['facility'] = facility
    __args__['global'] = global_
    __args__['projectId'] = project_id
    __args__['public'] = public
    __ret__ = await pulumi.runtime.invoke('packet:index/getPrecreatedIpBlock:getPrecreatedIpBlock', __args__, opts=opts)

    return GetPrecreatedIpBlockResult(
        address=__ret__.get('address'),
        cidr=__ret__.get('cidr'),
        cidr_notation=__ret__.get('cidrNotation'),
        gateway=__ret__.get('gateway'),
        manageable=__ret__.get('manageable'),
        management=__ret__.get('management'),
        netmask=__ret__.get('netmask'),
        network=__ret__.get('network'),
        quantity=__ret__.get('quantity'),
        id=__ret__.get('id'))
