# 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__ = [
    'GetDeviceRoleResult',
    'AwaitableGetDeviceRoleResult',
    'get_device_role',
    'get_device_role_output',
]

@pulumi.output_type
class GetDeviceRoleResult:
    """
    A collection of values returned by getDeviceRole.
    """
    def __init__(__self__, color_hex=None, id=None, name=None, slug=None):
        if color_hex and not isinstance(color_hex, str):
            raise TypeError("Expected argument 'color_hex' to be a str")
        pulumi.set(__self__, "color_hex", color_hex)
        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 slug and not isinstance(slug, str):
            raise TypeError("Expected argument 'slug' to be a str")
        pulumi.set(__self__, "slug", slug)

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

    @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 slug(self) -> str:
        return pulumi.get(self, "slug")


class AwaitableGetDeviceRoleResult(GetDeviceRoleResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDeviceRoleResult(
            color_hex=self.color_hex,
            id=self.id,
            name=self.name,
            slug=self.slug)


def get_device_role(name: Optional[str] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDeviceRoleResult:
    """
    ## Example Usage

    ```python
    import pulumi
    import pulumi_netbox as netbox

    core_sw = netbox.get_device_role(name="core-sw")
    ```
    """
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('netbox:index/getDeviceRole:getDeviceRole', __args__, opts=opts, typ=GetDeviceRoleResult).value

    return AwaitableGetDeviceRoleResult(
        color_hex=__ret__.color_hex,
        id=__ret__.id,
        name=__ret__.name,
        slug=__ret__.slug)


@_utilities.lift_output_func(get_device_role)
def get_device_role_output(name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDeviceRoleResult]:
    """
    ## Example Usage

    ```python
    import pulumi
    import pulumi_netbox as netbox

    core_sw = netbox.get_device_role(name="core-sw")
    ```
    """
    ...
