"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .credentialsdto import CredentialsDto, CredentialsDtoTypedDict
from .stepfilterdto import StepFilterDto, StepFilterDtoTypedDict
from novu_py.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class UpdateIntegrationRequestDtoConfigurationsTypedDict(TypedDict):
    r"""Configurations for the integration"""


class UpdateIntegrationRequestDtoConfigurations(BaseModel):
    r"""Configurations for the integration"""


class UpdateIntegrationRequestDtoTypedDict(TypedDict):
    name: NotRequired[str]
    identifier: NotRequired[str]
    environment_id: NotRequired[str]
    active: NotRequired[bool]
    r"""If the integration is active the validation on the credentials field will run"""
    credentials: NotRequired[CredentialsDtoTypedDict]
    check: NotRequired[bool]
    conditions: NotRequired[List[StepFilterDtoTypedDict]]
    configurations: NotRequired[UpdateIntegrationRequestDtoConfigurationsTypedDict]
    r"""Configurations for the integration"""


class UpdateIntegrationRequestDto(BaseModel):
    name: Optional[str] = None

    identifier: Optional[str] = None

    environment_id: Annotated[Optional[str], pydantic.Field(alias="_environmentId")] = (
        None
    )

    active: Optional[bool] = None
    r"""If the integration is active the validation on the credentials field will run"""

    credentials: Optional[CredentialsDto] = None

    check: Optional[bool] = None

    conditions: Optional[List[StepFilterDto]] = None

    configurations: Optional[UpdateIntegrationRequestDtoConfigurations] = None
    r"""Configurations for the integration"""
