# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .api_integration_webhook_overrides_request_headers_value import ApiIntegrationWebhookOverridesRequestHeadersValue
from .api_integration_webhook_overrides_schema_overrides_value import ApiIntegrationWebhookOverridesSchemaOverridesValue
from .response_filter_mode import ResponseFilterMode


class ApiIntegrationWebhookOverrides(UncheckedBaseModel):
    """
    A whitelist of fields that can be overridden by users when
    configuring an API Integration Webhook Tool.
    """

    schema_overrides: typing.Optional[
        typing.Dict[str, typing.Optional[ApiIntegrationWebhookOverridesSchemaOverridesValue]]
    ] = None
    request_headers: typing.Optional[
        typing.Dict[str, typing.Optional[ApiIntegrationWebhookOverridesRequestHeadersValue]]
    ] = None
    response_filter_mode: typing.Optional[ResponseFilterMode] = None
    response_filters: typing.Optional[typing.List[str]] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
