# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from rbb_swagger_server.models.base_model_ import Model
from rbb_swagger_server.models.user import User  # noqa: F401,E501
from rbb_swagger_server import util


class Comment(Model):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    def __init__(self, identifier: int=None, comment_text: str=None, created: datetime=None, posted_by: User=None):  # noqa: E501
        """Comment - a model defined in Swagger

        :param identifier: The identifier of this Comment.  # noqa: E501
        :type identifier: int
        :param comment_text: The comment_text of this Comment.  # noqa: E501
        :type comment_text: str
        :param created: The created of this Comment.  # noqa: E501
        :type created: datetime
        :param posted_by: The posted_by of this Comment.  # noqa: E501
        :type posted_by: User
        """
        self.swagger_types = {
            'identifier': int,
            'comment_text': str,
            'created': datetime,
            'posted_by': User
        }

        self.attribute_map = {
            'identifier': 'identifier',
            'comment_text': 'comment_text',
            'created': 'created',
            'posted_by': 'posted_by'
        }

        self._identifier = identifier
        self._comment_text = comment_text
        self._created = created
        self._posted_by = posted_by

    @classmethod
    def from_dict(cls, dikt) -> 'Comment':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The Comment of this Comment.  # noqa: E501
        :rtype: Comment
        """
        return util.deserialize_model(dikt, cls)

    @property
    def identifier(self) -> int:
        """Gets the identifier of this Comment.


        :return: The identifier of this Comment.
        :rtype: int
        """
        return self._identifier

    @identifier.setter
    def identifier(self, identifier: int):
        """Sets the identifier of this Comment.


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

        self._identifier = identifier

    @property
    def comment_text(self) -> str:
        """Gets the comment_text of this Comment.


        :return: The comment_text of this Comment.
        :rtype: str
        """
        return self._comment_text

    @comment_text.setter
    def comment_text(self, comment_text: str):
        """Sets the comment_text of this Comment.


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

        self._comment_text = comment_text

    @property
    def created(self) -> datetime:
        """Gets the created of this Comment.


        :return: The created of this Comment.
        :rtype: datetime
        """
        return self._created

    @created.setter
    def created(self, created: datetime):
        """Sets the created of this Comment.


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

        self._created = created

    @property
    def posted_by(self) -> User:
        """Gets the posted_by of this Comment.


        :return: The posted_by of this Comment.
        :rtype: User
        """
        return self._posted_by

    @posted_by.setter
    def posted_by(self, posted_by: User):
        """Sets the posted_by of this Comment.


        :param posted_by: The posted_by of this Comment.
        :type posted_by: User
        """

        self._posted_by = posted_by
