# 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__ = ['CollectionArgs', 'Collection']

@pulumi.input_type
class CollectionArgs:
    def __init__(__self__, *,
                 display_name: pulumi.Input[_builtins.str],
                 singular_name: pulumi.Input[_builtins.str],
                 site_id: pulumi.Input[_builtins.str],
                 slug: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a Collection resource.
        :param pulumi.Input[_builtins.str] display_name: The human-readable name of the collection (e.g., 'Blog Posts', 'Products', 'Team Members'). This name appears in the Webflow CMS interface. Maximum length: 255 characters.
        :param pulumi.Input[_builtins.str] singular_name: The singular form of the collection name (e.g., 'Blog Post' for 'Blog Posts', 'Product' for 'Products'). Used in the CMS UI when referring to individual items. Maximum length: 255 characters.
        :param pulumi.Input[_builtins.str] site_id: The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
        :param pulumi.Input[_builtins.str] slug: The URL-friendly slug for the collection (optional, e.g., 'blog-posts', 'products'). If not provided, Webflow will auto-generate a slug from the displayName. The slug determines the URL path for collection items.
        """
        pulumi.set(__self__, "display_name", display_name)
        pulumi.set(__self__, "singular_name", singular_name)
        pulumi.set(__self__, "site_id", site_id)
        if slug is not None:
            pulumi.set(__self__, "slug", slug)

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Input[_builtins.str]:
        """
        The human-readable name of the collection (e.g., 'Blog Posts', 'Products', 'Team Members'). This name appears in the Webflow CMS interface. Maximum length: 255 characters.
        """
        return pulumi.get(self, "display_name")

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

    @_builtins.property
    @pulumi.getter(name="singularName")
    def singular_name(self) -> pulumi.Input[_builtins.str]:
        """
        The singular form of the collection name (e.g., 'Blog Post' for 'Blog Posts', 'Product' for 'Products'). Used in the CMS UI when referring to individual items. Maximum length: 255 characters.
        """
        return pulumi.get(self, "singular_name")

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

    @_builtins.property
    @pulumi.getter(name="siteId")
    def site_id(self) -> pulumi.Input[_builtins.str]:
        """
        The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
        """
        return pulumi.get(self, "site_id")

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

    @_builtins.property
    @pulumi.getter
    def slug(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The URL-friendly slug for the collection (optional, e.g., 'blog-posts', 'products'). If not provided, Webflow will auto-generate a slug from the displayName. The slug determines the URL path for collection items.
        """
        return pulumi.get(self, "slug")

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


@pulumi.type_token("webflow:index:Collection")
class Collection(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 display_name: Optional[pulumi.Input[_builtins.str]] = None,
                 singular_name: Optional[pulumi.Input[_builtins.str]] = None,
                 site_id: Optional[pulumi.Input[_builtins.str]] = None,
                 slug: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        Manages CMS collections for a Webflow site. Collections are containers for structured content items (blog posts, products, etc.). Note: Webflow collections do not support updates - any changes require replacement (delete + recreate).

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] display_name: The human-readable name of the collection (e.g., 'Blog Posts', 'Products', 'Team Members'). This name appears in the Webflow CMS interface. Maximum length: 255 characters.
        :param pulumi.Input[_builtins.str] singular_name: The singular form of the collection name (e.g., 'Blog Post' for 'Blog Posts', 'Product' for 'Products'). Used in the CMS UI when referring to individual items. Maximum length: 255 characters.
        :param pulumi.Input[_builtins.str] site_id: The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
        :param pulumi.Input[_builtins.str] slug: The URL-friendly slug for the collection (optional, e.g., 'blog-posts', 'products'). If not provided, Webflow will auto-generate a slug from the displayName. The slug determines the URL path for collection items.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: CollectionArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manages CMS collections for a Webflow site. Collections are containers for structured content items (blog posts, products, etc.). Note: Webflow collections do not support updates - any changes require replacement (delete + recreate).

        :param str resource_name: The name of the resource.
        :param CollectionArgs 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(CollectionArgs, 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,
                 display_name: Optional[pulumi.Input[_builtins.str]] = None,
                 singular_name: Optional[pulumi.Input[_builtins.str]] = None,
                 site_id: Optional[pulumi.Input[_builtins.str]] = None,
                 slug: 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__ = CollectionArgs.__new__(CollectionArgs)

            if display_name is None and not opts.urn:
                raise TypeError("Missing required property 'display_name'")
            __props__.__dict__["display_name"] = display_name
            if singular_name is None and not opts.urn:
                raise TypeError("Missing required property 'singular_name'")
            __props__.__dict__["singular_name"] = singular_name
            if site_id is None and not opts.urn:
                raise TypeError("Missing required property 'site_id'")
            __props__.__dict__["site_id"] = site_id
            __props__.__dict__["slug"] = slug
            __props__.__dict__["collection_id"] = None
            __props__.__dict__["created_on"] = None
            __props__.__dict__["last_updated"] = None
        super(Collection, __self__).__init__(
            'webflow:index:Collection',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None) -> 'Collection':
        """
        Get an existing Collection 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.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = CollectionArgs.__new__(CollectionArgs)

        __props__.__dict__["collection_id"] = None
        __props__.__dict__["created_on"] = None
        __props__.__dict__["display_name"] = None
        __props__.__dict__["last_updated"] = None
        __props__.__dict__["singular_name"] = None
        __props__.__dict__["site_id"] = None
        __props__.__dict__["slug"] = None
        return Collection(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="collectionId")
    def collection_id(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The Webflow-assigned collection ID (24-character lowercase hexadecimal string). Use this ID when creating CollectionField or CollectionItem resources. This is automatically assigned when the collection is created and is read-only.
        """
        return pulumi.get(self, "collection_id")

    @_builtins.property
    @pulumi.getter(name="createdOn")
    def created_on(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The timestamp when the collection was created (RFC3339 format). This is automatically set by Webflow and is read-only.
        """
        return pulumi.get(self, "created_on")

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Output[_builtins.str]:
        """
        The human-readable name of the collection (e.g., 'Blog Posts', 'Products', 'Team Members'). This name appears in the Webflow CMS interface. Maximum length: 255 characters.
        """
        return pulumi.get(self, "display_name")

    @_builtins.property
    @pulumi.getter(name="lastUpdated")
    def last_updated(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The timestamp when the collection was last updated (RFC3339 format). This is automatically updated by Webflow and is read-only.
        """
        return pulumi.get(self, "last_updated")

    @_builtins.property
    @pulumi.getter(name="singularName")
    def singular_name(self) -> pulumi.Output[_builtins.str]:
        """
        The singular form of the collection name (e.g., 'Blog Post' for 'Blog Posts', 'Product' for 'Products'). Used in the CMS UI when referring to individual items. Maximum length: 255 characters.
        """
        return pulumi.get(self, "singular_name")

    @_builtins.property
    @pulumi.getter(name="siteId")
    def site_id(self) -> pulumi.Output[_builtins.str]:
        """
        The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
        """
        return pulumi.get(self, "site_id")

    @_builtins.property
    @pulumi.getter
    def slug(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The URL-friendly slug for the collection (optional, e.g., 'blog-posts', 'products'). If not provided, Webflow will auto-generate a slug from the displayName. The slug determines the URL path for collection items.
        """
        return pulumi.get(self, "slug")

