# coding: utf-8

"""
    PSI Candidate Rest Eligibility Service

    PSIs REST based service to modify candidate test eligibilities.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class EligibilityModel(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 = {
        'eligibility_end_date': 'str',
        'candidate': 'CandidateModel',
        'portion_codes': 'list[str]',
        'schedule_start_date': 'str',
        'test_code': 'str',
        'client_eligibility_id': 'str'
    }

    attribute_map = {
        'eligibility_end_date': 'eligibility_end_date',
        'candidate': 'candidate',
        'portion_codes': 'portion_codes',
        'schedule_start_date': 'schedule_start_date',
        'test_code': 'test_code',
        'client_eligibility_id': 'client_eligibility_id'
    }

    def __init__(self, eligibility_end_date=None, candidate=None, portion_codes=None, schedule_start_date=None, test_code=None, client_eligibility_id=None):  # noqa: E501
        """EligibilityModel - a model defined in Swagger"""  # noqa: E501

        self._eligibility_end_date = None
        self._candidate = None
        self._portion_codes = None
        self._schedule_start_date = None
        self._test_code = None
        self._client_eligibility_id = None
        self.discriminator = None

        if eligibility_end_date is not None:
            self.eligibility_end_date = eligibility_end_date
        self.candidate = candidate
        if portion_codes is not None:
            self.portion_codes = portion_codes
        if schedule_start_date is not None:
            self.schedule_start_date = schedule_start_date
        self.test_code = test_code
        if client_eligibility_id is not None:
            self.client_eligibility_id = client_eligibility_id

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

        The last date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format. Required when creating a new eligibility.  # noqa: E501

        :return: The eligibility_end_date of this EligibilityModel.  # noqa: E501
        :rtype: str
        """
        return self._eligibility_end_date

    @eligibility_end_date.setter
    def eligibility_end_date(self, eligibility_end_date):
        """Sets the eligibility_end_date of this EligibilityModel.

        The last date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format. Required when creating a new eligibility.  # noqa: E501

        :param eligibility_end_date: The eligibility_end_date of this EligibilityModel.  # noqa: E501
        :type: str
        """

        self._eligibility_end_date = eligibility_end_date

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


        :return: The candidate of this EligibilityModel.  # noqa: E501
        :rtype: CandidateModel
        """
        return self._candidate

    @candidate.setter
    def candidate(self, candidate):
        """Sets the candidate of this EligibilityModel.


        :param candidate: The candidate of this EligibilityModel.  # noqa: E501
        :type: CandidateModel
        """
        if candidate is None:
            raise ValueError("Invalid value for `candidate`, must not be `None`")  # noqa: E501

        self._candidate = candidate

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

        If required, specific portion codes may be supplied.  # noqa: E501

        :return: The portion_codes of this EligibilityModel.  # noqa: E501
        :rtype: list[str]
        """
        return self._portion_codes

    @portion_codes.setter
    def portion_codes(self, portion_codes):
        """Sets the portion_codes of this EligibilityModel.

        If required, specific portion codes may be supplied.  # noqa: E501

        :param portion_codes: The portion_codes of this EligibilityModel.  # noqa: E501
        :type: list[str]
        """

        self._portion_codes = portion_codes

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

        The first date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format. Required when creating a new eligibility.  # noqa: E501

        :return: The schedule_start_date of this EligibilityModel.  # noqa: E501
        :rtype: str
        """
        return self._schedule_start_date

    @schedule_start_date.setter
    def schedule_start_date(self, schedule_start_date):
        """Sets the schedule_start_date of this EligibilityModel.

        The first date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format. Required when creating a new eligibility.  # noqa: E501

        :param schedule_start_date: The schedule_start_date of this EligibilityModel.  # noqa: E501
        :type: str
        """

        self._schedule_start_date = schedule_start_date

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

        The client specific test code for the eligibility to be created against.  # noqa: E501

        :return: The test_code of this EligibilityModel.  # noqa: E501
        :rtype: str
        """
        return self._test_code

    @test_code.setter
    def test_code(self, test_code):
        """Sets the test_code of this EligibilityModel.

        The client specific test code for the eligibility to be created against.  # noqa: E501

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

        self._test_code = test_code

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

        Client provided unique key for this eligibility.  # noqa: E501

        :return: The client_eligibility_id of this EligibilityModel.  # noqa: E501
        :rtype: str
        """
        return self._client_eligibility_id

    @client_eligibility_id.setter
    def client_eligibility_id(self, client_eligibility_id):
        """Sets the client_eligibility_id of this EligibilityModel.

        Client provided unique key for this eligibility.  # noqa: E501

        :param client_eligibility_id: The client_eligibility_id of this EligibilityModel.  # noqa: E501
        :type: str
        """

        self._client_eligibility_id = client_eligibility_id

    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(EligibilityModel, 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, EligibilityModel):
            return False

        return self.__dict__ == other.__dict__

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