# 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__ = [
    'GetVolumeResult',
    'AwaitableGetVolumeResult',
    'get_volume',
    'get_volume_output',
]

@pulumi.output_type
class GetVolumeResult:
    """
    A collection of values returned by getVolume.
    """
    def __init__(__self__, access_mode=None, attached_vm=None, description=None, id=None, image=None, name=None, namespace=None, phase=None, size=None, state=None, storage_class_name=None, tags=None, volume_mode=None):
        if access_mode and not isinstance(access_mode, str):
            raise TypeError("Expected argument 'access_mode' to be a str")
        pulumi.set(__self__, "access_mode", access_mode)
        if attached_vm and not isinstance(attached_vm, str):
            raise TypeError("Expected argument 'attached_vm' to be a str")
        pulumi.set(__self__, "attached_vm", attached_vm)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if image and not isinstance(image, str):
            raise TypeError("Expected argument 'image' to be a str")
        pulumi.set(__self__, "image", image)
        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 phase and not isinstance(phase, str):
            raise TypeError("Expected argument 'phase' to be a str")
        pulumi.set(__self__, "phase", phase)
        if size and not isinstance(size, str):
            raise TypeError("Expected argument 'size' to be a str")
        pulumi.set(__self__, "size", size)
        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 volume_mode and not isinstance(volume_mode, str):
            raise TypeError("Expected argument 'volume_mode' to be a str")
        pulumi.set(__self__, "volume_mode", volume_mode)

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

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

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

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

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

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

    @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(name="volumeMode")
    def volume_mode(self) -> str:
        return pulumi.get(self, "volume_mode")


class AwaitableGetVolumeResult(GetVolumeResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVolumeResult(
            access_mode=self.access_mode,
            attached_vm=self.attached_vm,
            description=self.description,
            id=self.id,
            image=self.image,
            name=self.name,
            namespace=self.namespace,
            phase=self.phase,
            size=self.size,
            state=self.state,
            storage_class_name=self.storage_class_name,
            tags=self.tags,
            volume_mode=self.volume_mode)


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

    ```python
    import pulumi
    import pulumi_harvester as harvester

    ubuntu20_dev_mount_disk = harvester.get_volume(name="ubuntu20-dev-mount-disk",
        namespace="default")
    ```


    :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/getVolume:getVolume', __args__, opts=opts, typ=GetVolumeResult).value

    return AwaitableGetVolumeResult(
        access_mode=__ret__.access_mode,
        attached_vm=__ret__.attached_vm,
        description=__ret__.description,
        id=__ret__.id,
        image=__ret__.image,
        name=__ret__.name,
        namespace=__ret__.namespace,
        phase=__ret__.phase,
        size=__ret__.size,
        state=__ret__.state,
        storage_class_name=__ret__.storage_class_name,
        tags=__ret__.tags,
        volume_mode=__ret__.volume_mode)


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

    ```python
    import pulumi
    import pulumi_harvester as harvester

    ubuntu20_dev_mount_disk = harvester.get_volume(name="ubuntu20-dev-mount-disk",
        namespace="default")
    ```


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