# 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
from ...core.serialization import FieldMetadata


class CreateJobRequestInputParams_AzureIonqSimulator(UniversalBaseModel):
    """
    Backend-specific job input parameters. The supported parameters depend on the backend the job is executed on.
    """

    backend_id: typing_extensions.Annotated[
        typing.Literal["azure.ionq.simulator"], FieldMetadata(alias="backendId")
    ] = "azure.ionq.simulator"

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

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


class CreateJobRequestInputParams_AwsIqmGarnet(UniversalBaseModel):
    """
    Backend-specific job input parameters. The supported parameters depend on the backend the job is executed on.
    """

    backend_id: typing_extensions.Annotated[typing.Literal["aws.iqm.garnet"], FieldMetadata(alias="backendId")] = (
        "aws.iqm.garnet"
    )
    disable_qubit_rewiring: typing.Optional[bool] = None
    qubit_count: typing.Optional[float] = None

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

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


class CreateJobRequestInputParams_AwsSimSv1(UniversalBaseModel):
    """
    Backend-specific job input parameters. The supported parameters depend on the backend the job is executed on.
    """

    backend_id: typing_extensions.Annotated[typing.Literal["aws.sim.sv1"], FieldMetadata(alias="backendId")] = (
        "aws.sim.sv1"
    )
    disable_qubit_rewiring: typing.Optional[bool] = None
    qubit_count: typing.Optional[float] = None

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

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


class CreateJobRequestInputParams_AwsIonqAria2(UniversalBaseModel):
    """
    Backend-specific job input parameters. The supported parameters depend on the backend the job is executed on.
    """

    backend_id: typing_extensions.Annotated[typing.Literal["aws.ionq.aria-2"], FieldMetadata(alias="backendId")] = (
        "aws.ionq.aria-2"
    )
    disable_qubit_rewiring: typing.Optional[bool] = None
    qubit_count: typing.Optional[float] = None

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

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


class CreateJobRequestInputParams_AwsIonqForte(UniversalBaseModel):
    """
    Backend-specific job input parameters. The supported parameters depend on the backend the job is executed on.
    """

    backend_id: typing_extensions.Annotated[typing.Literal["aws.ionq.forte"], FieldMetadata(alias="backendId")] = (
        "aws.ionq.forte"
    )
    disable_qubit_rewiring: typing.Optional[bool] = None
    qubit_count: typing.Optional[float] = None

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

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


class CreateJobRequestInputParams_AwsSimDm1(UniversalBaseModel):
    """
    Backend-specific job input parameters. The supported parameters depend on the backend the job is executed on.
    """

    backend_id: typing_extensions.Annotated[typing.Literal["aws.sim.dm1"], FieldMetadata(alias="backendId")] = (
        "aws.sim.dm1"
    )
    disable_qubit_rewiring: typing.Optional[bool] = None
    qubit_count: typing.Optional[float] = None

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

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


class CreateJobRequestInputParams_AwsIonqAria(UniversalBaseModel):
    """
    Backend-specific job input parameters. The supported parameters depend on the backend the job is executed on.
    """

    backend_id: typing_extensions.Annotated[typing.Literal["aws.ionq.aria"], FieldMetadata(alias="backendId")] = (
        "aws.ionq.aria"
    )
    disable_qubit_rewiring: typing.Optional[bool] = None
    qubit_count: typing.Optional[float] = None

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

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


class CreateJobRequestInputParams_AwsRigettiAnkaa(UniversalBaseModel):
    """
    Backend-specific job input parameters. The supported parameters depend on the backend the job is executed on.
    """

    backend_id: typing_extensions.Annotated[typing.Literal["aws.rigetti.ankaa"], FieldMetadata(alias="backendId")] = (
        "aws.rigetti.ankaa"
    )
    disable_qubit_rewiring: typing.Optional[bool] = None
    qubit_count: typing.Optional[float] = None

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

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


CreateJobRequestInputParams = typing_extensions.Annotated[
    typing.Union[
        CreateJobRequestInputParams_AzureIonqSimulator,
        CreateJobRequestInputParams_AwsIqmGarnet,
        CreateJobRequestInputParams_AwsSimSv1,
        CreateJobRequestInputParams_AwsIonqAria2,
        CreateJobRequestInputParams_AwsIonqForte,
        CreateJobRequestInputParams_AwsSimDm1,
        CreateJobRequestInputParams_AwsIonqAria,
        CreateJobRequestInputParams_AwsRigettiAnkaa,
    ],
    pydantic.Field(discriminator="backendId"),
]
