# 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__ = ['AssetFolderArgs', 'AssetFolder']

@pulumi.input_type
class AssetFolderArgs:
    def __init__(__self__, *,
                 display_name: pulumi.Input[_builtins.str],
                 site_id: pulumi.Input[_builtins.str],
                 parent_folder: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a AssetFolder resource.
        :param pulumi.Input[_builtins.str] display_name: The human-readable name for the asset folder. This name appears in the Webflow Assets panel and helps organize your files. Examples: 'Images', 'Documents', 'Icons', 'Hero Backgrounds'. 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] parent_folder: Optional ID of the parent folder for creating nested folder structures. If not specified, the folder will be created at the root level of the Assets panel. Example: '5f0c8c9e1c9d440000e8d8c4'.
        """
        pulumi.set(__self__, "display_name", display_name)
        pulumi.set(__self__, "site_id", site_id)
        if parent_folder is not None:
            pulumi.set(__self__, "parent_folder", parent_folder)

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Input[_builtins.str]:
        """
        The human-readable name for the asset folder. This name appears in the Webflow Assets panel and helps organize your files. Examples: 'Images', 'Documents', 'Icons', 'Hero Backgrounds'. 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="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(name="parentFolder")
    def parent_folder(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Optional ID of the parent folder for creating nested folder structures. If not specified, the folder will be created at the root level of the Assets panel. Example: '5f0c8c9e1c9d440000e8d8c4'.
        """
        return pulumi.get(self, "parent_folder")

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


@pulumi.type_token("webflow:index:AssetFolder")
class AssetFolder(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 display_name: Optional[pulumi.Input[_builtins.str]] = None,
                 parent_folder: Optional[pulumi.Input[_builtins.str]] = None,
                 site_id: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        Manages asset folders for organizing files in a Webflow site. This resource allows you to create folders to organize your assets (images, documents, etc.) in the Webflow Assets panel. NOTE: The Webflow API does not support deleting or updating asset folders. Deleting this resource will only remove it from Pulumi state, not from Webflow. Any changes to folder properties will require creating a new folder.

        :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 for the asset folder. This name appears in the Webflow Assets panel and helps organize your files. Examples: 'Images', 'Documents', 'Icons', 'Hero Backgrounds'. Maximum length: 255 characters.
        :param pulumi.Input[_builtins.str] parent_folder: Optional ID of the parent folder for creating nested folder structures. If not specified, the folder will be created at the root level of the Assets panel. Example: '5f0c8c9e1c9d440000e8d8c4'.
        :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.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: AssetFolderArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manages asset folders for organizing files in a Webflow site. This resource allows you to create folders to organize your assets (images, documents, etc.) in the Webflow Assets panel. NOTE: The Webflow API does not support deleting or updating asset folders. Deleting this resource will only remove it from Pulumi state, not from Webflow. Any changes to folder properties will require creating a new folder.

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

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

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

        __props__.__dict__["assets"] = None
        __props__.__dict__["created_on"] = None
        __props__.__dict__["display_name"] = None
        __props__.__dict__["folder_id"] = None
        __props__.__dict__["last_updated"] = None
        __props__.__dict__["parent_folder"] = None
        __props__.__dict__["site_id"] = None
        return AssetFolder(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter
    def assets(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
        """
        List of asset IDs currently contained in this folder (read-only). This is automatically populated by Webflow when assets are added to the folder.
        """
        return pulumi.get(self, "assets")

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

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Output[_builtins.str]:
        """
        The human-readable name for the asset folder. This name appears in the Webflow Assets panel and helps organize your files. Examples: 'Images', 'Documents', 'Icons', 'Hero Backgrounds'. Maximum length: 255 characters.
        """
        return pulumi.get(self, "display_name")

    @_builtins.property
    @pulumi.getter(name="folderId")
    def folder_id(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The Webflow-assigned folder ID (read-only). This unique identifier can be used to reference the folder in other resources, such as when uploading assets to this folder.
        """
        return pulumi.get(self, "folder_id")

    @_builtins.property
    @pulumi.getter(name="lastUpdated")
    def last_updated(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The timestamp when the folder was last modified (RFC3339 format, read-only). This is updated when assets are added or removed from the folder.
        """
        return pulumi.get(self, "last_updated")

    @_builtins.property
    @pulumi.getter(name="parentFolder")
    def parent_folder(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        Optional ID of the parent folder for creating nested folder structures. If not specified, the folder will be created at the root level of the Assets panel. Example: '5f0c8c9e1c9d440000e8d8c4'.
        """
        return pulumi.get(self, "parent_folder")

    @_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")

