# coding: utf-8

"""
Alteryx Server API V3

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

OpenAPI spec version: 3

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

from src.server_client.configuration import Configuration


class DCMEConnectionHandlingRuleContract(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 = {
        "id": "str",
        "created_by": "DCMEUserView",
        "created_on": "datetime",
        "last_changed_on": "datetime",
        "source_connection_id": "str",
        "source_connection_title": "str",
        "target_connection_id": "str",
        "target_connection_title": "str",
    }

    attribute_map = {
        "id": "id",
        "created_by": "createdBy",
        "created_on": "createdOn",
        "last_changed_on": "lastChangedOn",
        "source_connection_id": "sourceConnectionId",
        "source_connection_title": "sourceConnectionTitle",
        "target_connection_id": "targetConnectionId",
        "target_connection_title": "targetConnectionTitle",
    }

    def __init__(
        self,
        id=None,
        created_by=None,
        created_on=None,
        last_changed_on=None,
        source_connection_id=None,
        source_connection_title=None,
        target_connection_id=None,
        target_connection_title=None,
        _configuration=None,
    ):  # noqa: E501
        """DCMEConnectionHandlingRuleContract - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._created_by = None
        self._created_on = None
        self._last_changed_on = None
        self._source_connection_id = None
        self._source_connection_title = None
        self._target_connection_id = None
        self._target_connection_title = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if created_by is not None:
            self.created_by = created_by
        if created_on is not None:
            self.created_on = created_on
        if last_changed_on is not None:
            self.last_changed_on = last_changed_on
        self.source_connection_id = source_connection_id
        if source_connection_title is not None:
            self.source_connection_title = source_connection_title
        if target_connection_id is not None:
            self.target_connection_id = target_connection_id
        if target_connection_title is not None:
            self.target_connection_title = target_connection_title

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


        :return: The id of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :rtype: str
        """
        return self._id

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


        :param id: The id of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The created_by of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :rtype: DCMEUserView
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this DCMEConnectionHandlingRuleContract.


        :param created_by: The created_by of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :type: DCMEUserView
        """

        self._created_by = created_by

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


        :return: The created_on of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :rtype: datetime
        """
        return self._created_on

    @created_on.setter
    def created_on(self, created_on):
        """Sets the created_on of this DCMEConnectionHandlingRuleContract.


        :param created_on: The created_on of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :type: datetime
        """

        self._created_on = created_on

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


        :return: The last_changed_on of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :rtype: datetime
        """
        return self._last_changed_on

    @last_changed_on.setter
    def last_changed_on(self, last_changed_on):
        """Sets the last_changed_on of this DCMEConnectionHandlingRuleContract.


        :param last_changed_on: The last_changed_on of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :type: datetime
        """

        self._last_changed_on = last_changed_on

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


        :return: The source_connection_id of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :rtype: str
        """
        return self._source_connection_id

    @source_connection_id.setter
    def source_connection_id(self, source_connection_id):
        """Sets the source_connection_id of this DCMEConnectionHandlingRuleContract.


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

        self._source_connection_id = source_connection_id

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


        :return: The source_connection_title of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :rtype: str
        """
        return self._source_connection_title

    @source_connection_title.setter
    def source_connection_title(self, source_connection_title):
        """Sets the source_connection_title of this DCMEConnectionHandlingRuleContract.


        :param source_connection_title:
            The source_connection_title of this DCMEConnectionHandlingRuleContract.
        :type: str
        """

        self._source_connection_title = source_connection_title

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


        :return: The target_connection_id of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :rtype: str
        """
        return self._target_connection_id

    @target_connection_id.setter
    def target_connection_id(self, target_connection_id):
        """Sets the target_connection_id of this DCMEConnectionHandlingRuleContract.


        :param target_connection_id:
            The target_connection_id of this DCMEConnectionHandlingRuleContract.
        :type: str
        """

        self._target_connection_id = target_connection_id

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


        :return: The target_connection_title of this DCMEConnectionHandlingRuleContract.  # noqa: E501
        :rtype: str
        """
        return self._target_connection_title

    @target_connection_title.setter
    def target_connection_title(self, target_connection_title):
        """Sets the target_connection_title of this DCMEConnectionHandlingRuleContract.


        :param target_connection_title:
            The target_connection_title of this DCMEConnectionHandlingRuleContract.
        :type: str
        """

        self._target_connection_title = target_connection_title

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

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