# 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 ExistingEligibilityModel(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',
        'eligibility_status_message': 'str',
        'test_code': 'str',
        'eligible_to_schedule': 'bool',
        'psi_eligiblity_id': 'str',
        'created_datetime': 'str',
        'client_eligibility_id': 'str',
        'status': 'str'
    }

    attribute_map = {
        'eligibility_end_date': 'eligibility_end_date',
        'candidate': 'candidate',
        'portion_codes': 'portion_codes',
        'schedule_start_date': 'schedule_start_date',
        'eligibility_status_message': 'eligibility_status_message',
        'test_code': 'test_code',
        'eligible_to_schedule': 'eligible_to_schedule',
        'psi_eligiblity_id': 'psi_eligiblity_id',
        'created_datetime': 'created_datetime',
        'client_eligibility_id': 'client_eligibility_id',
        'status': 'status'
    }

    def __init__(self, eligibility_end_date=None, candidate=None, portion_codes=None, schedule_start_date=None, eligibility_status_message=None, test_code=None, eligible_to_schedule=None, psi_eligiblity_id=None, created_datetime=None, client_eligibility_id=None, status=None):  # noqa: E501
        """ExistingEligibilityModel - 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._eligibility_status_message = None
        self._test_code = None
        self._eligible_to_schedule = None
        self._psi_eligiblity_id = None
        self._created_datetime = None
        self._client_eligibility_id = None
        self._status = None
        self.discriminator = None

        if eligibility_end_date is not None:
            self.eligibility_end_date = eligibility_end_date
        if candidate is not None:
            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
        if eligibility_status_message is not None:
            self.eligibility_status_message = eligibility_status_message
        if test_code is not None:
            self.test_code = test_code
        if eligible_to_schedule is not None:
            self.eligible_to_schedule = eligible_to_schedule
        if psi_eligiblity_id is not None:
            self.psi_eligiblity_id = psi_eligiblity_id
        if created_datetime is not None:
            self.created_datetime = created_datetime
        if client_eligibility_id is not None:
            self.client_eligibility_id = client_eligibility_id
        if status is not None:
            self.status = status

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

        The last date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format.  # noqa: E501

        :return: The eligibility_end_date of this ExistingEligibilityModel.  # 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 ExistingEligibilityModel.

        The last date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format.  # noqa: E501

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

        self._eligibility_end_date = eligibility_end_date

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


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

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


        :param candidate: The candidate of this ExistingEligibilityModel.  # noqa: E501
        :type: CandidateModel
        """

        self._candidate = candidate

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

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

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

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

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

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

        self._portion_codes = portion_codes

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

        The first date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format.  # noqa: E501

        :return: The schedule_start_date of this ExistingEligibilityModel.  # 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 ExistingEligibilityModel.

        The first date possible for the candidate to schedule on. Java ISO_OFFSET_DATE_TIME format.  # noqa: E501

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

        self._schedule_start_date = schedule_start_date

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

        Any pertinent message about why a candidate is not eligibile to scheduled yet. Common reasons can be because they have been blocked, have pending special accommodations or other similar reasons. Will be null if candidate is eligible to schedule.  # noqa: E501

        :return: The eligibility_status_message of this ExistingEligibilityModel.  # noqa: E501
        :rtype: str
        """
        return self._eligibility_status_message

    @eligibility_status_message.setter
    def eligibility_status_message(self, eligibility_status_message):
        """Sets the eligibility_status_message of this ExistingEligibilityModel.

        Any pertinent message about why a candidate is not eligibile to scheduled yet. Common reasons can be because they have been blocked, have pending special accommodations or other similar reasons. Will be null if candidate is eligible to schedule.  # noqa: E501

        :param eligibility_status_message: The eligibility_status_message of this ExistingEligibilityModel.  # noqa: E501
        :type: str
        """

        self._eligibility_status_message = eligibility_status_message

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

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

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

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

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

        :param test_code: The test_code of this ExistingEligibilityModel.  # noqa: E501
        :type: str
        """

        self._test_code = test_code

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

        Whether or not this candidate is eligibile to be scheduled.  # noqa: E501

        :return: The eligible_to_schedule of this ExistingEligibilityModel.  # noqa: E501
        :rtype: bool
        """
        return self._eligible_to_schedule

    @eligible_to_schedule.setter
    def eligible_to_schedule(self, eligible_to_schedule):
        """Sets the eligible_to_schedule of this ExistingEligibilityModel.

        Whether or not this candidate is eligibile to be scheduled.  # noqa: E501

        :param eligible_to_schedule: The eligible_to_schedule of this ExistingEligibilityModel.  # noqa: E501
        :type: bool
        """

        self._eligible_to_schedule = eligible_to_schedule

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

        PSI's unique identifier for this eligibility.  # noqa: E501

        :return: The psi_eligiblity_id of this ExistingEligibilityModel.  # noqa: E501
        :rtype: str
        """
        return self._psi_eligiblity_id

    @psi_eligiblity_id.setter
    def psi_eligiblity_id(self, psi_eligiblity_id):
        """Sets the psi_eligiblity_id of this ExistingEligibilityModel.

        PSI's unique identifier for this eligibility.  # noqa: E501

        :param psi_eligiblity_id: The psi_eligiblity_id of this ExistingEligibilityModel.  # noqa: E501
        :type: str
        """

        self._psi_eligiblity_id = psi_eligiblity_id

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

        Datetime when the eligibility was created. ISO 8601 format similar to  Java ISO_OFFSET_DATE_TIME format.  # noqa: E501

        :return: The created_datetime of this ExistingEligibilityModel.  # noqa: E501
        :rtype: str
        """
        return self._created_datetime

    @created_datetime.setter
    def created_datetime(self, created_datetime):
        """Sets the created_datetime of this ExistingEligibilityModel.

        Datetime when the eligibility was created. ISO 8601 format similar to  Java ISO_OFFSET_DATE_TIME format.  # noqa: E501

        :param created_datetime: The created_datetime of this ExistingEligibilityModel.  # noqa: E501
        :type: str
        """

        self._created_datetime = created_datetime

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

        Client's unique identifier for this eligibility if provided.  # noqa: E501

        :return: The client_eligibility_id of this ExistingEligibilityModel.  # 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 ExistingEligibilityModel.

        Client's unique identifier for this eligibility if provided.  # noqa: E501

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

        self._client_eligibility_id = client_eligibility_id

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

        Only set on this object when returned back to client. Setting this has no effect when provided as part of a create or update. This is the 4 different eligibility statuses available for a candidate: REG01 is Registration Pending, REG02 is Registration approved, REG03 is Cancelled, REG04 is Scheduled  # noqa: E501

        :return: The status of this ExistingEligibilityModel.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this ExistingEligibilityModel.

        Only set on this object when returned back to client. Setting this has no effect when provided as part of a create or update. This is the 4 different eligibility statuses available for a candidate: REG01 is Registration Pending, REG02 is Registration approved, REG03 is Cancelled, REG04 is Scheduled  # noqa: E501

        :param status: The status of this ExistingEligibilityModel.  # noqa: E501
        :type: str
        """
        allowed_values = ["REG01", "REG02", "REG03", "REG04"]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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

        return self.__dict__ == other.__dict__

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