# coding: utf-8

"""
    Translation API

    This API allows 3rd party developers to translate item titles.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class TranslateResponse(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 = {
        '_from': 'str',
        'to': 'str',
        'translations': 'list[Translation]'
    }

    attribute_map = {
        '_from': 'from',
        'to': 'to',
        'translations': 'translations'
    }

    def __init__(self, _from=None, to=None, translations=None):  # noqa: E501
        """TranslateResponse - a model defined in Swagger"""  # noqa: E501
        self.__from = None
        self._to = None
        self._translations = None
        self.discriminator = None
        if _from is not None:
            self._from = _from
        if to is not None:
            self.to = to
        if translations is not None:
            self.translations = translations

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

        The enumeration value indicates the language of the input text. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/commerce/translation/types/api:LanguageEnum'>eBay API documentation</a>  # noqa: E501

        :return: The _from of this TranslateResponse.  # noqa: E501
        :rtype: str
        """
        return self.__from

    @_from.setter
    def _from(self, _from):
        """Sets the _from of this TranslateResponse.

        The enumeration value indicates the language of the input text. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/commerce/translation/types/api:LanguageEnum'>eBay API documentation</a>  # noqa: E501

        :param _from: The _from of this TranslateResponse.  # noqa: E501
        :type: str
        """

        self.__from = _from

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

        The enumeration value indicates the language of the translated text. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/commerce/translation/types/api:LanguageEnum'>eBay API documentation</a>  # noqa: E501

        :return: The to of this TranslateResponse.  # noqa: E501
        :rtype: str
        """
        return self._to

    @to.setter
    def to(self, to):
        """Sets the to of this TranslateResponse.

        The enumeration value indicates the language of the translated text. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/commerce/translation/types/api:LanguageEnum'>eBay API documentation</a>  # noqa: E501

        :param to: The to of this TranslateResponse.  # noqa: E501
        :type: str
        """

        self._to = to

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

        An array showing the input and translated text. Only one input string can be translated at this time. Support for multiple continuous text strings is expected in the future.  # noqa: E501

        :return: The translations of this TranslateResponse.  # noqa: E501
        :rtype: list[Translation]
        """
        return self._translations

    @translations.setter
    def translations(self, translations):
        """Sets the translations of this TranslateResponse.

        An array showing the input and translated text. Only one input string can be translated at this time. Support for multiple continuous text strings is expected in the future.  # noqa: E501

        :param translations: The translations of this TranslateResponse.  # noqa: E501
        :type: list[Translation]
        """

        self._translations = translations

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

        return self.__dict__ == other.__dict__

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