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

from ..core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
from .parameter_output_lower_bound import ParameterOutputLowerBound
from .parameter_output_upper_bound import ParameterOutputUpperBound
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class Parameter(UniversalBaseModel):
    """
    A parameter to optimize with its bounds and path in the settings dictionary
    """

    path: str = pydantic.Field()
    """
    Path to the parameter in the netlist in the format 'instance_name,parameter_name'
    """

    lower_bound: typing.Optional[ParameterOutputLowerBound] = pydantic.Field(default=None)
    """
    Lower bound of the parameter
    """

    upper_bound: typing.Optional[ParameterOutputUpperBound] = pydantic.Field(default=None)
    """
    Upper bound of the parameter
    """

    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
