# 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__ = ['SiteArgs', 'Site']

@pulumi.input_type
class SiteArgs:
    def __init__(__self__, *,
                 display_name: pulumi.Input[_builtins.str],
                 workspace_id: pulumi.Input[_builtins.str],
                 parent_folder_id: Optional[pulumi.Input[_builtins.str]] = None,
                 publish: Optional[pulumi.Input[_builtins.bool]] = None,
                 short_name: Optional[pulumi.Input[_builtins.str]] = None,
                 template_name: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a Site resource.
        :param pulumi.Input[_builtins.str] display_name: The human-readable name of the site as shown in the Webflow dashboard. Required - must be a non-empty string. Examples: 'My Marketing Site', 'Company Blog', 'Product Landing Page'. This is the name users will see when managing the site.
        :param pulumi.Input[_builtins.str] workspace_id: The Webflow workspace ID where the site will be created. Required for site creation (Enterprise workspace required by Webflow API). Example: '5f0c8c9e1c9d440000e8d8c3'. You can find your workspace ID in the Webflow dashboard under Account Settings > Workspace.
        :param pulumi.Input[_builtins.str] parent_folder_id: The folder ID where the site will be organized in the Webflow dashboard. Optional - the site will be placed at the workspace root if not specified. This is useful for organizing multiple sites into logical groups within your workspace.
        :param pulumi.Input[_builtins.bool] publish: Automatically publish the site after creation or updates. When set to true, the provider will publish the site to production after successfully creating or updating it. Default: false (manual publishing required). Note: Site must have at least one published version before automatic publishing will work. If publishing fails, the entire operation will fail with an error (site may exist but Pulumi will report failure). Recommendation: Set to false for initial site creation, then enable after first manual publish.
        :param pulumi.Input[_builtins.str] short_name: DEPRECATED: This field is ignored. shortName is read-only and auto-generated by Webflow from the displayName. The Webflow API does not support setting shortName on create or update. The actual shortName value is available as a read-only output. This input field is preserved for backwards compatibility with existing stacks and will be removed in a future major release.
        :param pulumi.Input[_builtins.str] template_name: The template to use for site creation. Optional - if not specified, Webflow will create a blank site. **WARNING: This field is IMMUTABLE.** Once set, it cannot be changed. Changing this value will trigger a REPLACE operation, which will: (1) DELETE your existing site and ALL its content (pages, CMS items, assets, etc.), (2) CREATE a new site with the new template, (3) REPLACE all dependent resources (redirects, robots.txt, etc.). This is a DESTRUCTIVE operation that cannot be undone. Use any valid Webflow template identifier (e.g., 'mast-framework', 'blank'). Consider using resource protection (`protect: true`) to prevent accidental replacement.
        """
        pulumi.set(__self__, "display_name", display_name)
        pulumi.set(__self__, "workspace_id", workspace_id)
        if parent_folder_id is not None:
            pulumi.set(__self__, "parent_folder_id", parent_folder_id)
        if publish is not None:
            pulumi.set(__self__, "publish", publish)
        if short_name is not None:
            warnings.warn("""shortName is read-only and auto-generated by Webflow. Remove it from your Pulumi program inputs.""", DeprecationWarning)
            pulumi.log.warn("""short_name is deprecated: shortName is read-only and auto-generated by Webflow. Remove it from your Pulumi program inputs.""")
        if short_name is not None:
            pulumi.set(__self__, "short_name", short_name)
        if template_name is not None:
            pulumi.set(__self__, "template_name", template_name)

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Input[_builtins.str]:
        """
        The human-readable name of the site as shown in the Webflow dashboard. Required - must be a non-empty string. Examples: 'My Marketing Site', 'Company Blog', 'Product Landing Page'. This is the name users will see when managing the site.
        """
        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="workspaceId")
    def workspace_id(self) -> pulumi.Input[_builtins.str]:
        """
        The Webflow workspace ID where the site will be created. Required for site creation (Enterprise workspace required by Webflow API). Example: '5f0c8c9e1c9d440000e8d8c3'. You can find your workspace ID in the Webflow dashboard under Account Settings > Workspace.
        """
        return pulumi.get(self, "workspace_id")

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

    @_builtins.property
    @pulumi.getter(name="parentFolderId")
    def parent_folder_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The folder ID where the site will be organized in the Webflow dashboard. Optional - the site will be placed at the workspace root if not specified. This is useful for organizing multiple sites into logical groups within your workspace.
        """
        return pulumi.get(self, "parent_folder_id")

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

    @_builtins.property
    @pulumi.getter
    def publish(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        Automatically publish the site after creation or updates. When set to true, the provider will publish the site to production after successfully creating or updating it. Default: false (manual publishing required). Note: Site must have at least one published version before automatic publishing will work. If publishing fails, the entire operation will fail with an error (site may exist but Pulumi will report failure). Recommendation: Set to false for initial site creation, then enable after first manual publish.
        """
        return pulumi.get(self, "publish")

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

    @_builtins.property
    @pulumi.getter(name="shortName")
    @_utilities.deprecated("""shortName is read-only and auto-generated by Webflow. Remove it from your Pulumi program inputs.""")
    def short_name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        DEPRECATED: This field is ignored. shortName is read-only and auto-generated by Webflow from the displayName. The Webflow API does not support setting shortName on create or update. The actual shortName value is available as a read-only output. This input field is preserved for backwards compatibility with existing stacks and will be removed in a future major release.
        """
        return pulumi.get(self, "short_name")

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

    @_builtins.property
    @pulumi.getter(name="templateName")
    def template_name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The template to use for site creation. Optional - if not specified, Webflow will create a blank site. **WARNING: This field is IMMUTABLE.** Once set, it cannot be changed. Changing this value will trigger a REPLACE operation, which will: (1) DELETE your existing site and ALL its content (pages, CMS items, assets, etc.), (2) CREATE a new site with the new template, (3) REPLACE all dependent resources (redirects, robots.txt, etc.). This is a DESTRUCTIVE operation that cannot be undone. Use any valid Webflow template identifier (e.g., 'mast-framework', 'blank'). Consider using resource protection (`protect: true`) to prevent accidental replacement.
        """
        return pulumi.get(self, "template_name")

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


@pulumi.type_token("webflow:index:Site")
class Site(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 display_name: Optional[pulumi.Input[_builtins.str]] = None,
                 parent_folder_id: Optional[pulumi.Input[_builtins.str]] = None,
                 publish: Optional[pulumi.Input[_builtins.bool]] = None,
                 short_name: Optional[pulumi.Input[_builtins.str]] = None,
                 template_name: Optional[pulumi.Input[_builtins.str]] = None,
                 workspace_id: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        Manages Webflow sites programmatically. This resource allows you to create, configure, and manage Webflow sites through infrastructure code. Create, Read, Update, and Delete operations are fully supported for complete site lifecycle management.

        :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 site as shown in the Webflow dashboard. Required - must be a non-empty string. Examples: 'My Marketing Site', 'Company Blog', 'Product Landing Page'. This is the name users will see when managing the site.
        :param pulumi.Input[_builtins.str] parent_folder_id: The folder ID where the site will be organized in the Webflow dashboard. Optional - the site will be placed at the workspace root if not specified. This is useful for organizing multiple sites into logical groups within your workspace.
        :param pulumi.Input[_builtins.bool] publish: Automatically publish the site after creation or updates. When set to true, the provider will publish the site to production after successfully creating or updating it. Default: false (manual publishing required). Note: Site must have at least one published version before automatic publishing will work. If publishing fails, the entire operation will fail with an error (site may exist but Pulumi will report failure). Recommendation: Set to false for initial site creation, then enable after first manual publish.
        :param pulumi.Input[_builtins.str] short_name: DEPRECATED: This field is ignored. shortName is read-only and auto-generated by Webflow from the displayName. The Webflow API does not support setting shortName on create or update. The actual shortName value is available as a read-only output. This input field is preserved for backwards compatibility with existing stacks and will be removed in a future major release.
        :param pulumi.Input[_builtins.str] template_name: The template to use for site creation. Optional - if not specified, Webflow will create a blank site. **WARNING: This field is IMMUTABLE.** Once set, it cannot be changed. Changing this value will trigger a REPLACE operation, which will: (1) DELETE your existing site and ALL its content (pages, CMS items, assets, etc.), (2) CREATE a new site with the new template, (3) REPLACE all dependent resources (redirects, robots.txt, etc.). This is a DESTRUCTIVE operation that cannot be undone. Use any valid Webflow template identifier (e.g., 'mast-framework', 'blank'). Consider using resource protection (`protect: true`) to prevent accidental replacement.
        :param pulumi.Input[_builtins.str] workspace_id: The Webflow workspace ID where the site will be created. Required for site creation (Enterprise workspace required by Webflow API). Example: '5f0c8c9e1c9d440000e8d8c3'. You can find your workspace ID in the Webflow dashboard under Account Settings > Workspace.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: SiteArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manages Webflow sites programmatically. This resource allows you to create, configure, and manage Webflow sites through infrastructure code. Create, Read, Update, and Delete operations are fully supported for complete site lifecycle management.

        :param str resource_name: The name of the resource.
        :param SiteArgs 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(SiteArgs, 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_id: Optional[pulumi.Input[_builtins.str]] = None,
                 publish: Optional[pulumi.Input[_builtins.bool]] = None,
                 short_name: Optional[pulumi.Input[_builtins.str]] = None,
                 template_name: Optional[pulumi.Input[_builtins.str]] = None,
                 workspace_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__ = SiteArgs.__new__(SiteArgs)

            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_id"] = parent_folder_id
            __props__.__dict__["publish"] = publish
            __props__.__dict__["short_name"] = short_name
            __props__.__dict__["template_name"] = template_name
            if workspace_id is None and not opts.urn:
                raise TypeError("Missing required property 'workspace_id'")
            __props__.__dict__["workspace_id"] = workspace_id
            __props__.__dict__["custom_domains"] = None
            __props__.__dict__["data_collection_enabled"] = None
            __props__.__dict__["data_collection_type"] = None
            __props__.__dict__["last_published"] = None
            __props__.__dict__["last_updated"] = None
            __props__.__dict__["preview_url"] = None
            __props__.__dict__["time_zone"] = None
        super(Site, __self__).__init__(
            'webflow:index:Site',
            resource_name,
            __props__,
            opts)

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

        __props__.__dict__["custom_domains"] = None
        __props__.__dict__["data_collection_enabled"] = None
        __props__.__dict__["data_collection_type"] = None
        __props__.__dict__["display_name"] = None
        __props__.__dict__["last_published"] = None
        __props__.__dict__["last_updated"] = None
        __props__.__dict__["parent_folder_id"] = None
        __props__.__dict__["preview_url"] = None
        __props__.__dict__["publish"] = None
        __props__.__dict__["short_name"] = None
        __props__.__dict__["template_name"] = None
        __props__.__dict__["time_zone"] = None
        __props__.__dict__["workspace_id"] = None
        return Site(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="customDomains")
    def custom_domains(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
        """
        List of custom domains attached to the site (read-only in this release). Custom domain management will be available in a future release.
        """
        return pulumi.get(self, "custom_domains")

    @_builtins.property
    @pulumi.getter(name="dataCollectionEnabled")
    def data_collection_enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
        """
        Indicates whether data collection is enabled for this site (read-only). Controlled by your Webflow workspace settings, not per-site.
        """
        return pulumi.get(self, "data_collection_enabled")

    @_builtins.property
    @pulumi.getter(name="dataCollectionType")
    def data_collection_type(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The type of data collection enabled for the site (read-only). Possible values: 'always' (always collect), 'optOut' (collect by default), 'disabled' (no collection). Controlled by your Webflow workspace settings, not per-site.
        """
        return pulumi.get(self, "data_collection_type")

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Output[_builtins.str]:
        """
        The human-readable name of the site as shown in the Webflow dashboard. Required - must be a non-empty string. Examples: 'My Marketing Site', 'Company Blog', 'Product Landing Page'. This is the name users will see when managing the site.
        """
        return pulumi.get(self, "display_name")

    @_builtins.property
    @pulumi.getter(name="lastPublished")
    def last_published(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The RFC3339 timestamp of the last time the site was published (read-only). Automatically set by Webflow when changes are published to production.
        """
        return pulumi.get(self, "last_published")

    @_builtins.property
    @pulumi.getter(name="lastUpdated")
    def last_updated(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The RFC3339 timestamp of the last time the site configuration was updated (read-only). Automatically set by Webflow when any site changes occur.
        """
        return pulumi.get(self, "last_updated")

    @_builtins.property
    @pulumi.getter(name="parentFolderId")
    def parent_folder_id(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The folder ID where the site will be organized in the Webflow dashboard. Optional - the site will be placed at the workspace root if not specified. This is useful for organizing multiple sites into logical groups within your workspace.
        """
        return pulumi.get(self, "parent_folder_id")

    @_builtins.property
    @pulumi.getter(name="previewUrl")
    def preview_url(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The URL to a preview image of the site (read-only). Automatically generated by Webflow for site thumbnails in the dashboard.
        """
        return pulumi.get(self, "preview_url")

    @_builtins.property
    @pulumi.getter
    def publish(self) -> pulumi.Output[Optional[_builtins.bool]]:
        """
        Automatically publish the site after creation or updates. When set to true, the provider will publish the site to production after successfully creating or updating it. Default: false (manual publishing required). Note: Site must have at least one published version before automatic publishing will work. If publishing fails, the entire operation will fail with an error (site may exist but Pulumi will report failure). Recommendation: Set to false for initial site creation, then enable after first manual publish.
        """
        return pulumi.get(self, "publish")

    @_builtins.property
    @pulumi.getter(name="shortName")
    @_utilities.deprecated("""shortName is read-only and auto-generated by Webflow. Remove it from your Pulumi program inputs.""")
    def short_name(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        DEPRECATED: This field is ignored. shortName is read-only and auto-generated by Webflow from the displayName. The Webflow API does not support setting shortName on create or update. The actual shortName value is available as a read-only output. This input field is preserved for backwards compatibility with existing stacks and will be removed in a future major release.
        """
        return pulumi.get(self, "short_name")

    @_builtins.property
    @pulumi.getter(name="templateName")
    def template_name(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The template to use for site creation. Optional - if not specified, Webflow will create a blank site. **WARNING: This field is IMMUTABLE.** Once set, it cannot be changed. Changing this value will trigger a REPLACE operation, which will: (1) DELETE your existing site and ALL its content (pages, CMS items, assets, etc.), (2) CREATE a new site with the new template, (3) REPLACE all dependent resources (redirects, robots.txt, etc.). This is a DESTRUCTIVE operation that cannot be undone. Use any valid Webflow template identifier (e.g., 'mast-framework', 'blank'). Consider using resource protection (`protect: true`) to prevent accidental replacement.
        """
        return pulumi.get(self, "template_name")

    @_builtins.property
    @pulumi.getter(name="timeZone")
    def time_zone(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The IANA timezone identifier for the site (read-only). This value is configured in Webflow Site Settings and cannot be changed via API. Examples: 'America/New_York', 'Europe/London', 'Asia/Tokyo', 'UTC'.
        """
        return pulumi.get(self, "time_zone")

    @_builtins.property
    @pulumi.getter(name="workspaceId")
    def workspace_id(self) -> pulumi.Output[_builtins.str]:
        """
        The Webflow workspace ID where the site will be created. Required for site creation (Enterprise workspace required by Webflow API). Example: '5f0c8c9e1c9d440000e8d8c3'. You can find your workspace ID in the Webflow dashboard under Account Settings > Workspace.
        """
        return pulumi.get(self, "workspace_id")

