# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities

__all__ = [
    'GetProjectDirectoryResult',
    'AwaitableGetProjectDirectoryResult',
    'get_project_directory',
    'get_project_directory_output',
]

@pulumi.output_type
class GetProjectDirectoryResult:
    """
    A collection of values returned by getProjectDirectory.
    """
    def __init__(__self__, files=None, id=None, path=None):
        if files and not isinstance(files, dict):
            raise TypeError("Expected argument 'files' to be a dict")
        pulumi.set(__self__, "files", files)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if path and not isinstance(path, str):
            raise TypeError("Expected argument 'path' to be a str")
        pulumi.set(__self__, "path", path)

    @_builtins.property
    @pulumi.getter
    def files(self) -> Mapping[str, _builtins.str]:
        """
        A map of filename to metadata about the file. The metadata contains the file size and hash, and allows a deployment to be created if the file changes.
        """
        return pulumi.get(self, "files")

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

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


class AwaitableGetProjectDirectoryResult(GetProjectDirectoryResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetProjectDirectoryResult(
            files=self.files,
            id=self.id,
            path=self.path)


def get_project_directory(path: Optional[_builtins.str] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetProjectDirectoryResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['path'] = path
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vercel:index/getProjectDirectory:getProjectDirectory', __args__, opts=opts, typ=GetProjectDirectoryResult).value

    return AwaitableGetProjectDirectoryResult(
        files=pulumi.get(__ret__, 'files'),
        id=pulumi.get(__ret__, 'id'),
        path=pulumi.get(__ret__, 'path'))
def get_project_directory_output(path: Optional[pulumi.Input[_builtins.str]] = None,
                                 opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetProjectDirectoryResult]:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['path'] = path
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('vercel:index/getProjectDirectory:getProjectDirectory', __args__, opts=opts, typ=GetProjectDirectoryResult)
    return __ret__.apply(lambda __response__: GetProjectDirectoryResult(
        files=pulumi.get(__response__, 'files'),
        id=pulumi.get(__response__, 'id'),
        path=pulumi.get(__response__, 'path')))
