"""Snowflake resource field metadata -- AUTO-GENERATED.

Re-generate by running:  python scripts/sync_resource_metadata.py
Source: https://github.com/snowflakedb/snowflake-rest-api-specs
"""

from __future__ import annotations


RESOURCE_METADATA: dict[str, dict] = {
    "ACCOUNT": {
        "fields": {
            "account_locator": {"type": "string", "read_only": True, "required": False},
            "account_locator_url": {"type": "string", "read_only": True, "required": False},
            "account_old_url_last_used": {"type": "string", "read_only": True, "required": False},
            "account_old_url_saved_on": {"type": "string", "read_only": True, "required": False},
            "account_url": {"type": "string", "read_only": True, "required": False},
            "admin_name": {"type": "string", "read_only": False, "required": True},
            "admin_password": {"type": "string", "read_only": False, "required": False},
            "admin_rsa_public_key": {"type": "string", "read_only": False, "required": False},
            "admin_user_type": {"type": "string", "read_only": False, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "consumption_billing_entity_name": {"type": "string", "read_only": True, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "dropped_on": {"type": "string", "read_only": True, "required": False},
            "edition": {"type": "string", "read_only": False, "required": True},
            "email": {"type": "string", "read_only": False, "required": True},
            "first_name": {"type": "string", "read_only": False, "required": False},
            "is_events_account": {"type": "boolean", "read_only": True, "required": False},
            "is_org_admin": {"type": "boolean", "read_only": True, "required": False},
            "last_name": {"type": "string", "read_only": False, "required": False},
            "managed_accounts": {"type": "integer", "read_only": True, "required": False},
            "marketplace_consumer_billing_entity_name": {"type": "string", "read_only": True, "required": False},
            "marketplace_provider_billing_entity_name": {"type": "string", "read_only": True, "required": False},
            "moved_on": {"type": "string", "read_only": True, "required": False},
            "moved_to_organization": {"type": "string", "read_only": True, "required": False},
            "must_change_password": {"type": "boolean", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "old_account_url": {"type": "string", "read_only": True, "required": False},
            "organization_URL_expiration_on": {"type": "string", "read_only": True, "required": False},
            "organization_name": {"type": "string", "read_only": True, "required": False},
            "organization_old_url": {"type": "string", "read_only": True, "required": False},
            "organization_old_url_last_used": {"type": "string", "read_only": True, "required": False},
            "organization_old_url_saved_on": {"type": "string", "read_only": True, "required": False},
            "polaris": {"type": "boolean", "read_only": False, "required": False},
            "region": {"type": "string", "read_only": False, "required": False},
            "region_group": {"type": "string", "read_only": False, "required": False},
            "restored_on": {"type": "string", "read_only": True, "required": False},
            "retention_time": {"type": "integer", "read_only": True, "required": False},
            "scheduled_deletion_time": {"type": "string", "read_only": True, "required": False},
        },
    },
    "ALERT": {
        "fields": {
            "action": {"type": "string", "read_only": False, "required": True},
            "comment": {"type": "string", "read_only": False, "required": False},
            "condition": {"type": "string", "read_only": False, "required": True},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "schedule": {"type": "Schedule", "read_only": False, "required": True},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "state": {"type": "string", "read_only": True, "required": False},
            "warehouse": {"type": "string", "read_only": False, "required": False},
        },
    },
    "API INTEGRATION": {
        "fields": {
            "api_allowed_prefixes": {"type": "array[string]", "read_only": False, "required": True},
            "api_blocked_prefixes": {"type": "array[string]", "read_only": False, "required": False},
            "api_hook": {"type": "ApiHook", "read_only": False, "required": True},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "enabled": {"type": "boolean", "read_only": False, "required": True},
            "name": {"type": "string", "read_only": False, "required": True},
        },
    },
    "ARTIFACT REPOSITORY": {
        "fields": {
            "api_integration": {"type": "string", "read_only": False, "required": True},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "type": {"type": "string", "read_only": False, "required": True},
        },
    },
    "CATALOG INTEGRATION": {
        "fields": {
            "catalog": {"type": "Catalog", "read_only": False, "required": True},
            "category": {"type": "string", "read_only": True, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "enabled": {"type": "boolean", "read_only": False, "required": True},
            "name": {"type": "string", "read_only": False, "required": True},
            "table_format": {"type": "string", "read_only": False, "required": True},
            "type": {"type": "string", "read_only": True, "required": False},
        },
    },
    "COMPUTE POOL": {
        "fields": {
            "active_nodes": {"type": "integer", "read_only": True, "required": False},
            "application": {"type": "string", "read_only": True, "required": False},
            "auto_resume": {"type": "boolean", "read_only": False, "required": False},
            "auto_suspend_secs": {"type": "integer", "read_only": False, "required": False},
            "budget": {"type": "string", "read_only": True, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "desired_nodes": {"type": "integer", "read_only": True, "required": False},
            "desired_nodes_expire_after": {"type": "string", "read_only": True, "required": False},
            "error_code": {"type": "string", "read_only": True, "required": False},
            "idle_nodes": {"type": "integer", "read_only": True, "required": False},
            "instance_family": {"type": "string", "read_only": False, "required": True},
            "is_exclusive": {"type": "boolean", "read_only": True, "required": False},
            "max_nodes": {"type": "integer", "read_only": False, "required": True},
            "min_nodes": {"type": "integer", "read_only": False, "required": True},
            "name": {"type": "string", "read_only": False, "required": True},
            "num_jobs": {"type": "integer", "read_only": True, "required": False},
            "num_services": {"type": "integer", "read_only": True, "required": False},
            "optimize_for_capacity": {"type": "boolean", "read_only": True, "required": False},
            "owner": {"type": "string", "read_only": True, "required": False},
            "placement_group": {"type": "string", "read_only": True, "required": False},
            "resumed_on": {"type": "string", "read_only": True, "required": False},
            "state": {"type": "string", "read_only": True, "required": False},
            "status_message": {"type": "string", "read_only": True, "required": False},
            "target_nodes": {"type": "integer", "read_only": True, "required": False},
            "updated_on": {"type": "string", "read_only": True, "required": False},
        },
    },
    "CORTEX SEARCH SERVICE": {
        "fields": {
            "attribute_columns": {"type": "array[string]", "read_only": False, "required": False},
            "columns": {"type": "array[string]", "read_only": False, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "data_timestamp": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "definition": {"type": "string", "read_only": False, "required": False},
            "indexing_error": {"type": "string", "read_only": True, "required": False},
            "indexing_state": {"type": "SchedulingState", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "search_column": {"type": "string", "read_only": False, "required": False},
            "serving_data_bytes": {"type": "integer", "read_only": True, "required": False},
            "serving_state": {"type": "SchedulingState", "read_only": False, "required": False},
            "source_data_num_rows": {"type": "integer", "read_only": True, "required": False},
            "target_lag": {"type": "string", "read_only": False, "required": False},
            "warehouse": {"type": "string", "read_only": False, "required": False},
        },
    },
    "DATABASE": {
        "fields": {
            "budget": {"type": "string", "read_only": True, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "data_retention_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "default_ddl_collation": {"type": "string", "read_only": False, "required": False},
            "dropped_on": {"type": "string", "read_only": True, "required": False},
            "is_current": {"type": "boolean", "read_only": True, "required": False},
            "is_default": {"type": "boolean", "read_only": True, "required": False},
            "kind": {"type": "string", "read_only": False, "required": False},
            "log_level": {"type": "string", "read_only": False, "required": False},
            "max_data_extension_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "options": {"type": "string", "read_only": True, "required": False},
            "origin": {"type": "string", "read_only": True, "required": False},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "retention_time": {"type": "integer", "read_only": True, "required": False},
            "serverless_task_max_statement_size": {"type": "string", "read_only": False, "required": False},
            "serverless_task_min_statement_size": {"type": "string", "read_only": False, "required": False},
            "suspend_task_after_num_failures": {"type": "integer", "read_only": False, "required": False},
            "trace_level": {"type": "string", "read_only": False, "required": False},
            "user_task_managed_initial_warehouse_size": {"type": "string", "read_only": False, "required": False},
            "user_task_timeout_ms": {"type": "integer", "read_only": False, "required": False},
        },
    },
    "DATABASE ROLE": {
        "fields": {
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "granted_database_roles": {"type": "integer", "read_only": True, "required": False},
            "granted_to_database_roles": {"type": "integer", "read_only": True, "required": False},
            "granted_to_roles": {"type": "integer", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
        },
    },
    "DYNAMIC TABLE": {
        "fields": {
            "automatic_clustering": {"type": "boolean", "read_only": True, "required": False},
            "budget": {"type": "string", "read_only": True, "required": False},
            "bytes": {"type": "integer", "read_only": True, "required": False},
            "cluster_by": {"type": "array[string]", "read_only": False, "required": False},
            "columns": {"type": "array[DynamicTableColumn]", "read_only": False, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "data_retention_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "initialize": {"type": "string", "read_only": False, "required": False},
            "kind": {"type": "string", "read_only": False, "required": False},
            "max_data_extension_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "query": {"type": "string", "read_only": False, "required": True},
            "refresh_mode": {"type": "string", "read_only": False, "required": False},
            "rows": {"type": "integer", "read_only": True, "required": False},
            "scheduling_state": {"type": "string", "read_only": True, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "target_lag": {"type": "string", "read_only": False, "required": True},
            "warehouse": {"type": "string", "read_only": False, "required": True},
        },
    },
    "EVENT TABLE": {
        "fields": {
            "automatic_clustering": {"type": "boolean", "read_only": True, "required": False},
            "bytes": {"type": "integer", "read_only": True, "required": False},
            "change_tracking": {"type": "boolean", "read_only": False, "required": False},
            "cluster_by": {"type": "array[string]", "read_only": False, "required": False},
            "columns": {"type": "array[EventTableColumn]", "read_only": True, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "data_retention_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "default_ddl_collation": {"type": "string", "read_only": False, "required": False},
            "max_data_extension_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "rows": {"type": "integer", "read_only": True, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "search_optimization": {"type": "boolean", "read_only": True, "required": False},
            "search_optimization_bytes": {"type": "integer", "read_only": True, "required": False},
            "search_optimization_progress": {"type": "integer", "read_only": True, "required": False},
        },
    },
    "EXTERNAL VOLUME": {
        "fields": {
            "allow_writes": {"type": "boolean", "read_only": False, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "storage_locations": {"type": "array[StorageLocation]", "read_only": False, "required": True},
        },
    },
    "FUNCTION": {
        "fields": {
            "arguments": {"type": "array[FunctionArgument]", "read_only": False, "required": True},
            "body": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": False, "required": False},
            "function_type": {"type": "string", "read_only": False, "required": False},
            "language": {"type": "string", "read_only": False, "required": False},
            "max_batch_rows": {"type": "integer", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "returns": {"type": "string", "read_only": False, "required": False},
            "signature": {"type": "string", "read_only": False, "required": False},
        },
    },
    "GRANT": {
        "fields": {
            "created_on": {"type": "string", "read_only": False, "required": False},
            "grant_option": {"type": "boolean", "read_only": False, "required": False},
            "granted_by_name": {"type": "string", "read_only": False, "required": False},
            "granted_by_role_type": {"type": "string", "read_only": False, "required": False},
            "grantee_name": {"type": "string", "read_only": False, "required": False},
            "grantee_type": {"type": "string", "read_only": False, "required": False},
            "privileges": {"type": "array[string]", "read_only": False, "required": False},
            "securable_name": {"type": "string", "read_only": False, "required": False},
            "securable_type": {"type": "string", "read_only": False, "required": False},
        },
    },
    "ICEBERG TABLE": {
        "fields": {
            "auto_refresh": {"type": "boolean", "read_only": True, "required": False},
            "base_location": {"type": "string", "read_only": False, "required": False},
            "can_write_metadata": {"type": "string", "read_only": True, "required": False},
            "catalog": {"type": "string", "read_only": False, "required": False},
            "catalog_namespace": {"type": "string", "read_only": False, "required": False},
            "catalog_sync": {"type": "string", "read_only": False, "required": False},
            "catalog_table_name": {"type": "string", "read_only": False, "required": False},
            "change_tracking": {"type": "boolean", "read_only": False, "required": False},
            "cluster_by": {"type": "array[string]", "read_only": False, "required": False},
            "columns": {"type": "array[IcebergTableColumn]", "read_only": False, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "constraints": {"type": "array[Constraint]", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "data_retention_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "external_volume": {"type": "string", "read_only": False, "required": False},
            "iceberg_table_type": {"type": "string", "read_only": True, "required": False},
            "max_data_extension_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "metadata_file_path": {"type": "string", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "replace_invalid_characters": {"type": "boolean", "read_only": False, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "storage_serialization_policy": {"type": "string", "read_only": False, "required": False},
        },
    },
    "IMAGE REPOSITORY": {
        "fields": {
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "repository_url": {"type": "string", "read_only": True, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
        },
    },
    "MANAGED ACCOUNT": {
        "fields": {
            "account_locator_url": {"type": "string", "read_only": True, "required": False},
            "account_type": {"type": "string", "read_only": False, "required": True},
            "admin_name": {"type": "string", "read_only": False, "required": True},
            "admin_password": {"type": "string", "read_only": False, "required": True},
            "cloud": {"type": "string", "read_only": True, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "locator": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "region": {"type": "string", "read_only": True, "required": False},
            "url": {"type": "string", "read_only": True, "required": False},
        },
    },
    "NETWORK POLICY": {
        "fields": {
            "allowed_ip_list": {"type": "array[string]", "read_only": False, "required": False},
            "allowed_network_rule_list": {"type": "array[string]", "read_only": False, "required": False},
            "blocked_ip_list": {"type": "array[string]", "read_only": False, "required": False},
            "blocked_network_rule_list": {"type": "array[string]", "read_only": False, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
        },
    },
    "NETWORK RULE": {
        "fields": {
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "mode": {"type": "string", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "type": {"type": "string", "read_only": False, "required": True},
            "value_list": {"type": "array[string]", "read_only": False, "required": False},
        },
    },
    "NOTEBOOK": {
        "fields": {
            "budget": {"type": "string", "read_only": True, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "compute_pool": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "default_packages": {"type": "string", "read_only": True, "required": False},
            "default_version": {"type": "string", "read_only": False, "required": False},
            "default_version_details": {"type": "VersionDetails", "read_only": True, "required": False},
            "external_access_integrations": {"type": "array[string]", "read_only": False, "required": False},
            "external_access_secrets": {"type": "string", "read_only": True, "required": False},
            "fromLocation": {"type": "string", "read_only": False, "required": False},
            "idle_auto_shutdown_time_seconds": {"type": "integer", "read_only": False, "required": False},
            "import_urls": {"type": "array[string]", "read_only": False, "required": False},
            "last_version_details": {"type": "VersionDetails", "read_only": True, "required": False},
            "live_version_location_uri": {"type": "string", "read_only": True, "required": False},
            "main_file": {"type": "string", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "query_warehouse": {"type": "string", "read_only": False, "required": False},
            "runtime_name": {"type": "string", "read_only": False, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "title": {"type": "string", "read_only": False, "required": False},
            "url_id": {"type": "string", "read_only": True, "required": False},
            "user_packages": {"type": "string", "read_only": True, "required": False},
            "version": {"type": "string", "read_only": False, "required": False},
        },
    },
    "NOTIFICATION INTEGRATION": {
        "fields": {
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "enabled": {"type": "boolean", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "notification_hook": {"type": "NotificationHook", "read_only": False, "required": True},
        },
    },
    "PASSWORD POLICY": {
        "fields": {
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "password_history": {"type": "integer", "read_only": False, "required": False},
            "password_lockout_time_mins": {"type": "integer", "read_only": False, "required": False},
            "password_max_age_days": {"type": "integer", "read_only": False, "required": False},
            "password_max_length": {"type": "integer", "read_only": False, "required": False},
            "password_max_retries": {"type": "integer", "read_only": False, "required": False},
            "password_min_age_days": {"type": "integer", "read_only": False, "required": False},
            "password_min_length": {"type": "integer", "read_only": False, "required": False},
            "password_min_lower_case_chars": {"type": "integer", "read_only": False, "required": False},
            "password_min_numeric_chars": {"type": "integer", "read_only": False, "required": False},
            "password_min_special_chars": {"type": "integer", "read_only": False, "required": False},
            "password_min_upper_case_chars": {"type": "integer", "read_only": False, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
        },
    },
    "PIPE": {
        "fields": {
            "auto_ingest": {"type": "boolean", "read_only": False, "required": False},
            "aws_sns_topic": {"type": "string", "read_only": False, "required": False},
            "budget": {"type": "string", "read_only": True, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "copy_statement": {"type": "string", "read_only": False, "required": True},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "error_integration": {"type": "string", "read_only": False, "required": False},
            "integration": {"type": "string", "read_only": False, "required": False},
            "invalid_reason": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "pattern": {"type": "string", "read_only": True, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
        },
    },
    "PROCEDURE": {
        "fields": {
            "arguments": {"type": "array[Argument]", "read_only": False, "required": True},
            "body": {"type": "string", "read_only": False, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "execute_as": {"type": "string", "read_only": False, "required": False},
            "is_builtin": {"type": "boolean", "read_only": True, "required": False},
            "is_secure": {"type": "boolean", "read_only": False, "required": False},
            "language_config": {"type": "FunctionLanguage", "read_only": False, "required": True},
            "max_num_arguments": {"type": "integer", "read_only": True, "required": False},
            "min_num_arguments": {"type": "integer", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "return_type": {"type": "ReturnType", "read_only": False, "required": True},
            "schema_name": {"type": "string", "read_only": True, "required": False},
        },
    },
    "ROLE": {
        "fields": {
            "assigned_to_users": {"type": "integer", "read_only": True, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "granted_roles": {"type": "integer", "read_only": True, "required": False},
            "granted_to_roles": {"type": "integer", "read_only": True, "required": False},
            "is_current": {"type": "boolean", "read_only": True, "required": False},
            "is_default": {"type": "boolean", "read_only": True, "required": False},
            "is_inherited": {"type": "boolean", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
        },
    },
    "SCHEMA": {
        "fields": {
            "budget": {"type": "string", "read_only": True, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "data_retention_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "default_ddl_collation": {"type": "string", "read_only": False, "required": False},
            "dropped_on": {"type": "string", "read_only": True, "required": False},
            "is_current": {"type": "boolean", "read_only": True, "required": False},
            "is_default": {"type": "boolean", "read_only": True, "required": False},
            "kind": {"type": "string", "read_only": False, "required": False},
            "log_level": {"type": "string", "read_only": False, "required": False},
            "managed_access": {"type": "boolean", "read_only": False, "required": False},
            "max_data_extension_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "options": {"type": "string", "read_only": True, "required": False},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "pipe_execution_paused": {"type": "boolean", "read_only": False, "required": False},
            "retention_time": {"type": "integer", "read_only": True, "required": False},
            "serverless_task_max_statement_size": {"type": "string", "read_only": False, "required": False},
            "serverless_task_min_statement_size": {"type": "string", "read_only": False, "required": False},
            "suspend_task_after_num_failures": {"type": "integer", "read_only": False, "required": False},
            "trace_level": {"type": "string", "read_only": False, "required": False},
            "user_task_managed_initial_warehouse_size": {"type": "string", "read_only": False, "required": False},
            "user_task_timeout_ms": {"type": "integer", "read_only": False, "required": False},
        },
    },
    "SECRET": {
        "fields": {
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "type": {"type": "string", "read_only": False, "required": True},
        },
    },
    "SEQUENCE": {
        "fields": {
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "increment": {"type": "integer", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "ordered": {"type": "boolean", "read_only": False, "required": False},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "start": {"type": "integer", "read_only": False, "required": False},
        },
    },
    "STAGE": {
        "fields": {
            "cloud": {"type": "string", "read_only": True, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "credentials": {"type": "Credentials", "read_only": False, "required": False},
            "directory_table": {"type": "object", "read_only": False, "required": False},
            "encryption": {"type": "object", "read_only": False, "required": False},
            "endpoint": {"type": "string", "read_only": False, "required": False},
            "has_credentials": {"type": "boolean", "read_only": True, "required": False},
            "has_encryption_key": {"type": "boolean", "read_only": True, "required": False},
            "kind": {"type": "string", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "region": {"type": "string", "read_only": True, "required": False},
            "storage_integration": {"type": "string", "read_only": False, "required": False},
            "url": {"type": "string", "read_only": False, "required": False},
        },
    },
    "STREAM": {
        "fields": {
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "invalid_reason": {"type": "string", "read_only": True, "required": False},
            "mode": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "stale": {"type": "boolean", "read_only": True, "required": False},
            "stale_after": {"type": "string", "read_only": True, "required": False},
            "stream_source": {"type": "StreamSource", "read_only": False, "required": True},
            "table_name": {"type": "string", "read_only": True, "required": False},
            "type": {"type": "string", "read_only": True, "required": False},
        },
    },
    "STREAMLIT": {
        "fields": {
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "default_packages": {"type": "array[string]", "read_only": True, "required": False},
            "default_version": {"type": "string", "read_only": False, "required": False},
            "default_version_details": {"type": "VersionDetailsStreamlit", "read_only": True, "required": False},
            "external_access_integrations": {"type": "array[string]", "read_only": False, "required": False},
            "external_access_secrets": {"type": "string", "read_only": True, "required": False},
            "imports": {"type": "array[string]", "read_only": False, "required": False},
            "last_version_details": {"type": "VersionDetailsStreamlit", "read_only": True, "required": False},
            "live_version_location_uri": {"type": "string", "read_only": True, "required": False},
            "main_file": {"type": "string", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "query_warehouse": {"type": "string", "read_only": False, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "source_location": {"type": "string", "read_only": False, "required": False},
            "title": {"type": "string", "read_only": False, "required": False},
            "url_id": {"type": "string", "read_only": True, "required": False},
            "user_packages": {"type": "array[string]", "read_only": True, "required": False},
        },
    },
    "TABLE": {
        "fields": {
            "automatic_clustering": {"type": "boolean", "read_only": True, "required": False},
            "budget": {"type": "string", "read_only": True, "required": False},
            "bytes": {"type": "integer", "read_only": True, "required": False},
            "change_tracking": {"type": "boolean", "read_only": False, "required": False},
            "cluster_by": {"type": "array[string]", "read_only": False, "required": False},
            "columns": {"type": "array[TableColumn]", "read_only": False, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "constraints": {"type": "array[Constraint]", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "data_retention_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "default_ddl_collation": {"type": "string", "read_only": False, "required": False},
            "dropped_on": {"type": "string", "read_only": True, "required": False},
            "enable_schema_evolution": {"type": "boolean", "read_only": False, "required": False},
            "kind": {"type": "string", "read_only": False, "required": False},
            "max_data_extension_time_in_days": {"type": "integer", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "rows": {"type": "integer", "read_only": True, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "search_optimization": {"type": "boolean", "read_only": True, "required": False},
            "search_optimization_bytes": {"type": "integer", "read_only": True, "required": False},
            "search_optimization_progress": {"type": "integer", "read_only": True, "required": False},
            "table_type": {"type": "string", "read_only": True, "required": False},
        },
    },
    "TAG": {
        "fields": {
            "allowed_values": {"type": "array[string]", "read_only": False, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "on_conflict": {"type": "string", "read_only": False, "required": False},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "propagate": {"type": "string", "read_only": False, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
        },
    },
    "TASK": {
        "fields": {
            "allow_overlapping_execution": {"type": "boolean", "read_only": False, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "condition": {"type": "string", "read_only": False, "required": False},
            "config": {"type": "object", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "definition": {"type": "string", "read_only": False, "required": True},
            "error_integration": {"type": "string", "read_only": False, "required": False},
            "finalize": {"type": "string", "read_only": False, "required": False},
            "id": {"type": "string", "read_only": True, "required": False},
            "last_committed_on": {"type": "string", "read_only": True, "required": False},
            "last_suspended_on": {"type": "string", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "predecessors": {"type": "array[string]", "read_only": False, "required": False},
            "schedule": {"type": "TaskSchedule", "read_only": False, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "serverless_task_max_statement_size": {"type": "string", "read_only": False, "required": False},
            "serverless_task_min_statement_size": {"type": "string", "read_only": False, "required": False},
            "session_parameters": {"type": "object", "read_only": False, "required": False},
            "state": {"type": "string", "read_only": True, "required": False},
            "suspend_task_after_num_failures": {"type": "integer", "read_only": False, "required": False},
            "target_completion_interval": {"type": "MinutesSchedule", "read_only": False, "required": False},
            "task_auto_retry_attempts": {"type": "integer", "read_only": False, "required": False},
            "task_relations": {"type": "string", "read_only": True, "required": False},
            "user_task_managed_initial_warehouse_size": {"type": "string", "read_only": False, "required": False},
            "user_task_timeout_ms": {"type": "integer", "read_only": False, "required": False},
            "warehouse": {"type": "string", "read_only": False, "required": False},
        },
    },
    "USER": {
        "fields": {
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "custom_landing_page_url": {"type": "string", "read_only": True, "required": False},
            "custom_landing_page_url_flush_next_ui_load": {"type": "boolean", "read_only": True, "required": False},
            "days_to_expiry": {"type": "integer", "read_only": False, "required": False},
            "default_namespace": {"type": "string", "read_only": False, "required": False},
            "default_role": {"type": "string", "read_only": False, "required": False},
            "default_secondary_roles": {"type": "string", "read_only": False, "required": False},
            "default_warehouse": {"type": "string", "read_only": False, "required": False},
            "disabled": {"type": "boolean", "read_only": False, "required": False},
            "display_name": {"type": "string", "read_only": False, "required": False},
            "email": {"type": "string", "read_only": False, "required": False},
            "enable_unredacted_query_syntax_error": {"type": "boolean", "read_only": False, "required": False},
            "expires_at": {"type": "string", "read_only": True, "required": False},
            "ext_authn_duo": {"type": "boolean", "read_only": True, "required": False},
            "ext_authn_uid": {"type": "string", "read_only": True, "required": False},
            "first_name": {"type": "string", "read_only": False, "required": False},
            "has_password": {"type": "boolean", "read_only": True, "required": False},
            "has_rsa_public_key": {"type": "boolean", "read_only": True, "required": False},
            "last_name": {"type": "string", "read_only": False, "required": False},
            "last_successful_login": {"type": "string", "read_only": True, "required": False},
            "locked_until": {"type": "string", "read_only": True, "required": False},
            "login_name": {"type": "string", "read_only": False, "required": False},
            "middle_name": {"type": "string", "read_only": False, "required": False},
            "mins_to_bypass_mfa": {"type": "integer", "read_only": False, "required": False},
            "mins_to_bypass_network_policy": {"type": "integer", "read_only": True, "required": False},
            "mins_to_unlock": {"type": "integer", "read_only": False, "required": False},
            "must_change_password": {"type": "boolean", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "network_policy": {"type": "string", "read_only": False, "required": False},
            "owner": {"type": "string", "read_only": True, "required": False},
            "password": {"type": "string", "read_only": False, "required": False},
            "password_last_set": {"type": "string", "read_only": True, "required": False},
            "rsa_public_key": {"type": "string", "read_only": False, "required": False},
            "rsa_public_key_2": {"type": "string", "read_only": False, "required": False},
            "rsa_public_key_2_fp": {"type": "string", "read_only": True, "required": False},
            "rsa_public_key_fp": {"type": "string", "read_only": True, "required": False},
            "snowflake_lock": {"type": "boolean", "read_only": True, "required": False},
            "snowflake_support": {"type": "boolean", "read_only": True, "required": False},
            "type": {"type": "string", "read_only": False, "required": False},
        },
    },
    "USER DEFINED FUNCTION": {
        "fields": {
            "arguments": {"type": "array[Argument]", "read_only": False, "required": True},
            "body": {"type": "string", "read_only": False, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "is_aggregate": {"type": "boolean", "read_only": False, "required": False},
            "is_builtin": {"type": "boolean", "read_only": True, "required": False},
            "is_memoizable": {"type": "boolean", "read_only": False, "required": False},
            "is_secure": {"type": "boolean", "read_only": False, "required": False},
            "is_table_function": {"type": "boolean", "read_only": True, "required": False},
            "is_temporary": {"type": "boolean", "read_only": False, "required": False},
            "language_config": {"type": "FunctionLanguage", "read_only": False, "required": True},
            "max_num_arguments": {"type": "integer", "read_only": True, "required": False},
            "min_num_arguments": {"type": "integer", "read_only": True, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "return_type": {"type": "ReturnType", "read_only": False, "required": True},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "valid_for_clustering": {"type": "boolean", "read_only": True, "required": False},
        },
    },
    "VIEW": {
        "fields": {
            "columns": {"type": "array[ViewColumn]", "read_only": False, "required": True},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "database_name": {"type": "string", "read_only": True, "required": False},
            "kind": {"type": "string", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "query": {"type": "string", "read_only": False, "required": True},
            "recursive": {"type": "boolean", "read_only": False, "required": False},
            "schema_name": {"type": "string", "read_only": True, "required": False},
            "secure": {"type": "boolean", "read_only": False, "required": False},
        },
    },
    "WAREHOUSE": {
        "fields": {
            "auto_resume": {"type": "string", "read_only": False, "required": False},
            "auto_suspend": {"type": "integer", "read_only": False, "required": False},
            "available": {"type": "string", "read_only": True, "required": False},
            "budget": {"type": "string", "read_only": True, "required": False},
            "comment": {"type": "string", "read_only": False, "required": False},
            "created_on": {"type": "string", "read_only": True, "required": False},
            "enable_query_acceleration": {"type": "string", "read_only": False, "required": False},
            "initially_suspended": {"type": "string", "read_only": False, "required": False},
            "is_current": {"type": "boolean", "read_only": True, "required": False},
            "is_default": {"type": "boolean", "read_only": True, "required": False},
            "kind": {"type": "string", "read_only": True, "required": False},
            "max_cluster_count": {"type": "integer", "read_only": False, "required": False},
            "max_concurrency_level": {"type": "integer", "read_only": False, "required": False},
            "min_cluster_count": {"type": "integer", "read_only": False, "required": False},
            "name": {"type": "string", "read_only": False, "required": True},
            "other": {"type": "string", "read_only": True, "required": False},
            "owner": {"type": "string", "read_only": True, "required": False},
            "owner_role_type": {"type": "string", "read_only": True, "required": False},
            "provisioning": {"type": "string", "read_only": True, "required": False},
            "query_acceleration_max_scale_factor": {"type": "integer", "read_only": False, "required": False},
            "queued": {"type": "integer", "read_only": True, "required": False},
            "quiescing": {"type": "string", "read_only": True, "required": False},
            "resource_monitor": {"type": "string", "read_only": False, "required": False},
            "resumed_on": {"type": "string", "read_only": True, "required": False},
            "running": {"type": "integer", "read_only": True, "required": False},
            "scaling_policy": {"type": "string", "read_only": False, "required": False},
            "size": {"type": "string", "read_only": False, "required": False},
            "started_clusters": {"type": "integer", "read_only": True, "required": False},
            "state": {"type": "string", "read_only": True, "required": False},
            "statement_queued_timeout_in_seconds": {"type": "integer", "read_only": False, "required": False},
            "statement_timeout_in_seconds": {"type": "integer", "read_only": False, "required": False},
            "target_statement_size": {"type": "string", "read_only": False, "required": False},
            "type": {"type": "string", "read_only": False, "required": False},
            "updated_on": {"type": "string", "read_only": True, "required": False},
            "wait_for_completion": {"type": "string", "read_only": False, "required": False},
            "warehouse_credit_limit": {"type": "integer", "read_only": False, "required": False},
            "warehouse_size": {"type": "string", "read_only": False, "required": False},
            "warehouse_type": {"type": "string", "read_only": False, "required": False},
        },
    },
}


def get_read_only_fields(object_type: str) -> frozenset[str]:
    """Return the set of read-only field names for an object type."""
    entry = RESOURCE_METADATA.get(object_type.upper())
    if entry is None:
        return frozenset()
    return frozenset(
        name for name, meta in entry["fields"].items() if meta["read_only"]
    )


def get_writable_fields(object_type: str) -> frozenset[str]:
    """Return the set of writable (non-read-only) field names for an object type."""
    entry = RESOURCE_METADATA.get(object_type.upper())
    if entry is None:
        return frozenset()
    return frozenset(
        name for name, meta in entry["fields"].items() if not meta["read_only"]
    )


def get_required_fields(object_type: str) -> frozenset[str]:
    """Return the set of required field names for an object type."""
    entry = RESOURCE_METADATA.get(object_type.upper())
    if entry is None:
        return frozenset()
    return frozenset(
        name for name, meta in entry["fields"].items() if meta["required"]
    )
