# coding: utf-8

"""
    Metadata API

    The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces. In addition to marketplace information, the API also has operations that get information that helps sellers list items on eBay.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class ListingDuration(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 = {
        'duration_values': 'list[str]',
        'listing_type': 'str'
    }

    attribute_map = {
        'duration_values': 'durationValues',
        'listing_type': 'listingType'
    }

    def __init__(self, duration_values=None, listing_type=None):  # noqa: E501
        """ListingDuration - a model defined in Swagger"""  # noqa: E501
        self._duration_values = None
        self._listing_type = None
        self.discriminator = None
        if duration_values is not None:
            self.duration_values = duration_values
        if listing_type is not None:
            self.listing_type = listing_type

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

        This array defines the supported time duration options available for the listing type.  # noqa: E501

        :return: The duration_values of this ListingDuration.  # noqa: E501
        :rtype: list[str]
        """
        return self._duration_values

    @duration_values.setter
    def duration_values(self, duration_values):
        """Sets the duration_values of this ListingDuration.

        This array defines the supported time duration options available for the listing type.  # noqa: E501

        :param duration_values: The duration_values of this ListingDuration.  # noqa: E501
        :type: list[str]
        """

        self._duration_values = duration_values

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

        The enumerated value returned in this field indicates the listing type for the duration value(s). For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/metadata/types/sel:ListingTypeEnum'>eBay API documentation</a>  # noqa: E501

        :return: The listing_type of this ListingDuration.  # noqa: E501
        :rtype: str
        """
        return self._listing_type

    @listing_type.setter
    def listing_type(self, listing_type):
        """Sets the listing_type of this ListingDuration.

        The enumerated value returned in this field indicates the listing type for the duration value(s). For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/metadata/types/sel:ListingTypeEnum'>eBay API documentation</a>  # noqa: E501

        :param listing_type: The listing_type of this ListingDuration.  # noqa: E501
        :type: str
        """

        self._listing_type = listing_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(ListingDuration, 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, ListingDuration):
            return False

        return self.__dict__ == other.__dict__

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