# 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 BusinessObjectPermission(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 = {
        'bus_ob_id': 'str',
        'bus_ob_name': 'str',
        'department_member_edit': 'bool',
        'department_member_view': 'bool',
        'edit': 'bool',
        'field_permissions': 'list[FieldPermission]',
        'manager_of_owner_edit': 'bool',
        'manager_of_owner_view': 'bool',
        'owner_edit': 'bool',
        'owner_view': 'bool',
        'team_edit': 'bool',
        'team_manager_of_owner_edit': 'bool',
        'team_manager_of_owner_view': 'bool',
        'team_view': 'bool',
        'view': 'bool'
    }

    attribute_map = {
        'bus_ob_id': 'busObId',
        'bus_ob_name': 'busObName',
        'department_member_edit': 'departmentMemberEdit',
        'department_member_view': 'departmentMemberView',
        'edit': 'edit',
        'field_permissions': 'fieldPermissions',
        'manager_of_owner_edit': 'managerOfOwnerEdit',
        'manager_of_owner_view': 'managerOfOwnerView',
        'owner_edit': 'ownerEdit',
        'owner_view': 'ownerView',
        'team_edit': 'teamEdit',
        'team_manager_of_owner_edit': 'teamManagerOfOwnerEdit',
        'team_manager_of_owner_view': 'teamManagerOfOwnerView',
        'team_view': 'teamView',
        'view': 'view'
    }

    def __init__(self, bus_ob_id=None, bus_ob_name=None, department_member_edit=None, department_member_view=None, edit=None, field_permissions=None, manager_of_owner_edit=None, manager_of_owner_view=None, owner_edit=None, owner_view=None, team_edit=None, team_manager_of_owner_edit=None, team_manager_of_owner_view=None, team_view=None, view=None, local_vars_configuration=None):  # noqa: E501
        """BusinessObjectPermission - 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._bus_ob_id = None
        self._bus_ob_name = None
        self._department_member_edit = None
        self._department_member_view = None
        self._edit = None
        self._field_permissions = None
        self._manager_of_owner_edit = None
        self._manager_of_owner_view = None
        self._owner_edit = None
        self._owner_view = None
        self._team_edit = None
        self._team_manager_of_owner_edit = None
        self._team_manager_of_owner_view = None
        self._team_view = None
        self._view = None
        self.discriminator = None

        if bus_ob_id is not None:
            self.bus_ob_id = bus_ob_id
        if bus_ob_name is not None:
            self.bus_ob_name = bus_ob_name
        if department_member_edit is not None:
            self.department_member_edit = department_member_edit
        if department_member_view is not None:
            self.department_member_view = department_member_view
        if edit is not None:
            self.edit = edit
        if field_permissions is not None:
            self.field_permissions = field_permissions
        if manager_of_owner_edit is not None:
            self.manager_of_owner_edit = manager_of_owner_edit
        if manager_of_owner_view is not None:
            self.manager_of_owner_view = manager_of_owner_view
        if owner_edit is not None:
            self.owner_edit = owner_edit
        if owner_view is not None:
            self.owner_view = owner_view
        if team_edit is not None:
            self.team_edit = team_edit
        if team_manager_of_owner_edit is not None:
            self.team_manager_of_owner_edit = team_manager_of_owner_edit
        if team_manager_of_owner_view is not None:
            self.team_manager_of_owner_view = team_manager_of_owner_view
        if team_view is not None:
            self.team_view = team_view
        if view is not None:
            self.view = view

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


        :return: The bus_ob_id of this BusinessObjectPermission.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_id

    @bus_ob_id.setter
    def bus_ob_id(self, bus_ob_id):
        """Sets the bus_ob_id of this BusinessObjectPermission.


        :param bus_ob_id: The bus_ob_id of this BusinessObjectPermission.  # noqa: E501
        :type: str
        """

        self._bus_ob_id = bus_ob_id

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


        :return: The bus_ob_name of this BusinessObjectPermission.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_name

    @bus_ob_name.setter
    def bus_ob_name(self, bus_ob_name):
        """Sets the bus_ob_name of this BusinessObjectPermission.


        :param bus_ob_name: The bus_ob_name of this BusinessObjectPermission.  # noqa: E501
        :type: str
        """

        self._bus_ob_name = bus_ob_name

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


        :return: The department_member_edit of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._department_member_edit

    @department_member_edit.setter
    def department_member_edit(self, department_member_edit):
        """Sets the department_member_edit of this BusinessObjectPermission.


        :param department_member_edit: The department_member_edit of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._department_member_edit = department_member_edit

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


        :return: The department_member_view of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._department_member_view

    @department_member_view.setter
    def department_member_view(self, department_member_view):
        """Sets the department_member_view of this BusinessObjectPermission.


        :param department_member_view: The department_member_view of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._department_member_view = department_member_view

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


        :return: The edit of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._edit

    @edit.setter
    def edit(self, edit):
        """Sets the edit of this BusinessObjectPermission.


        :param edit: The edit of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._edit = edit

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


        :return: The field_permissions of this BusinessObjectPermission.  # noqa: E501
        :rtype: list[FieldPermission]
        """
        return self._field_permissions

    @field_permissions.setter
    def field_permissions(self, field_permissions):
        """Sets the field_permissions of this BusinessObjectPermission.


        :param field_permissions: The field_permissions of this BusinessObjectPermission.  # noqa: E501
        :type: list[FieldPermission]
        """

        self._field_permissions = field_permissions

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


        :return: The manager_of_owner_edit of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._manager_of_owner_edit

    @manager_of_owner_edit.setter
    def manager_of_owner_edit(self, manager_of_owner_edit):
        """Sets the manager_of_owner_edit of this BusinessObjectPermission.


        :param manager_of_owner_edit: The manager_of_owner_edit of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._manager_of_owner_edit = manager_of_owner_edit

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


        :return: The manager_of_owner_view of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._manager_of_owner_view

    @manager_of_owner_view.setter
    def manager_of_owner_view(self, manager_of_owner_view):
        """Sets the manager_of_owner_view of this BusinessObjectPermission.


        :param manager_of_owner_view: The manager_of_owner_view of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._manager_of_owner_view = manager_of_owner_view

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


        :return: The owner_edit of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._owner_edit

    @owner_edit.setter
    def owner_edit(self, owner_edit):
        """Sets the owner_edit of this BusinessObjectPermission.


        :param owner_edit: The owner_edit of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._owner_edit = owner_edit

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


        :return: The owner_view of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._owner_view

    @owner_view.setter
    def owner_view(self, owner_view):
        """Sets the owner_view of this BusinessObjectPermission.


        :param owner_view: The owner_view of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._owner_view = owner_view

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


        :return: The team_edit of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._team_edit

    @team_edit.setter
    def team_edit(self, team_edit):
        """Sets the team_edit of this BusinessObjectPermission.


        :param team_edit: The team_edit of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._team_edit = team_edit

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


        :return: The team_manager_of_owner_edit of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._team_manager_of_owner_edit

    @team_manager_of_owner_edit.setter
    def team_manager_of_owner_edit(self, team_manager_of_owner_edit):
        """Sets the team_manager_of_owner_edit of this BusinessObjectPermission.


        :param team_manager_of_owner_edit: The team_manager_of_owner_edit of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._team_manager_of_owner_edit = team_manager_of_owner_edit

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


        :return: The team_manager_of_owner_view of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._team_manager_of_owner_view

    @team_manager_of_owner_view.setter
    def team_manager_of_owner_view(self, team_manager_of_owner_view):
        """Sets the team_manager_of_owner_view of this BusinessObjectPermission.


        :param team_manager_of_owner_view: The team_manager_of_owner_view of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._team_manager_of_owner_view = team_manager_of_owner_view

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


        :return: The team_view of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._team_view

    @team_view.setter
    def team_view(self, team_view):
        """Sets the team_view of this BusinessObjectPermission.


        :param team_view: The team_view of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._team_view = team_view

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


        :return: The view of this BusinessObjectPermission.  # noqa: E501
        :rtype: bool
        """
        return self._view

    @view.setter
    def view(self, view):
        """Sets the view of this BusinessObjectPermission.


        :param view: The view of this BusinessObjectPermission.  # noqa: E501
        :type: bool
        """

        self._view = view

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

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