text: # coding: utf-8
  
  """
      NetBox API
  
      API to access NetBox  # noqa: E501
  
      OpenAPI spec version: 2.8
      
      Generated by: https://github.com/swagger-api/swagger-codegen.git
  """
  
  
  import pprint
  import re  # noqa: F401
  
  import six
  
  
  class InventoryItem(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 = {
          'id': 'int',
          'device': 'NestedDevice',
          'parent': 'int',
          'name': 'str',
          'manufacturer': 'NestedManufacturer',
          'part_id': 'str',
          'serial': 'str',
          'asset_tag': 'str',
          'discovered': 'bool',
          'description': 'str',
          'tags': 'list[str]'
      }
  
      attribute_map = {
          'id': 'id',
          'device': 'device',
          'parent': 'parent',
          'name': 'name',
          'manufacturer': 'manufacturer',
          'part_id': 'part_id',
          'serial': 'serial',
          'asset_tag': 'asset_tag',
          'discovered': 'discovered',
          'description': 'description',
          'tags': 'tags'
      }
  
      def __init__(self, id=None, device=None, parent=None, name=None, manufacturer=None, part_id=None, serial=None, asset_tag=None, discovered=None, description=None, tags=None):  # noqa: E501
          """InventoryItem - a model defined in Swagger"""  # noqa: E501
  
          self._id = None
          self._device = None
          self._parent = None
          self._name = None
          self._manufacturer = None
          self._part_id = None
          self._serial = None
          self._asset_tag = None
          self._discovered = None
          self._description = None
          self._tags = None
          self.discriminator = None
  
          if id is not None:
              self.id = id
          self.device = device
          if parent is not None:
              self.parent = parent
          self.name = name
          if manufacturer is not None:
              self.manufacturer = manufacturer
          if part_id is not None:
              self.part_id = part_id
          if serial is not None:
              self.serial = serial
          if asset_tag is not None:
              self.asset_tag = asset_tag
          if discovered is not None:
              self.discovered = discovered
          if description is not None:
              self.description = description
          if tags is not None:
              self.tags = tags
  
      @property
      def id(self):
          """Gets the id of this InventoryItem.  # noqa: E501
  
  
          :return: The id of this InventoryItem.  # noqa: E501
          :rtype: int
          """
          return self._id
  
      @id.setter
      def id(self, id):
          """Sets the id of this InventoryItem.
  
  
          :param id: The id of this InventoryItem.  # noqa: E501
          :type: int
          """
  
          self._id = id
  
      @property
      def device(self):
          """Gets the device of this InventoryItem.  # noqa: E501
  
  
          :return: The device of this InventoryItem.  # noqa: E501
          :rtype: NestedDevice
          """
          return self._device
  
      @device.setter
      def device(self, device):
          """Sets the device of this InventoryItem.
  
  
          :param device: The device of this InventoryItem.  # noqa: E501
          :type: NestedDevice
          """
          if device is None:
              raise ValueError("Invalid value for `device`, must not be `None`")  # noqa: E501
  
          self._device = device
  
      @property
      def parent(self):
          """Gets the parent of this InventoryItem.  # noqa: E501
  
  
          :return: The parent of this InventoryItem.  # noqa: E501
          :rtype: int
          """
          return self._parent
  
      @parent.setter
      def parent(self, parent):
          """Sets the parent of this InventoryItem.
  
  
          :param parent: The parent of this InventoryItem.  # noqa: E501
          :type: int
          """
  
          self._parent = parent
  
      @property
      def name(self):
          """Gets the name of this InventoryItem.  # noqa: E501
  
  
          :return: The name of this InventoryItem.  # noqa: E501
          :rtype: str
          """
          return self._name
  
      @name.setter
      def name(self, name):
          """Sets the name of this InventoryItem.
  
  
          :param name: The name of this InventoryItem.  # noqa: E501
          :type: str
          """
          if name is None:
              raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501
          if name is not None and len(name) > 50:
              raise ValueError("Invalid value for `name`, length must be less than or equal to `50`")  # noqa: E501
          if name is not None and len(name) < 1:
              raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")  # noqa: E501
  
          self._name = name
  
      @property
      def manufacturer(self):
          """Gets the manufacturer of this InventoryItem.  # noqa: E501
  
  
          :return: The manufacturer of this InventoryItem.  # noqa: E501
          :rtype: NestedManufacturer
          """
          return self._manufacturer
  
      @manufacturer.setter
      def manufacturer(self, manufacturer):
          """Sets the manufacturer of this InventoryItem.
  
  
          :param manufacturer: The manufacturer of this InventoryItem.  # noqa: E501
          :type: NestedManufacturer
          """
  
          self._manufacturer = manufacturer
  
      @property
      def part_id(self):
          """Gets the part_id of this InventoryItem.  # noqa: E501
  
          Manufacturer-assigned part identifier  # noqa: E501
  
          :return: The part_id of this InventoryItem.  # noqa: E501
          :rtype: str
          """
          return self._part_id
  
      @part_id.setter
      def part_id(self, part_id):
          """Sets the part_id of this InventoryItem.
  
          Manufacturer-assigned part identifier  # noqa: E501
  
          :param part_id: The part_id of this InventoryItem.  # noqa: E501
          :type: str
          """
          if part_id is not None and len(part_id) > 50:
              raise ValueError("Invalid value for `part_id`, length must be less than or equal to `50`")  # noqa: E501
  
          self._part_id = part_id
  
      @property
      def serial(self):
          """Gets the serial of this InventoryItem.  # noqa: E501
  
  
          :return: The serial of this InventoryItem.  # noqa: E501
          :rtype: str
          """
          return self._serial
  
      @serial.setter
      def serial(self, serial):
          """Sets the serial of this InventoryItem.
  
  
          :param serial: The serial of this InventoryItem.  # noqa: E501
          :type: str
          """
          if serial is not None and len(serial) > 50:
              raise ValueError("Invalid value for `serial`, length must be less than or equal to `50`")  # noqa: E501
  
          self._serial = serial
  
      @property
      def asset_tag(self):
          """Gets the asset_tag of this InventoryItem.  # noqa: E501
  
          A unique tag used to identify this item  # noqa: E501
  
          :return: The asset_tag of this InventoryItem.  # noqa: E501
          :rtype: str
          """
          return self._asset_tag
  
      @asset_tag.setter
      def asset_tag(self, asset_tag):
          """Sets the asset_tag of this InventoryItem.
  
          A unique tag used to identify this item  # noqa: E501
  
          :param asset_tag: The asset_tag of this InventoryItem.  # noqa: E501
          :type: str
          """
          if asset_tag is not None and len(asset_tag) > 50:
              raise ValueError("Invalid value for `asset_tag`, length must be less than or equal to `50`")  # noqa: E501
  
          self._asset_tag = asset_tag
  
      @property
      def discovered(self):
          """Gets the discovered of this InventoryItem.  # noqa: E501
  
          This item was automatically discovered  # noqa: E501
  
          :return: The discovered of this InventoryItem.  # noqa: E501
          :rtype: bool
          """
          return self._discovered
  
      @discovered.setter
      def discovered(self, discovered):
          """Sets the discovered of this InventoryItem.
  
          This item was automatically discovered  # noqa: E501
  
          :param discovered: The discovered of this InventoryItem.  # noqa: E501
          :type: bool
          """
  
          self._discovered = discovered
  
      @property
      def description(self):
          """Gets the description of this InventoryItem.  # noqa: E501
  
  
          :return: The description of this InventoryItem.  # noqa: E501
          :rtype: str
          """
          return self._description
  
      @description.setter
      def description(self, description):
          """Sets the description of this InventoryItem.
  
  
          :param description: The description of this InventoryItem.  # noqa: E501
          :type: str
          """
          if description is not None and len(description) > 200:
              raise ValueError("Invalid value for `description`, length must be less than or equal to `200`")  # noqa: E501
  
          self._description = description
  
      @property
      def tags(self):
          """Gets the tags of this InventoryItem.  # noqa: E501
  
  
          :return: The tags of this InventoryItem.  # noqa: E501
          :rtype: list[str]
          """
          return self._tags
  
      @tags.setter
      def tags(self, tags):
          """Sets the tags of this InventoryItem.
  
  
          :param tags: The tags of this InventoryItem.  # noqa: E501
          :type: list[str]
          """
  
          self._tags = tags
  
      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(InventoryItem, 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, InventoryItem):
              return False
  
          return self.__dict__ == other.__dict__
  
      def __ne__(self, other):
          """Returns true if both objects are not equal"""
          return not self == other
  