# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

__all__ = [
    'GetSparkVersionResult',
    'AwaitableGetSparkVersionResult',
    'get_spark_version',
]

@pulumi.output_type
class GetSparkVersionResult:
    """
    A collection of values returned by getSparkVersion.
    """
    def __init__(__self__, beta=None, genomics=None, gpu=None, id=None, latest=None, long_term_support=None, ml=None, photon=None, scala=None, spark_version=None):
        if beta and not isinstance(beta, bool):
            raise TypeError("Expected argument 'beta' to be a bool")
        pulumi.set(__self__, "beta", beta)
        if genomics and not isinstance(genomics, bool):
            raise TypeError("Expected argument 'genomics' to be a bool")
        pulumi.set(__self__, "genomics", genomics)
        if gpu and not isinstance(gpu, bool):
            raise TypeError("Expected argument 'gpu' to be a bool")
        pulumi.set(__self__, "gpu", gpu)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if latest and not isinstance(latest, bool):
            raise TypeError("Expected argument 'latest' to be a bool")
        pulumi.set(__self__, "latest", latest)
        if long_term_support and not isinstance(long_term_support, bool):
            raise TypeError("Expected argument 'long_term_support' to be a bool")
        pulumi.set(__self__, "long_term_support", long_term_support)
        if ml and not isinstance(ml, bool):
            raise TypeError("Expected argument 'ml' to be a bool")
        pulumi.set(__self__, "ml", ml)
        if photon and not isinstance(photon, bool):
            raise TypeError("Expected argument 'photon' to be a bool")
        pulumi.set(__self__, "photon", photon)
        if scala and not isinstance(scala, str):
            raise TypeError("Expected argument 'scala' to be a str")
        pulumi.set(__self__, "scala", scala)
        if spark_version and not isinstance(spark_version, str):
            raise TypeError("Expected argument 'spark_version' to be a str")
        pulumi.set(__self__, "spark_version", spark_version)

    @property
    @pulumi.getter
    def beta(self) -> Optional[bool]:
        return pulumi.get(self, "beta")

    @property
    @pulumi.getter
    def genomics(self) -> Optional[bool]:
        return pulumi.get(self, "genomics")

    @property
    @pulumi.getter
    def gpu(self) -> Optional[bool]:
        return pulumi.get(self, "gpu")

    @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 latest(self) -> Optional[bool]:
        return pulumi.get(self, "latest")

    @property
    @pulumi.getter(name="longTermSupport")
    def long_term_support(self) -> Optional[bool]:
        return pulumi.get(self, "long_term_support")

    @property
    @pulumi.getter
    def ml(self) -> Optional[bool]:
        return pulumi.get(self, "ml")

    @property
    @pulumi.getter
    def photon(self) -> Optional[bool]:
        return pulumi.get(self, "photon")

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

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


class AwaitableGetSparkVersionResult(GetSparkVersionResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetSparkVersionResult(
            beta=self.beta,
            genomics=self.genomics,
            gpu=self.gpu,
            id=self.id,
            latest=self.latest,
            long_term_support=self.long_term_support,
            ml=self.ml,
            photon=self.photon,
            scala=self.scala,
            spark_version=self.spark_version)


def get_spark_version(beta: Optional[bool] = None,
                      genomics: Optional[bool] = None,
                      gpu: Optional[bool] = None,
                      latest: Optional[bool] = None,
                      long_term_support: Optional[bool] = None,
                      ml: Optional[bool] = None,
                      photon: Optional[bool] = None,
                      scala: Optional[str] = None,
                      spark_version: Optional[str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSparkVersionResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['beta'] = beta
    __args__['genomics'] = genomics
    __args__['gpu'] = gpu
    __args__['latest'] = latest
    __args__['longTermSupport'] = long_term_support
    __args__['ml'] = ml
    __args__['photon'] = photon
    __args__['scala'] = scala
    __args__['sparkVersion'] = spark_version
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('databricks:databricks/getSparkVersion:getSparkVersion', __args__, opts=opts, typ=GetSparkVersionResult).value

    return AwaitableGetSparkVersionResult(
        beta=__ret__.beta,
        genomics=__ret__.genomics,
        gpu=__ret__.gpu,
        id=__ret__.id,
        latest=__ret__.latest,
        long_term_support=__ret__.long_term_support,
        ml=__ret__.ml,
        photon=__ret__.photon,
        scala=__ret__.scala,
        spark_version=__ret__.spark_version)
