# 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
from . import outputs

__all__ = [
    'GetReleaseLinksResult',
    'AwaitableGetReleaseLinksResult',
    'get_release_links',
    'get_release_links_output',
]

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

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

    @_builtins.property
    @pulumi.getter
    def project(self) -> _builtins.str:
        """
        The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
        """
        return pulumi.get(self, "project")

    @_builtins.property
    @pulumi.getter(name="releaseLinks")
    def release_links(self) -> Sequence['outputs.GetReleaseLinksReleaseLinkResult']:
        """
        List of release links
        """
        return pulumi.get(self, "release_links")

    @_builtins.property
    @pulumi.getter(name="tagName")
    def tag_name(self) -> _builtins.str:
        """
        The tag associated with the Release.
        """
        return pulumi.get(self, "tag_name")


class AwaitableGetReleaseLinksResult(GetReleaseLinksResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetReleaseLinksResult(
            id=self.id,
            project=self.project,
            release_links=self.release_links,
            tag_name=self.tag_name)


def get_release_links(project: Optional[_builtins.str] = None,
                      tag_name: Optional[_builtins.str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetReleaseLinksResult:
    """
    The `get_release_links` data source allows get details of release links.

    **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/releases/links/)


    :param _builtins.str project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
    :param _builtins.str tag_name: The tag associated with the Release.
    """
    __args__ = dict()
    __args__['project'] = project
    __args__['tagName'] = tag_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('gitlab:index/getReleaseLinks:getReleaseLinks', __args__, opts=opts, typ=GetReleaseLinksResult).value

    return AwaitableGetReleaseLinksResult(
        id=pulumi.get(__ret__, 'id'),
        project=pulumi.get(__ret__, 'project'),
        release_links=pulumi.get(__ret__, 'release_links'),
        tag_name=pulumi.get(__ret__, 'tag_name'))
def get_release_links_output(project: Optional[pulumi.Input[_builtins.str]] = None,
                             tag_name: Optional[pulumi.Input[_builtins.str]] = None,
                             opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetReleaseLinksResult]:
    """
    The `get_release_links` data source allows get details of release links.

    **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/releases/links/)


    :param _builtins.str project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
    :param _builtins.str tag_name: The tag associated with the Release.
    """
    __args__ = dict()
    __args__['project'] = project
    __args__['tagName'] = tag_name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('gitlab:index/getReleaseLinks:getReleaseLinks', __args__, opts=opts, typ=GetReleaseLinksResult)
    return __ret__.apply(lambda __response__: GetReleaseLinksResult(
        id=pulumi.get(__response__, 'id'),
        project=pulumi.get(__response__, 'project'),
        release_links=pulumi.get(__response__, 'release_links'),
        tag_name=pulumi.get(__response__, 'tag_name')))
