# 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
from . import outputs
from ._inputs import *

__all__ = [
    'GetNodeDeviceInfoResult',
    'AwaitableGetNodeDeviceInfoResult',
    'get_node_device_info',
    'get_node_device_info_output',
]

@pulumi.output_type
class GetNodeDeviceInfoResult:
    """
    A collection of values returned by getNodeDeviceInfo.
    """
    def __init__(__self__, capability=None, devnodes=None, id=None, name=None, parent=None, path=None, xml=None):
        if capability and not isinstance(capability, dict):
            raise TypeError("Expected argument 'capability' to be a dict")
        pulumi.set(__self__, "capability", capability)
        if devnodes and not isinstance(devnodes, list):
            raise TypeError("Expected argument 'devnodes' to be a list")
        pulumi.set(__self__, "devnodes", devnodes)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if parent and not isinstance(parent, str):
            raise TypeError("Expected argument 'parent' to be a str")
        pulumi.set(__self__, "parent", parent)
        if path and not isinstance(path, str):
            raise TypeError("Expected argument 'path' to be a str")
        pulumi.set(__self__, "path", path)
        if xml and not isinstance(xml, str):
            raise TypeError("Expected argument 'xml' to be a str")
        pulumi.set(__self__, "xml", xml)

    @property
    @pulumi.getter
    def capability(self) -> 'outputs.GetNodeDeviceInfoCapabilityResult':
        """
        Holds key `type` that describes the type of network interface: `80203` for IEEE 802.3 or `80211` for IEEE 802.11
        """
        return pulumi.get(self, "capability")

    @property
    @pulumi.getter
    def devnodes(self) -> Sequence['outputs.GetNodeDeviceInfoDevnodeResult']:
        """
        For type `drm` holds the `path` and `link` that point to the device
        """
        return pulumi.get(self, "devnodes")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

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

    @property
    @pulumi.getter
    def parent(self) -> str:
        """
        The parent of this device in the hierarchy
        """
        return pulumi.get(self, "parent")

    @property
    @pulumi.getter
    def path(self) -> str:
        """
        Full path of the device
        """
        return pulumi.get(self, "path")

    @property
    @pulumi.getter
    def xml(self) -> str:
        """
        The XML returned by the libvirt API call
        """
        return pulumi.get(self, "xml")


class AwaitableGetNodeDeviceInfoResult(GetNodeDeviceInfoResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNodeDeviceInfoResult(
            capability=self.capability,
            devnodes=self.devnodes,
            id=self.id,
            name=self.name,
            parent=self.parent,
            path=self.path,
            xml=self.xml)


def get_node_device_info(capability: Optional[Union['GetNodeDeviceInfoCapabilityArgs', 'GetNodeDeviceInfoCapabilityArgsDict']] = None,
                         name: Optional[str] = None,
                         opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNodeDeviceInfoResult:
    """
    Retrieve information about a specific device on the current node

    ## Example Usage

    ```python
    import pulumi
    import pulumi_libvirt as libvirt

    device = libvirt.get_node_device_info(name="pci_0000_00_00_0")
    ```


    :param Union['GetNodeDeviceInfoCapabilityArgs', 'GetNodeDeviceInfoCapabilityArgsDict'] capability: Holds key `type` that describes the type of network interface: `80203` for IEEE 802.3 or `80211` for IEEE 802.11
    :param str name: The name of the device name as expected by [libvirt](https://www.libvirt.org/manpages/virsh.html#nodedev-commands).
    """
    __args__ = dict()
    __args__['capability'] = capability
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('libvirt:index/getNodeDeviceInfo:getNodeDeviceInfo', __args__, opts=opts, typ=GetNodeDeviceInfoResult).value

    return AwaitableGetNodeDeviceInfoResult(
        capability=pulumi.get(__ret__, 'capability'),
        devnodes=pulumi.get(__ret__, 'devnodes'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        parent=pulumi.get(__ret__, 'parent'),
        path=pulumi.get(__ret__, 'path'),
        xml=pulumi.get(__ret__, 'xml'))


@_utilities.lift_output_func(get_node_device_info)
def get_node_device_info_output(capability: Optional[pulumi.Input[Optional[Union['GetNodeDeviceInfoCapabilityArgs', 'GetNodeDeviceInfoCapabilityArgsDict']]]] = None,
                                name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNodeDeviceInfoResult]:
    """
    Retrieve information about a specific device on the current node

    ## Example Usage

    ```python
    import pulumi
    import pulumi_libvirt as libvirt

    device = libvirt.get_node_device_info(name="pci_0000_00_00_0")
    ```


    :param Union['GetNodeDeviceInfoCapabilityArgs', 'GetNodeDeviceInfoCapabilityArgsDict'] capability: Holds key `type` that describes the type of network interface: `80203` for IEEE 802.3 or `80211` for IEEE 802.11
    :param str name: The name of the device name as expected by [libvirt](https://www.libvirt.org/manpages/virsh.html#nodedev-commands).
    """
    ...
