# generated by datamodel-codegen:
#   filename:  use_non_positive_negative.json
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from pydantic import (
    BaseModel,
    Field,
    NegativeFloat,
    NegativeInt,
    NonNegativeFloat,
    NonNegativeInt,
    NonPositiveFloat,
    NonPositiveInt,
    PositiveFloat,
    PositiveInt,
    confloat,
    conint,
)


class NumberConstraints(BaseModel):
    non_negative_int: NonNegativeInt | None = Field(
        None, description='NonNegativeInt: minimum=0 only'
    )
    non_positive_int: NonPositiveInt | None = Field(
        None, description='NonPositiveInt: maximum=0 only'
    )
    non_negative_float: NonNegativeFloat | None = Field(
        None, description='NonNegativeFloat: minimum=0 only'
    )
    non_positive_float: NonPositiveFloat | None = Field(
        None, description='NonPositiveFloat: maximum=0 only'
    )
    positive_int: PositiveInt | None = Field(
        None, description='PositiveInt: exclusiveMinimum=0'
    )
    negative_int: NegativeInt | None = Field(
        None, description='NegativeInt: exclusiveMaximum=0'
    )
    positive_float: PositiveFloat | None = Field(
        None, description='PositiveFloat: exclusiveMinimum=0'
    )
    negative_float: NegativeFloat | None = Field(
        None, description='NegativeFloat: exclusiveMaximum=0'
    )
    bounded_non_negative_int: conint(ge=0, le=100) | None = Field(
        None, description='NonNegativeInt with additional upper bound'
    )
    bounded_non_positive_int: conint(ge=-100, le=0) | None = Field(
        None, description='NonPositiveInt with additional lower bound'
    )
    bounded_non_negative_float: confloat(ge=0.0, le=1.0) | None = Field(
        None, description='NonNegativeFloat with additional upper bound'
    )
    bounded_non_positive_float: confloat(ge=-1.0, le=0.0) | None = Field(
        None, description='NonPositiveFloat with additional lower bound'
    )
    plain_constrained_int: conint(ge=5, le=100) | None = Field(
        None, description='No zero bound: should remain conint/Field'
    )
