# 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 Circuit(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 = {
        'body': 'str',
        'depth': 'int',
        'jobs': 'list[Job]',
        'language': 'str',
        'name': 'str',
        'num_gates_double': 'int',
        'num_gates_single': 'int',
        'num_measurements': 'int',
        'num_swaps': 'int'
    }

    attribute_map = {
        'body': 'body',
        'depth': 'depth',
        'jobs': 'jobs',
        'language': 'language',
        'name': 'name',
        'num_gates_double': 'numGatesDouble',
        'num_gates_single': 'numGatesSingle',
        'num_measurements': 'numMeasurements',
        'num_swaps': 'numSwaps'
    }

    def __init__(self, body=None, depth=None, jobs=None, language=None, name=None, num_gates_double=None, num_gates_single=None, num_measurements=None, num_swaps=None, local_vars_configuration=None):  # noqa: E501
        """Circuit - 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._body = None
        self._depth = None
        self._jobs = None
        self._language = None
        self._name = None
        self._num_gates_double = None
        self._num_gates_single = None
        self._num_measurements = None
        self._num_swaps = None
        self.discriminator = None

        self.body = body
        if depth is not None:
            self.depth = depth
        self.jobs = jobs
        self.language = language
        if name is not None:
            self.name = name
        if num_gates_double is not None:
            self.num_gates_double = num_gates_double
        if num_gates_single is not None:
            self.num_gates_single = num_gates_single
        if num_measurements is not None:
            self.num_measurements = num_measurements
        if num_swaps is not None:
            self.num_swaps = num_swaps

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

        The inputted circuit string  # noqa: E501

        :return: The body of this Circuit.  # noqa: E501
        :rtype: str
        """
        return self._body

    @body.setter
    def body(self, body):
        """Sets the body of this Circuit.

        The inputted circuit string  # noqa: E501

        :param body: The body of this Circuit.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and body is None:  # noqa: E501
            raise ValueError("Invalid value for `body`, must not be `None`")  # noqa: E501

        self._body = body

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


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

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


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

        self._depth = depth

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


        :return: The jobs of this Circuit.  # noqa: E501
        :rtype: list[Job]
        """
        return self._jobs

    @jobs.setter
    def jobs(self, jobs):
        """Sets the jobs of this Circuit.


        :param jobs: The jobs of this Circuit.  # noqa: E501
        :type: list[Job]
        """
        if self.local_vars_configuration.client_side_validation and jobs is None:  # noqa: E501
            raise ValueError("Invalid value for `jobs`, must not be `None`")  # noqa: E501

        self._jobs = jobs

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


        :return: The language of this Circuit.  # noqa: E501
        :rtype: str
        """
        return self._language

    @language.setter
    def language(self, language):
        """Sets the language of this Circuit.


        :param language: The language of this Circuit.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and language is None:  # noqa: E501
            raise ValueError("Invalid value for `language`, must not be `None`")  # noqa: E501

        self._language = language

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


        :return: The name of this Circuit.  # noqa: E501
        :rtype: str
        """
        return self._name

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


        :param name: The name of this Circuit.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The num_gates_double of this Circuit.  # noqa: E501
        :rtype: int
        """
        return self._num_gates_double

    @num_gates_double.setter
    def num_gates_double(self, num_gates_double):
        """Sets the num_gates_double of this Circuit.


        :param num_gates_double: The num_gates_double of this Circuit.  # noqa: E501
        :type: int
        """

        self._num_gates_double = num_gates_double

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


        :return: The num_gates_single of this Circuit.  # noqa: E501
        :rtype: int
        """
        return self._num_gates_single

    @num_gates_single.setter
    def num_gates_single(self, num_gates_single):
        """Sets the num_gates_single of this Circuit.


        :param num_gates_single: The num_gates_single of this Circuit.  # noqa: E501
        :type: int
        """

        self._num_gates_single = num_gates_single

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


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

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


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

        self._num_measurements = num_measurements

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


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

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


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

        self._num_swaps = num_swaps

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

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