# coding: utf-8

"""
    mzTab-M reference implementation and validation API.

    This is the mzTab-M reference implementation and validation API service.  # noqa: E501

    OpenAPI spec version: 2.0.0
    Contact: nils.hoffmann@isas.de
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from mztab_m_swagger_client.models.ms_run import MsRun  # noqa: F401,E501


class SpectraRef(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 = {
        'ms_run': 'MsRun',
        'reference': 'str'
    }

    attribute_map = {
        'ms_run': 'ms_run',
        'reference': 'reference'
    }

    def __init__(self, ms_run=None, reference=None):  # noqa: E501
        """SpectraRef - a model defined in Swagger"""  # noqa: E501

        self._ms_run = None
        self._reference = None
        self.discriminator = None

        self.ms_run = ms_run
        self.reference = reference

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

        The ms run object reference by this spectral reference.   # noqa: E501

        :return: The ms_run of this SpectraRef.  # noqa: E501
        :rtype: MsRun
        """
        return self._ms_run

    @ms_run.setter
    def ms_run(self, ms_run):
        """Sets the ms_run of this SpectraRef.

        The ms run object reference by this spectral reference.   # noqa: E501

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

        self._ms_run = ms_run

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

        The (vendor-dependendent) reference string to the actual mass spectrum.   # noqa: E501

        :return: The reference of this SpectraRef.  # noqa: E501
        :rtype: str
        """
        return self._reference

    @reference.setter
    def reference(self, reference):
        """Sets the reference of this SpectraRef.

        The (vendor-dependendent) reference string to the actual mass spectrum.   # noqa: E501

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

        self._reference = reference

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

        return self.__dict__ == other.__dict__

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