# 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 .action_trigger import ActionTrigger
from .integration_required_param import IntegrationRequiredParam
from .integration_sem_ver import IntegrationSemVer


class IntegrationRelease(UniversalBaseModel):
    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The id of the associated IntegrationRelease
    """

    trigger: typing.Optional[ActionTrigger] = None
    semver: typing.Optional[IntegrationSemVer] = None
    required_secrets: typing.Optional[typing.List[IntegrationRequiredParam]] = pydantic.Field(default=None)
    """
    required_secrets declares all the necessary secrets for an integration to
    work.
    """

    required_configuration: typing.Optional[typing.List[IntegrationRequiredParam]] = pydantic.Field(default=None)
    """
    required_configuration declares all the necessary configuration fields for an integration to work.
    """

    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
