# coding: utf-8

"""
    jobsync-api

    Job Sync enables the user to manage jobs (view, create, update and delete jobs) in the Phenom database directly from the ATS, with the updates reflected on the career site.  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: shravan.malla@phenompeople.com
    Generated by: phenom
"""

import pprint
import re  # noqa: F401

import six

class Posting(object):
    """
    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 = {
        'locale': 'str',
        'site_type': 'str',
        'category': 'str',
        'title': 'str',
        'description': 'str',
        'apply_url': 'str',
        'visibility_locale': 'list[str]',
        'visibility_site_type': 'list[str]'
    }

    attribute_map = {
        'locale': 'locale',
        'site_type': 'siteType',
        'category': 'category',
        'title': 'title',
        'description': 'description',
        'apply_url': 'applyUrl',
        'visibility_locale': 'visibilityLocale',
        'visibility_site_type': 'visibilitySiteType'
    }

    def __init__(self, locale=None, site_type=None, category=None, title=None, description=None, apply_url=None, visibility_locale=None, visibility_site_type=None):  # noqa: E501
        """Posting - a model defined in Swagger"""  # noqa: E501
        self._locale = None
        self._site_type = None
        self._category = None
        self._title = None
        self._description = None
        self._apply_url = None
        self._visibility_locale = None
        self._visibility_site_type = None
        self.discriminator = None
        self.locale = locale
        self.site_type = site_type
        if category is not None:
            self.category = category
        if title is not None:
            self.title = title
        if description is not None:
            self.description = description
        if apply_url is not None:
            self.apply_url = apply_url
        if visibility_locale is not None:
            self.visibility_locale = visibility_locale
        if visibility_site_type is not None:
            self.visibility_site_type = visibility_site_type

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

        Locale of the site (Language_Country).  # noqa: E501

        :return: The locale of this Posting.  # noqa: E501
        :rtype: str
        """
        return self._locale

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

        Locale of the site (Language_Country).  # noqa: E501

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

        self._locale = locale

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

        SiteType of the job.  # noqa: E501

        :return: The site_type of this Posting.  # noqa: E501
        :rtype: str
        """
        return self._site_type

    @site_type.setter
    def site_type(self, site_type):
        """Sets the site_type of this Posting.

        SiteType of the job.  # noqa: E501

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

        self._site_type = site_type

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

        Category of the job.  # noqa: E501

        :return: The category of this Posting.  # noqa: E501
        :rtype: str
        """
        return self._category

    @category.setter
    def category(self, category):
        """Sets the category of this Posting.

        Category of the job.  # noqa: E501

        :param category: The category of this Posting.  # noqa: E501
        :type: str
        """

        self._category = category

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

        ATS job title.  # noqa: E501

        :return: The title of this Posting.  # noqa: E501
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this Posting.

        ATS job title.  # noqa: E501

        :param title: The title of this Posting.  # noqa: E501
        :type: str
        """

        self._title = title

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

        Description of the job.  # noqa: E501

        :return: The description of this Posting.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this Posting.

        Description of the job.  # noqa: E501

        :param description: The description of this Posting.  # noqa: E501
        :type: str
        """

        self._description = description

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

        Apply url of the job.  # noqa: E501

        :return: The apply_url of this Posting.  # noqa: E501
        :rtype: str
        """
        return self._apply_url

    @apply_url.setter
    def apply_url(self, apply_url):
        """Sets the apply_url of this Posting.

        Apply url of the job.  # noqa: E501

        :param apply_url: The apply_url of this Posting.  # noqa: E501
        :type: str
        """

        self._apply_url = apply_url

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

        All locales that the job belongs to.  # noqa: E501

        :return: The visibility_locale of this Posting.  # noqa: E501
        :rtype: list[str]
        """
        return self._visibility_locale

    @visibility_locale.setter
    def visibility_locale(self, visibility_locale):
        """Sets the visibility_locale of this Posting.

        All locales that the job belongs to.  # noqa: E501

        :param visibility_locale: The visibility_locale of this Posting.  # noqa: E501
        :type: list[str]
        """

        self._visibility_locale = visibility_locale

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

        All personas that the jobs belongs to.  # noqa: E501

        :return: The visibility_site_type of this Posting.  # noqa: E501
        :rtype: list[str]
        """
        return self._visibility_site_type

    @visibility_site_type.setter
    def visibility_site_type(self, visibility_site_type):
        """Sets the visibility_site_type of this Posting.

        All personas that the jobs belongs to.  # noqa: E501

        :param visibility_site_type: The visibility_site_type of this Posting.  # noqa: E501
        :type: list[str]
        """

        self._visibility_site_type = visibility_site_type

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

        return self.__dict__ == other.__dict__

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