Validation types¶
Various types used to validate input data for correctness.
Available Data Types¶
diffusion.internal.validation ¶
StrictTimedelta
module-attribute
¶
A datetime.timedelta
instance.
StrictNonNegativeTimedelta
module-attribute
¶
StrictNonNegativeTimedelta: TypeAlias = typing.Union[
datetime.timedelta, StrictNonNegativeTimedeltaClass
]
A non-negative datetime.timedelta
instance.
StrictTimedeltaClass ¶
StrictNonNegativeTimedeltaClass ¶
pydantic ¶
StrictPositiveInt
module-attribute
¶
StrictPositiveInt = typing.Union[
StrictPositiveIntClass, pydantic.StrictInt
]
A positive int
StrictNonNegativeInt
module-attribute
¶
StrictNonNegativeInt = typing.Union[
StrictNonNegativeIntClass, pydantic.StrictInt, int
]
A non-negative int
StrictNonNegativeFloat
module-attribute
¶
StrictNonNegativeFloat = typing.Union[
StrictNonNegativeFloatClass, pydantic.StrictFloat
]
A non-negative float
StrictNonNegative
module-attribute
¶
StrictNonNegative = typing.Union[
StrictNonNegativeInt, StrictNonNegativeFloat
]
A non-negative int
or float
MaximumResultSize
module-attribute
¶
MaximumResultSize: TypeAlias = UnsignedInt32
The maximum result size
StrictPositiveIntClass ¶
Bases: pydantic.StrictInt
Strictly validated version of int
.
Accepts only int
or any subclasses thereof. Must be positive.
StrictNonNegativeIntClass ¶
Bases: pydantic.StrictInt
Strictly validated version of int
.
Accepts only int
or any subclasses thereof. Must be non-negative.
StrictNonNegativeFloatClass ¶
Bases: pydantic.StrictFloat
Strictly validated version of float
.
Accepts only int
or any subclasses thereof. Must be non-negative.
Int32 ¶
Bases: encoded_data.Int32
max_unsigned_int
classmethod
¶
max_unsigned_int() -> StrictNonNegativeInt
Returns:
Type | Description |
---|---|
StrictNonNegativeInt
|
The maximum unsigned integer for this type width |
max_signed_int
classmethod
¶
max_signed_int() -> StrictNonNegativeInt
Returns:
Type | Description |
---|---|
StrictNonNegativeInt
|
The maximum signed integer for this type width |
Int64 ¶
Bases: encoded_data.Int64
max_unsigned_int
classmethod
¶
max_unsigned_int() -> StrictNonNegativeInt
Returns:
Type | Description |
---|---|
StrictNonNegativeInt
|
The maximum unsigned integer for this type width |
max_signed_int
classmethod
¶
max_signed_int() -> StrictNonNegativeInt
Returns:
Type | Description |
---|---|
StrictNonNegativeInt
|
The maximum signed integer for this type width |
MinMaxStrictInt ¶
UnsignedInt32 ¶
SignedInt32 ¶
NonNegativeSignedInt32 ¶
UnsignedInt64 ¶
SignedInt64 ¶
NonNegativeSignedInt64 ¶
diffusion.internal.validation.pydantic ¶
StrictPositiveInt
module-attribute
¶
StrictPositiveInt = typing.Union[
StrictPositiveIntClass, pydantic.StrictInt
]
A positive int
StrictNonNegativeInt
module-attribute
¶
StrictNonNegativeInt = typing.Union[
StrictNonNegativeIntClass, pydantic.StrictInt, int
]
A non-negative int
StrictNonNegativeFloat
module-attribute
¶
StrictNonNegativeFloat = typing.Union[
StrictNonNegativeFloatClass, pydantic.StrictFloat
]
A non-negative float
StrictNonNegative
module-attribute
¶
StrictNonNegative = typing.Union[
StrictNonNegativeInt, StrictNonNegativeFloat
]
A non-negative int
or float
MaximumResultSize
module-attribute
¶
MaximumResultSize: TypeAlias = UnsignedInt32
The maximum result size
StrictPositiveIntClass ¶
Bases: pydantic.StrictInt
Strictly validated version of int
.
Accepts only int
or any subclasses thereof. Must be positive.
StrictNonNegativeIntClass ¶
Bases: pydantic.StrictInt
Strictly validated version of int
.
Accepts only int
or any subclasses thereof. Must be non-negative.
StrictNonNegativeFloatClass ¶
Bases: pydantic.StrictFloat
Strictly validated version of float
.
Accepts only int
or any subclasses thereof. Must be non-negative.
Int32 ¶
Bases: encoded_data.Int32
max_unsigned_int
classmethod
¶
max_unsigned_int() -> StrictNonNegativeInt
Returns:
Type | Description |
---|---|
StrictNonNegativeInt
|
The maximum unsigned integer for this type width |
max_signed_int
classmethod
¶
max_signed_int() -> StrictNonNegativeInt
Returns:
Type | Description |
---|---|
StrictNonNegativeInt
|
The maximum signed integer for this type width |
Int64 ¶
Bases: encoded_data.Int64
max_unsigned_int
classmethod
¶
max_unsigned_int() -> StrictNonNegativeInt
Returns:
Type | Description |
---|---|
StrictNonNegativeInt
|
The maximum unsigned integer for this type width |
max_signed_int
classmethod
¶
max_signed_int() -> StrictNonNegativeInt
Returns:
Type | Description |
---|---|
StrictNonNegativeInt
|
The maximum signed integer for this type width |