# 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 RelatedBusinessObjectResponse(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 = {
        'error_code': 'str',
        'error_message': 'str',
        'has_error': 'bool',
        'links': 'list[Link]',
        'page_number': 'int',
        'page_size': 'int',
        'parent_bus_ob_id': 'str',
        'parent_bus_ob_public_id': 'str',
        'parent_bus_ob_rec_id': 'str',
        'related_business_objects': 'list[ReadResponse]',
        'relationship_id': 'str',
        'total_records': 'int'
    }

    attribute_map = {
        'error_code': 'errorCode',
        'error_message': 'errorMessage',
        'has_error': 'hasError',
        'links': 'links',
        'page_number': 'pageNumber',
        'page_size': 'pageSize',
        'parent_bus_ob_id': 'parentBusObId',
        'parent_bus_ob_public_id': 'parentBusObPublicId',
        'parent_bus_ob_rec_id': 'parentBusObRecId',
        'related_business_objects': 'relatedBusinessObjects',
        'relationship_id': 'relationshipId',
        'total_records': 'totalRecords'
    }

    def __init__(self, error_code=None, error_message=None, has_error=None, links=None, page_number=None, page_size=None, parent_bus_ob_id=None, parent_bus_ob_public_id=None, parent_bus_ob_rec_id=None, related_business_objects=None, relationship_id=None, total_records=None, local_vars_configuration=None):  # noqa: E501
        """RelatedBusinessObjectResponse - 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._error_code = None
        self._error_message = None
        self._has_error = None
        self._links = None
        self._page_number = None
        self._page_size = None
        self._parent_bus_ob_id = None
        self._parent_bus_ob_public_id = None
        self._parent_bus_ob_rec_id = None
        self._related_business_objects = None
        self._relationship_id = None
        self._total_records = None
        self.discriminator = None

        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
        if links is not None:
            self.links = links
        if page_number is not None:
            self.page_number = page_number
        if page_size is not None:
            self.page_size = page_size
        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 related_business_objects is not None:
            self.related_business_objects = related_business_objects
        if relationship_id is not None:
            self.relationship_id = relationship_id
        if total_records is not None:
            self.total_records = total_records

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


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

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


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

        self._error_code = error_code

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


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

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


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

        self._error_message = error_message

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


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

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


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

        self._has_error = has_error

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


        :return: The links of this RelatedBusinessObjectResponse.  # noqa: E501
        :rtype: list[Link]
        """
        return self._links

    @links.setter
    def links(self, links):
        """Sets the links of this RelatedBusinessObjectResponse.


        :param links: The links of this RelatedBusinessObjectResponse.  # noqa: E501
        :type: list[Link]
        """

        self._links = links

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


        :return: The page_number of this RelatedBusinessObjectResponse.  # noqa: E501
        :rtype: int
        """
        return self._page_number

    @page_number.setter
    def page_number(self, page_number):
        """Sets the page_number of this RelatedBusinessObjectResponse.


        :param page_number: The page_number of this RelatedBusinessObjectResponse.  # noqa: E501
        :type: int
        """

        self._page_number = page_number

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


        :return: The page_size of this RelatedBusinessObjectResponse.  # noqa: E501
        :rtype: int
        """
        return self._page_size

    @page_size.setter
    def page_size(self, page_size):
        """Sets the page_size of this RelatedBusinessObjectResponse.


        :param page_size: The page_size of this RelatedBusinessObjectResponse.  # noqa: E501
        :type: int
        """

        self._page_size = page_size

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


        :return: The parent_bus_ob_id of this RelatedBusinessObjectResponse.  # 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 RelatedBusinessObjectResponse.


        :param parent_bus_ob_id: The parent_bus_ob_id of this RelatedBusinessObjectResponse.  # 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 RelatedBusinessObjectResponse.  # noqa: E501


        :return: The parent_bus_ob_public_id of this RelatedBusinessObjectResponse.  # 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 RelatedBusinessObjectResponse.


        :param parent_bus_ob_public_id: The parent_bus_ob_public_id of this RelatedBusinessObjectResponse.  # 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 RelatedBusinessObjectResponse.  # noqa: E501


        :return: The parent_bus_ob_rec_id of this RelatedBusinessObjectResponse.  # 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 RelatedBusinessObjectResponse.


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

        self._parent_bus_ob_rec_id = parent_bus_ob_rec_id

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


        :return: The related_business_objects of this RelatedBusinessObjectResponse.  # noqa: E501
        :rtype: list[ReadResponse]
        """
        return self._related_business_objects

    @related_business_objects.setter
    def related_business_objects(self, related_business_objects):
        """Sets the related_business_objects of this RelatedBusinessObjectResponse.


        :param related_business_objects: The related_business_objects of this RelatedBusinessObjectResponse.  # noqa: E501
        :type: list[ReadResponse]
        """

        self._related_business_objects = related_business_objects

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


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

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


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

        self._relationship_id = relationship_id

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


        :return: The total_records of this RelatedBusinessObjectResponse.  # noqa: E501
        :rtype: int
        """
        return self._total_records

    @total_records.setter
    def total_records(self, total_records):
        """Sets the total_records of this RelatedBusinessObjectResponse.


        :param total_records: The total_records of this RelatedBusinessObjectResponse.  # noqa: E501
        :type: int
        """

        self._total_records = total_records

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

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