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

import pprint
import re  # noqa: F401

import six

class ItemConditionDescriptorConstraint(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 = {
        'applicable_to_condition_descriptor_ids': 'list[str]',
        'cardinality': 'str',
        'default_condition_descriptor_value_id': 'str',
        'max_length': 'int',
        'mode': 'str',
        'usage': 'str'
    }

    attribute_map = {
        'applicable_to_condition_descriptor_ids': 'applicableToConditionDescriptorIds',
        'cardinality': 'cardinality',
        'default_condition_descriptor_value_id': 'defaultConditionDescriptorValueId',
        'max_length': 'maxLength',
        'mode': 'mode',
        'usage': 'usage'
    }

    def __init__(self, applicable_to_condition_descriptor_ids=None, cardinality=None, default_condition_descriptor_value_id=None, max_length=None, mode=None, usage=None):  # noqa: E501
        """ItemConditionDescriptorConstraint - a model defined in Swagger"""  # noqa: E501
        self._applicable_to_condition_descriptor_ids = None
        self._cardinality = None
        self._default_condition_descriptor_value_id = None
        self._max_length = None
        self._mode = None
        self._usage = None
        self.discriminator = None
        if applicable_to_condition_descriptor_ids is not None:
            self.applicable_to_condition_descriptor_ids = applicable_to_condition_descriptor_ids
        if cardinality is not None:
            self.cardinality = cardinality
        if default_condition_descriptor_value_id is not None:
            self.default_condition_descriptor_value_id = default_condition_descriptor_value_id
        if max_length is not None:
            self.max_length = max_length
        if mode is not None:
            self.mode = mode
        if usage is not None:
            self.usage = usage

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

        This array is returned if the corresponding condition descriptor requires that one or more other associated condition descriptors must also be specified in a listing. The condition descriptor IDs for the associated condition descriptors are returned here.<br><br>For example, the <code>Grade</code> and <code>Grader</code> condition descriptors must always be specified together in a listing for Graded cards.  # noqa: E501

        :return: The applicable_to_condition_descriptor_ids of this ItemConditionDescriptorConstraint.  # noqa: E501
        :rtype: list[str]
        """
        return self._applicable_to_condition_descriptor_ids

    @applicable_to_condition_descriptor_ids.setter
    def applicable_to_condition_descriptor_ids(self, applicable_to_condition_descriptor_ids):
        """Sets the applicable_to_condition_descriptor_ids of this ItemConditionDescriptorConstraint.

        This array is returned if the corresponding condition descriptor requires that one or more other associated condition descriptors must also be specified in a listing. The condition descriptor IDs for the associated condition descriptors are returned here.<br><br>For example, the <code>Grade</code> and <code>Grader</code> condition descriptors must always be specified together in a listing for Graded cards.  # noqa: E501

        :param applicable_to_condition_descriptor_ids: The applicable_to_condition_descriptor_ids of this ItemConditionDescriptorConstraint.  # noqa: E501
        :type: list[str]
        """

        self._applicable_to_condition_descriptor_ids = applicable_to_condition_descriptor_ids

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

        The value returned in this field indicates whether a condition descriptor can have a single value or multiple values. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/metadata/types/sel:CardinalityEnum'>eBay API documentation</a>  # noqa: E501

        :return: The cardinality of this ItemConditionDescriptorConstraint.  # noqa: E501
        :rtype: str
        """
        return self._cardinality

    @cardinality.setter
    def cardinality(self, cardinality):
        """Sets the cardinality of this ItemConditionDescriptorConstraint.

        The value returned in this field indicates whether a condition descriptor can have a single value or multiple values. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/metadata/types/sel:CardinalityEnum'>eBay API documentation</a>  # noqa: E501

        :param cardinality: The cardinality of this ItemConditionDescriptorConstraint.  # noqa: E501
        :type: str
        """

        self._cardinality = cardinality

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

        The default condition descriptor value that will be set if there are multiple values.  # noqa: E501

        :return: The default_condition_descriptor_value_id of this ItemConditionDescriptorConstraint.  # noqa: E501
        :rtype: str
        """
        return self._default_condition_descriptor_value_id

    @default_condition_descriptor_value_id.setter
    def default_condition_descriptor_value_id(self, default_condition_descriptor_value_id):
        """Sets the default_condition_descriptor_value_id of this ItemConditionDescriptorConstraint.

        The default condition descriptor value that will be set if there are multiple values.  # noqa: E501

        :param default_condition_descriptor_value_id: The default_condition_descriptor_value_id of this ItemConditionDescriptorConstraint.  # noqa: E501
        :type: str
        """

        self._default_condition_descriptor_value_id = default_condition_descriptor_value_id

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

        The maximum characters allowed for a condition descriptor. This field is only returned/applicable for condition descriptors that allow free text for condition descriptor values.   # noqa: E501

        :return: The max_length of this ItemConditionDescriptorConstraint.  # noqa: E501
        :rtype: int
        """
        return self._max_length

    @max_length.setter
    def max_length(self, max_length):
        """Sets the max_length of this ItemConditionDescriptorConstraint.

        The maximum characters allowed for a condition descriptor. This field is only returned/applicable for condition descriptors that allow free text for condition descriptor values.   # noqa: E501

        :param max_length: The max_length of this ItemConditionDescriptorConstraint.  # noqa: E501
        :type: int
        """

        self._max_length = max_length

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

        The value returned in this field indicates whether the supported values for a condition descriptor are predefined or if the seller manually specified the value.<br><br><span class=\"tablenote\"><b>Note:</b> <code>FREE_TEXT</code> is currently only applicable to the Certification Number condition descriptor.</span> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/metadata/types/sel:ModeEnum'>eBay API documentation</a>  # noqa: E501

        :return: The mode of this ItemConditionDescriptorConstraint.  # noqa: E501
        :rtype: str
        """
        return self._mode

    @mode.setter
    def mode(self, mode):
        """Sets the mode of this ItemConditionDescriptorConstraint.

        The value returned in this field indicates whether the supported values for a condition descriptor are predefined or if the seller manually specified the value.<br><br><span class=\"tablenote\"><b>Note:</b> <code>FREE_TEXT</code> is currently only applicable to the Certification Number condition descriptor.</span> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/metadata/types/sel:ModeEnum'>eBay API documentation</a>  # noqa: E501

        :param mode: The mode of this ItemConditionDescriptorConstraint.  # noqa: E501
        :type: str
        """

        self._mode = mode

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

        This value indicates whether or not the condition descriptor is required for the item condition. Currently, this field is only returned if the condition descriptor is required for the item condition. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/metadata/types/sel:DescriptorUsageEnum'>eBay API documentation</a>  # noqa: E501

        :return: The usage of this ItemConditionDescriptorConstraint.  # noqa: E501
        :rtype: str
        """
        return self._usage

    @usage.setter
    def usage(self, usage):
        """Sets the usage of this ItemConditionDescriptorConstraint.

        This value indicates whether or not the condition descriptor is required for the item condition. Currently, this field is only returned if the condition descriptor is required for the item condition. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/metadata/types/sel:DescriptorUsageEnum'>eBay API documentation</a>  # noqa: E501

        :param usage: The usage of this ItemConditionDescriptorConstraint.  # noqa: E501
        :type: str
        """

        self._usage = usage

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

        return self.__dict__ == other.__dict__

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