# coding: utf-8

"""
    Account API

    The <b>Account API</b> gives sellers the ability to configure their eBay seller accounts, including the seller's policies (seller-defined custom policies and eBay business policies), opt in and out of eBay seller programs, configure sales tax tables, and get account information.  <br><br>For details on the availability of the methods in this API, see <a href=\"/api-docs/sell/account/overview.html#requirements\">Account API requirements and restrictions</a>.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class CategoryType(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 = {
        'default': 'bool',
        'name': 'str'
    }

    attribute_map = {
        'default': 'default',
        'name': 'name'
    }

    def __init__(self, default=None, name=None):  # noqa: E501
        """CategoryType - a model defined in Swagger"""  # noqa: E501
        self._default = None
        self._name = None
        self.discriminator = None
        if default is not None:
            self.default = default
        if name is not None:
            self.name = name

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

        Specifies the default policy for a <b>marketplaceId</b> and <b>categoryTypes.name</b> pair. Sellers can create multiple policies for any <b>marketplaceId</b> and <b>categoryTypes.name</b> combination. For example, you can create multiple fulfillment policies for one marketplace, where they all target the same category type <b>name</b>. However, only one policy can be the default for any <b>marketplaceId</b> and <b>name</b> combination, and eBay designates the first policy created for a combination as the default.  <br><br>If set to <code>true</code>, this policy is the default policy for the associated <b>categoryTypes.name</b> and <b>marketplaceId</b> pair.<br><br><span class=\"tablenote\"><b>Note</b>: eBay considers the status of this field only when you create listings through the Web flow. If you create listings using the APIs, you must specifically set the policies you want applied to a listing in the payload of the call you use to create the listing. If you use the Web flow to create item listings, eBay uses the default policy for the marketplace and category type specified, unless you override the default.</span> <br><br>For more on default policies, see <a href=\"/api-docs/sell/static/seller-accounts/business-policies.html#default_policy\">Changing the default policy for a category type</a>.  # noqa: E501

        :return: The default of this CategoryType.  # noqa: E501
        :rtype: bool
        """
        return self._default

    @default.setter
    def default(self, default):
        """Sets the default of this CategoryType.

        Specifies the default policy for a <b>marketplaceId</b> and <b>categoryTypes.name</b> pair. Sellers can create multiple policies for any <b>marketplaceId</b> and <b>categoryTypes.name</b> combination. For example, you can create multiple fulfillment policies for one marketplace, where they all target the same category type <b>name</b>. However, only one policy can be the default for any <b>marketplaceId</b> and <b>name</b> combination, and eBay designates the first policy created for a combination as the default.  <br><br>If set to <code>true</code>, this policy is the default policy for the associated <b>categoryTypes.name</b> and <b>marketplaceId</b> pair.<br><br><span class=\"tablenote\"><b>Note</b>: eBay considers the status of this field only when you create listings through the Web flow. If you create listings using the APIs, you must specifically set the policies you want applied to a listing in the payload of the call you use to create the listing. If you use the Web flow to create item listings, eBay uses the default policy for the marketplace and category type specified, unless you override the default.</span> <br><br>For more on default policies, see <a href=\"/api-docs/sell/static/seller-accounts/business-policies.html#default_policy\">Changing the default policy for a category type</a>.  # noqa: E501

        :param default: The default of this CategoryType.  # noqa: E501
        :type: bool
        """

        self._default = default

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

        The category type to which the policy applies (motor vehicles or non-motor vehicles). <br /><br /><b>Restrictions</b>: <ul><li>The <code>MOTORS_VEHICLES</code> category type is not valid for return policies. eBay flows do not support the return of motor vehicles.</li><li>Only the <code>ALL_EXCLUDING_MOTORS_VEHICLES</code> category type is supported for sellers who opt-in to the <a href=\"/managed-payments\" title=\"eBay Developers Program page\" target=\"_blank\">managed payments</a> program. Managed payments does not currently support the sale of motor vehicles.</li></ul> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:CategoryTypeEnum'>eBay API documentation</a>  # noqa: E501

        :return: The name of this CategoryType.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this CategoryType.

        The category type to which the policy applies (motor vehicles or non-motor vehicles). <br /><br /><b>Restrictions</b>: <ul><li>The <code>MOTORS_VEHICLES</code> category type is not valid for return policies. eBay flows do not support the return of motor vehicles.</li><li>Only the <code>ALL_EXCLUDING_MOTORS_VEHICLES</code> category type is supported for sellers who opt-in to the <a href=\"/managed-payments\" title=\"eBay Developers Program page\" target=\"_blank\">managed payments</a> program. Managed payments does not currently support the sale of motor vehicles.</li></ul> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:CategoryTypeEnum'>eBay API documentation</a>  # noqa: E501

        :param name: The name of this CategoryType.  # noqa: E501
        :type: str
        """

        self._name = name

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

        return self.__dict__ == other.__dict__

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