# 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

__all__ = [
    'GetIssueLabelsResult',
    'AwaitableGetIssueLabelsResult',
    'get_issue_labels',
    'get_issue_labels_output',
]

@pulumi.output_type
class GetIssueLabelsResult:
    """
    A collection of values returned by getIssueLabels.
    """
    def __init__(__self__, id=None, labels=None, repository=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if labels and not isinstance(labels, list):
            raise TypeError("Expected argument 'labels' to be a list")
        pulumi.set(__self__, "labels", labels)
        if repository and not isinstance(repository, str):
            raise TypeError("Expected argument 'repository' to be a str")
        pulumi.set(__self__, "repository", repository)

    @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 labels(self) -> Sequence['outputs.GetIssueLabelsLabelResult']:
        """
        The list of this repository's labels. Each element of `labels` has the following attributes:
        """
        return pulumi.get(self, "labels")

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


class AwaitableGetIssueLabelsResult(GetIssueLabelsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetIssueLabelsResult(
            id=self.id,
            labels=self.labels,
            repository=self.repository)


def get_issue_labels(repository: Optional[str] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetIssueLabelsResult:
    """
    Use this data source to retrieve the labels for a given repository.


    :param str repository: The name of the repository.
    """
    __args__ = dict()
    __args__['repository'] = repository
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('github:index/getIssueLabels:getIssueLabels', __args__, opts=opts, typ=GetIssueLabelsResult).value

    return AwaitableGetIssueLabelsResult(
        id=pulumi.get(__ret__, 'id'),
        labels=pulumi.get(__ret__, 'labels'),
        repository=pulumi.get(__ret__, 'repository'))


@_utilities.lift_output_func(get_issue_labels)
def get_issue_labels_output(repository: Optional[pulumi.Input[str]] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetIssueLabelsResult]:
    """
    Use this data source to retrieve the labels for a given repository.


    :param str repository: The name of the repository.
    """
    ...
