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

from __future__ import annotations

from typing import Union, Iterable
from typing_extensions import Required, Annotated, TypedDict

from .._types import Base64FileInput
from .._utils import PropertyInfo
from .._models import set_pydantic_config
from .input_type import InputType

__all__ = ["TransformationCreateParams", "Transformation"]


class TransformationCreateParams(TypedDict, total=False):
    pipeline_id: Required[Annotated[str, PropertyInfo(alias="pipelineID")]]
    """ID of the desired pipeline to transform the input content. Generated by bem."""

    transformations: Required[Iterable[Transformation]]
    """An array of objects containing all the transformations you want to create."""


class Transformation(TypedDict, total=False):
    input_content: Required[Annotated[Union[str, Base64FileInput], PropertyInfo(alias="inputContent", format="base64")]]
    """The file content you want to transform as a base64 URL-encoded string.

    If the `inputType` is `email`, this is equivalent to the raw format returned by
    the Gmail API.
    """

    input_type: Required[Annotated[InputType, PropertyInfo(alias="inputType")]]
    """The input type of the content you're sending for transformation."""

    reference_id: Required[Annotated[str, PropertyInfo(alias="referenceID")]]
    """The unique ID you use internally to refer to this data point.

    Upon successful transformation, we will return it to you with the transformed
    content, so you can associate inputs and outputs.
    """


set_pydantic_config(Transformation, {"arbitrary_types_allowed": True})
