# coding: utf-8

"""
    EXACT - API

    API to interact with the EXACT Server  # noqa: E501

    OpenAPI spec version: 1.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class ImageRegistration(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',
        'source_image': 'int',
        'target_image': 'int',
        'transformation_matrix': 'object',
        'registration_error': 'float',
        'runtime': 'int',
        'file': 'str'
    }

    attribute_map = {
        'id': 'id',
        'source_image': 'source_image',
        'target_image': 'target_image',
        'transformation_matrix': 'transformation_matrix',
        'registration_error': 'registration_error',
        'runtime': 'runtime',
        'file': 'file'
    }

    def __init__(self, id=None, source_image=None, target_image=None, transformation_matrix=None, registration_error=None, runtime=None, file=None):  # noqa: E501
        """ImageRegistration - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._source_image = None
        self._target_image = None
        self._transformation_matrix = None
        self._registration_error = None
        self._runtime = None
        self._file = None
        self.discriminator = None
        if id is not None:
            self.id = id
        self.source_image = source_image
        self.target_image = target_image
        if transformation_matrix is not None:
            self.transformation_matrix = transformation_matrix
        if registration_error is not None:
            self.registration_error = registration_error
        if runtime is not None:
            self.runtime = runtime
        if file is not None:
            self.file = file

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


        :return: The id of this ImageRegistration.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this ImageRegistration.


        :param id: The id of this ImageRegistration.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The source_image of this ImageRegistration.  # noqa: E501
        :rtype: int
        """
        return self._source_image

    @source_image.setter
    def source_image(self, source_image):
        """Sets the source_image of this ImageRegistration.


        :param source_image: The source_image of this ImageRegistration.  # noqa: E501
        :type: int
        """
        if source_image is None:
            raise ValueError("Invalid value for `source_image`, must not be `None`")  # noqa: E501

        self._source_image = source_image

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


        :return: The target_image of this ImageRegistration.  # noqa: E501
        :rtype: int
        """
        return self._target_image

    @target_image.setter
    def target_image(self, target_image):
        """Sets the target_image of this ImageRegistration.


        :param target_image: The target_image of this ImageRegistration.  # noqa: E501
        :type: int
        """
        if target_image is None:
            raise ValueError("Invalid value for `target_image`, must not be `None`")  # noqa: E501

        self._target_image = target_image

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


        :return: The transformation_matrix of this ImageRegistration.  # noqa: E501
        :rtype: object
        """
        return self._transformation_matrix

    @transformation_matrix.setter
    def transformation_matrix(self, transformation_matrix):
        """Sets the transformation_matrix of this ImageRegistration.


        :param transformation_matrix: The transformation_matrix of this ImageRegistration.  # noqa: E501
        :type: object
        """

        self._transformation_matrix = transformation_matrix

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


        :return: The registration_error of this ImageRegistration.  # noqa: E501
        :rtype: float
        """
        return self._registration_error

    @registration_error.setter
    def registration_error(self, registration_error):
        """Sets the registration_error of this ImageRegistration.


        :param registration_error: The registration_error of this ImageRegistration.  # noqa: E501
        :type: float
        """

        self._registration_error = registration_error

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


        :return: The runtime of this ImageRegistration.  # noqa: E501
        :rtype: int
        """
        return self._runtime

    @runtime.setter
    def runtime(self, runtime):
        """Sets the runtime of this ImageRegistration.


        :param runtime: The runtime of this ImageRegistration.  # noqa: E501
        :type: int
        """

        self._runtime = runtime

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


        :return: The file of this ImageRegistration.  # noqa: E501
        :rtype: str
        """
        return self._file

    @file.setter
    def file(self, file):
        """Sets the file of this ImageRegistration.


        :param file: The file of this ImageRegistration.  # noqa: E501
        :type: str
        """

        self._file = file

    @property
    def server_file(self):
        return f"/media{self._file.split('/media')[1]}"

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

        return self.__dict__ == other.__dict__

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