# 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.10.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class ListingTypePolicy(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 = {
        'category_id': 'str',
        'category_tree_id': 'str',
        'digital_good_delivery_enabled': 'bool',
        'listing_durations': 'list[ListingDuration]',
        'pickup_drop_off_enabled': 'bool'
    }

    attribute_map = {
        'category_id': 'categoryId',
        'category_tree_id': 'categoryTreeId',
        'digital_good_delivery_enabled': 'digitalGoodDeliveryEnabled',
        'listing_durations': 'listingDurations',
        'pickup_drop_off_enabled': 'pickupDropOffEnabled'
    }

    def __init__(self, category_id=None, category_tree_id=None, digital_good_delivery_enabled=None, listing_durations=None, pickup_drop_off_enabled=None):  # noqa: E501
        """ListingTypePolicy - a model defined in Swagger"""  # noqa: E501
        self._category_id = None
        self._category_tree_id = None
        self._digital_good_delivery_enabled = None
        self._listing_durations = None
        self._pickup_drop_off_enabled = None
        self.discriminator = None
        if category_id is not None:
            self.category_id = category_id
        if category_tree_id is not None:
            self.category_tree_id = category_tree_id
        if digital_good_delivery_enabled is not None:
            self.digital_good_delivery_enabled = digital_good_delivery_enabled
        if listing_durations is not None:
            self.listing_durations = listing_durations
        if pickup_drop_off_enabled is not None:
            self.pickup_drop_off_enabled = pickup_drop_off_enabled

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

        The unique identifier of the eBay leaf category for which metadata is being returned.  # noqa: E501

        :return: The category_id of this ListingTypePolicy.  # noqa: E501
        :rtype: str
        """
        return self._category_id

    @category_id.setter
    def category_id(self, category_id):
        """Sets the category_id of this ListingTypePolicy.

        The unique identifier of the eBay leaf category for which metadata is being returned.  # noqa: E501

        :param category_id: The category_id of this ListingTypePolicy.  # noqa: E501
        :type: str
        """

        self._category_id = category_id

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

        The unique identifier of the category tree.  # noqa: E501

        :return: The category_tree_id of this ListingTypePolicy.  # noqa: E501
        :rtype: str
        """
        return self._category_tree_id

    @category_tree_id.setter
    def category_tree_id(self, category_tree_id):
        """Sets the category_tree_id of this ListingTypePolicy.

        The unique identifier of the category tree.  # noqa: E501

        :param category_tree_id: The category_tree_id of this ListingTypePolicy.  # noqa: E501
        :type: str
        """

        self._category_tree_id = category_tree_id

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

        A <code>true</code> value in this field indicates that the leaf category supports the listing of items (such as gift cards) that can be delivered electronically via a download link or sent to a buyer's email address.  # noqa: E501

        :return: The digital_good_delivery_enabled of this ListingTypePolicy.  # noqa: E501
        :rtype: bool
        """
        return self._digital_good_delivery_enabled

    @digital_good_delivery_enabled.setter
    def digital_good_delivery_enabled(self, digital_good_delivery_enabled):
        """Sets the digital_good_delivery_enabled of this ListingTypePolicy.

        A <code>true</code> value in this field indicates that the leaf category supports the listing of items (such as gift cards) that can be delivered electronically via a download link or sent to a buyer's email address.  # noqa: E501

        :param digital_good_delivery_enabled: The digital_good_delivery_enabled of this ListingTypePolicy.  # noqa: E501
        :type: bool
        """

        self._digital_good_delivery_enabled = digital_good_delivery_enabled

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

        An array of eBay listing types and the supported durations for the corresponding leaf category. If a specific eBay listing type does not appear for a leaf category, it indicates that the category does not support that listing type.  # noqa: E501

        :return: The listing_durations of this ListingTypePolicy.  # noqa: E501
        :rtype: list[ListingDuration]
        """
        return self._listing_durations

    @listing_durations.setter
    def listing_durations(self, listing_durations):
        """Sets the listing_durations of this ListingTypePolicy.

        An array of eBay listing types and the supported durations for the corresponding leaf category. If a specific eBay listing type does not appear for a leaf category, it indicates that the category does not support that listing type.  # noqa: E501

        :param listing_durations: The listing_durations of this ListingTypePolicy.  # noqa: E501
        :type: list[ListingDuration]
        """

        self._listing_durations = listing_durations

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

        A true value in this field indicates that items listed in the category (specified in the <b>listingTypePolicies.categoryId</b> field) may be enabled with the 'Click and Collect' feature. With the 'Click and Collect' feature, a buyer can purchase certain items on an eBay site and collect them at a local store. Buyers are notified by eBay once their items are available. A false value in this field indicates that items listed in the category are not eligible for the 'Click and Collect' feature.  # noqa: E501

        :return: The pickup_drop_off_enabled of this ListingTypePolicy.  # noqa: E501
        :rtype: bool
        """
        return self._pickup_drop_off_enabled

    @pickup_drop_off_enabled.setter
    def pickup_drop_off_enabled(self, pickup_drop_off_enabled):
        """Sets the pickup_drop_off_enabled of this ListingTypePolicy.

        A true value in this field indicates that items listed in the category (specified in the <b>listingTypePolicies.categoryId</b> field) may be enabled with the 'Click and Collect' feature. With the 'Click and Collect' feature, a buyer can purchase certain items on an eBay site and collect them at a local store. Buyers are notified by eBay once their items are available. A false value in this field indicates that items listed in the category are not eligible for the 'Click and Collect' feature.  # noqa: E501

        :param pickup_drop_off_enabled: The pickup_drop_off_enabled of this ListingTypePolicy.  # noqa: E501
        :type: bool
        """

        self._pickup_drop_off_enabled = pickup_drop_off_enabled

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

        return self.__dict__ == other.__dict__

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