# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from datetime import datetime

from pydantic import Field as FieldInfo

from .._models import BaseModel

__all__ = ["TransformationListErrorsResponse", "TransformationError"]


class TransformationError(BaseModel):
    message: str
    """
    Message describing the error encountered while attempting to transform the
    original input data.
    """

    pipeline_id: str = FieldInfo(alias="pipelineID")
    """ID of pipeline that was used to attempt to transform the original input data."""

    reference_id: str = FieldInfo(alias="referenceID")
    """The unique ID you use internally to refer to this data point."""

    timestamp: datetime
    """Timestamp indicating when the transformation was created."""

    transformation_error_id: str = FieldInfo(alias="transformationErrorID")
    """Unique ID of this error generated by bem following Segment's KSUID conventions."""


class TransformationListErrorsResponse(BaseModel):
    total_count: Optional[int] = FieldInfo(alias="totalCount", default=None)
    """The total number of results available."""

    transformation_errors: Optional[List[TransformationError]] = FieldInfo(alias="transformationErrors", default=None)
    """An array of objects containing the transformation errors."""
