# coding: utf-8

"""
    SevOne API Documentation

    Supported endpoints by the new RESTful API  # noqa: E501

    OpenAPI spec version: 2.1.18, Hash: db562e6
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class ConstraintDto(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 = {
        'forward_cardinality': 'str',
        'forward_relationship_type': 'str',
        'id': 'int',
        'local_object_type_id': 'int',
        'remote_object_type_id': 'int',
        'reverse_cardinality': 'str',
        'reverse_relationship_type': 'str'
    }

    attribute_map = {
        'forward_cardinality': 'forwardCardinality',
        'forward_relationship_type': 'forwardRelationshipType',
        'id': 'id',
        'local_object_type_id': 'localObjectTypeId',
        'remote_object_type_id': 'remoteObjectTypeId',
        'reverse_cardinality': 'reverseCardinality',
        'reverse_relationship_type': 'reverseRelationshipType'
    }

    def __init__(self, forward_cardinality=None, forward_relationship_type=None, id=None, local_object_type_id=None, remote_object_type_id=None, reverse_cardinality=None, reverse_relationship_type=None):  # noqa: E501
        """ConstraintDto - a model defined in Swagger"""  # noqa: E501

        self._forward_cardinality = None
        self._forward_relationship_type = None
        self._id = None
        self._local_object_type_id = None
        self._remote_object_type_id = None
        self._reverse_cardinality = None
        self._reverse_relationship_type = None
        self.discriminator = None

        if forward_cardinality is not None:
            self.forward_cardinality = forward_cardinality
        if forward_relationship_type is not None:
            self.forward_relationship_type = forward_relationship_type
        if id is not None:
            self.id = id
        if local_object_type_id is not None:
            self.local_object_type_id = local_object_type_id
        if remote_object_type_id is not None:
            self.remote_object_type_id = remote_object_type_id
        if reverse_cardinality is not None:
            self.reverse_cardinality = reverse_cardinality
        if reverse_relationship_type is not None:
            self.reverse_relationship_type = reverse_relationship_type

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


        :return: The forward_cardinality of this ConstraintDto.  # noqa: E501
        :rtype: str
        """
        return self._forward_cardinality

    @forward_cardinality.setter
    def forward_cardinality(self, forward_cardinality):
        """Sets the forward_cardinality of this ConstraintDto.


        :param forward_cardinality: The forward_cardinality of this ConstraintDto.  # noqa: E501
        :type: str
        """
        allowed_values = ["ONE", "MANY"]  # noqa: E501
        if forward_cardinality not in allowed_values:
            raise ValueError(
                "Invalid value for `forward_cardinality` ({0}), must be one of {1}"  # noqa: E501
                .format(forward_cardinality, allowed_values)
            )

        self._forward_cardinality = forward_cardinality

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


        :return: The forward_relationship_type of this ConstraintDto.  # noqa: E501
        :rtype: str
        """
        return self._forward_relationship_type

    @forward_relationship_type.setter
    def forward_relationship_type(self, forward_relationship_type):
        """Sets the forward_relationship_type of this ConstraintDto.


        :param forward_relationship_type: The forward_relationship_type of this ConstraintDto.  # noqa: E501
        :type: str
        """
        allowed_values = ["COMPOSED_OF", "MEMBER_OF", "UNDERLYING", "LAYERED_OVER", "PEER", "CONNECTED_VIA"]  # noqa: E501
        if forward_relationship_type not in allowed_values:
            raise ValueError(
                "Invalid value for `forward_relationship_type` ({0}), must be one of {1}"  # noqa: E501
                .format(forward_relationship_type, allowed_values)
            )

        self._forward_relationship_type = forward_relationship_type

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


        :return: The id of this ConstraintDto.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this ConstraintDto.


        :param id: The id of this ConstraintDto.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The local_object_type_id of this ConstraintDto.  # noqa: E501
        :rtype: int
        """
        return self._local_object_type_id

    @local_object_type_id.setter
    def local_object_type_id(self, local_object_type_id):
        """Sets the local_object_type_id of this ConstraintDto.


        :param local_object_type_id: The local_object_type_id of this ConstraintDto.  # noqa: E501
        :type: int
        """

        self._local_object_type_id = local_object_type_id

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


        :return: The remote_object_type_id of this ConstraintDto.  # noqa: E501
        :rtype: int
        """
        return self._remote_object_type_id

    @remote_object_type_id.setter
    def remote_object_type_id(self, remote_object_type_id):
        """Sets the remote_object_type_id of this ConstraintDto.


        :param remote_object_type_id: The remote_object_type_id of this ConstraintDto.  # noqa: E501
        :type: int
        """

        self._remote_object_type_id = remote_object_type_id

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


        :return: The reverse_cardinality of this ConstraintDto.  # noqa: E501
        :rtype: str
        """
        return self._reverse_cardinality

    @reverse_cardinality.setter
    def reverse_cardinality(self, reverse_cardinality):
        """Sets the reverse_cardinality of this ConstraintDto.


        :param reverse_cardinality: The reverse_cardinality of this ConstraintDto.  # noqa: E501
        :type: str
        """
        allowed_values = ["ONE", "MANY"]  # noqa: E501
        if reverse_cardinality not in allowed_values:
            raise ValueError(
                "Invalid value for `reverse_cardinality` ({0}), must be one of {1}"  # noqa: E501
                .format(reverse_cardinality, allowed_values)
            )

        self._reverse_cardinality = reverse_cardinality

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


        :return: The reverse_relationship_type of this ConstraintDto.  # noqa: E501
        :rtype: str
        """
        return self._reverse_relationship_type

    @reverse_relationship_type.setter
    def reverse_relationship_type(self, reverse_relationship_type):
        """Sets the reverse_relationship_type of this ConstraintDto.


        :param reverse_relationship_type: The reverse_relationship_type of this ConstraintDto.  # noqa: E501
        :type: str
        """
        allowed_values = ["COMPOSED_OF", "MEMBER_OF", "UNDERLYING", "LAYERED_OVER", "PEER", "CONNECTED_VIA"]  # noqa: E501
        if reverse_relationship_type not in allowed_values:
            raise ValueError(
                "Invalid value for `reverse_relationship_type` ({0}), must be one of {1}"  # noqa: E501
                .format(reverse_relationship_type, allowed_values)
            )

        self._reverse_relationship_type = reverse_relationship_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(ConstraintDto, 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, ConstraintDto):
            return False

        return self.__dict__ == other.__dict__

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