# 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__ = ['ProjectCicdCatalogArgs', 'ProjectCicdCatalog']

@pulumi.input_type
class ProjectCicdCatalogArgs:
    def __init__(__self__, *,
                 enabled: pulumi.Input[_builtins.bool],
                 project: pulumi.Input[_builtins.str],
                 keep_settings_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None):
        """
        The set of arguments for constructing a ProjectCicdCatalog resource.
        :param pulumi.Input[_builtins.bool] enabled: Whether the project should be enabled as a CI/CD Catalog resource.
        :param pulumi.Input[_builtins.str] project: The ID or URL-encoded path of the project.
        """
        pulumi.set(__self__, "enabled", enabled)
        pulumi.set(__self__, "project", project)
        if keep_settings_on_destroy is not None:
            pulumi.set(__self__, "keep_settings_on_destroy", keep_settings_on_destroy)

    @_builtins.property
    @pulumi.getter
    def enabled(self) -> pulumi.Input[_builtins.bool]:
        """
        Whether the project should be enabled as a CI/CD Catalog resource.
        """
        return pulumi.get(self, "enabled")

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

    @_builtins.property
    @pulumi.getter
    def project(self) -> pulumi.Input[_builtins.str]:
        """
        The ID or URL-encoded path of the project.
        """
        return pulumi.get(self, "project")

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

    @_builtins.property
    @pulumi.getter(name="keepSettingsOnDestroy")
    def keep_settings_on_destroy(self) -> Optional[pulumi.Input[_builtins.bool]]:
        return pulumi.get(self, "keep_settings_on_destroy")

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


@pulumi.input_type
class _ProjectCicdCatalogState:
    def __init__(__self__, *,
                 enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 keep_settings_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
                 project: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering ProjectCicdCatalog resources.
        :param pulumi.Input[_builtins.bool] enabled: Whether the project should be enabled as a CI/CD Catalog resource.
        :param pulumi.Input[_builtins.str] project: The ID or URL-encoded path of the project.
        """
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if keep_settings_on_destroy is not None:
            pulumi.set(__self__, "keep_settings_on_destroy", keep_settings_on_destroy)
        if project is not None:
            pulumi.set(__self__, "project", project)

    @_builtins.property
    @pulumi.getter
    def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Whether the project should be enabled as a CI/CD Catalog resource.
        """
        return pulumi.get(self, "enabled")

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

    @_builtins.property
    @pulumi.getter(name="keepSettingsOnDestroy")
    def keep_settings_on_destroy(self) -> Optional[pulumi.Input[_builtins.bool]]:
        return pulumi.get(self, "keep_settings_on_destroy")

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

    @_builtins.property
    @pulumi.getter
    def project(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The ID or URL-encoded path of the project.
        """
        return pulumi.get(self, "project")

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


@pulumi.type_token("gitlab:index/projectCicdCatalog:ProjectCicdCatalog")
class ProjectCicdCatalog(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 keep_settings_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
                 project: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        The `ProjectCicdCatalog` resource allows users to manage the lifecycle of a CI/CD Catalog project.

        This resource controls whether a project is available as a CI/CD Catalog resource.

        > If `keep_settings_on_destroy` is set to false, destroying the resource will revert the catalog status to the value that was present when the resource was first created.
        You will need to apply the resource with the new setting before destroying the resource.

        **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationcatalogresourcescreate)

        ## Example Usage

        ```python
        import pulumi
        import pulumi_gitlab as gitlab

        example = gitlab.ProjectCicdCatalog("example",
            project="namespace/project",
            enabled=True)
        ```

        ## Import

        Starting in Terraform v1.5.0, you can use an import block to import `gitlab_project_cicd_catalog`. For example:

        terraform

        import {

          to = gitlab_project_cicd_catalog.example

          id = "see CLI command below for ID"

        }

        Importing using the CLI is supported with the following syntax:

        Gitlab Project CICD Catalogs can be imported with their id, e.g.

        ```sh
        $ pulumi import gitlab:index/projectCicdCatalog:ProjectCicdCatalog example "1"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.bool] enabled: Whether the project should be enabled as a CI/CD Catalog resource.
        :param pulumi.Input[_builtins.str] project: The ID or URL-encoded path of the project.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ProjectCicdCatalogArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        The `ProjectCicdCatalog` resource allows users to manage the lifecycle of a CI/CD Catalog project.

        This resource controls whether a project is available as a CI/CD Catalog resource.

        > If `keep_settings_on_destroy` is set to false, destroying the resource will revert the catalog status to the value that was present when the resource was first created.
        You will need to apply the resource with the new setting before destroying the resource.

        **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationcatalogresourcescreate)

        ## Example Usage

        ```python
        import pulumi
        import pulumi_gitlab as gitlab

        example = gitlab.ProjectCicdCatalog("example",
            project="namespace/project",
            enabled=True)
        ```

        ## Import

        Starting in Terraform v1.5.0, you can use an import block to import `gitlab_project_cicd_catalog`. For example:

        terraform

        import {

          to = gitlab_project_cicd_catalog.example

          id = "see CLI command below for ID"

        }

        Importing using the CLI is supported with the following syntax:

        Gitlab Project CICD Catalogs can be imported with their id, e.g.

        ```sh
        $ pulumi import gitlab:index/projectCicdCatalog:ProjectCicdCatalog example "1"
        ```

        :param str resource_name: The name of the resource.
        :param ProjectCicdCatalogArgs 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(ProjectCicdCatalogArgs, 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,
                 enabled: Optional[pulumi.Input[_builtins.bool]] = None,
                 keep_settings_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
                 project: 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__ = ProjectCicdCatalogArgs.__new__(ProjectCicdCatalogArgs)

            if enabled is None and not opts.urn:
                raise TypeError("Missing required property 'enabled'")
            __props__.__dict__["enabled"] = enabled
            __props__.__dict__["keep_settings_on_destroy"] = keep_settings_on_destroy
            if project is None and not opts.urn:
                raise TypeError("Missing required property 'project'")
            __props__.__dict__["project"] = project
        super(ProjectCicdCatalog, __self__).__init__(
            'gitlab:index/projectCicdCatalog:ProjectCicdCatalog',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            enabled: Optional[pulumi.Input[_builtins.bool]] = None,
            keep_settings_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
            project: Optional[pulumi.Input[_builtins.str]] = None) -> 'ProjectCicdCatalog':
        """
        Get an existing ProjectCicdCatalog 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] enabled: Whether the project should be enabled as a CI/CD Catalog resource.
        :param pulumi.Input[_builtins.str] project: The ID or URL-encoded path of the project.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _ProjectCicdCatalogState.__new__(_ProjectCicdCatalogState)

        __props__.__dict__["enabled"] = enabled
        __props__.__dict__["keep_settings_on_destroy"] = keep_settings_on_destroy
        __props__.__dict__["project"] = project
        return ProjectCicdCatalog(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter
    def enabled(self) -> pulumi.Output[_builtins.bool]:
        """
        Whether the project should be enabled as a CI/CD Catalog resource.
        """
        return pulumi.get(self, "enabled")

    @_builtins.property
    @pulumi.getter(name="keepSettingsOnDestroy")
    def keep_settings_on_destroy(self) -> pulumi.Output[_builtins.bool]:
        return pulumi.get(self, "keep_settings_on_destroy")

    @_builtins.property
    @pulumi.getter
    def project(self) -> pulumi.Output[_builtins.str]:
        """
        The ID or URL-encoded path of the project.
        """
        return pulumi.get(self, "project")

