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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .flow_action_http_send_request_params_basic_auth import FlowActionHttpSendRequestParamsBasicAuth
from .flow_action_http_send_request_params_content_type import FlowActionHttpSendRequestParamsContentType
from .flow_action_http_send_request_params_headers import FlowActionHttpSendRequestParamsHeaders
from .flow_action_http_send_request_params_method import FlowActionHttpSendRequestParamsMethod
from .flow_action_http_send_request_params_payload import FlowActionHttpSendRequestParamsPayload
from .flow_action_http_send_request_params_query_params import FlowActionHttpSendRequestParamsQueryParams


class FlowActionHttpSendRequestParams(UniversalBaseModel):
    connection_id: typing.Optional[str] = None
    url: str
    method: typing.Optional[FlowActionHttpSendRequestParamsMethod] = None
    headers: typing.Optional[FlowActionHttpSendRequestParamsHeaders] = None
    basic: typing.Optional[FlowActionHttpSendRequestParamsBasicAuth] = None
    params: typing.Optional[FlowActionHttpSendRequestParamsQueryParams] = None
    payload: typing.Optional[FlowActionHttpSendRequestParamsPayload] = None
    content_type: typing.Optional[FlowActionHttpSendRequestParamsContentType] = 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
