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

from __future__ import annotations

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
from ..core.serialization import FieldMetadata
from .helm import Helm


class UpgradeData(UniversalBaseModel):
    diff: typing.Optional[typing.List["IChange"]] = None
    current_manifest: typing_extensions.Annotated[typing.Optional[Helm], FieldMetadata(alias="currentManifest")] = None
    desired_manifest: typing_extensions.Annotated[typing.Optional[Helm], FieldMetadata(alias="desiredManifest")] = None
    upgrade_possible: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="upgradePossible")] = None
    conflict_fields: typing_extensions.Annotated[
        typing.Optional[typing.List[str]], FieldMetadata(alias="conflictFields")
    ] = None
    has_conflict: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="hasConflict")] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow")  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow


from .i_change import IChange  # noqa: E402, I001

update_forward_refs(UpgradeData, IChange=IChange)
