# coding: utf-8

"""
    Cherwell REST API

    Unofficial Python Cherwell REST API library.  # noqa: E501

    The version of the OpenAPI document: 9.3.2
    Contact: See AUTHORS.
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from pycherwell.configuration import Configuration


class RelatedSaveResponse(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 = {
        'parent_bus_ob_id': 'str',
        'parent_bus_ob_public_id': 'str',
        'parent_bus_ob_rec_id': 'str',
        'relationship_id': 'str',
        'bus_ob_public_id': 'str',
        'bus_ob_rec_id': 'str',
        'cache_key': 'str',
        'field_validation_errors': 'list[FieldValidationError]',
        'notification_triggers': 'list[NotificationTrigger]',
        'error_code': 'str',
        'error_message': 'str',
        'has_error': 'bool'
    }

    attribute_map = {
        'parent_bus_ob_id': 'parentBusObId',
        'parent_bus_ob_public_id': 'parentBusObPublicId',
        'parent_bus_ob_rec_id': 'parentBusObRecId',
        'relationship_id': 'relationshipId',
        'bus_ob_public_id': 'busObPublicId',
        'bus_ob_rec_id': 'busObRecId',
        'cache_key': 'cacheKey',
        'field_validation_errors': 'fieldValidationErrors',
        'notification_triggers': 'notificationTriggers',
        'error_code': 'errorCode',
        'error_message': 'errorMessage',
        'has_error': 'hasError'
    }

    def __init__(self, parent_bus_ob_id=None, parent_bus_ob_public_id=None, parent_bus_ob_rec_id=None, relationship_id=None, bus_ob_public_id=None, bus_ob_rec_id=None, cache_key=None, field_validation_errors=None, notification_triggers=None, error_code=None, error_message=None, has_error=None, local_vars_configuration=None):  # noqa: E501
        """RelatedSaveResponse - 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._parent_bus_ob_id = None
        self._parent_bus_ob_public_id = None
        self._parent_bus_ob_rec_id = None
        self._relationship_id = None
        self._bus_ob_public_id = None
        self._bus_ob_rec_id = None
        self._cache_key = None
        self._field_validation_errors = None
        self._notification_triggers = None
        self._error_code = None
        self._error_message = None
        self._has_error = None
        self.discriminator = None

        if parent_bus_ob_id is not None:
            self.parent_bus_ob_id = parent_bus_ob_id
        if parent_bus_ob_public_id is not None:
            self.parent_bus_ob_public_id = parent_bus_ob_public_id
        if parent_bus_ob_rec_id is not None:
            self.parent_bus_ob_rec_id = parent_bus_ob_rec_id
        if relationship_id is not None:
            self.relationship_id = relationship_id
        if bus_ob_public_id is not None:
            self.bus_ob_public_id = bus_ob_public_id
        if bus_ob_rec_id is not None:
            self.bus_ob_rec_id = bus_ob_rec_id
        if cache_key is not None:
            self.cache_key = cache_key
        if field_validation_errors is not None:
            self.field_validation_errors = field_validation_errors
        if notification_triggers is not None:
            self.notification_triggers = notification_triggers
        if error_code is not None:
            self.error_code = error_code
        if error_message is not None:
            self.error_message = error_message
        if has_error is not None:
            self.has_error = has_error

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


        :return: The parent_bus_ob_id of this RelatedSaveResponse.  # noqa: E501
        :rtype: str
        """
        return self._parent_bus_ob_id

    @parent_bus_ob_id.setter
    def parent_bus_ob_id(self, parent_bus_ob_id):
        """Sets the parent_bus_ob_id of this RelatedSaveResponse.


        :param parent_bus_ob_id: The parent_bus_ob_id of this RelatedSaveResponse.  # noqa: E501
        :type: str
        """

        self._parent_bus_ob_id = parent_bus_ob_id

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


        :return: The parent_bus_ob_public_id of this RelatedSaveResponse.  # noqa: E501
        :rtype: str
        """
        return self._parent_bus_ob_public_id

    @parent_bus_ob_public_id.setter
    def parent_bus_ob_public_id(self, parent_bus_ob_public_id):
        """Sets the parent_bus_ob_public_id of this RelatedSaveResponse.


        :param parent_bus_ob_public_id: The parent_bus_ob_public_id of this RelatedSaveResponse.  # noqa: E501
        :type: str
        """

        self._parent_bus_ob_public_id = parent_bus_ob_public_id

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


        :return: The parent_bus_ob_rec_id of this RelatedSaveResponse.  # noqa: E501
        :rtype: str
        """
        return self._parent_bus_ob_rec_id

    @parent_bus_ob_rec_id.setter
    def parent_bus_ob_rec_id(self, parent_bus_ob_rec_id):
        """Sets the parent_bus_ob_rec_id of this RelatedSaveResponse.


        :param parent_bus_ob_rec_id: The parent_bus_ob_rec_id of this RelatedSaveResponse.  # noqa: E501
        :type: str
        """

        self._parent_bus_ob_rec_id = parent_bus_ob_rec_id

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


        :return: The relationship_id of this RelatedSaveResponse.  # noqa: E501
        :rtype: str
        """
        return self._relationship_id

    @relationship_id.setter
    def relationship_id(self, relationship_id):
        """Sets the relationship_id of this RelatedSaveResponse.


        :param relationship_id: The relationship_id of this RelatedSaveResponse.  # noqa: E501
        :type: str
        """

        self._relationship_id = relationship_id

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


        :return: The bus_ob_public_id of this RelatedSaveResponse.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_public_id

    @bus_ob_public_id.setter
    def bus_ob_public_id(self, bus_ob_public_id):
        """Sets the bus_ob_public_id of this RelatedSaveResponse.


        :param bus_ob_public_id: The bus_ob_public_id of this RelatedSaveResponse.  # noqa: E501
        :type: str
        """

        self._bus_ob_public_id = bus_ob_public_id

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


        :return: The bus_ob_rec_id of this RelatedSaveResponse.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_rec_id

    @bus_ob_rec_id.setter
    def bus_ob_rec_id(self, bus_ob_rec_id):
        """Sets the bus_ob_rec_id of this RelatedSaveResponse.


        :param bus_ob_rec_id: The bus_ob_rec_id of this RelatedSaveResponse.  # noqa: E501
        :type: str
        """

        self._bus_ob_rec_id = bus_ob_rec_id

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


        :return: The cache_key of this RelatedSaveResponse.  # noqa: E501
        :rtype: str
        """
        return self._cache_key

    @cache_key.setter
    def cache_key(self, cache_key):
        """Sets the cache_key of this RelatedSaveResponse.


        :param cache_key: The cache_key of this RelatedSaveResponse.  # noqa: E501
        :type: str
        """

        self._cache_key = cache_key

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


        :return: The field_validation_errors of this RelatedSaveResponse.  # noqa: E501
        :rtype: list[FieldValidationError]
        """
        return self._field_validation_errors

    @field_validation_errors.setter
    def field_validation_errors(self, field_validation_errors):
        """Sets the field_validation_errors of this RelatedSaveResponse.


        :param field_validation_errors: The field_validation_errors of this RelatedSaveResponse.  # noqa: E501
        :type: list[FieldValidationError]
        """

        self._field_validation_errors = field_validation_errors

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


        :return: The notification_triggers of this RelatedSaveResponse.  # noqa: E501
        :rtype: list[NotificationTrigger]
        """
        return self._notification_triggers

    @notification_triggers.setter
    def notification_triggers(self, notification_triggers):
        """Sets the notification_triggers of this RelatedSaveResponse.


        :param notification_triggers: The notification_triggers of this RelatedSaveResponse.  # noqa: E501
        :type: list[NotificationTrigger]
        """

        self._notification_triggers = notification_triggers

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


        :return: The error_code of this RelatedSaveResponse.  # noqa: E501
        :rtype: str
        """
        return self._error_code

    @error_code.setter
    def error_code(self, error_code):
        """Sets the error_code of this RelatedSaveResponse.


        :param error_code: The error_code of this RelatedSaveResponse.  # noqa: E501
        :type: str
        """

        self._error_code = error_code

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


        :return: The error_message of this RelatedSaveResponse.  # noqa: E501
        :rtype: str
        """
        return self._error_message

    @error_message.setter
    def error_message(self, error_message):
        """Sets the error_message of this RelatedSaveResponse.


        :param error_message: The error_message of this RelatedSaveResponse.  # noqa: E501
        :type: str
        """

        self._error_message = error_message

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


        :return: The has_error of this RelatedSaveResponse.  # noqa: E501
        :rtype: bool
        """
        return self._has_error

    @has_error.setter
    def has_error(self, has_error):
        """Sets the has_error of this RelatedSaveResponse.


        :param has_error: The has_error of this RelatedSaveResponse.  # noqa: E501
        :type: bool
        """

        self._has_error = has_error

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

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