# coding: utf-8

"""
    bl-db-index

    This is a API document for Index DB

    OpenAPI spec version: 0.0.1
    Contact: master@bluehack.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class Index(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 = {
        'index_id': 'int',
        'object_id': 'str',
        'product_id': 'str',
        'feature_vector': 'list[float]'
    }

    attribute_map = {
        'index_id': 'index_id',
        'object_id': 'object_id',
        'product_id': 'product_id',
        'feature_vector': 'feature_vector'
    }

    def __init__(self, index_id=None, object_id=None, product_id=None, feature_vector=None):
        """
        Index - a model defined in Swagger
        """

        self._index_id = None
        self._object_id = None
        self._product_id = None
        self._feature_vector = None

        if index_id is not None:
          self.index_id = index_id
        if object_id is not None:
          self.object_id = object_id
        if product_id is not None:
          self.product_id = product_id
        if feature_vector is not None:
          self.feature_vector = feature_vector

    @property
    def index_id(self):
        """
        Gets the index_id of this Index.

        :return: The index_id of this Index.
        :rtype: int
        """
        return self._index_id

    @index_id.setter
    def index_id(self, index_id):
        """
        Sets the index_id of this Index.

        :param index_id: The index_id of this Index.
        :type: int
        """

        self._index_id = index_id

    @property
    def object_id(self):
        """
        Gets the object_id of this Index.

        :return: The object_id of this Index.
        :rtype: str
        """
        return self._object_id

    @object_id.setter
    def object_id(self, object_id):
        """
        Sets the object_id of this Index.

        :param object_id: The object_id of this Index.
        :type: str
        """

        self._object_id = object_id

    @property
    def product_id(self):
        """
        Gets the product_id of this Index.

        :return: The product_id of this Index.
        :rtype: str
        """
        return self._product_id

    @product_id.setter
    def product_id(self, product_id):
        """
        Sets the product_id of this Index.

        :param product_id: The product_id of this Index.
        :type: str
        """

        self._product_id = product_id

    @property
    def feature_vector(self):
        """
        Gets the feature_vector of this Index.

        :return: The feature_vector of this Index.
        :rtype: list[float]
        """
        return self._feature_vector

    @feature_vector.setter
    def feature_vector(self, feature_vector):
        """
        Sets the feature_vector of this Index.

        :param feature_vector: The feature_vector of this Index.
        :type: list[float]
        """

        self._feature_vector = feature_vector

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

        return self.__dict__ == other.__dict__

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