text: # coding: utf-8
  
  """
      UltraCart Rest API V2
  
      UltraCart REST API Version 2
  
      OpenAPI spec version: 2.0.0
      Contact: support@ultracart.com
      Generated by: https://github.com/swagger-api/swagger-codegen.git
  """
  
  
  from pprint import pformat
  from six import iteritems
  import re
  
  
  class CouponPercentOffItems(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 = {
          'discount_percent': 'float',
          'excluded_items': 'list[str]',
          'items': 'list[str]',
          'limit': 'int'
      }
  
      attribute_map = {
          'discount_percent': 'discount_percent',
          'excluded_items': 'excluded_items',
          'items': 'items',
          'limit': 'limit'
      }
  
      def __init__(self, discount_percent=None, excluded_items=None, items=None, limit=None):
          """
          CouponPercentOffItems - a model defined in Swagger
          """
  
          self._discount_percent = None
          self._excluded_items = None
          self._items = None
          self._limit = None
          self.discriminator = None
  
          if discount_percent is not None:
            self.discount_percent = discount_percent
          if excluded_items is not None:
            self.excluded_items = excluded_items
          if items is not None:
            self.items = items
          if limit is not None:
            self.limit = limit
  
      @property
      def discount_percent(self):
          """
          Gets the discount_percent of this CouponPercentOffItems.
          The percentage of subtotal discount
  
          :return: The discount_percent of this CouponPercentOffItems.
          :rtype: float
          """
          return self._discount_percent
  
      @discount_percent.setter
      def discount_percent(self, discount_percent):
          """
          Sets the discount_percent of this CouponPercentOffItems.
          The percentage of subtotal discount
  
          :param discount_percent: The discount_percent of this CouponPercentOffItems.
          :type: float
          """
  
          self._discount_percent = discount_percent
  
      @property
      def excluded_items(self):
          """
          Gets the excluded_items of this CouponPercentOffItems.
          A list of items which cannot be discounted.
  
          :return: The excluded_items of this CouponPercentOffItems.
          :rtype: list[str]
          """
          return self._excluded_items
  
      @excluded_items.setter
      def excluded_items(self, excluded_items):
          """
          Sets the excluded_items of this CouponPercentOffItems.
          A list of items which cannot be discounted.
  
          :param excluded_items: The excluded_items of this CouponPercentOffItems.
          :type: list[str]
          """
  
          self._excluded_items = excluded_items
  
      @property
      def items(self):
          """
          Gets the items of this CouponPercentOffItems.
          An optional list of items which will receive a discount.  If blank, discount applies to all items except excluded items.
  
          :return: The items of this CouponPercentOffItems.
          :rtype: list[str]
          """
          return self._items
  
      @items.setter
      def items(self, items):
          """
          Sets the items of this CouponPercentOffItems.
          An optional list of items which will receive a discount.  If blank, discount applies to all items except excluded items.
  
          :param items: The items of this CouponPercentOffItems.
          :type: list[str]
          """
  
          self._items = items
  
      @property
      def limit(self):
          """
          Gets the limit of this CouponPercentOffItems.
          The (optional) maximum quantity of discounted items.
  
          :return: The limit of this CouponPercentOffItems.
          :rtype: int
          """
          return self._limit
  
      @limit.setter
      def limit(self, limit):
          """
          Sets the limit of this CouponPercentOffItems.
          The (optional) maximum quantity of discounted items.
  
          :param limit: The limit of this CouponPercentOffItems.
          :type: int
          """
  
          self._limit = limit
  
      def to_dict(self):
          """
          Returns the model properties as a dict
          """
          result = {}
  
          for attr, _ in 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
  
          return result
  
      def to_str(self):
          """
          Returns the string representation of the model
          """
          return 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, CouponPercentOffItems):
              return False
  
          return self.__dict__ == other.__dict__
  
      def __ne__(self, other):
          """
          Returns true if both objects are not equal
          """
          return not self == other
  