# 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 ShippingPolicy(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',
        'global_shipping_enabled': 'bool',
        'group1_max_flat_shipping_cost': 'Amount',
        'group2_max_flat_shipping_cost': 'Amount',
        'group3_max_flat_shipping_cost': 'Amount',
        'handling_time_enabled': 'bool',
        'max_flat_shipping_cost': 'Amount',
        'shipping_terms_required': 'bool'
    }

    attribute_map = {
        'category_id': 'categoryId',
        'category_tree_id': 'categoryTreeId',
        'global_shipping_enabled': 'globalShippingEnabled',
        'group1_max_flat_shipping_cost': 'group1MaxFlatShippingCost',
        'group2_max_flat_shipping_cost': 'group2MaxFlatShippingCost',
        'group3_max_flat_shipping_cost': 'group3MaxFlatShippingCost',
        'handling_time_enabled': 'handlingTimeEnabled',
        'max_flat_shipping_cost': 'maxFlatShippingCost',
        'shipping_terms_required': 'shippingTermsRequired'
    }

    def __init__(self, category_id=None, category_tree_id=None, global_shipping_enabled=None, group1_max_flat_shipping_cost=None, group2_max_flat_shipping_cost=None, group3_max_flat_shipping_cost=None, handling_time_enabled=None, max_flat_shipping_cost=None, shipping_terms_required=None):  # noqa: E501
        """ShippingPolicy - a model defined in Swagger"""  # noqa: E501
        self._category_id = None
        self._category_tree_id = None
        self._global_shipping_enabled = None
        self._group1_max_flat_shipping_cost = None
        self._group2_max_flat_shipping_cost = None
        self._group3_max_flat_shipping_cost = None
        self._handling_time_enabled = None
        self._max_flat_shipping_cost = None
        self._shipping_terms_required = 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 global_shipping_enabled is not None:
            self.global_shipping_enabled = global_shipping_enabled
        if group1_max_flat_shipping_cost is not None:
            self.group1_max_flat_shipping_cost = group1_max_flat_shipping_cost
        if group2_max_flat_shipping_cost is not None:
            self.group2_max_flat_shipping_cost = group2_max_flat_shipping_cost
        if group3_max_flat_shipping_cost is not None:
            self.group3_max_flat_shipping_cost = group3_max_flat_shipping_cost
        if handling_time_enabled is not None:
            self.handling_time_enabled = handling_time_enabled
        if max_flat_shipping_cost is not None:
            self.max_flat_shipping_cost = max_flat_shipping_cost
        if shipping_terms_required is not None:
            self.shipping_terms_required = shipping_terms_required

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

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

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

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

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

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

        self._category_id = category_id

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

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

        :return: The category_tree_id of this ShippingPolicy.  # 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 ShippingPolicy.

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

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

        self._category_tree_id = category_tree_id

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

        Indicates if the Global Shipping Program (GSP) is supported for the category. <p><span class=\"tablenote\"><span style=\"color:#004680\"><strong>Note: </strong>GSP is only supported by the eBay UK marketplace (<code>EBAY_GB</code>).</span></p>  # noqa: E501

        :return: The global_shipping_enabled of this ShippingPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._global_shipping_enabled

    @global_shipping_enabled.setter
    def global_shipping_enabled(self, global_shipping_enabled):
        """Sets the global_shipping_enabled of this ShippingPolicy.

        Indicates if the Global Shipping Program (GSP) is supported for the category. <p><span class=\"tablenote\"><span style=\"color:#004680\"><strong>Note: </strong>GSP is only supported by the eBay UK marketplace (<code>EBAY_GB</code>).</span></p>  # noqa: E501

        :param global_shipping_enabled: The global_shipping_enabled of this ShippingPolicy.  # noqa: E501
        :type: bool
        """

        self._global_shipping_enabled = global_shipping_enabled

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


        :return: The group1_max_flat_shipping_cost of this ShippingPolicy.  # noqa: E501
        :rtype: Amount
        """
        return self._group1_max_flat_shipping_cost

    @group1_max_flat_shipping_cost.setter
    def group1_max_flat_shipping_cost(self, group1_max_flat_shipping_cost):
        """Sets the group1_max_flat_shipping_cost of this ShippingPolicy.


        :param group1_max_flat_shipping_cost: The group1_max_flat_shipping_cost of this ShippingPolicy.  # noqa: E501
        :type: Amount
        """

        self._group1_max_flat_shipping_cost = group1_max_flat_shipping_cost

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


        :return: The group2_max_flat_shipping_cost of this ShippingPolicy.  # noqa: E501
        :rtype: Amount
        """
        return self._group2_max_flat_shipping_cost

    @group2_max_flat_shipping_cost.setter
    def group2_max_flat_shipping_cost(self, group2_max_flat_shipping_cost):
        """Sets the group2_max_flat_shipping_cost of this ShippingPolicy.


        :param group2_max_flat_shipping_cost: The group2_max_flat_shipping_cost of this ShippingPolicy.  # noqa: E501
        :type: Amount
        """

        self._group2_max_flat_shipping_cost = group2_max_flat_shipping_cost

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


        :return: The group3_max_flat_shipping_cost of this ShippingPolicy.  # noqa: E501
        :rtype: Amount
        """
        return self._group3_max_flat_shipping_cost

    @group3_max_flat_shipping_cost.setter
    def group3_max_flat_shipping_cost(self, group3_max_flat_shipping_cost):
        """Sets the group3_max_flat_shipping_cost of this ShippingPolicy.


        :param group3_max_flat_shipping_cost: The group3_max_flat_shipping_cost of this ShippingPolicy.  # noqa: E501
        :type: Amount
        """

        self._group3_max_flat_shipping_cost = group3_max_flat_shipping_cost

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

        Indicates if a seller's stated handling time is enabled for a category. A handling time is generally needed for items that are shipped to the buyer, but not necessarily applicable to freight shipping or local pickup.  # noqa: E501

        :return: The handling_time_enabled of this ShippingPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._handling_time_enabled

    @handling_time_enabled.setter
    def handling_time_enabled(self, handling_time_enabled):
        """Sets the handling_time_enabled of this ShippingPolicy.

        Indicates if a seller's stated handling time is enabled for a category. A handling time is generally needed for items that are shipped to the buyer, but not necessarily applicable to freight shipping or local pickup.  # noqa: E501

        :param handling_time_enabled: The handling_time_enabled of this ShippingPolicy.  # noqa: E501
        :type: bool
        """

        self._handling_time_enabled = handling_time_enabled

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


        :return: The max_flat_shipping_cost of this ShippingPolicy.  # noqa: E501
        :rtype: Amount
        """
        return self._max_flat_shipping_cost

    @max_flat_shipping_cost.setter
    def max_flat_shipping_cost(self, max_flat_shipping_cost):
        """Sets the max_flat_shipping_cost of this ShippingPolicy.


        :param max_flat_shipping_cost: The max_flat_shipping_cost of this ShippingPolicy.  # noqa: E501
        :type: Amount
        """

        self._max_flat_shipping_cost = max_flat_shipping_cost

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

        Indicates whether the category requires sellers to specify shipping details at listing time.  # noqa: E501

        :return: The shipping_terms_required of this ShippingPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._shipping_terms_required

    @shipping_terms_required.setter
    def shipping_terms_required(self, shipping_terms_required):
        """Sets the shipping_terms_required of this ShippingPolicy.

        Indicates whether the category requires sellers to specify shipping details at listing time.  # noqa: E501

        :param shipping_terms_required: The shipping_terms_required of this ShippingPolicy.  # noqa: E501
        :type: bool
        """

        self._shipping_terms_required = shipping_terms_required

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

        return self.__dict__ == other.__dict__

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