# 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_pipedrive_add_deal_params_fields import FlowActionPipedriveAddDealParamsFields
from .flow_action_pipedrive_add_deal_params_organization_id import FlowActionPipedriveAddDealParamsOrganizationId
from .flow_action_pipedrive_add_deal_params_person_id import FlowActionPipedriveAddDealParamsPersonId
from .flow_action_pipedrive_add_deal_params_stage_id import FlowActionPipedriveAddDealParamsStageId
from .flow_action_pipedrive_add_deal_params_user_id import FlowActionPipedriveAddDealParamsUserId


class FlowActionPipedriveAddDealParams(UniversalBaseModel):
    connection_id: str
    title: str
    value: typing.Optional[str] = None
    user_id: typing.Optional[FlowActionPipedriveAddDealParamsUserId] = None
    person_id: typing.Optional[FlowActionPipedriveAddDealParamsPersonId] = None
    organization_id: typing.Optional[FlowActionPipedriveAddDealParamsOrganizationId] = None
    stage_id: typing.Optional[FlowActionPipedriveAddDealParamsStageId] = None
    fields: typing.Optional[FlowActionPipedriveAddDealParamsFields] = 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
