# coding: utf-8

"""
    Phrase Strings API Reference

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


import pprint
import re  # noqa: F401

import six

from phrase_api.configuration import Configuration


class JobLocale(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 = {
        'id': 'str',
        'job': 'JobPreview',
        'locale': 'LocalePreview',
        'users': 'list[UserPreview]',
        'completed': 'bool',
        'translation_completed_at': 'datetime',
        'review_completed_at': 'datetime'
    }

    attribute_map = {
        'id': 'id',
        'job': 'job',
        'locale': 'locale',
        'users': 'users',
        'completed': 'completed',
        'translation_completed_at': 'translation_completed_at',
        'review_completed_at': 'review_completed_at'
    }

    def __init__(self, id=None, job=None, locale=None, users=None, completed=None, translation_completed_at=None, review_completed_at=None, local_vars_configuration=None):  # noqa: E501
        """JobLocale - 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._id = None
        self._job = None
        self._locale = None
        self._users = None
        self._completed = None
        self._translation_completed_at = None
        self._review_completed_at = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if job is not None:
            self.job = job
        if locale is not None:
            self.locale = locale
        if users is not None:
            self.users = users
        if completed is not None:
            self.completed = completed
        if translation_completed_at is not None:
            self.translation_completed_at = translation_completed_at
        if review_completed_at is not None:
            self.review_completed_at = review_completed_at

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


        :return: The id of this JobLocale.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this JobLocale.


        :param id: The id of this JobLocale.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The job of this JobLocale.  # noqa: E501
        :rtype: JobPreview
        """
        return self._job

    @job.setter
    def job(self, job):
        """Sets the job of this JobLocale.


        :param job: The job of this JobLocale.  # noqa: E501
        :type: JobPreview
        """

        self._job = job

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


        :return: The locale of this JobLocale.  # noqa: E501
        :rtype: LocalePreview
        """
        return self._locale

    @locale.setter
    def locale(self, locale):
        """Sets the locale of this JobLocale.


        :param locale: The locale of this JobLocale.  # noqa: E501
        :type: LocalePreview
        """

        self._locale = locale

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


        :return: The users of this JobLocale.  # noqa: E501
        :rtype: list[UserPreview]
        """
        return self._users

    @users.setter
    def users(self, users):
        """Sets the users of this JobLocale.


        :param users: The users of this JobLocale.  # noqa: E501
        :type: list[UserPreview]
        """

        self._users = users

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


        :return: The completed of this JobLocale.  # noqa: E501
        :rtype: bool
        """
        return self._completed

    @completed.setter
    def completed(self, completed):
        """Sets the completed of this JobLocale.


        :param completed: The completed of this JobLocale.  # noqa: E501
        :type: bool
        """

        self._completed = completed

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


        :return: The translation_completed_at of this JobLocale.  # noqa: E501
        :rtype: datetime
        """
        return self._translation_completed_at

    @translation_completed_at.setter
    def translation_completed_at(self, translation_completed_at):
        """Sets the translation_completed_at of this JobLocale.


        :param translation_completed_at: The translation_completed_at of this JobLocale.  # noqa: E501
        :type: datetime
        """

        self._translation_completed_at = translation_completed_at

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


        :return: The review_completed_at of this JobLocale.  # noqa: E501
        :rtype: datetime
        """
        return self._review_completed_at

    @review_completed_at.setter
    def review_completed_at(self, review_completed_at):
        """Sets the review_completed_at of this JobLocale.


        :param review_completed_at: The review_completed_at of this JobLocale.  # noqa: E501
        :type: datetime
        """

        self._review_completed_at = review_completed_at

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

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