# 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 copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = [
    'GetNetworkResult',
    'AwaitableGetNetworkResult',
    'get_network',
    'get_network_output',
]

@pulumi.output_type
class GetNetworkResult:
    """
    A collection of values returned by getNetwork.
    """
    def __init__(__self__, dhcp_dns=None, dhcp_enabled=None, dhcp_lease=None, dhcp_start=None, dhcp_stop=None, dhcpd_boot_enabled=None, dhcpd_boot_filename=None, dhcpd_boot_server=None, domain_name=None, id=None, igmp_snooping=None, ipv6_interface_type=None, ipv6_pd_interface=None, ipv6_pd_prefixid=None, ipv6_ra_enable=None, ipv6_static_subnet=None, name=None, network_group=None, purpose=None, site=None, subnet=None, vlan_id=None, wan_dns=None, wan_egress_qos=None, wan_gateway=None, wan_ip=None, wan_netmask=None, wan_networkgroup=None, wan_type=None, wan_username=None, x_wan_password=None):
        if dhcp_dns and not isinstance(dhcp_dns, list):
            raise TypeError("Expected argument 'dhcp_dns' to be a list")
        pulumi.set(__self__, "dhcp_dns", dhcp_dns)
        if dhcp_enabled and not isinstance(dhcp_enabled, bool):
            raise TypeError("Expected argument 'dhcp_enabled' to be a bool")
        pulumi.set(__self__, "dhcp_enabled", dhcp_enabled)
        if dhcp_lease and not isinstance(dhcp_lease, int):
            raise TypeError("Expected argument 'dhcp_lease' to be a int")
        pulumi.set(__self__, "dhcp_lease", dhcp_lease)
        if dhcp_start and not isinstance(dhcp_start, str):
            raise TypeError("Expected argument 'dhcp_start' to be a str")
        pulumi.set(__self__, "dhcp_start", dhcp_start)
        if dhcp_stop and not isinstance(dhcp_stop, str):
            raise TypeError("Expected argument 'dhcp_stop' to be a str")
        pulumi.set(__self__, "dhcp_stop", dhcp_stop)
        if dhcpd_boot_enabled and not isinstance(dhcpd_boot_enabled, bool):
            raise TypeError("Expected argument 'dhcpd_boot_enabled' to be a bool")
        pulumi.set(__self__, "dhcpd_boot_enabled", dhcpd_boot_enabled)
        if dhcpd_boot_filename and not isinstance(dhcpd_boot_filename, str):
            raise TypeError("Expected argument 'dhcpd_boot_filename' to be a str")
        pulumi.set(__self__, "dhcpd_boot_filename", dhcpd_boot_filename)
        if dhcpd_boot_server and not isinstance(dhcpd_boot_server, str):
            raise TypeError("Expected argument 'dhcpd_boot_server' to be a str")
        pulumi.set(__self__, "dhcpd_boot_server", dhcpd_boot_server)
        if domain_name and not isinstance(domain_name, str):
            raise TypeError("Expected argument 'domain_name' to be a str")
        pulumi.set(__self__, "domain_name", domain_name)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if igmp_snooping and not isinstance(igmp_snooping, bool):
            raise TypeError("Expected argument 'igmp_snooping' to be a bool")
        pulumi.set(__self__, "igmp_snooping", igmp_snooping)
        if ipv6_interface_type and not isinstance(ipv6_interface_type, str):
            raise TypeError("Expected argument 'ipv6_interface_type' to be a str")
        pulumi.set(__self__, "ipv6_interface_type", ipv6_interface_type)
        if ipv6_pd_interface and not isinstance(ipv6_pd_interface, str):
            raise TypeError("Expected argument 'ipv6_pd_interface' to be a str")
        pulumi.set(__self__, "ipv6_pd_interface", ipv6_pd_interface)
        if ipv6_pd_prefixid and not isinstance(ipv6_pd_prefixid, str):
            raise TypeError("Expected argument 'ipv6_pd_prefixid' to be a str")
        pulumi.set(__self__, "ipv6_pd_prefixid", ipv6_pd_prefixid)
        if ipv6_ra_enable and not isinstance(ipv6_ra_enable, bool):
            raise TypeError("Expected argument 'ipv6_ra_enable' to be a bool")
        pulumi.set(__self__, "ipv6_ra_enable", ipv6_ra_enable)
        if ipv6_static_subnet and not isinstance(ipv6_static_subnet, str):
            raise TypeError("Expected argument 'ipv6_static_subnet' to be a str")
        pulumi.set(__self__, "ipv6_static_subnet", ipv6_static_subnet)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if network_group and not isinstance(network_group, str):
            raise TypeError("Expected argument 'network_group' to be a str")
        pulumi.set(__self__, "network_group", network_group)
        if purpose and not isinstance(purpose, str):
            raise TypeError("Expected argument 'purpose' to be a str")
        pulumi.set(__self__, "purpose", purpose)
        if site and not isinstance(site, str):
            raise TypeError("Expected argument 'site' to be a str")
        pulumi.set(__self__, "site", site)
        if subnet and not isinstance(subnet, str):
            raise TypeError("Expected argument 'subnet' to be a str")
        pulumi.set(__self__, "subnet", subnet)
        if vlan_id and not isinstance(vlan_id, int):
            raise TypeError("Expected argument 'vlan_id' to be a int")
        pulumi.set(__self__, "vlan_id", vlan_id)
        if wan_dns and not isinstance(wan_dns, list):
            raise TypeError("Expected argument 'wan_dns' to be a list")
        pulumi.set(__self__, "wan_dns", wan_dns)
        if wan_egress_qos and not isinstance(wan_egress_qos, int):
            raise TypeError("Expected argument 'wan_egress_qos' to be a int")
        pulumi.set(__self__, "wan_egress_qos", wan_egress_qos)
        if wan_gateway and not isinstance(wan_gateway, str):
            raise TypeError("Expected argument 'wan_gateway' to be a str")
        pulumi.set(__self__, "wan_gateway", wan_gateway)
        if wan_ip and not isinstance(wan_ip, str):
            raise TypeError("Expected argument 'wan_ip' to be a str")
        pulumi.set(__self__, "wan_ip", wan_ip)
        if wan_netmask and not isinstance(wan_netmask, str):
            raise TypeError("Expected argument 'wan_netmask' to be a str")
        pulumi.set(__self__, "wan_netmask", wan_netmask)
        if wan_networkgroup and not isinstance(wan_networkgroup, str):
            raise TypeError("Expected argument 'wan_networkgroup' to be a str")
        pulumi.set(__self__, "wan_networkgroup", wan_networkgroup)
        if wan_type and not isinstance(wan_type, str):
            raise TypeError("Expected argument 'wan_type' to be a str")
        pulumi.set(__self__, "wan_type", wan_type)
        if wan_username and not isinstance(wan_username, str):
            raise TypeError("Expected argument 'wan_username' to be a str")
        pulumi.set(__self__, "wan_username", wan_username)
        if x_wan_password and not isinstance(x_wan_password, str):
            raise TypeError("Expected argument 'x_wan_password' to be a str")
        pulumi.set(__self__, "x_wan_password", x_wan_password)

    @property
    @pulumi.getter(name="dhcpDns")
    def dhcp_dns(self) -> Sequence[str]:
        """
        IPv4 addresses for the DNS server to be returned from the DHCP server.
        """
        return pulumi.get(self, "dhcp_dns")

    @property
    @pulumi.getter(name="dhcpEnabled")
    def dhcp_enabled(self) -> bool:
        """
        whether DHCP is enabled or not on this network.
        """
        return pulumi.get(self, "dhcp_enabled")

    @property
    @pulumi.getter(name="dhcpLease")
    def dhcp_lease(self) -> int:
        """
        lease time for DHCP addresses.
        """
        return pulumi.get(self, "dhcp_lease")

    @property
    @pulumi.getter(name="dhcpStart")
    def dhcp_start(self) -> str:
        """
        The IPv4 address where the DHCP range of addresses starts.
        """
        return pulumi.get(self, "dhcp_start")

    @property
    @pulumi.getter(name="dhcpStop")
    def dhcp_stop(self) -> str:
        """
        The IPv4 address where the DHCP range of addresses stops.
        """
        return pulumi.get(self, "dhcp_stop")

    @property
    @pulumi.getter(name="dhcpdBootEnabled")
    def dhcpd_boot_enabled(self) -> bool:
        """
        Toggles on the DHCP boot options. will be set to true if you have dhcpd*boot*filename, and dhcpd*boot*server set.
        """
        return pulumi.get(self, "dhcpd_boot_enabled")

    @property
    @pulumi.getter(name="dhcpdBootFilename")
    def dhcpd_boot_filename(self) -> str:
        """
        the file to PXE boot from on the dhcpd*boot*server.
        """
        return pulumi.get(self, "dhcpd_boot_filename")

    @property
    @pulumi.getter(name="dhcpdBootServer")
    def dhcpd_boot_server(self) -> str:
        """
        IPv4 address of a TFTP server to network boot from.
        """
        return pulumi.get(self, "dhcpd_boot_server")

    @property
    @pulumi.getter(name="domainName")
    def domain_name(self) -> str:
        """
        The domain name of this network.
        """
        return pulumi.get(self, "domain_name")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The ID of the network.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="igmpSnooping")
    def igmp_snooping(self) -> bool:
        """
        Specifies whether IGMP snooping is enabled or not.
        """
        return pulumi.get(self, "igmp_snooping")

    @property
    @pulumi.getter(name="ipv6InterfaceType")
    def ipv6_interface_type(self) -> str:
        """
        Specifies which type of IPv6 connection to use.
        """
        return pulumi.get(self, "ipv6_interface_type")

    @property
    @pulumi.getter(name="ipv6PdInterface")
    def ipv6_pd_interface(self) -> str:
        """
        Specifies which WAN interface is used for IPv6 Prefix Delegation.
        """
        return pulumi.get(self, "ipv6_pd_interface")

    @property
    @pulumi.getter(name="ipv6PdPrefixid")
    def ipv6_pd_prefixid(self) -> str:
        """
        Specifies the IPv6 Prefix ID.
        """
        return pulumi.get(self, "ipv6_pd_prefixid")

    @property
    @pulumi.getter(name="ipv6RaEnable")
    def ipv6_ra_enable(self) -> bool:
        """
        Specifies whether to enable router advertisements or not.
        """
        return pulumi.get(self, "ipv6_ra_enable")

    @property
    @pulumi.getter(name="ipv6StaticSubnet")
    def ipv6_static_subnet(self) -> str:
        """
        Specifies the static IPv6 subnet (when ipv6*interface*type is 'static').
        """
        return pulumi.get(self, "ipv6_static_subnet")

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        The name of the network.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="networkGroup")
    def network_group(self) -> str:
        """
        The group of the network.
        """
        return pulumi.get(self, "network_group")

    @property
    @pulumi.getter
    def purpose(self) -> str:
        """
        The purpose of the network. One of `corporate`, `guest`, `wan`, or `vlan-only`.
        """
        return pulumi.get(self, "purpose")

    @property
    @pulumi.getter
    def site(self) -> str:
        """
        The name of the site to associate the network with.
        """
        return pulumi.get(self, "site")

    @property
    @pulumi.getter
    def subnet(self) -> str:
        """
        The subnet of the network (CIDR address).
        """
        return pulumi.get(self, "subnet")

    @property
    @pulumi.getter(name="vlanId")
    def vlan_id(self) -> int:
        """
        The VLAN ID of the network.
        """
        return pulumi.get(self, "vlan_id")

    @property
    @pulumi.getter(name="wanDns")
    def wan_dns(self) -> Sequence[str]:
        """
        DNS servers IPs of the WAN.
        """
        return pulumi.get(self, "wan_dns")

    @property
    @pulumi.getter(name="wanEgressQos")
    def wan_egress_qos(self) -> int:
        """
        Specifies the WAN egress quality of service.
        """
        return pulumi.get(self, "wan_egress_qos")

    @property
    @pulumi.getter(name="wanGateway")
    def wan_gateway(self) -> str:
        """
        The IPv4 gateway of the WAN.
        """
        return pulumi.get(self, "wan_gateway")

    @property
    @pulumi.getter(name="wanIp")
    def wan_ip(self) -> str:
        """
        The IPv4 address of the WAN.
        """
        return pulumi.get(self, "wan_ip")

    @property
    @pulumi.getter(name="wanNetmask")
    def wan_netmask(self) -> str:
        """
        The IPv4 netmask of the WAN.
        """
        return pulumi.get(self, "wan_netmask")

    @property
    @pulumi.getter(name="wanNetworkgroup")
    def wan_networkgroup(self) -> str:
        """
        Specifies the WAN network group. One of either `WAN`, `WAN2` or `WAN_LTE_FAILOVER`.
        """
        return pulumi.get(self, "wan_networkgroup")

    @property
    @pulumi.getter(name="wanType")
    def wan_type(self) -> str:
        """
        Specifies the IPV4 WAN connection type. One of either `disabled`, `static`, `dhcp`, or `pppoe`.
        """
        return pulumi.get(self, "wan_type")

    @property
    @pulumi.getter(name="wanUsername")
    def wan_username(self) -> str:
        """
        Specifies the IPV4 WAN username.
        """
        return pulumi.get(self, "wan_username")

    @property
    @pulumi.getter(name="xWanPassword")
    def x_wan_password(self) -> str:
        """
        Specifies the IPV4 WAN password.
        """
        return pulumi.get(self, "x_wan_password")


class AwaitableGetNetworkResult(GetNetworkResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNetworkResult(
            dhcp_dns=self.dhcp_dns,
            dhcp_enabled=self.dhcp_enabled,
            dhcp_lease=self.dhcp_lease,
            dhcp_start=self.dhcp_start,
            dhcp_stop=self.dhcp_stop,
            dhcpd_boot_enabled=self.dhcpd_boot_enabled,
            dhcpd_boot_filename=self.dhcpd_boot_filename,
            dhcpd_boot_server=self.dhcpd_boot_server,
            domain_name=self.domain_name,
            id=self.id,
            igmp_snooping=self.igmp_snooping,
            ipv6_interface_type=self.ipv6_interface_type,
            ipv6_pd_interface=self.ipv6_pd_interface,
            ipv6_pd_prefixid=self.ipv6_pd_prefixid,
            ipv6_ra_enable=self.ipv6_ra_enable,
            ipv6_static_subnet=self.ipv6_static_subnet,
            name=self.name,
            network_group=self.network_group,
            purpose=self.purpose,
            site=self.site,
            subnet=self.subnet,
            vlan_id=self.vlan_id,
            wan_dns=self.wan_dns,
            wan_egress_qos=self.wan_egress_qos,
            wan_gateway=self.wan_gateway,
            wan_ip=self.wan_ip,
            wan_netmask=self.wan_netmask,
            wan_networkgroup=self.wan_networkgroup,
            wan_type=self.wan_type,
            wan_username=self.wan_username,
            x_wan_password=self.x_wan_password)


def get_network(id: Optional[str] = None,
                name: Optional[str] = None,
                site: Optional[str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNetworkResult:
    """
    `Network` data source can be used to retrieve settings for a network by name or ID.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_unifi as unifi

    lan_network = unifi.get_network(name="LAN")
    my_device = unifi.iam.get_user(mac="01:23:45:67:89:ab")
    my_network = unifi.get_network(id=my_device.network_id)
    ```


    :param str id: The ID of the network.
    :param str name: The name of the network.
    :param str site: The name of the site to associate the network with.
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['name'] = name
    __args__['site'] = site
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('unifi:index/getNetwork:getNetwork', __args__, opts=opts, typ=GetNetworkResult).value

    return AwaitableGetNetworkResult(
        dhcp_dns=__ret__.dhcp_dns,
        dhcp_enabled=__ret__.dhcp_enabled,
        dhcp_lease=__ret__.dhcp_lease,
        dhcp_start=__ret__.dhcp_start,
        dhcp_stop=__ret__.dhcp_stop,
        dhcpd_boot_enabled=__ret__.dhcpd_boot_enabled,
        dhcpd_boot_filename=__ret__.dhcpd_boot_filename,
        dhcpd_boot_server=__ret__.dhcpd_boot_server,
        domain_name=__ret__.domain_name,
        id=__ret__.id,
        igmp_snooping=__ret__.igmp_snooping,
        ipv6_interface_type=__ret__.ipv6_interface_type,
        ipv6_pd_interface=__ret__.ipv6_pd_interface,
        ipv6_pd_prefixid=__ret__.ipv6_pd_prefixid,
        ipv6_ra_enable=__ret__.ipv6_ra_enable,
        ipv6_static_subnet=__ret__.ipv6_static_subnet,
        name=__ret__.name,
        network_group=__ret__.network_group,
        purpose=__ret__.purpose,
        site=__ret__.site,
        subnet=__ret__.subnet,
        vlan_id=__ret__.vlan_id,
        wan_dns=__ret__.wan_dns,
        wan_egress_qos=__ret__.wan_egress_qos,
        wan_gateway=__ret__.wan_gateway,
        wan_ip=__ret__.wan_ip,
        wan_netmask=__ret__.wan_netmask,
        wan_networkgroup=__ret__.wan_networkgroup,
        wan_type=__ret__.wan_type,
        wan_username=__ret__.wan_username,
        x_wan_password=__ret__.x_wan_password)


@_utilities.lift_output_func(get_network)
def get_network_output(id: Optional[pulumi.Input[Optional[str]]] = None,
                       name: Optional[pulumi.Input[Optional[str]]] = None,
                       site: Optional[pulumi.Input[Optional[str]]] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNetworkResult]:
    """
    `Network` data source can be used to retrieve settings for a network by name or ID.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_unifi as unifi

    lan_network = unifi.get_network(name="LAN")
    my_device = unifi.iam.get_user(mac="01:23:45:67:89:ab")
    my_network = unifi.get_network(id=my_device.network_id)
    ```


    :param str id: The ID of the network.
    :param str name: The name of the network.
    :param str site: The name of the site to associate the network with.
    """
    ...
