text: # coding: utf-8
  
  """
      UltraCart Rest API V2
  
      UltraCart REST API Version 2  # noqa: E501
  
      OpenAPI spec version: 2.0.0
      Contact: support@ultracart.com
      Generated by: https://github.com/swagger-api/swagger-codegen.git
  """
  
  
  import pprint
  import re  # noqa: F401
  
  import six
  
  
  class LibraryItemPurchasedMeta(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 = {
          'most_recent_version': 'int',
          'my_purchased_version': 'int',
          'upgrade_available': 'bool'
      }
  
      attribute_map = {
          'most_recent_version': 'most_recent_version',
          'my_purchased_version': 'my_purchased_version',
          'upgrade_available': 'upgrade_available'
      }
  
      def __init__(self, most_recent_version=None, my_purchased_version=None, upgrade_available=None):  # noqa: E501
          """LibraryItemPurchasedMeta - a model defined in Swagger"""  # noqa: E501
  
          self._most_recent_version = None
          self._my_purchased_version = None
          self._upgrade_available = None
          self.discriminator = None
  
          if most_recent_version is not None:
              self.most_recent_version = most_recent_version
          if my_purchased_version is not None:
              self.my_purchased_version = my_purchased_version
          if upgrade_available is not None:
              self.upgrade_available = upgrade_available
  
      @property
      def most_recent_version(self):
          """Gets the most_recent_version of this LibraryItemPurchasedMeta.  # noqa: E501
  
          The most recent version of the item purchased  # noqa: E501
  
          :return: The most_recent_version of this LibraryItemPurchasedMeta.  # noqa: E501
          :rtype: int
          """
          return self._most_recent_version
  
      @most_recent_version.setter
      def most_recent_version(self, most_recent_version):
          """Sets the most_recent_version of this LibraryItemPurchasedMeta.
  
          The most recent version of the item purchased  # noqa: E501
  
          :param most_recent_version: The most_recent_version of this LibraryItemPurchasedMeta.  # noqa: E501
          :type: int
          """
  
          self._most_recent_version = most_recent_version
  
      @property
      def my_purchased_version(self):
          """Gets the my_purchased_version of this LibraryItemPurchasedMeta.  # noqa: E501
  
          If this is a public item and the merchant has already purchased it, this is their version.  If not yet purchased, this will be zero.  This value will only be populated during a searchPublicItems() call.  # noqa: E501
  
          :return: The my_purchased_version of this LibraryItemPurchasedMeta.  # noqa: E501
          :rtype: int
          """
          return self._my_purchased_version
  
      @my_purchased_version.setter
      def my_purchased_version(self, my_purchased_version):
          """Sets the my_purchased_version of this LibraryItemPurchasedMeta.
  
          If this is a public item and the merchant has already purchased it, this is their version.  If not yet purchased, this will be zero.  This value will only be populated during a searchPublicItems() call.  # noqa: E501
  
          :param my_purchased_version: The my_purchased_version of this LibraryItemPurchasedMeta.  # noqa: E501
          :type: int
          """
  
          self._my_purchased_version = my_purchased_version
  
      @property
      def upgrade_available(self):
          """Gets the upgrade_available of this LibraryItemPurchasedMeta.  # noqa: E501
  
          True if the most recent version of this purchase it greater than what was purchased  # noqa: E501
  
          :return: The upgrade_available of this LibraryItemPurchasedMeta.  # noqa: E501
          :rtype: bool
          """
          return self._upgrade_available
  
      @upgrade_available.setter
      def upgrade_available(self, upgrade_available):
          """Sets the upgrade_available of this LibraryItemPurchasedMeta.
  
          True if the most recent version of this purchase it greater than what was purchased  # noqa: E501
  
          :param upgrade_available: The upgrade_available of this LibraryItemPurchasedMeta.  # noqa: E501
          :type: bool
          """
  
          self._upgrade_available = upgrade_available
  
      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(LibraryItemPurchasedMeta, 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, LibraryItemPurchasedMeta):
              return False
  
          return self.__dict__ == other.__dict__
  
      def __ne__(self, other):
          """Returns true if both objects are not equal"""
          return not self == other
  