# coding: utf-8

"""
    Trackside Software TeamDB API v2.0

    This API enables you to access TeamDB data  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: support@trackside.fr
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from teamdbapi.configuration import Configuration


class NotesAuthorization(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',
        'concerned_entity_id': 'str',
        'concerned_entity_is_group': 'bool',
        'item_base_id': 'str',
        'has_acces': 'bool'
    }

    attribute_map = {
        'id': 'Id',
        'concerned_entity_id': 'ConcernedEntityId',
        'concerned_entity_is_group': 'ConcernedEntityIsGroup',
        'item_base_id': 'ItemBaseId',
        'has_acces': 'HasAcces'
    }

    def __init__(self, id=None, concerned_entity_id=None, concerned_entity_is_group=None, item_base_id=None, has_acces=None, _configuration=None):  # noqa: E501
        """NotesAuthorization - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._concerned_entity_id = None
        self._concerned_entity_is_group = None
        self._item_base_id = None
        self._has_acces = None
        self.discriminator = None

        self.id = id
        self.concerned_entity_id = concerned_entity_id
        if concerned_entity_is_group is not None:
            self.concerned_entity_is_group = concerned_entity_is_group
        self.item_base_id = item_base_id
        self.has_acces = has_acces

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

        The unique authorization Id.  # noqa: E501

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

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

        The unique authorization Id.  # noqa: E501

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

        self._id = id

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

        The unique id of the concerned entity (user or group).  # noqa: E501

        :return: The concerned_entity_id of this NotesAuthorization.  # noqa: E501
        :rtype: str
        """
        return self._concerned_entity_id

    @concerned_entity_id.setter
    def concerned_entity_id(self, concerned_entity_id):
        """Sets the concerned_entity_id of this NotesAuthorization.

        The unique id of the concerned entity (user or group).  # noqa: E501

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

        self._concerned_entity_id = concerned_entity_id

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

        Set to True if `ConcernedEntityId` is a group id.  # noqa: E501

        :return: The concerned_entity_is_group of this NotesAuthorization.  # noqa: E501
        :rtype: bool
        """
        return self._concerned_entity_is_group

    @concerned_entity_is_group.setter
    def concerned_entity_is_group(self, concerned_entity_is_group):
        """Sets the concerned_entity_is_group of this NotesAuthorization.

        Set to True if `ConcernedEntityId` is a group id.  # noqa: E501

        :param concerned_entity_is_group: The concerned_entity_is_group of this NotesAuthorization.  # noqa: E501
        :type: bool
        """

        self._concerned_entity_is_group = concerned_entity_is_group

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

        The itemBase (event or car) id to which this authorization belongs.  # noqa: E501

        :return: The item_base_id of this NotesAuthorization.  # noqa: E501
        :rtype: str
        """
        return self._item_base_id

    @item_base_id.setter
    def item_base_id(self, item_base_id):
        """Sets the item_base_id of this NotesAuthorization.

        The itemBase (event or car) id to which this authorization belongs.  # noqa: E501

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

        self._item_base_id = item_base_id

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

        Set to True to allow the user/group to access to the event or car.  # noqa: E501

        :return: The has_acces of this NotesAuthorization.  # noqa: E501
        :rtype: bool
        """
        return self._has_acces

    @has_acces.setter
    def has_acces(self, has_acces):
        """Sets the has_acces of this NotesAuthorization.

        Set to True to allow the user/group to access to the event or car.  # noqa: E501

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

        self._has_acces = has_acces

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

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