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

__all__ = [
    'GetVersionsResult',
    'AwaitableGetVersionsResult',
    'get_versions',
    'get_versions_output',
]

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

    @_builtins.property
    @pulumi.getter
    def filters(self) -> Optional['outputs.GetVersionsFiltersResult']:
        """
        The filter to apply to the overlays list.
        """
        return pulumi.get(self, "filters")

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

    @_builtins.property
    @pulumi.getter(name="talosVersions")
    def talos_versions(self) -> Sequence[_builtins.str]:
        """
        The list of available talos versions.
        """
        return pulumi.get(self, "talos_versions")


class AwaitableGetVersionsResult(GetVersionsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVersionsResult(
            filters=self.filters,
            id=self.id,
            talos_versions=self.talos_versions)


def get_versions(filters: Optional[Union['GetVersionsFiltersArgs', 'GetVersionsFiltersArgsDict']] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVersionsResult:
    """
    The image factory versions data source provides a list of available talos versions from the image factory.


    :param Union['GetVersionsFiltersArgs', 'GetVersionsFiltersArgsDict'] filters: The filter to apply to the overlays list.
    """
    __args__ = dict()
    __args__['filters'] = filters
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('talos:imageFactory/getVersions:getVersions', __args__, opts=opts, typ=GetVersionsResult).value

    return AwaitableGetVersionsResult(
        filters=pulumi.get(__ret__, 'filters'),
        id=pulumi.get(__ret__, 'id'),
        talos_versions=pulumi.get(__ret__, 'talos_versions'))
def get_versions_output(filters: Optional[pulumi.Input[Optional[Union['GetVersionsFiltersArgs', 'GetVersionsFiltersArgsDict']]]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetVersionsResult]:
    """
    The image factory versions data source provides a list of available talos versions from the image factory.


    :param Union['GetVersionsFiltersArgs', 'GetVersionsFiltersArgsDict'] filters: The filter to apply to the overlays list.
    """
    __args__ = dict()
    __args__['filters'] = filters
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('talos:imageFactory/getVersions:getVersions', __args__, opts=opts, typ=GetVersionsResult)
    return __ret__.apply(lambda __response__: GetVersionsResult(
        filters=pulumi.get(__response__, 'filters'),
        id=pulumi.get(__response__, 'id'),
        talos_versions=pulumi.get(__response__, 'talos_versions')))
