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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.serialization import FieldMetadata
from ..core.unchecked_base_model import UncheckedBaseModel
from .external_data_validation_step_definition_config_request_options_content_type import (
    ExternalDataValidationStepDefinitionConfigRequestOptionsContentType,
)
from .external_data_validation_step_definition_config_request_options_method import (
    ExternalDataValidationStepDefinitionConfigRequestOptionsMethod,
)


class ExternalDataValidationStepDefinitionConfigRequestOptions(UncheckedBaseModel):
    """
    HTTP request configuration for the external validation call.

    See the [External Data Validation step docs](https://docs.extend.ai/2026-02-09/product/workflows/configuring-workflows-via-api#external-data-validation-step).
    """

    url: str = pydantic.Field()
    """
    The URL to send the validation request to.
    """

    method: ExternalDataValidationStepDefinitionConfigRequestOptionsMethod
    headers: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
    """
    Optional HTTP headers to include on the external validation request.
    
    See the [External Data Validation step docs](https://docs.extend.ai/2026-02-09/product/workflows/configuring-workflows-via-api#external-data-validation-step).
    """

    content_type: typing_extensions.Annotated[
        typing.Optional[ExternalDataValidationStepDefinitionConfigRequestOptionsContentType],
        FieldMetadata(alias="contentType"),
    ] = pydantic.Field(alias="contentType", default=None)
    """
    Content type of the request body sent to the external endpoint.
    
    See the [External Data Validation step docs](https://docs.extend.ai/2026-02-09/product/workflows/configuring-workflows-via-api#external-data-validation-step).
    """

    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
