# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from . import utilities, tables

class Catalog(pulumi.CustomResource):
    annotations: pulumi.Output[dict]
    """
    Annotations for the catalog (map)
    """
    branch: pulumi.Output[str]
    """
    The branch of the catalog repo to use. Default `master` (string)
    """
    cluster_id: pulumi.Output[str]
    """
    The cluster id of the catalog. Mandatory if `scope = cluster` (string)
    """
    description: pulumi.Output[str]
    """
    A catalog description (string)
    """
    kind: pulumi.Output[str]
    """
    The kind of the catalog. Just helm by the moment (string)
    """
    labels: pulumi.Output[dict]
    """
    Labels for the catalog (map)
    """
    name: pulumi.Output[str]
    """
    The name of the catalog (string)
    """
    password: pulumi.Output[str]
    """
    The password to access the catalog if needed (string)
    """
    project_id: pulumi.Output[str]
    """
    The project id of the catalog. Mandatory if `scope = project` (string)
    """
    refresh: pulumi.Output[bool]
    """
    Catalog will wait for refresh after tf creation and on every tf read. Default `false` (bool)
    """
    scope: pulumi.Output[str]
    """
    The scope of the catalog. `cluster`, `global`, and `project` are supported. Default `global` (string)
    """
    url: pulumi.Output[str]
    """
    The url of the catalog repo (string)
    """
    username: pulumi.Output[str]
    """
    The username to access the catalog if needed (string)
    """
    version: pulumi.Output[str]
    """
    Helm version for the catalog. Available options: `helm_v2` and `helm_v3` (string)
    """
    def __init__(__self__, resource_name, opts=None, annotations=None, branch=None, cluster_id=None, description=None, kind=None, labels=None, name=None, password=None, project_id=None, refresh=None, scope=None, url=None, username=None, version=None, __props__=None, __name__=None, __opts__=None):
        """
        Provides a Rancher v2 Catalog resource. This can be used to create cluster, global and/or project catalogs for Rancher v2 environments and retrieve their information.



        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[dict] annotations: Annotations for the catalog (map)
        :param pulumi.Input[str] branch: The branch of the catalog repo to use. Default `master` (string)
        :param pulumi.Input[str] cluster_id: The cluster id of the catalog. Mandatory if `scope = cluster` (string)
        :param pulumi.Input[str] description: A catalog description (string)
        :param pulumi.Input[str] kind: The kind of the catalog. Just helm by the moment (string)
        :param pulumi.Input[dict] labels: Labels for the catalog (map)
        :param pulumi.Input[str] name: The name of the catalog (string)
        :param pulumi.Input[str] password: The password to access the catalog if needed (string)
        :param pulumi.Input[str] project_id: The project id of the catalog. Mandatory if `scope = project` (string)
        :param pulumi.Input[bool] refresh: Catalog will wait for refresh after tf creation and on every tf read. Default `false` (bool)
        :param pulumi.Input[str] scope: The scope of the catalog. `cluster`, `global`, and `project` are supported. Default `global` (string)
        :param pulumi.Input[str] url: The url of the catalog repo (string)
        :param pulumi.Input[str] username: The username to access the catalog if needed (string)
        :param pulumi.Input[str] version: Helm version for the catalog. Available options: `helm_v2` and `helm_v3` (string)
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = utilities.get_version()
        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__ = dict()

            __props__['annotations'] = annotations
            __props__['branch'] = branch
            __props__['cluster_id'] = cluster_id
            __props__['description'] = description
            __props__['kind'] = kind
            __props__['labels'] = labels
            __props__['name'] = name
            __props__['password'] = password
            __props__['project_id'] = project_id
            __props__['refresh'] = refresh
            __props__['scope'] = scope
            if url is None:
                raise TypeError("Missing required property 'url'")
            __props__['url'] = url
            __props__['username'] = username
            __props__['version'] = version
        super(Catalog, __self__).__init__(
            'rancher2:index/catalog:Catalog',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name, id, opts=None, annotations=None, branch=None, cluster_id=None, description=None, kind=None, labels=None, name=None, password=None, project_id=None, refresh=None, scope=None, url=None, username=None, version=None):
        """
        Get an existing Catalog 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 str id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[dict] annotations: Annotations for the catalog (map)
        :param pulumi.Input[str] branch: The branch of the catalog repo to use. Default `master` (string)
        :param pulumi.Input[str] cluster_id: The cluster id of the catalog. Mandatory if `scope = cluster` (string)
        :param pulumi.Input[str] description: A catalog description (string)
        :param pulumi.Input[str] kind: The kind of the catalog. Just helm by the moment (string)
        :param pulumi.Input[dict] labels: Labels for the catalog (map)
        :param pulumi.Input[str] name: The name of the catalog (string)
        :param pulumi.Input[str] password: The password to access the catalog if needed (string)
        :param pulumi.Input[str] project_id: The project id of the catalog. Mandatory if `scope = project` (string)
        :param pulumi.Input[bool] refresh: Catalog will wait for refresh after tf creation and on every tf read. Default `false` (bool)
        :param pulumi.Input[str] scope: The scope of the catalog. `cluster`, `global`, and `project` are supported. Default `global` (string)
        :param pulumi.Input[str] url: The url of the catalog repo (string)
        :param pulumi.Input[str] username: The username to access the catalog if needed (string)
        :param pulumi.Input[str] version: Helm version for the catalog. Available options: `helm_v2` and `helm_v3` (string)
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["annotations"] = annotations
        __props__["branch"] = branch
        __props__["cluster_id"] = cluster_id
        __props__["description"] = description
        __props__["kind"] = kind
        __props__["labels"] = labels
        __props__["name"] = name
        __props__["password"] = password
        __props__["project_id"] = project_id
        __props__["refresh"] = refresh
        __props__["scope"] = scope
        __props__["url"] = url
        __props__["username"] = username
        __props__["version"] = version
        return Catalog(resource_name, opts=opts, __props__=__props__)
    def translate_output_property(self, prop):
        return tables._CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return tables._SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

