# coding: utf-8

"""
    Hopsworks api

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

import pprint
import re  # noqa: F401

import six
from swagger_client.models.project import Project  # noqa: F401,E501
from swagger_client.models.users import Users  # noqa: F401,E501


class Activity(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': 'int',
        'activity': 'str',
        'timestamp': 'datetime',
        'flag': 'str',
        'project': 'Project',
        'user': 'Users'
    }

    attribute_map = {
        'id': 'id',
        'activity': 'activity',
        'timestamp': 'timestamp',
        'flag': 'flag',
        'project': 'project',
        'user': 'user'
    }

    def __init__(self, id=None, activity=None, timestamp=None, flag=None, project=None, user=None):  # noqa: E501
        """Activity - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._activity = None
        self._timestamp = None
        self._flag = None
        self._project = None
        self._user = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if activity is not None:
            self.activity = activity
        self.timestamp = timestamp
        self.flag = flag
        if project is not None:
            self.project = project
        if user is not None:
            self.user = user

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


        :return: The id of this Activity.  # noqa: E501
        :rtype: int
        """
        return self._id

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


        :param id: The id of this Activity.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The activity of this Activity.  # noqa: E501
        :rtype: str
        """
        return self._activity

    @activity.setter
    def activity(self, activity):
        """Sets the activity of this Activity.


        :param activity: The activity of this Activity.  # noqa: E501
        :type: str
        """

        self._activity = activity

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


        :return: The timestamp of this Activity.  # noqa: E501
        :rtype: datetime
        """
        return self._timestamp

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


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

        self._timestamp = timestamp

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


        :return: The flag of this Activity.  # noqa: E501
        :rtype: str
        """
        return self._flag

    @flag.setter
    def flag(self, flag):
        """Sets the flag of this Activity.


        :param flag: The flag of this Activity.  # noqa: E501
        :type: str
        """
        if flag is None:
            raise ValueError("Invalid value for `flag`, must not be `None`")  # noqa: E501
        allowed_values = ["MEMBER", "PROJECT", "SERVICE", "DATASET", "JOB"]  # noqa: E501
        if flag not in allowed_values:
            raise ValueError(
                "Invalid value for `flag` ({0}), must be one of {1}"  # noqa: E501
                .format(flag, allowed_values)
            )

        self._flag = flag

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


        :return: The project of this Activity.  # noqa: E501
        :rtype: Project
        """
        return self._project

    @project.setter
    def project(self, project):
        """Sets the project of this Activity.


        :param project: The project of this Activity.  # noqa: E501
        :type: Project
        """

        self._project = project

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


        :return: The user of this Activity.  # noqa: E501
        :rtype: Users
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this Activity.


        :param user: The user of this Activity.  # noqa: E501
        :type: Users
        """

        self._user = user

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

        return self.__dict__ == other.__dict__

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