# 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

__all__ = ['IdpEnvironmentBlueprintArgs', 'IdpEnvironmentBlueprint']

@pulumi.input_type
class IdpEnvironmentBlueprintArgs:
    def __init__(__self__, *,
                 identifier: pulumi.Input[_builtins.str],
                 version: pulumi.Input[_builtins.str],
                 yaml: pulumi.Input[_builtins.str],
                 deprecated: Optional[pulumi.Input[_builtins.bool]] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 stable: Optional[pulumi.Input[_builtins.bool]] = None):
        """
        The set of arguments for constructing a IdpEnvironmentBlueprint resource.
        :param pulumi.Input[_builtins.str] identifier: Unique identifier of the resource.
        :param pulumi.Input[_builtins.str] version: Version of the catalog entity
        :param pulumi.Input[_builtins.str] yaml: YAML definition of the catalog entity
        :param pulumi.Input[_builtins.bool] deprecated: Whether the catalog entity is deprecated
        :param pulumi.Input[_builtins.str] description: Description of the catalog entity
        :param pulumi.Input[_builtins.bool] stable: Whether the catalog entity is stable
        """
        pulumi.set(__self__, "identifier", identifier)
        pulumi.set(__self__, "version", version)
        pulumi.set(__self__, "yaml", yaml)
        if deprecated is not None:
            pulumi.set(__self__, "deprecated", deprecated)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if stable is not None:
            pulumi.set(__self__, "stable", stable)

    @_builtins.property
    @pulumi.getter
    def identifier(self) -> pulumi.Input[_builtins.str]:
        """
        Unique identifier of the resource.
        """
        return pulumi.get(self, "identifier")

    @identifier.setter
    def identifier(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "identifier", value)

    @_builtins.property
    @pulumi.getter
    def version(self) -> pulumi.Input[_builtins.str]:
        """
        Version of the catalog entity
        """
        return pulumi.get(self, "version")

    @version.setter
    def version(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "version", value)

    @_builtins.property
    @pulumi.getter
    def yaml(self) -> pulumi.Input[_builtins.str]:
        """
        YAML definition of the catalog entity
        """
        return pulumi.get(self, "yaml")

    @yaml.setter
    def yaml(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "yaml", value)

    @_builtins.property
    @pulumi.getter
    def deprecated(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether the catalog entity is deprecated
        """
        return pulumi.get(self, "deprecated")

    @deprecated.setter
    def deprecated(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "deprecated", value)

    @_builtins.property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Description of the catalog entity
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "description", value)

    @_builtins.property
    @pulumi.getter
    def stable(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether the catalog entity is stable
        """
        return pulumi.get(self, "stable")

    @stable.setter
    def stable(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "stable", value)


@pulumi.input_type
class _IdpEnvironmentBlueprintState:
    def __init__(__self__, *,
                 deprecated: Optional[pulumi.Input[_builtins.bool]] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 identifier: Optional[pulumi.Input[_builtins.str]] = None,
                 stable: Optional[pulumi.Input[_builtins.bool]] = None,
                 version: Optional[pulumi.Input[_builtins.str]] = None,
                 yaml: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering IdpEnvironmentBlueprint resources.
        :param pulumi.Input[_builtins.bool] deprecated: Whether the catalog entity is deprecated
        :param pulumi.Input[_builtins.str] description: Description of the catalog entity
        :param pulumi.Input[_builtins.str] identifier: Unique identifier of the resource.
        :param pulumi.Input[_builtins.bool] stable: Whether the catalog entity is stable
        :param pulumi.Input[_builtins.str] version: Version of the catalog entity
        :param pulumi.Input[_builtins.str] yaml: YAML definition of the catalog entity
        """
        if deprecated is not None:
            pulumi.set(__self__, "deprecated", deprecated)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if identifier is not None:
            pulumi.set(__self__, "identifier", identifier)
        if stable is not None:
            pulumi.set(__self__, "stable", stable)
        if version is not None:
            pulumi.set(__self__, "version", version)
        if yaml is not None:
            pulumi.set(__self__, "yaml", yaml)

    @_builtins.property
    @pulumi.getter
    def deprecated(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether the catalog entity is deprecated
        """
        return pulumi.get(self, "deprecated")

    @deprecated.setter
    def deprecated(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "deprecated", value)

    @_builtins.property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Description of the catalog entity
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "description", value)

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

    @identifier.setter
    def identifier(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "identifier", value)

    @_builtins.property
    @pulumi.getter
    def stable(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether the catalog entity is stable
        """
        return pulumi.get(self, "stable")

    @stable.setter
    def stable(self, value: Optional[pulumi.Input[_builtins.bool]]):
        pulumi.set(self, "stable", value)

    @_builtins.property
    @pulumi.getter
    def version(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Version of the catalog entity
        """
        return pulumi.get(self, "version")

    @version.setter
    def version(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "version", value)

    @_builtins.property
    @pulumi.getter
    def yaml(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        YAML definition of the catalog entity
        """
        return pulumi.get(self, "yaml")

    @yaml.setter
    def yaml(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "yaml", value)


@pulumi.type_token("harness:platform/idpEnvironmentBlueprint:IdpEnvironmentBlueprint")
class IdpEnvironmentBlueprint(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 deprecated: Optional[pulumi.Input[_builtins.bool]] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 identifier: Optional[pulumi.Input[_builtins.str]] = None,
                 stable: Optional[pulumi.Input[_builtins.bool]] = None,
                 version: Optional[pulumi.Input[_builtins.str]] = None,
                 yaml: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        Resource for creating IDP environment blueprints.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_harness as harness

        test = harness.platform.IdpEnvironmentBlueprint("test",
            identifier="identifier",
            version="v1.0.0",
            stable=True,
            deprecated=False,
            description="description",
            yaml=\"\"\"apiVersion: harness.io/v1
        kind: EnvironmentBlueprint
        type: long-lived
        identifier: identifier
        name: name
        owner: group:account/_account_all_users
        metadata:
          description: description
        spec:
          entities:
          - identifier: git
            backend:
              type: HarnessCD
              steps:
                apply:
                  pipeline: gittest
                  branch: main
                destroy:
                  pipeline: gittest
                  branch: not-main
          ownedBy:
          - group:account/_account_all_users
        \"\"\")
        ```

        ## Import

        The `pulumi import` command can be used, for example:

        Import environment blueprint

        ```sh
        $ pulumi import harness:platform/idpEnvironmentBlueprint:IdpEnvironmentBlueprint example <blueprint_id>/<version>
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.bool] deprecated: Whether the catalog entity is deprecated
        :param pulumi.Input[_builtins.str] description: Description of the catalog entity
        :param pulumi.Input[_builtins.str] identifier: Unique identifier of the resource.
        :param pulumi.Input[_builtins.bool] stable: Whether the catalog entity is stable
        :param pulumi.Input[_builtins.str] version: Version of the catalog entity
        :param pulumi.Input[_builtins.str] yaml: YAML definition of the catalog entity
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: IdpEnvironmentBlueprintArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Resource for creating IDP environment blueprints.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_harness as harness

        test = harness.platform.IdpEnvironmentBlueprint("test",
            identifier="identifier",
            version="v1.0.0",
            stable=True,
            deprecated=False,
            description="description",
            yaml=\"\"\"apiVersion: harness.io/v1
        kind: EnvironmentBlueprint
        type: long-lived
        identifier: identifier
        name: name
        owner: group:account/_account_all_users
        metadata:
          description: description
        spec:
          entities:
          - identifier: git
            backend:
              type: HarnessCD
              steps:
                apply:
                  pipeline: gittest
                  branch: main
                destroy:
                  pipeline: gittest
                  branch: not-main
          ownedBy:
          - group:account/_account_all_users
        \"\"\")
        ```

        ## Import

        The `pulumi import` command can be used, for example:

        Import environment blueprint

        ```sh
        $ pulumi import harness:platform/idpEnvironmentBlueprint:IdpEnvironmentBlueprint example <blueprint_id>/<version>
        ```

        :param str resource_name: The name of the resource.
        :param IdpEnvironmentBlueprintArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(IdpEnvironmentBlueprintArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 deprecated: Optional[pulumi.Input[_builtins.bool]] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 identifier: Optional[pulumi.Input[_builtins.str]] = None,
                 stable: Optional[pulumi.Input[_builtins.bool]] = None,
                 version: Optional[pulumi.Input[_builtins.str]] = None,
                 yaml: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = IdpEnvironmentBlueprintArgs.__new__(IdpEnvironmentBlueprintArgs)

            __props__.__dict__["deprecated"] = deprecated
            __props__.__dict__["description"] = description
            if identifier is None and not opts.urn:
                raise TypeError("Missing required property 'identifier'")
            __props__.__dict__["identifier"] = identifier
            __props__.__dict__["stable"] = stable
            if version is None and not opts.urn:
                raise TypeError("Missing required property 'version'")
            __props__.__dict__["version"] = version
            if yaml is None and not opts.urn:
                raise TypeError("Missing required property 'yaml'")
            __props__.__dict__["yaml"] = yaml
        super(IdpEnvironmentBlueprint, __self__).__init__(
            'harness:platform/idpEnvironmentBlueprint:IdpEnvironmentBlueprint',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            deprecated: Optional[pulumi.Input[_builtins.bool]] = None,
            description: Optional[pulumi.Input[_builtins.str]] = None,
            identifier: Optional[pulumi.Input[_builtins.str]] = None,
            stable: Optional[pulumi.Input[_builtins.bool]] = None,
            version: Optional[pulumi.Input[_builtins.str]] = None,
            yaml: Optional[pulumi.Input[_builtins.str]] = None) -> 'IdpEnvironmentBlueprint':
        """
        Get an existing IdpEnvironmentBlueprint resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.bool] deprecated: Whether the catalog entity is deprecated
        :param pulumi.Input[_builtins.str] description: Description of the catalog entity
        :param pulumi.Input[_builtins.str] identifier: Unique identifier of the resource.
        :param pulumi.Input[_builtins.bool] stable: Whether the catalog entity is stable
        :param pulumi.Input[_builtins.str] version: Version of the catalog entity
        :param pulumi.Input[_builtins.str] yaml: YAML definition of the catalog entity
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _IdpEnvironmentBlueprintState.__new__(_IdpEnvironmentBlueprintState)

        __props__.__dict__["deprecated"] = deprecated
        __props__.__dict__["description"] = description
        __props__.__dict__["identifier"] = identifier
        __props__.__dict__["stable"] = stable
        __props__.__dict__["version"] = version
        __props__.__dict__["yaml"] = yaml
        return IdpEnvironmentBlueprint(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter
    def deprecated(self) -> pulumi.Output[Optional[_builtins.bool]]:
        """
        Whether the catalog entity is deprecated
        """
        return pulumi.get(self, "deprecated")

    @_builtins.property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        Description of the catalog entity
        """
        return pulumi.get(self, "description")

    @_builtins.property
    @pulumi.getter
    def identifier(self) -> pulumi.Output[_builtins.str]:
        """
        Unique identifier of the resource.
        """
        return pulumi.get(self, "identifier")

    @_builtins.property
    @pulumi.getter
    def stable(self) -> pulumi.Output[Optional[_builtins.bool]]:
        """
        Whether the catalog entity is stable
        """
        return pulumi.get(self, "stable")

    @_builtins.property
    @pulumi.getter
    def version(self) -> pulumi.Output[_builtins.str]:
        """
        Version of the catalog entity
        """
        return pulumi.get(self, "version")

    @_builtins.property
    @pulumi.getter
    def yaml(self) -> pulumi.Output[_builtins.str]:
        """
        YAML definition of the catalog entity
        """
        return pulumi.get(self, "yaml")

