# coding: utf-8

"""
    Aron API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from openapi_client.configuration import Configuration


class OrmAccessControlPolicy(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 = {
        'created_dt': 'datetime',
        'edges': 'OrmAccessControlPolicyEdges',
        'group_id': 'int',
        'id': 'int',
        'organization_id': 'int',
        'permission': 'str',
        'project_id': 'int',
        'root_organization_id': 'int',
        'subject_everyone': 'bool',
        'updated_dt': 'datetime',
        'user_id': 'int'
    }

    attribute_map = {
        'created_dt': 'created_dt',
        'edges': 'edges',
        'group_id': 'group_id',
        'id': 'id',
        'organization_id': 'organization_id',
        'permission': 'permission',
        'project_id': 'project_id',
        'root_organization_id': 'root_organization_id',
        'subject_everyone': 'subject_everyone',
        'updated_dt': 'updated_dt',
        'user_id': 'user_id'
    }

    def __init__(self, created_dt=None, edges=None, group_id=None, id=None, organization_id=None, permission=None, project_id=None, root_organization_id=None, subject_everyone=None, updated_dt=None, user_id=None, local_vars_configuration=None):  # noqa: E501
        """OrmAccessControlPolicy - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._created_dt = None
        self._edges = None
        self._group_id = None
        self._id = None
        self._organization_id = None
        self._permission = None
        self._project_id = None
        self._root_organization_id = None
        self._subject_everyone = None
        self._updated_dt = None
        self._user_id = None
        self.discriminator = None

        if created_dt is not None:
            self.created_dt = created_dt
        if edges is not None:
            self.edges = edges
        self.group_id = group_id
        if id is not None:
            self.id = id
        self.organization_id = organization_id
        if permission is not None:
            self.permission = permission
        self.project_id = project_id
        self.root_organization_id = root_organization_id
        if subject_everyone is not None:
            self.subject_everyone = subject_everyone
        if updated_dt is not None:
            self.updated_dt = updated_dt
        self.user_id = user_id

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


        :return: The created_dt of this OrmAccessControlPolicy.  # noqa: E501
        :rtype: datetime
        """
        return self._created_dt

    @created_dt.setter
    def created_dt(self, created_dt):
        """Sets the created_dt of this OrmAccessControlPolicy.


        :param created_dt: The created_dt of this OrmAccessControlPolicy.  # noqa: E501
        :type created_dt: datetime
        """

        self._created_dt = created_dt

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


        :return: The edges of this OrmAccessControlPolicy.  # noqa: E501
        :rtype: OrmAccessControlPolicyEdges
        """
        return self._edges

    @edges.setter
    def edges(self, edges):
        """Sets the edges of this OrmAccessControlPolicy.


        :param edges: The edges of this OrmAccessControlPolicy.  # noqa: E501
        :type edges: OrmAccessControlPolicyEdges
        """

        self._edges = edges

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


        :return: The group_id of this OrmAccessControlPolicy.  # noqa: E501
        :rtype: int
        """
        return self._group_id

    @group_id.setter
    def group_id(self, group_id):
        """Sets the group_id of this OrmAccessControlPolicy.


        :param group_id: The group_id of this OrmAccessControlPolicy.  # noqa: E501
        :type group_id: int
        """

        self._group_id = group_id

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


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

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


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

        self._id = id

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


        :return: The organization_id of this OrmAccessControlPolicy.  # noqa: E501
        :rtype: int
        """
        return self._organization_id

    @organization_id.setter
    def organization_id(self, organization_id):
        """Sets the organization_id of this OrmAccessControlPolicy.


        :param organization_id: The organization_id of this OrmAccessControlPolicy.  # noqa: E501
        :type organization_id: int
        """

        self._organization_id = organization_id

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


        :return: The permission of this OrmAccessControlPolicy.  # noqa: E501
        :rtype: str
        """
        return self._permission

    @permission.setter
    def permission(self, permission):
        """Sets the permission of this OrmAccessControlPolicy.


        :param permission: The permission of this OrmAccessControlPolicy.  # noqa: E501
        :type permission: str
        """

        self._permission = permission

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


        :return: The project_id of this OrmAccessControlPolicy.  # noqa: E501
        :rtype: int
        """
        return self._project_id

    @project_id.setter
    def project_id(self, project_id):
        """Sets the project_id of this OrmAccessControlPolicy.


        :param project_id: The project_id of this OrmAccessControlPolicy.  # noqa: E501
        :type project_id: int
        """

        self._project_id = project_id

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


        :return: The root_organization_id of this OrmAccessControlPolicy.  # noqa: E501
        :rtype: int
        """
        return self._root_organization_id

    @root_organization_id.setter
    def root_organization_id(self, root_organization_id):
        """Sets the root_organization_id of this OrmAccessControlPolicy.


        :param root_organization_id: The root_organization_id of this OrmAccessControlPolicy.  # noqa: E501
        :type root_organization_id: int
        """

        self._root_organization_id = root_organization_id

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


        :return: The subject_everyone of this OrmAccessControlPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._subject_everyone

    @subject_everyone.setter
    def subject_everyone(self, subject_everyone):
        """Sets the subject_everyone of this OrmAccessControlPolicy.


        :param subject_everyone: The subject_everyone of this OrmAccessControlPolicy.  # noqa: E501
        :type subject_everyone: bool
        """

        self._subject_everyone = subject_everyone

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


        :return: The updated_dt of this OrmAccessControlPolicy.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_dt

    @updated_dt.setter
    def updated_dt(self, updated_dt):
        """Sets the updated_dt of this OrmAccessControlPolicy.


        :param updated_dt: The updated_dt of this OrmAccessControlPolicy.  # noqa: E501
        :type updated_dt: datetime
        """

        self._updated_dt = updated_dt

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


        :return: The user_id of this OrmAccessControlPolicy.  # noqa: E501
        :rtype: int
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """Sets the user_id of this OrmAccessControlPolicy.


        :param user_id: The user_id of this OrmAccessControlPolicy.  # noqa: E501
        :type user_id: int
        """

        self._user_id = user_id

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, OrmAccessControlPolicy):
            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, OrmAccessControlPolicy):
            return True

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