# 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 copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['ContentSourceArgs', 'ContentSource']

@pulumi.input_type
class ContentSourceArgs:
    def __init__(__self__, *,
                 config: pulumi.Input['ContentSourceConfigArgs'],
                 project_id: pulumi.Input[str],
                 sync_enabled: pulumi.Input[bool],
                 type_id: pulumi.Input[str],
                 description: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a ContentSource resource.
        :param pulumi.Input['ContentSourceConfigArgs'] config: Content source custom configuration.
        :param pulumi.Input[str] project_id: The id of the project this entity belongs to.
        :param pulumi.Input[bool] sync_enabled: Flag indicating whether sync is enabled for this content source.
        :param pulumi.Input[str] type_id: Content Source type. Supported values are `com.gitlab`, `com.github`, `com.vmware.marketplace`, `org.bitbucket`.
        :param pulumi.Input[str] description: A human-friendly description.
        :param pulumi.Input[str] name: A human-friendly name for content source used as an identifier in APIs that support this option.
        """
        pulumi.set(__self__, "config", config)
        pulumi.set(__self__, "project_id", project_id)
        pulumi.set(__self__, "sync_enabled", sync_enabled)
        pulumi.set(__self__, "type_id", type_id)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if name is not None:
            pulumi.set(__self__, "name", name)

    @property
    @pulumi.getter
    def config(self) -> pulumi.Input['ContentSourceConfigArgs']:
        """
        Content source custom configuration.
        """
        return pulumi.get(self, "config")

    @config.setter
    def config(self, value: pulumi.Input['ContentSourceConfigArgs']):
        pulumi.set(self, "config", value)

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> pulumi.Input[str]:
        """
        The id of the project this entity belongs to.
        """
        return pulumi.get(self, "project_id")

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

    @property
    @pulumi.getter(name="syncEnabled")
    def sync_enabled(self) -> pulumi.Input[bool]:
        """
        Flag indicating whether sync is enabled for this content source.
        """
        return pulumi.get(self, "sync_enabled")

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

    @property
    @pulumi.getter(name="typeId")
    def type_id(self) -> pulumi.Input[str]:
        """
        Content Source type. Supported values are `com.gitlab`, `com.github`, `com.vmware.marketplace`, `org.bitbucket`.
        """
        return pulumi.get(self, "type_id")

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

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        A human-friendly description.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        A human-friendly name for content source used as an identifier in APIs that support this option.
        """
        return pulumi.get(self, "name")

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


@pulumi.input_type
class _ContentSourceState:
    def __init__(__self__, *,
                 config: Optional[pulumi.Input['ContentSourceConfigArgs']] = None,
                 created_at: Optional[pulumi.Input[str]] = None,
                 created_by: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 last_updated_at: Optional[pulumi.Input[str]] = None,
                 last_updated_by: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 org_id: Optional[pulumi.Input[str]] = None,
                 project_id: Optional[pulumi.Input[str]] = None,
                 sync_enabled: Optional[pulumi.Input[bool]] = None,
                 type_id: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering ContentSource resources.
        :param pulumi.Input['ContentSourceConfigArgs'] config: Content source custom configuration.
        :param pulumi.Input[str] created_at: Date when the entity was created. The date is in ISO 6801 and UTC.
        :param pulumi.Input[str] created_by: The user the entity was created by.
        :param pulumi.Input[str] description: A human-friendly description.
        :param pulumi.Input[str] last_updated_at: Date when the entity was last updated. The date is in ISO 6801 and UTC.
        :param pulumi.Input[str] last_updated_by: The user the entity was last updated by.
        :param pulumi.Input[str] name: A human-friendly name for content source used as an identifier in APIs that support this option.
        :param pulumi.Input[str] org_id: The id of the organization this entity belongs to.
        :param pulumi.Input[str] project_id: The id of the project this entity belongs to.
        :param pulumi.Input[bool] sync_enabled: Flag indicating whether sync is enabled for this content source.
        :param pulumi.Input[str] type_id: Content Source type. Supported values are `com.gitlab`, `com.github`, `com.vmware.marketplace`, `org.bitbucket`.
        """
        if config is not None:
            pulumi.set(__self__, "config", config)
        if created_at is not None:
            pulumi.set(__self__, "created_at", created_at)
        if created_by is not None:
            pulumi.set(__self__, "created_by", created_by)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if last_updated_at is not None:
            pulumi.set(__self__, "last_updated_at", last_updated_at)
        if last_updated_by is not None:
            pulumi.set(__self__, "last_updated_by", last_updated_by)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if org_id is not None:
            pulumi.set(__self__, "org_id", org_id)
        if project_id is not None:
            pulumi.set(__self__, "project_id", project_id)
        if sync_enabled is not None:
            pulumi.set(__self__, "sync_enabled", sync_enabled)
        if type_id is not None:
            pulumi.set(__self__, "type_id", type_id)

    @property
    @pulumi.getter
    def config(self) -> Optional[pulumi.Input['ContentSourceConfigArgs']]:
        """
        Content source custom configuration.
        """
        return pulumi.get(self, "config")

    @config.setter
    def config(self, value: Optional[pulumi.Input['ContentSourceConfigArgs']]):
        pulumi.set(self, "config", value)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> Optional[pulumi.Input[str]]:
        """
        Date when the entity was created. The date is in ISO 6801 and UTC.
        """
        return pulumi.get(self, "created_at")

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

    @property
    @pulumi.getter(name="createdBy")
    def created_by(self) -> Optional[pulumi.Input[str]]:
        """
        The user the entity was created by.
        """
        return pulumi.get(self, "created_by")

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

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        A human-friendly description.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter(name="lastUpdatedAt")
    def last_updated_at(self) -> Optional[pulumi.Input[str]]:
        """
        Date when the entity was last updated. The date is in ISO 6801 and UTC.
        """
        return pulumi.get(self, "last_updated_at")

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

    @property
    @pulumi.getter(name="lastUpdatedBy")
    def last_updated_by(self) -> Optional[pulumi.Input[str]]:
        """
        The user the entity was last updated by.
        """
        return pulumi.get(self, "last_updated_by")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        A human-friendly name for content source used as an identifier in APIs that support this option.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter(name="orgId")
    def org_id(self) -> Optional[pulumi.Input[str]]:
        """
        The id of the organization this entity belongs to.
        """
        return pulumi.get(self, "org_id")

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

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> Optional[pulumi.Input[str]]:
        """
        The id of the project this entity belongs to.
        """
        return pulumi.get(self, "project_id")

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

    @property
    @pulumi.getter(name="syncEnabled")
    def sync_enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        Flag indicating whether sync is enabled for this content source.
        """
        return pulumi.get(self, "sync_enabled")

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

    @property
    @pulumi.getter(name="typeId")
    def type_id(self) -> Optional[pulumi.Input[str]]:
        """
        Content Source type. Supported values are `com.gitlab`, `com.github`, `com.vmware.marketplace`, `org.bitbucket`.
        """
        return pulumi.get(self, "type_id")

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


class ContentSource(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 config: Optional[pulumi.Input[pulumi.InputType['ContentSourceConfigArgs']]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 project_id: Optional[pulumi.Input[str]] = None,
                 sync_enabled: Optional[pulumi.Input[bool]] = None,
                 type_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        This resource provides a way to create a content source vRealize Automation(vRA).

        ## Example Usage
        ### S

        ```python
        import pulumi
        import pulumiverse_vra as vra

        this = vra.contentsource.ContentSource("this",
            project_id=var["project_id"],
            type_id="com.gitlab",
            description="Some content Source",
            sync_enabled=False,
            config=vra.contentsource.ContentSourceConfigArgs(
                path="blueprint01",
                branch="master",
                repository="vracontent/vra8_content_source_test",
                content_type="BLUEPRINT",
                project_name=var["project_name"],
                integration_id=var["integration_id"],
            ))
        ```

        ## Import

        Content source can be imported using the id, e.g.

        ```sh
         $ pulumi import vra:contentsource/contentSource:ContentSource this 05956583-6488-4e7d-84c9-92a7b7219a15`
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[pulumi.InputType['ContentSourceConfigArgs']] config: Content source custom configuration.
        :param pulumi.Input[str] description: A human-friendly description.
        :param pulumi.Input[str] name: A human-friendly name for content source used as an identifier in APIs that support this option.
        :param pulumi.Input[str] project_id: The id of the project this entity belongs to.
        :param pulumi.Input[bool] sync_enabled: Flag indicating whether sync is enabled for this content source.
        :param pulumi.Input[str] type_id: Content Source type. Supported values are `com.gitlab`, `com.github`, `com.vmware.marketplace`, `org.bitbucket`.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ContentSourceArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        This resource provides a way to create a content source vRealize Automation(vRA).

        ## Example Usage
        ### S

        ```python
        import pulumi
        import pulumiverse_vra as vra

        this = vra.contentsource.ContentSource("this",
            project_id=var["project_id"],
            type_id="com.gitlab",
            description="Some content Source",
            sync_enabled=False,
            config=vra.contentsource.ContentSourceConfigArgs(
                path="blueprint01",
                branch="master",
                repository="vracontent/vra8_content_source_test",
                content_type="BLUEPRINT",
                project_name=var["project_name"],
                integration_id=var["integration_id"],
            ))
        ```

        ## Import

        Content source can be imported using the id, e.g.

        ```sh
         $ pulumi import vra:contentsource/contentSource:ContentSource this 05956583-6488-4e7d-84c9-92a7b7219a15`
        ```

        :param str resource_name: The name of the resource.
        :param ContentSourceArgs 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(ContentSourceArgs, 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,
                 config: Optional[pulumi.Input[pulumi.InputType['ContentSourceConfigArgs']]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 project_id: Optional[pulumi.Input[str]] = None,
                 sync_enabled: Optional[pulumi.Input[bool]] = None,
                 type_id: Optional[pulumi.Input[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__ = ContentSourceArgs.__new__(ContentSourceArgs)

            if config is None and not opts.urn:
                raise TypeError("Missing required property 'config'")
            __props__.__dict__["config"] = config
            __props__.__dict__["description"] = description
            __props__.__dict__["name"] = name
            if project_id is None and not opts.urn:
                raise TypeError("Missing required property 'project_id'")
            __props__.__dict__["project_id"] = project_id
            if sync_enabled is None and not opts.urn:
                raise TypeError("Missing required property 'sync_enabled'")
            __props__.__dict__["sync_enabled"] = sync_enabled
            if type_id is None and not opts.urn:
                raise TypeError("Missing required property 'type_id'")
            __props__.__dict__["type_id"] = type_id
            __props__.__dict__["created_at"] = None
            __props__.__dict__["created_by"] = None
            __props__.__dict__["last_updated_at"] = None
            __props__.__dict__["last_updated_by"] = None
            __props__.__dict__["org_id"] = None
        super(ContentSource, __self__).__init__(
            'vra:contentsource/contentSource:ContentSource',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            config: Optional[pulumi.Input[pulumi.InputType['ContentSourceConfigArgs']]] = None,
            created_at: Optional[pulumi.Input[str]] = None,
            created_by: Optional[pulumi.Input[str]] = None,
            description: Optional[pulumi.Input[str]] = None,
            last_updated_at: Optional[pulumi.Input[str]] = None,
            last_updated_by: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            org_id: Optional[pulumi.Input[str]] = None,
            project_id: Optional[pulumi.Input[str]] = None,
            sync_enabled: Optional[pulumi.Input[bool]] = None,
            type_id: Optional[pulumi.Input[str]] = None) -> 'ContentSource':
        """
        Get an existing ContentSource 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[pulumi.InputType['ContentSourceConfigArgs']] config: Content source custom configuration.
        :param pulumi.Input[str] created_at: Date when the entity was created. The date is in ISO 6801 and UTC.
        :param pulumi.Input[str] created_by: The user the entity was created by.
        :param pulumi.Input[str] description: A human-friendly description.
        :param pulumi.Input[str] last_updated_at: Date when the entity was last updated. The date is in ISO 6801 and UTC.
        :param pulumi.Input[str] last_updated_by: The user the entity was last updated by.
        :param pulumi.Input[str] name: A human-friendly name for content source used as an identifier in APIs that support this option.
        :param pulumi.Input[str] org_id: The id of the organization this entity belongs to.
        :param pulumi.Input[str] project_id: The id of the project this entity belongs to.
        :param pulumi.Input[bool] sync_enabled: Flag indicating whether sync is enabled for this content source.
        :param pulumi.Input[str] type_id: Content Source type. Supported values are `com.gitlab`, `com.github`, `com.vmware.marketplace`, `org.bitbucket`.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _ContentSourceState.__new__(_ContentSourceState)

        __props__.__dict__["config"] = config
        __props__.__dict__["created_at"] = created_at
        __props__.__dict__["created_by"] = created_by
        __props__.__dict__["description"] = description
        __props__.__dict__["last_updated_at"] = last_updated_at
        __props__.__dict__["last_updated_by"] = last_updated_by
        __props__.__dict__["name"] = name
        __props__.__dict__["org_id"] = org_id
        __props__.__dict__["project_id"] = project_id
        __props__.__dict__["sync_enabled"] = sync_enabled
        __props__.__dict__["type_id"] = type_id
        return ContentSource(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def config(self) -> pulumi.Output['outputs.ContentSourceConfig']:
        """
        Content source custom configuration.
        """
        return pulumi.get(self, "config")

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> pulumi.Output[str]:
        """
        Date when the entity was created. The date is in ISO 6801 and UTC.
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="createdBy")
    def created_by(self) -> pulumi.Output[str]:
        """
        The user the entity was created by.
        """
        return pulumi.get(self, "created_by")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[str]]:
        """
        A human-friendly description.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="lastUpdatedAt")
    def last_updated_at(self) -> pulumi.Output[str]:
        """
        Date when the entity was last updated. The date is in ISO 6801 and UTC.
        """
        return pulumi.get(self, "last_updated_at")

    @property
    @pulumi.getter(name="lastUpdatedBy")
    def last_updated_by(self) -> pulumi.Output[str]:
        """
        The user the entity was last updated by.
        """
        return pulumi.get(self, "last_updated_by")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        A human-friendly name for content source used as an identifier in APIs that support this option.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="orgId")
    def org_id(self) -> pulumi.Output[str]:
        """
        The id of the organization this entity belongs to.
        """
        return pulumi.get(self, "org_id")

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> pulumi.Output[str]:
        """
        The id of the project this entity belongs to.
        """
        return pulumi.get(self, "project_id")

    @property
    @pulumi.getter(name="syncEnabled")
    def sync_enabled(self) -> pulumi.Output[bool]:
        """
        Flag indicating whether sync is enabled for this content source.
        """
        return pulumi.get(self, "sync_enabled")

    @property
    @pulumi.getter(name="typeId")
    def type_id(self) -> pulumi.Output[str]:
        """
        Content Source type. Supported values are `com.gitlab`, `com.github`, `com.vmware.marketplace`, `org.bitbucket`.
        """
        return pulumi.get(self, "type_id")

