# coding: utf-8

"""
    Aliro Quantum App

    This is an api for the Aliro Quantum App  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Contact: nick@aliroquantum.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from aliro_quantum.configuration import Configuration


class Qubit(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'fidelity_rotation': 'float',
        'last_reported_fidelity_rotation_datetime': 'str',
        'name': 'int',
        'pos_x': 'float',
        'pos_y': 'float',
        'real_qubit': 'int'
    }

    attribute_map = {
        'fidelity_rotation': 'fidelityRotation',
        'last_reported_fidelity_rotation_datetime': 'lastReportedFidelityRotationDatetime',
        'name': 'name',
        'pos_x': 'posX',
        'pos_y': 'posY',
        'real_qubit': 'realQubit'
    }

    def __init__(self, fidelity_rotation=None, last_reported_fidelity_rotation_datetime=None, name=None, pos_x=None, pos_y=None, real_qubit=None, local_vars_configuration=None):  # noqa: E501
        """Qubit - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._fidelity_rotation = None
        self._last_reported_fidelity_rotation_datetime = None
        self._name = None
        self._pos_x = None
        self._pos_y = None
        self._real_qubit = None
        self.discriminator = None

        if fidelity_rotation is not None:
            self.fidelity_rotation = fidelity_rotation
        if last_reported_fidelity_rotation_datetime is not None:
            self.last_reported_fidelity_rotation_datetime = last_reported_fidelity_rotation_datetime
        if name is not None:
            self.name = name
        if pos_x is not None:
            self.pos_x = pos_x
        if pos_y is not None:
            self.pos_y = pos_y
        if real_qubit is not None:
            self.real_qubit = real_qubit

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


        :return: The fidelity_rotation of this Qubit.  # noqa: E501
        :rtype: float
        """
        return self._fidelity_rotation

    @fidelity_rotation.setter
    def fidelity_rotation(self, fidelity_rotation):
        """Sets the fidelity_rotation of this Qubit.


        :param fidelity_rotation: The fidelity_rotation of this Qubit.  # noqa: E501
        :type: float
        """

        self._fidelity_rotation = fidelity_rotation

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


        :return: The last_reported_fidelity_rotation_datetime of this Qubit.  # noqa: E501
        :rtype: str
        """
        return self._last_reported_fidelity_rotation_datetime

    @last_reported_fidelity_rotation_datetime.setter
    def last_reported_fidelity_rotation_datetime(self, last_reported_fidelity_rotation_datetime):
        """Sets the last_reported_fidelity_rotation_datetime of this Qubit.


        :param last_reported_fidelity_rotation_datetime: The last_reported_fidelity_rotation_datetime of this Qubit.  # noqa: E501
        :type: str
        """

        self._last_reported_fidelity_rotation_datetime = last_reported_fidelity_rotation_datetime

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


        :return: The name of this Qubit.  # noqa: E501
        :rtype: int
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Qubit.


        :param name: The name of this Qubit.  # noqa: E501
        :type: int
        """

        self._name = name

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


        :return: The pos_x of this Qubit.  # noqa: E501
        :rtype: float
        """
        return self._pos_x

    @pos_x.setter
    def pos_x(self, pos_x):
        """Sets the pos_x of this Qubit.


        :param pos_x: The pos_x of this Qubit.  # noqa: E501
        :type: float
        """

        self._pos_x = pos_x

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


        :return: The pos_y of this Qubit.  # noqa: E501
        :rtype: float
        """
        return self._pos_y

    @pos_y.setter
    def pos_y(self, pos_y):
        """Sets the pos_y of this Qubit.


        :param pos_y: The pos_y of this Qubit.  # noqa: E501
        :type: float
        """

        self._pos_y = pos_y

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


        :return: The real_qubit of this Qubit.  # noqa: E501
        :rtype: int
        """
        return self._real_qubit

    @real_qubit.setter
    def real_qubit(self, real_qubit):
        """Sets the real_qubit of this Qubit.


        :param real_qubit: The real_qubit of this Qubit.  # noqa: E501
        :type: int
        """

        self._real_qubit = real_qubit

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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 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, Qubit):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
