# generated by datamodel-codegen:
#   filename:  content_standards/update_content_standards_response.json
#   timestamp: 2026-02-28T17:39:50+00:00

from __future__ import annotations

from typing import Annotated, Literal

from adcp.types.base import AdCPBaseModel
from pydantic import ConfigDict, Field, RootModel

from ..core import context as context_1
from ..core import error
from ..core import ext as ext_1


class UpdateContentStandardsResponse1(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None
    standards_id: Annotated[str, Field(description='ID of the updated standards configuration')]
    success: Annotated[
        Literal[True], Field(description='Indicates the update was applied successfully')
    ]


class UpdateContentStandardsResponse2(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    conflicting_standards_id: Annotated[
        str | None,
        Field(
            description='If scope change conflicts with another configuration, the ID of the conflicting standards'
        ),
    ] = None
    context: context_1.ContextObject | None = None
    errors: Annotated[
        list[error.Error], Field(description='Errors that occurred during the update', min_length=1)
    ]
    ext: ext_1.ExtensionObject | None = None
    success: Annotated[Literal[False], Field(description='Indicates the update failed')]


class UpdateContentStandardsResponse(
    RootModel[UpdateContentStandardsResponse1 | UpdateContentStandardsResponse2]
):
    root: Annotated[
        UpdateContentStandardsResponse1 | UpdateContentStandardsResponse2,
        Field(
            description='Response from updating a content standards configuration',
            title='Update Content Standards Response',
        ),
    ]
