# 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__ = [
    'GetImageResult',
    'AwaitableGetImageResult',
    'get_image',
    'get_image_output',
]

@pulumi.output_type
class GetImageResult:
    """
    A collection of values returned by getImage.
    """
    def __init__(__self__, description=None, display_name=None, id=None, name=None, namespace=None, progress=None, pvc_name=None, pvc_namespace=None, size=None, source_type=None, state=None, storage_class_name=None, tags=None, url=None):
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if namespace and not isinstance(namespace, str):
            raise TypeError("Expected argument 'namespace' to be a str")
        pulumi.set(__self__, "namespace", namespace)
        if progress and not isinstance(progress, int):
            raise TypeError("Expected argument 'progress' to be a int")
        pulumi.set(__self__, "progress", progress)
        if pvc_name and not isinstance(pvc_name, str):
            raise TypeError("Expected argument 'pvc_name' to be a str")
        pulumi.set(__self__, "pvc_name", pvc_name)
        if pvc_namespace and not isinstance(pvc_namespace, str):
            raise TypeError("Expected argument 'pvc_namespace' to be a str")
        pulumi.set(__self__, "pvc_namespace", pvc_namespace)
        if size and not isinstance(size, int):
            raise TypeError("Expected argument 'size' to be a int")
        pulumi.set(__self__, "size", size)
        if source_type and not isinstance(source_type, str):
            raise TypeError("Expected argument 'source_type' to be a str")
        pulumi.set(__self__, "source_type", source_type)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if storage_class_name and not isinstance(storage_class_name, str):
            raise TypeError("Expected argument 'storage_class_name' to be a str")
        pulumi.set(__self__, "storage_class_name", storage_class_name)
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        pulumi.set(__self__, "tags", tags)
        if url and not isinstance(url, str):
            raise TypeError("Expected argument 'url' to be a str")
        pulumi.set(__self__, "url", url)

    @property
    @pulumi.getter
    def description(self) -> str:
        """
        Any text you want that better describes this resource
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> str:
        return pulumi.get(self, "display_name")

    @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 name(self) -> str:
        """
        A unique name
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter
    def progress(self) -> int:
        return pulumi.get(self, "progress")

    @property
    @pulumi.getter(name="pvcName")
    def pvc_name(self) -> str:
        return pulumi.get(self, "pvc_name")

    @property
    @pulumi.getter(name="pvcNamespace")
    def pvc_namespace(self) -> str:
        return pulumi.get(self, "pvc_namespace")

    @property
    @pulumi.getter
    def size(self) -> int:
        return pulumi.get(self, "size")

    @property
    @pulumi.getter(name="sourceType")
    def source_type(self) -> str:
        return pulumi.get(self, "source_type")

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

    @property
    @pulumi.getter(name="storageClassName")
    def storage_class_name(self) -> str:
        return pulumi.get(self, "storage_class_name")

    @property
    @pulumi.getter
    def tags(self) -> Mapping[str, Any]:
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def url(self) -> str:
        """
        supports the `raw` and `qcow2` image formats which are supported by [qemu](https://www.qemu.org/docs/master/system/images.html#disk-image-file-formats). Bootable ISO images can also be used and are treated like `raw` images.
        """
        return pulumi.get(self, "url")


class AwaitableGetImageResult(GetImageResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetImageResult(
            description=self.description,
            display_name=self.display_name,
            id=self.id,
            name=self.name,
            namespace=self.namespace,
            progress=self.progress,
            pvc_name=self.pvc_name,
            pvc_namespace=self.pvc_namespace,
            size=self.size,
            source_type=self.source_type,
            state=self.state,
            storage_class_name=self.storage_class_name,
            tags=self.tags,
            url=self.url)


def get_image(name: Optional[str] = None,
              namespace: Optional[str] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetImageResult:
    """
    ## Example Usage

    ```python
    import pulumi
    import pulumi_harvester as harvester

    ubuntu20 = harvester.get_image(name="ubuntu20",
        namespace="harvester-public")
    ```


    :param str name: A unique name
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['namespace'] = namespace
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('harvester:index/getImage:getImage', __args__, opts=opts, typ=GetImageResult).value

    return AwaitableGetImageResult(
        description=__ret__.description,
        display_name=__ret__.display_name,
        id=__ret__.id,
        name=__ret__.name,
        namespace=__ret__.namespace,
        progress=__ret__.progress,
        pvc_name=__ret__.pvc_name,
        pvc_namespace=__ret__.pvc_namespace,
        size=__ret__.size,
        source_type=__ret__.source_type,
        state=__ret__.state,
        storage_class_name=__ret__.storage_class_name,
        tags=__ret__.tags,
        url=__ret__.url)


@_utilities.lift_output_func(get_image)
def get_image_output(name: Optional[pulumi.Input[str]] = None,
                     namespace: Optional[pulumi.Input[Optional[str]]] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetImageResult]:
    """
    ## Example Usage

    ```python
    import pulumi
    import pulumi_harvester as harvester

    ubuntu20 = harvester.get_image(name="ubuntu20",
        namespace="harvester-public")
    ```


    :param str name: A unique name
    """
    ...
