# 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 Gate(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': 'float',
        'fidelity_change_per_day': 'float',
        'qubit_from': 'Qubit',
        'qubit_to': 'Qubit',
        'gate_type': 'str'
    }

    attribute_map = {
        'fidelity': 'fidelity',
        'fidelity_change_per_day': 'fidelityChangePerDay',
        'qubit_from': 'qubitFrom',
        'qubit_to': 'qubitTo',
        'gate_type': 'gateType'
    }

    def __init__(self, fidelity=None, fidelity_change_per_day=None, qubit_from=None, qubit_to=None, gate_type=None, local_vars_configuration=None):  # noqa: E501
        """Gate - 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 = None
        self._fidelity_change_per_day = None
        self._qubit_from = None
        self._qubit_to = None
        self._gate_type = None
        self.discriminator = None

        if fidelity is not None:
            self.fidelity = fidelity
        if fidelity_change_per_day is not None:
            self.fidelity_change_per_day = fidelity_change_per_day
        if qubit_from is not None:
            self.qubit_from = qubit_from
        if qubit_to is not None:
            self.qubit_to = qubit_to
        if gate_type is not None:
            self.gate_type = gate_type

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


        :return: The fidelity of this Gate.  # noqa: E501
        :rtype: float
        """
        return self._fidelity

    @fidelity.setter
    def fidelity(self, fidelity):
        """Sets the fidelity of this Gate.


        :param fidelity: The fidelity of this Gate.  # noqa: E501
        :type: float
        """

        self._fidelity = fidelity

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


        :return: The fidelity_change_per_day of this Gate.  # noqa: E501
        :rtype: float
        """
        return self._fidelity_change_per_day

    @fidelity_change_per_day.setter
    def fidelity_change_per_day(self, fidelity_change_per_day):
        """Sets the fidelity_change_per_day of this Gate.


        :param fidelity_change_per_day: The fidelity_change_per_day of this Gate.  # noqa: E501
        :type: float
        """

        self._fidelity_change_per_day = fidelity_change_per_day

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


        :return: The qubit_from of this Gate.  # noqa: E501
        :rtype: Qubit
        """
        return self._qubit_from

    @qubit_from.setter
    def qubit_from(self, qubit_from):
        """Sets the qubit_from of this Gate.


        :param qubit_from: The qubit_from of this Gate.  # noqa: E501
        :type: Qubit
        """

        self._qubit_from = qubit_from

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


        :return: The qubit_to of this Gate.  # noqa: E501
        :rtype: Qubit
        """
        return self._qubit_to

    @qubit_to.setter
    def qubit_to(self, qubit_to):
        """Sets the qubit_to of this Gate.


        :param qubit_to: The qubit_to of this Gate.  # noqa: E501
        :type: Qubit
        """

        self._qubit_to = qubit_to

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


        :return: The gate_type of this Gate.  # noqa: E501
        :rtype: str
        """
        return self._gate_type

    @gate_type.setter
    def gate_type(self, gate_type):
        """Sets the gate_type of this Gate.


        :param gate_type: The gate_type of this Gate.  # noqa: E501
        :type: str
        """

        self._gate_type = gate_type

    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, Gate):
            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, Gate):
            return True

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