# encoding: utf-8

"""
binary butterfly validator
Copyright (c) 2021, binary butterfly GmbH
Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt.
"""

from typing import Union
from decimal import Decimal

from ..fields import Field
from ..validators import IsType, DecimalValidator
from ..util import UnsetValue


class DecimalField(Field):
    pre_validators = [
        IsType(data_type=str),
        DecimalValidator()
    ]

    @property
    def data(self) -> Union[Decimal, UnsetValue]:
        return super().data

    @property
    def out(self) -> Union[Decimal, UnsetValue]:
        return super().out

e1a25273503b74a1537867f526f189fad86bd941
<mask token>


class DecimalField(Field):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class DecimalField(Field):
    <mask token>

    @property
    def data(self) ->Union[Decimal, UnsetValue]:
        return super().data

    @property
    def out(self) ->Union[Decimal, UnsetValue]:
        return super().out

<mask token>


class DecimalField(Field):
    pre_validators = [IsType(data_type=str), DecimalValidator()]

    @property
    def data(self) ->Union[Decimal, UnsetValue]:
        return super().data

    @property
    def out(self) ->Union[Decimal, UnsetValue]:
        return super().out

<mask token>
from typing import Union
from decimal import Decimal
from ..fields import Field
from ..validators import IsType, DecimalValidator
from ..util import UnsetValue


class DecimalField(Field):
    pre_validators = [IsType(data_type=str), DecimalValidator()]

    @property
    def data(self) ->Union[Decimal, UnsetValue]:
        return super().data

    @property
    def out(self) ->Union[Decimal, UnsetValue]:
        return super().out

# encoding: utf-8

"""
binary butterfly validator
Copyright (c) 2021, binary butterfly GmbH
Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt.
"""

from typing import Union
from decimal import Decimal

from ..fields import Field
from ..validators import IsType, DecimalValidator
from ..util import UnsetValue


class DecimalField(Field):
    pre_validators = [
        IsType(data_type=str),
        DecimalValidator()
    ]

    @property
    def data(self) -> Union[Decimal, UnsetValue]:
        return super().data

    @property
    def out(self) -> Union[Decimal, UnsetValue]:
        return super().out
