# 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__ = [
    'GetGithubAppResult',
    'AwaitableGetGithubAppResult',
    'get_github_app',
    'get_github_app_output',
]

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

    @property
    @pulumi.getter
    def description(self) -> str:
        """
        The app's description.
        """
        return pulumi.get(self, "description")

    @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:
        """
        The app's full name.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="nodeId")
    def node_id(self) -> str:
        """
        The Node ID of the app.
        """
        return pulumi.get(self, "node_id")

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


class AwaitableGetGithubAppResult(GetGithubAppResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetGithubAppResult(
            description=self.description,
            id=self.id,
            name=self.name,
            node_id=self.node_id,
            slug=self.slug)


def get_github_app(slug: Optional[str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGithubAppResult:
    """
    Use this data source to retrieve information about an app.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_github as github

    foobar = github.get_github_app(slug="foobar")
    ```


    :param str slug: The URL-friendly name of your GitHub App.
    """
    __args__ = dict()
    __args__['slug'] = slug
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('github:index/getGithubApp:getGithubApp', __args__, opts=opts, typ=GetGithubAppResult).value

    return AwaitableGetGithubAppResult(
        description=pulumi.get(__ret__, 'description'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        node_id=pulumi.get(__ret__, 'node_id'),
        slug=pulumi.get(__ret__, 'slug'))


@_utilities.lift_output_func(get_github_app)
def get_github_app_output(slug: Optional[pulumi.Input[str]] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetGithubAppResult]:
    """
    Use this data source to retrieve information about an app.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_github as github

    foobar = github.get_github_app(slug="foobar")
    ```


    :param str slug: The URL-friendly name of your GitHub App.
    """
    ...
