# coding: utf-8

"""
    eLabFTW REST API v2 Documentation

    This document describes all available endpoints and methods for eLabFTW's API version 2.   # noqa: E501

    OpenAPI spec version: 2.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class ItemsType(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 = {
        'category_id': 'int',
        'category': 'str',
        'color': 'str',
        'bookable': 'int',
        'body': 'str',
        'ordering': 'int',
        'canread': 'str',
        'canwrite': 'str'
    }

    attribute_map = {
        'category_id': 'category_id',
        'category': 'category',
        'color': 'color',
        'bookable': 'bookable',
        'body': 'body',
        'ordering': 'ordering',
        'canread': 'canread',
        'canwrite': 'canwrite'
    }

    def __init__(self, category_id=None, category=None, color=None, bookable=None, body=None, ordering=None, canread=None, canwrite=None):  # noqa: E501
        """ItemsType - a model defined in Swagger"""  # noqa: E501
        self._category_id = None
        self._category = None
        self._color = None
        self._bookable = None
        self._body = None
        self._ordering = None
        self._canread = None
        self._canwrite = None
        self.discriminator = None
        if category_id is not None:
            self.category_id = category_id
        if category is not None:
            self.category = category
        if color is not None:
            self.color = color
        if bookable is not None:
            self.bookable = bookable
        if body is not None:
            self.body = body
        if ordering is not None:
            self.ordering = ordering
        if canread is not None:
            self.canread = canread
        if canwrite is not None:
            self.canwrite = canwrite

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


        :return: The category_id of this ItemsType.  # noqa: E501
        :rtype: int
        """
        return self._category_id

    @category_id.setter
    def category_id(self, category_id):
        """Sets the category_id of this ItemsType.


        :param category_id: The category_id of this ItemsType.  # noqa: E501
        :type: int
        """

        self._category_id = category_id

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


        :return: The category of this ItemsType.  # noqa: E501
        :rtype: str
        """
        return self._category

    @category.setter
    def category(self, category):
        """Sets the category of this ItemsType.


        :param category: The category of this ItemsType.  # noqa: E501
        :type: str
        """

        self._category = category

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


        :return: The color of this ItemsType.  # noqa: E501
        :rtype: str
        """
        return self._color

    @color.setter
    def color(self, color):
        """Sets the color of this ItemsType.


        :param color: The color of this ItemsType.  # noqa: E501
        :type: str
        """

        self._color = color

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


        :return: The bookable of this ItemsType.  # noqa: E501
        :rtype: int
        """
        return self._bookable

    @bookable.setter
    def bookable(self, bookable):
        """Sets the bookable of this ItemsType.


        :param bookable: The bookable of this ItemsType.  # noqa: E501
        :type: int
        """

        self._bookable = bookable

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


        :return: The body of this ItemsType.  # noqa: E501
        :rtype: str
        """
        return self._body

    @body.setter
    def body(self, body):
        """Sets the body of this ItemsType.


        :param body: The body of this ItemsType.  # noqa: E501
        :type: str
        """

        self._body = body

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


        :return: The ordering of this ItemsType.  # noqa: E501
        :rtype: int
        """
        return self._ordering

    @ordering.setter
    def ordering(self, ordering):
        """Sets the ordering of this ItemsType.


        :param ordering: The ordering of this ItemsType.  # noqa: E501
        :type: int
        """

        self._ordering = ordering

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


        :return: The canread of this ItemsType.  # noqa: E501
        :rtype: str
        """
        return self._canread

    @canread.setter
    def canread(self, canread):
        """Sets the canread of this ItemsType.


        :param canread: The canread of this ItemsType.  # noqa: E501
        :type: str
        """

        self._canread = canread

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


        :return: The canwrite of this ItemsType.  # noqa: E501
        :rtype: str
        """
        return self._canwrite

    @canwrite.setter
    def canwrite(self, canwrite):
        """Sets the canwrite of this ItemsType.


        :param canwrite: The canwrite of this ItemsType.  # noqa: E501
        :type: str
        """

        self._canwrite = canwrite

    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(ItemsType, 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, ItemsType):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
