# 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__ = [
    'GetRepositoriesResult',
    'AwaitableGetRepositoriesResult',
    'get_repositories',
    'get_repositories_output',
]

@pulumi.output_type
class GetRepositoriesResult:
    """
    A collection of values returned by getRepositories.
    """
    def __init__(__self__, id=None, package_type=None, project_key=None, repos=None, repository_type=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if package_type and not isinstance(package_type, str):
            raise TypeError("Expected argument 'package_type' to be a str")
        pulumi.set(__self__, "package_type", package_type)
        if project_key and not isinstance(project_key, str):
            raise TypeError("Expected argument 'project_key' to be a str")
        pulumi.set(__self__, "project_key", project_key)
        if repos and not isinstance(repos, list):
            raise TypeError("Expected argument 'repos' to be a list")
        pulumi.set(__self__, "repos", repos)
        if repository_type and not isinstance(repository_type, str):
            raise TypeError("Expected argument 'repository_type' to be a str")
        pulumi.set(__self__, "repository_type", repository_type)

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

    @property
    @pulumi.getter(name="packageType")
    def package_type(self) -> Optional[str]:
        return pulumi.get(self, "package_type")

    @property
    @pulumi.getter(name="projectKey")
    def project_key(self) -> Optional[str]:
        """
        Filter for repositories assigned to a specific project.
        """
        return pulumi.get(self, "project_key")

    @property
    @pulumi.getter
    def repos(self) -> Sequence['outputs.GetRepositoriesRepoResult']:
        """
        A list of repositories.
        """
        return pulumi.get(self, "repos")

    @property
    @pulumi.getter(name="repositoryType")
    def repository_type(self) -> Optional[str]:
        """
        Filter for repositories of a specific type. Allowed values are: local, remote, virtual, federated, distribution
        """
        return pulumi.get(self, "repository_type")


class AwaitableGetRepositoriesResult(GetRepositoriesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetRepositoriesResult(
            id=self.id,
            package_type=self.package_type,
            project_key=self.project_key,
            repos=self.repos,
            repository_type=self.repository_type)


def get_repositories(package_type: Optional[str] = None,
                     project_key: Optional[str] = None,
                     repository_type: Optional[str] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRepositoriesResult:
    """
    Returns a list of minimal repository details for all repositories of the specified type.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_artifactory as artifactory

    all_alpine_local = artifactory.get_repositories(repository_type="local",
        package_type="alpine")
    ```


    :param str project_key: Filter for repositories assigned to a specific project.
    :param str repository_type: Filter for repositories of a specific type. Allowed values are: local, remote, virtual, federated, distribution
    """
    __args__ = dict()
    __args__['packageType'] = package_type
    __args__['projectKey'] = project_key
    __args__['repositoryType'] = repository_type
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('artifactory:index/getRepositories:getRepositories', __args__, opts=opts, typ=GetRepositoriesResult).value

    return AwaitableGetRepositoriesResult(
        id=pulumi.get(__ret__, 'id'),
        package_type=pulumi.get(__ret__, 'package_type'),
        project_key=pulumi.get(__ret__, 'project_key'),
        repos=pulumi.get(__ret__, 'repos'),
        repository_type=pulumi.get(__ret__, 'repository_type'))


@_utilities.lift_output_func(get_repositories)
def get_repositories_output(package_type: Optional[pulumi.Input[Optional[str]]] = None,
                            project_key: Optional[pulumi.Input[Optional[str]]] = None,
                            repository_type: Optional[pulumi.Input[Optional[str]]] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRepositoriesResult]:
    """
    Returns a list of minimal repository details for all repositories of the specified type.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_artifactory as artifactory

    all_alpine_local = artifactory.get_repositories(repository_type="local",
        package_type="alpine")
    ```


    :param str project_key: Filter for repositories assigned to a specific project.
    :param str repository_type: Filter for repositories of a specific type. Allowed values are: local, remote, virtual, federated, distribution
    """
    ...
