# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

    OpenAPI spec version: 4.11.5
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class UserVouchersQueryFilters(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'amount_range': 'list[BigDecimal]',
        'creation_period': 'list[datetime]',
        'expiration_period': 'list[datetime]',
        'redeem_period': 'list[datetime]',
        'token': 'str',
        'types': 'list[str]',
        'statuses': 'list[VoucherStatusEnum]',
        'relation': 'VoucherRelationEnum'
    }

    attribute_map = {
        'amount_range': 'amountRange',
        'creation_period': 'creationPeriod',
        'expiration_period': 'expirationPeriod',
        'redeem_period': 'redeemPeriod',
        'token': 'token',
        'types': 'types',
        'statuses': 'statuses',
        'relation': 'relation'
    }

    def __init__(self, amount_range=None, creation_period=None, expiration_period=None, redeem_period=None, token=None, types=None, statuses=None, relation=None, _configuration=None):  # noqa: E501
        """UserVouchersQueryFilters - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._amount_range = None
        self._creation_period = None
        self._expiration_period = None
        self._redeem_period = None
        self._token = None
        self._types = None
        self._statuses = None
        self._relation = None
        self.discriminator = None

        if amount_range is not None:
            self.amount_range = amount_range
        if creation_period is not None:
            self.creation_period = creation_period
        if expiration_period is not None:
            self.expiration_period = expiration_period
        if redeem_period is not None:
            self.redeem_period = redeem_period
        if token is not None:
            self.token = token
        if types is not None:
            self.types = types
        if statuses is not None:
            self.statuses = statuses
        if relation is not None:
            self.relation = relation

    @property
    def amount_range(self):
        """Gets the amount_range of this UserVouchersQueryFilters.  # noqa: E501

        The minimum / maximum voucher amount   # noqa: E501

        :return: The amount_range of this UserVouchersQueryFilters.  # noqa: E501
        :rtype: list[BigDecimal]
        """
        return self._amount_range

    @amount_range.setter
    def amount_range(self, amount_range):
        """Sets the amount_range of this UserVouchersQueryFilters.

        The minimum / maximum voucher amount   # noqa: E501

        :param amount_range: The amount_range of this UserVouchersQueryFilters.  # noqa: E501
        :type: list[BigDecimal]
        """

        self._amount_range = amount_range

    @property
    def creation_period(self):
        """Gets the creation_period of this UserVouchersQueryFilters.  # noqa: E501

        The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.   # noqa: E501

        :return: The creation_period of this UserVouchersQueryFilters.  # noqa: E501
        :rtype: list[datetime]
        """
        return self._creation_period

    @creation_period.setter
    def creation_period(self, creation_period):
        """Sets the creation_period of this UserVouchersQueryFilters.

        The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.   # noqa: E501

        :param creation_period: The creation_period of this UserVouchersQueryFilters.  # noqa: E501
        :type: list[datetime]
        """

        self._creation_period = creation_period

    @property
    def expiration_period(self):
        """Gets the expiration_period of this UserVouchersQueryFilters.  # noqa: E501

        The minimum / maximum voucher expiration date Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.   # noqa: E501

        :return: The expiration_period of this UserVouchersQueryFilters.  # noqa: E501
        :rtype: list[datetime]
        """
        return self._expiration_period

    @expiration_period.setter
    def expiration_period(self, expiration_period):
        """Sets the expiration_period of this UserVouchersQueryFilters.

        The minimum / maximum voucher expiration date Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.   # noqa: E501

        :param expiration_period: The expiration_period of this UserVouchersQueryFilters.  # noqa: E501
        :type: list[datetime]
        """

        self._expiration_period = expiration_period

    @property
    def redeem_period(self):
        """Gets the redeem_period of this UserVouchersQueryFilters.  # noqa: E501

        The minimum / maximum voucher redeem date Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.   # noqa: E501

        :return: The redeem_period of this UserVouchersQueryFilters.  # noqa: E501
        :rtype: list[datetime]
        """
        return self._redeem_period

    @redeem_period.setter
    def redeem_period(self, redeem_period):
        """Sets the redeem_period of this UserVouchersQueryFilters.

        The minimum / maximum voucher redeem date Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.   # noqa: E501

        :param redeem_period: The redeem_period of this UserVouchersQueryFilters.  # noqa: E501
        :type: list[datetime]
        """

        self._redeem_period = redeem_period

    @property
    def token(self):
        """Gets the token of this UserVouchersQueryFilters.  # noqa: E501

        The voucher token (with or without mask)  # noqa: E501

        :return: The token of this UserVouchersQueryFilters.  # noqa: E501
        :rtype: str
        """
        return self._token

    @token.setter
    def token(self, token):
        """Sets the token of this UserVouchersQueryFilters.

        The voucher token (with or without mask)  # noqa: E501

        :param token: The token of this UserVouchersQueryFilters.  # noqa: E501
        :type: str
        """

        self._token = token

    @property
    def types(self):
        """Gets the types of this UserVouchersQueryFilters.  # noqa: E501

        The ids or internal names of voucher types  # noqa: E501

        :return: The types of this UserVouchersQueryFilters.  # noqa: E501
        :rtype: list[str]
        """
        return self._types

    @types.setter
    def types(self, types):
        """Sets the types of this UserVouchersQueryFilters.

        The ids or internal names of voucher types  # noqa: E501

        :param types: The types of this UserVouchersQueryFilters.  # noqa: E501
        :type: list[str]
        """

        self._types = types

    @property
    def statuses(self):
        """Gets the statuses of this UserVouchersQueryFilters.  # noqa: E501

        The voucher statuses Possibles values for each array element are: * canceled: The voucher was canceled, and cannot be further used * expired: The voucher has expired without being redeemed * open: The voucher has been generated / bought, and is open * pending: The voucher has been bought, and the corresponding payment is pending for authorization * redeemed: The voucher has been redeemed, and the corresponding payment was done   # noqa: E501

        :return: The statuses of this UserVouchersQueryFilters.  # noqa: E501
        :rtype: list[VoucherStatusEnum]
        """
        return self._statuses

    @statuses.setter
    def statuses(self, statuses):
        """Sets the statuses of this UserVouchersQueryFilters.

        The voucher statuses Possibles values for each array element are: * canceled: The voucher was canceled, and cannot be further used * expired: The voucher has expired without being redeemed * open: The voucher has been generated / bought, and is open * pending: The voucher has been bought, and the corresponding payment is pending for authorization * redeemed: The voucher has been redeemed, and the corresponding payment was done   # noqa: E501

        :param statuses: The statuses of this UserVouchersQueryFilters.  # noqa: E501
        :type: list[VoucherStatusEnum]
        """

        self._statuses = statuses

    @property
    def relation(self):
        """Gets the relation of this UserVouchersQueryFilters.  # noqa: E501

        Indicates the relation used to filter the vouchers. Possible values are: * bought: A voucher the user has bought * redeemed: A voucher the user has redeemed   # noqa: E501

        :return: The relation of this UserVouchersQueryFilters.  # noqa: E501
        :rtype: VoucherRelationEnum
        """
        return self._relation

    @relation.setter
    def relation(self, relation):
        """Sets the relation of this UserVouchersQueryFilters.

        Indicates the relation used to filter the vouchers. Possible values are: * bought: A voucher the user has bought * redeemed: A voucher the user has redeemed   # noqa: E501

        :param relation: The relation of this UserVouchersQueryFilters.  # noqa: E501
        :type: VoucherRelationEnum
        """

        self._relation = relation

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(UserVouchersQueryFilters, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, UserVouchersQueryFilters):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, UserVouchersQueryFilters):
            return True

        return self.to_dict() != other.to_dict()
