# coding: utf-8

"""
    Moosend API

    TODO: Add a description

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


from pprint import pformat
from six import iteritems
import re


class AddingCriteriaToSegmentsRequest(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 = {
        'field': 'str',
        'value': 'str',
        'comparer': 'str',
        'date_from': 'str',
        'date_to': 'str'
    }

    attribute_map = {
        'field': 'Field',
        'value': 'Value',
        'comparer': 'Comparer',
        'date_from': 'DateFrom',
        'date_to': 'DateTo'
    }

    def __init__(self, field=None, value=None, comparer=None, date_from=None, date_to=None):
        """
        AddingCriteriaToSegmentsRequest - a model defined in Swagger
        """

        self._field = None
        self._value = None
        self._comparer = None
        self._date_from = None
        self._date_to = None

        self.field = field
        self.value = value
        if comparer is not None:
          self.comparer = comparer
        if date_from is not None:
          self.date_from = date_from
        if date_to is not None:
          self.date_to = date_to

    @property
    def field(self):
        """
        Gets the field of this AddingCriteriaToSegmentsRequest.
        The field of the criterion to filter the mailing list by. This must be one of the following values.

        :return: The field of this AddingCriteriaToSegmentsRequest.
        :rtype: str
        """
        return self._field

    @field.setter
    def field(self, field):
        """
        Sets the field of this AddingCriteriaToSegmentsRequest.
        The field of the criterion to filter the mailing list by. This must be one of the following values.

        :param field: The field of this AddingCriteriaToSegmentsRequest.
        :type: str
        """
        if field is None:
            raise ValueError("Invalid value for `field`, must not be `None`")

        self._field = field

    @property
    def value(self):
        """
        Gets the value of this AddingCriteriaToSegmentsRequest.
        A search term to filter the specified field by.

        :return: The value of this AddingCriteriaToSegmentsRequest.
        :rtype: str
        """
        return self._value

    @value.setter
    def value(self, value):
        """
        Sets the value of this AddingCriteriaToSegmentsRequest.
        A search term to filter the specified field by.

        :param value: The value of this AddingCriteriaToSegmentsRequest.
        :type: str
        """
        if value is None:
            raise ValueError("Invalid value for `value`, must not be `None`")

        self._value = value

    @property
    def comparer(self):
        """
        Gets the comparer of this AddingCriteriaToSegmentsRequest.
        An operator that defines the way to compare a criterion field with its value. This must be one of the following values. If not specified, `Is` will be assumed.

        :return: The comparer of this AddingCriteriaToSegmentsRequest.
        :rtype: str
        """
        return self._comparer

    @comparer.setter
    def comparer(self, comparer):
        """
        Sets the comparer of this AddingCriteriaToSegmentsRequest.
        An operator that defines the way to compare a criterion field with its value. This must be one of the following values. If not specified, `Is` will be assumed.

        :param comparer: The comparer of this AddingCriteriaToSegmentsRequest.
        :type: str
        """

        self._comparer = comparer

    @property
    def date_from(self):
        """
        Gets the date_from of this AddingCriteriaToSegmentsRequest.
        Provides an additional filter option to be combined with the following fields.

        :return: The date_from of this AddingCriteriaToSegmentsRequest.
        :rtype: str
        """
        return self._date_from

    @date_from.setter
    def date_from(self, date_from):
        """
        Sets the date_from of this AddingCriteriaToSegmentsRequest.
        Provides an additional filter option to be combined with the following fields.

        :param date_from: The date_from of this AddingCriteriaToSegmentsRequest.
        :type: str
        """

        self._date_from = date_from

    @property
    def date_to(self):
        """
        Gets the date_to of this AddingCriteriaToSegmentsRequest.
        Provides an additional filter option to be combined with the following fields.

        :return: The date_to of this AddingCriteriaToSegmentsRequest.
        :rtype: str
        """
        return self._date_to

    @date_to.setter
    def date_to(self, date_to):
        """
        Sets the date_to of this AddingCriteriaToSegmentsRequest.
        Provides an additional filter option to be combined with the following fields.

        :param date_to: The date_to of this AddingCriteriaToSegmentsRequest.
        :type: str
        """

        self._date_to = date_to

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, AddingCriteriaToSegmentsRequest):
            return False

        return self.__dict__ == other.__dict__

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