# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities

__all__ = [
    'GetPolicyResourceResult',
    'AwaitableGetPolicyResourceResult',
    'get_policy_resource',
    'get_policy_resource_output',
]

warnings.warn("""Version 2015-05-21-preview will be removed in v2 of the provider.""", DeprecationWarning)

@pulumi.output_type
class GetPolicyResourceResult:
    """
    A Policy.
    """
    def __init__(__self__, description=None, evaluator_type=None, fact_data=None, fact_name=None, id=None, location=None, name=None, provisioning_state=None, status=None, tags=None, threshold=None, type=None):
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if evaluator_type and not isinstance(evaluator_type, str):
            raise TypeError("Expected argument 'evaluator_type' to be a str")
        pulumi.set(__self__, "evaluator_type", evaluator_type)
        if fact_data and not isinstance(fact_data, str):
            raise TypeError("Expected argument 'fact_data' to be a str")
        pulumi.set(__self__, "fact_data", fact_data)
        if fact_name and not isinstance(fact_name, str):
            raise TypeError("Expected argument 'fact_name' to be a str")
        pulumi.set(__self__, "fact_name", fact_name)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if location and not isinstance(location, str):
            raise TypeError("Expected argument 'location' to be a str")
        pulumi.set(__self__, "location", location)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if provisioning_state and not isinstance(provisioning_state, str):
            raise TypeError("Expected argument 'provisioning_state' to be a str")
        pulumi.set(__self__, "provisioning_state", provisioning_state)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        pulumi.set(__self__, "tags", tags)
        if threshold and not isinstance(threshold, str):
            raise TypeError("Expected argument 'threshold' to be a str")
        pulumi.set(__self__, "threshold", threshold)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)

    @property
    @pulumi.getter
    def description(self) -> Optional[str]:
        """
        The description of the policy.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="evaluatorType")
    def evaluator_type(self) -> Optional[str]:
        """
        The evaluator type of the policy.
        """
        return pulumi.get(self, "evaluator_type")

    @property
    @pulumi.getter(name="factData")
    def fact_data(self) -> Optional[str]:
        """
        The fact data of the policy.
        """
        return pulumi.get(self, "fact_data")

    @property
    @pulumi.getter(name="factName")
    def fact_name(self) -> Optional[str]:
        """
        The fact name of the policy.
        """
        return pulumi.get(self, "fact_name")

    @property
    @pulumi.getter
    def id(self) -> Optional[str]:
        """
        The identifier of the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def location(self) -> Optional[str]:
        """
        The location of the resource.
        """
        return pulumi.get(self, "location")

    @property
    @pulumi.getter
    def name(self) -> Optional[str]:
        """
        The name of the resource.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="provisioningState")
    def provisioning_state(self) -> Optional[str]:
        """
        The provisioning status of the resource.
        """
        return pulumi.get(self, "provisioning_state")

    @property
    @pulumi.getter
    def status(self) -> Optional[str]:
        """
        The status of the policy.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Optional[Mapping[str, str]]:
        """
        The tags of the resource.
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def threshold(self) -> Optional[str]:
        """
        The threshold of the policy.
        """
        return pulumi.get(self, "threshold")

    @property
    @pulumi.getter
    def type(self) -> Optional[str]:
        """
        The type of the resource.
        """
        return pulumi.get(self, "type")


class AwaitableGetPolicyResourceResult(GetPolicyResourceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetPolicyResourceResult(
            description=self.description,
            evaluator_type=self.evaluator_type,
            fact_data=self.fact_data,
            fact_name=self.fact_name,
            id=self.id,
            location=self.location,
            name=self.name,
            provisioning_state=self.provisioning_state,
            status=self.status,
            tags=self.tags,
            threshold=self.threshold,
            type=self.type)


def get_policy_resource(lab_name: Optional[str] = None,
                        name: Optional[str] = None,
                        policy_set_name: Optional[str] = None,
                        resource_group_name: Optional[str] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPolicyResourceResult:
    """
    Get policy.


    :param str lab_name: The name of the lab.
    :param str name: The name of the policy.
    :param str policy_set_name: The name of the policy set.
    :param str resource_group_name: The name of the resource group.
    """
    pulumi.log.warn("""get_policy_resource is deprecated: Version 2015-05-21-preview will be removed in v2 of the provider.""")
    __args__ = dict()
    __args__['labName'] = lab_name
    __args__['name'] = name
    __args__['policySetName'] = policy_set_name
    __args__['resourceGroupName'] = resource_group_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:devtestlab/v20150521preview:getPolicyResource', __args__, opts=opts, typ=GetPolicyResourceResult).value

    return AwaitableGetPolicyResourceResult(
        description=__ret__.description,
        evaluator_type=__ret__.evaluator_type,
        fact_data=__ret__.fact_data,
        fact_name=__ret__.fact_name,
        id=__ret__.id,
        location=__ret__.location,
        name=__ret__.name,
        provisioning_state=__ret__.provisioning_state,
        status=__ret__.status,
        tags=__ret__.tags,
        threshold=__ret__.threshold,
        type=__ret__.type)


@_utilities.lift_output_func(get_policy_resource)
def get_policy_resource_output(lab_name: Optional[pulumi.Input[str]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               policy_set_name: Optional[pulumi.Input[str]] = None,
                               resource_group_name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPolicyResourceResult]:
    """
    Get policy.


    :param str lab_name: The name of the lab.
    :param str name: The name of the policy.
    :param str policy_set_name: The name of the policy set.
    :param str resource_group_name: The name of the resource group.
    """
    pulumi.log.warn("""get_policy_resource is deprecated: Version 2015-05-21-preview will be removed in v2 of the provider.""")
    ...
