# coding: utf-8

"""
    VeeRoute.UD

    VeeRoute.UD API  # noqa: E501

    The version of the OpenAPI document: 2.8.160628
    Contact: support@veeroute.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from vrt_ud.configuration import Configuration


class FactsFilter(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'time_window': 'TimeWindow',
        'types': 'list[str]',
        'order_keys': 'list[str]',
        'business_order_keys': 'list[str]'
    }

    attribute_map = {
        'time_window': 'time_window',
        'types': 'types',
        'order_keys': 'order_keys',
        'business_order_keys': 'business_order_keys'
    }

    def __init__(self, time_window=None, types=None, order_keys=None, business_order_keys=None, local_vars_configuration=None):  # noqa: E501
        """FactsFilter - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._time_window = None
        self._types = None
        self._order_keys = None
        self._business_order_keys = None
        self.discriminator = None

        if time_window is not None:
            self.time_window = time_window
        if types is not None:
            self.types = types
        if order_keys is not None:
            self.order_keys = order_keys
        if business_order_keys is not None:
            self.business_order_keys = business_order_keys

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


        :return: The time_window of this FactsFilter.  # noqa: E501
        :rtype: TimeWindow
        """
        return self._time_window

    @time_window.setter
    def time_window(self, time_window):
        """Sets the time_window of this FactsFilter.


        :param time_window: The time_window of this FactsFilter.  # noqa: E501
        :type: TimeWindow
        """

        self._time_window = time_window

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

        Fact types.  # noqa: E501

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

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

        Fact types.  # noqa: E501

        :param types: The types of this FactsFilter.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["JobDone", "FactDemandDone", "FactDemandCancellation", "FactDemandPayment", "FactDemandResumed", "FactEventWindowChanged", "FactPerformerMessage", "FactTripStatusNotice", "FactTripactionCommentChanged", "FactWorkStarted", "FactTripProgress", "Photo"]  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                not set(types).issubset(set(allowed_values))):  # noqa: E501
            raise ValueError(
                "Invalid values for `types` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(types) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._types = types

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

        List of orders keys for which it is necessary to get the facts.  # noqa: E501

        :return: The order_keys of this FactsFilter.  # noqa: E501
        :rtype: list[str]
        """
        return self._order_keys

    @order_keys.setter
    def order_keys(self, order_keys):
        """Sets the order_keys of this FactsFilter.

        List of orders keys for which it is necessary to get the facts.  # noqa: E501

        :param order_keys: The order_keys of this FactsFilter.  # noqa: E501
        :type: list[str]
        """

        self._order_keys = order_keys

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

        External order business keys list for which it is necessary to get the facts.  # noqa: E501

        :return: The business_order_keys of this FactsFilter.  # noqa: E501
        :rtype: list[str]
        """
        return self._business_order_keys

    @business_order_keys.setter
    def business_order_keys(self, business_order_keys):
        """Sets the business_order_keys of this FactsFilter.

        External order business keys list for which it is necessary to get the facts.  # noqa: E501

        :param business_order_keys: The business_order_keys of this FactsFilter.  # noqa: E501
        :type: list[str]
        """

        self._business_order_keys = business_order_keys

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

        for attr, _ in six.iteritems(self.openapi_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

        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, FactsFilter):
            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, FactsFilter):
            return True

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