# 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 CompiledCircuit(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 = {
        'compiled_circuit': 'str',
        'depth': 'int',
        'num_measurements': 'int',
        'num_one_qubit_gates': 'int',
        'num_swaps': 'int',
        'num_two_qubit_gates': 'int',
        'qubits': 'list[int]'
    }

    attribute_map = {
        'compiled_circuit': 'compiledCircuit',
        'depth': 'depth',
        'num_measurements': 'numMeasurements',
        'num_one_qubit_gates': 'numOneQubitGates',
        'num_swaps': 'numSwaps',
        'num_two_qubit_gates': 'numTwoQubitGates',
        'qubits': 'qubits'
    }

    def __init__(self, compiled_circuit=None, depth=None, num_measurements=None, num_one_qubit_gates=None, num_swaps=None, num_two_qubit_gates=None, qubits=None, local_vars_configuration=None):  # noqa: E501
        """CompiledCircuit - 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._compiled_circuit = None
        self._depth = None
        self._num_measurements = None
        self._num_one_qubit_gates = None
        self._num_swaps = None
        self._num_two_qubit_gates = None
        self._qubits = None
        self.discriminator = None

        if compiled_circuit is not None:
            self.compiled_circuit = compiled_circuit
        if depth is not None:
            self.depth = depth
        if num_measurements is not None:
            self.num_measurements = num_measurements
        if num_one_qubit_gates is not None:
            self.num_one_qubit_gates = num_one_qubit_gates
        if num_swaps is not None:
            self.num_swaps = num_swaps
        if num_two_qubit_gates is not None:
            self.num_two_qubit_gates = num_two_qubit_gates
        if qubits is not None:
            self.qubits = qubits

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


        :return: The compiled_circuit of this CompiledCircuit.  # noqa: E501
        :rtype: str
        """
        return self._compiled_circuit

    @compiled_circuit.setter
    def compiled_circuit(self, compiled_circuit):
        """Sets the compiled_circuit of this CompiledCircuit.


        :param compiled_circuit: The compiled_circuit of this CompiledCircuit.  # noqa: E501
        :type: str
        """

        self._compiled_circuit = compiled_circuit

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


        :return: The depth of this CompiledCircuit.  # noqa: E501
        :rtype: int
        """
        return self._depth

    @depth.setter
    def depth(self, depth):
        """Sets the depth of this CompiledCircuit.


        :param depth: The depth of this CompiledCircuit.  # noqa: E501
        :type: int
        """

        self._depth = depth

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


        :return: The num_measurements of this CompiledCircuit.  # noqa: E501
        :rtype: int
        """
        return self._num_measurements

    @num_measurements.setter
    def num_measurements(self, num_measurements):
        """Sets the num_measurements of this CompiledCircuit.


        :param num_measurements: The num_measurements of this CompiledCircuit.  # noqa: E501
        :type: int
        """

        self._num_measurements = num_measurements

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


        :return: The num_one_qubit_gates of this CompiledCircuit.  # noqa: E501
        :rtype: int
        """
        return self._num_one_qubit_gates

    @num_one_qubit_gates.setter
    def num_one_qubit_gates(self, num_one_qubit_gates):
        """Sets the num_one_qubit_gates of this CompiledCircuit.


        :param num_one_qubit_gates: The num_one_qubit_gates of this CompiledCircuit.  # noqa: E501
        :type: int
        """

        self._num_one_qubit_gates = num_one_qubit_gates

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


        :return: The num_swaps of this CompiledCircuit.  # noqa: E501
        :rtype: int
        """
        return self._num_swaps

    @num_swaps.setter
    def num_swaps(self, num_swaps):
        """Sets the num_swaps of this CompiledCircuit.


        :param num_swaps: The num_swaps of this CompiledCircuit.  # noqa: E501
        :type: int
        """

        self._num_swaps = num_swaps

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


        :return: The num_two_qubit_gates of this CompiledCircuit.  # noqa: E501
        :rtype: int
        """
        return self._num_two_qubit_gates

    @num_two_qubit_gates.setter
    def num_two_qubit_gates(self, num_two_qubit_gates):
        """Sets the num_two_qubit_gates of this CompiledCircuit.


        :param num_two_qubit_gates: The num_two_qubit_gates of this CompiledCircuit.  # noqa: E501
        :type: int
        """

        self._num_two_qubit_gates = num_two_qubit_gates

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


        :return: The qubits of this CompiledCircuit.  # noqa: E501
        :rtype: list[int]
        """
        return self._qubits

    @qubits.setter
    def qubits(self, qubits):
        """Sets the qubits of this CompiledCircuit.


        :param qubits: The qubits of this CompiledCircuit.  # noqa: E501
        :type: list[int]
        """

        self._qubits = qubits

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

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