# coding: utf-8

"""
    Kodexa

    Content Intelligence  # noqa: E501

    OpenAPI spec version: 2.0.132
    Contact: suppot@kodexa.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class CloudBotSession(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 = {
        'documents': 'list[CloudDocument]',
        'files': 'list[CloudFile]',
        'id': 'str',
        'last_accessed': 'int',
        'pipeline_templates': 'list[CloudPipeline]',
        'session_state': 'str',
        'type': 'str',
        'bot': 'Bot',
        'bot_state': 'object'
    }
    if hasattr(CloudSession, "swagger_types"):
        swagger_types.update(CloudSession.swagger_types)

    attribute_map = {
        'documents': 'documents',
        'files': 'files',
        'id': 'id',
        'last_accessed': 'lastAccessed',
        'pipeline_templates': 'pipelineTemplates',
        'session_state': 'sessionState',
        'type': 'type',
        'bot': 'bot',
        'bot_state': 'botState'
    }
    if hasattr(CloudSession, "attribute_map"):
        attribute_map.update(CloudSession.attribute_map)

    def __init__(self, documents=None, files=None, id=None, last_accessed=None, pipeline_templates=None, session_state=None, type=None, bot=None, bot_state=None, *args, **kwargs):  # noqa: E501
        """CloudBotSession - a model defined in Swagger"""  # noqa: E501
        self._documents = None
        self._files = None
        self._id = None
        self._last_accessed = None
        self._pipeline_templates = None
        self._session_state = None
        self._type = None
        self._bot = None
        self._bot_state = None
        self.discriminator = None
        if documents is not None:
            self.documents = documents
        if files is not None:
            self.files = files
        self.id = id
        if last_accessed is not None:
            self.last_accessed = last_accessed
        if pipeline_templates is not None:
            self.pipeline_templates = pipeline_templates
        self.session_state = session_state
        self.type = type
        if bot is not None:
            self.bot = bot
        if bot_state is not None:
            self.bot_state = bot_state
        CloudSession.__init__(self, *args, **kwargs)

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


        :return: The documents of this CloudBotSession.  # noqa: E501
        :rtype: list[CloudDocument]
        """
        return self._documents

    @documents.setter
    def documents(self, documents):
        """Sets the documents of this CloudBotSession.


        :param documents: The documents of this CloudBotSession.  # noqa: E501
        :type: list[CloudDocument]
        """

        self._documents = documents

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


        :return: The files of this CloudBotSession.  # noqa: E501
        :rtype: list[CloudFile]
        """
        return self._files

    @files.setter
    def files(self, files):
        """Sets the files of this CloudBotSession.


        :param files: The files of this CloudBotSession.  # noqa: E501
        :type: list[CloudFile]
        """

        self._files = files

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


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

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


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

        self._id = id

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


        :return: The last_accessed of this CloudBotSession.  # noqa: E501
        :rtype: int
        """
        return self._last_accessed

    @last_accessed.setter
    def last_accessed(self, last_accessed):
        """Sets the last_accessed of this CloudBotSession.


        :param last_accessed: The last_accessed of this CloudBotSession.  # noqa: E501
        :type: int
        """

        self._last_accessed = last_accessed

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


        :return: The pipeline_templates of this CloudBotSession.  # noqa: E501
        :rtype: list[CloudPipeline]
        """
        return self._pipeline_templates

    @pipeline_templates.setter
    def pipeline_templates(self, pipeline_templates):
        """Sets the pipeline_templates of this CloudBotSession.


        :param pipeline_templates: The pipeline_templates of this CloudBotSession.  # noqa: E501
        :type: list[CloudPipeline]
        """

        self._pipeline_templates = pipeline_templates

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


        :return: The session_state of this CloudBotSession.  # noqa: E501
        :rtype: str
        """
        return self._session_state

    @session_state.setter
    def session_state(self, session_state):
        """Sets the session_state of this CloudBotSession.


        :param session_state: The session_state of this CloudBotSession.  # noqa: E501
        :type: str
        """
        if session_state is None:
            raise ValueError("Invalid value for `session_state`, must not be `None`")  # noqa: E501
        allowed_values = ["OPEN", "CLOSED"]  # noqa: E501
        if session_state not in allowed_values:
            raise ValueError(
                "Invalid value for `session_state` ({0}), must be one of {1}"  # noqa: E501
                .format(session_state, allowed_values)
            )

        self._session_state = session_state

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


        :return: The type of this CloudBotSession.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this CloudBotSession.


        :param type: The type of this CloudBotSession.  # noqa: E501
        :type: str
        """
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501

        self._type = type

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


        :return: The bot of this CloudBotSession.  # noqa: E501
        :rtype: Bot
        """
        return self._bot

    @bot.setter
    def bot(self, bot):
        """Sets the bot of this CloudBotSession.


        :param bot: The bot of this CloudBotSession.  # noqa: E501
        :type: Bot
        """

        self._bot = bot

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


        :return: The bot_state of this CloudBotSession.  # noqa: E501
        :rtype: object
        """
        return self._bot_state

    @bot_state.setter
    def bot_state(self, bot_state):
        """Sets the bot_state of this CloudBotSession.


        :param bot_state: The bot_state of this CloudBotSession.  # noqa: E501
        :type: object
        """

        self._bot_state = bot_state

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

        return self.__dict__ == other.__dict__

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