# coding: utf-8

"""
    Trackside Software TeamDB API v2.0

    This API enables you to access TeamDB data  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: support@trackside.fr
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from teamdbapi.configuration import Configuration


class CompareResultDetail(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 = {
        'reference': 'str',
        'assembly_a_detail': 'CompareResult',
        'assembly_b_detail': 'CompareResult',
        'diff_type': 'str'
    }

    attribute_map = {
        'reference': 'Reference',
        'assembly_a_detail': 'AssemblyADetail',
        'assembly_b_detail': 'AssemblyBDetail',
        'diff_type': 'DiffType'
    }

    def __init__(self, reference=None, assembly_a_detail=None, assembly_b_detail=None, diff_type=None, _configuration=None):  # noqa: E501
        """CompareResultDetail - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._reference = None
        self._assembly_a_detail = None
        self._assembly_b_detail = None
        self._diff_type = None
        self.discriminator = None

        if reference is not None:
            self.reference = reference
        if assembly_a_detail is not None:
            self.assembly_a_detail = assembly_a_detail
        if assembly_b_detail is not None:
            self.assembly_b_detail = assembly_b_detail
        if diff_type is not None:
            self.diff_type = diff_type

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

        Parameter reference  # noqa: E501

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

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

        Parameter reference  # noqa: E501

        :param reference: The reference of this CompareResultDetail.  # noqa: E501
        :type: str
        """

        self._reference = reference

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


        :return: The assembly_a_detail of this CompareResultDetail.  # noqa: E501
        :rtype: CompareResult
        """
        return self._assembly_a_detail

    @assembly_a_detail.setter
    def assembly_a_detail(self, assembly_a_detail):
        """Sets the assembly_a_detail of this CompareResultDetail.


        :param assembly_a_detail: The assembly_a_detail of this CompareResultDetail.  # noqa: E501
        :type: CompareResult
        """

        self._assembly_a_detail = assembly_a_detail

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


        :return: The assembly_b_detail of this CompareResultDetail.  # noqa: E501
        :rtype: CompareResult
        """
        return self._assembly_b_detail

    @assembly_b_detail.setter
    def assembly_b_detail(self, assembly_b_detail):
        """Sets the assembly_b_detail of this CompareResultDetail.


        :param assembly_b_detail: The assembly_b_detail of this CompareResultDetail.  # noqa: E501
        :type: CompareResult
        """

        self._assembly_b_detail = assembly_b_detail

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

        The difference type detected between A and B  # noqa: E501

        :return: The diff_type of this CompareResultDetail.  # noqa: E501
        :rtype: str
        """
        return self._diff_type

    @diff_type.setter
    def diff_type(self, diff_type):
        """Sets the diff_type of this CompareResultDetail.

        The difference type detected between A and B  # noqa: E501

        :param diff_type: The diff_type of this CompareResultDetail.  # noqa: E501
        :type: str
        """
        allowed_values = ["A_Missing", "B_Missing", "Difference"]  # noqa: E501
        if (self._configuration.client_side_validation and
                diff_type not in allowed_values):
            raise ValueError(
                "Invalid value for `diff_type` ({0}), must be one of {1}"  # noqa: E501
                .format(diff_type, allowed_values)
            )

        self._diff_type = diff_type

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

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