# coding: utf-8

from __future__ import absolute_import

from datetime import date, datetime  # noqa: F401
from typing import Dict, List  # noqa: F401

from pcluster.api import util
from pcluster.api.models.base_model_ import Model


class LogEvent(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, message=None, timestamp=None):  # noqa: E501
        """LogEvent - a model defined in OpenAPI

        :param message: The message of this LogEvent.  # noqa: E501
        :type message: str
        :param timestamp: The timestamp of this LogEvent.  # noqa: E501
        :type timestamp: datetime
        """
        self.openapi_types = {"message": str, "timestamp": datetime}

        self.attribute_map = {"message": "message", "timestamp": "timestamp"}

        self._message = message
        self._timestamp = timestamp

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

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

    @property
    def message(self):
        """Gets the message of this LogEvent.


        :return: The message of this LogEvent.
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this LogEvent.


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

        self._message = message

    @property
    def timestamp(self):
        """Gets the timestamp of this LogEvent.


        :return: The timestamp of this LogEvent.
        :rtype: datetime
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp):
        """Sets the timestamp of this LogEvent.


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

        self._timestamp = timestamp
