# coding: utf-8

"""
    Syntropy network API

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

    OpenAPI spec version: 1.0.0
    Contact: support@syntropynet.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class UserWorkspace(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 = {
        "user_id": "float",
        "workspace_id": "float",
        "role_id": "float",
        "user_workspace_id": "float",
        "user_workspace_created_at": "datetime",
        "user_workspace_updated_at": "datetime",
        "user": "User",
        "workspace": "Workspace",
        "role": "Role",
    }

    attribute_map = {
        "user_id": "user_id",
        "workspace_id": "workspace_id",
        "role_id": "role_id",
        "user_workspace_id": "user_workspace_id",
        "user_workspace_created_at": "user_workspace_created_at",
        "user_workspace_updated_at": "user_workspace_updated_at",
        "user": "user",
        "workspace": "workspace",
        "role": "role",
    }

    def __init__(
        self,
        user_id=None,
        workspace_id=None,
        role_id=None,
        user_workspace_id=None,
        user_workspace_created_at=None,
        user_workspace_updated_at=None,
        user=None,
        workspace=None,
        role=None,
    ):  # noqa: E501
        """UserWorkspace - a model defined in Swagger"""  # noqa: E501
        self._user_id = None
        self._workspace_id = None
        self._role_id = None
        self._user_workspace_id = None
        self._user_workspace_created_at = None
        self._user_workspace_updated_at = None
        self._user = None
        self._workspace = None
        self._role = None
        self.discriminator = None
        self.user_id = user_id
        self.workspace_id = workspace_id
        self.role_id = role_id
        self.user_workspace_id = user_workspace_id
        self.user_workspace_created_at = user_workspace_created_at
        self.user_workspace_updated_at = user_workspace_updated_at
        self.user = user
        self.workspace = workspace
        self.role = role

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


        :return: The user_id of this UserWorkspace.  # noqa: E501
        :rtype: float
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """Sets the user_id of this UserWorkspace.


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

        self._user_id = user_id

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


        :return: The workspace_id of this UserWorkspace.  # noqa: E501
        :rtype: float
        """
        return self._workspace_id

    @workspace_id.setter
    def workspace_id(self, workspace_id):
        """Sets the workspace_id of this UserWorkspace.


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

        self._workspace_id = workspace_id

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


        :return: The role_id of this UserWorkspace.  # noqa: E501
        :rtype: float
        """
        return self._role_id

    @role_id.setter
    def role_id(self, role_id):
        """Sets the role_id of this UserWorkspace.


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

        self._role_id = role_id

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


        :return: The user_workspace_id of this UserWorkspace.  # noqa: E501
        :rtype: float
        """
        return self._user_workspace_id

    @user_workspace_id.setter
    def user_workspace_id(self, user_workspace_id):
        """Sets the user_workspace_id of this UserWorkspace.


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

        self._user_workspace_id = user_workspace_id

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


        :return: The user_workspace_created_at of this UserWorkspace.  # noqa: E501
        :rtype: datetime
        """
        return self._user_workspace_created_at

    @user_workspace_created_at.setter
    def user_workspace_created_at(self, user_workspace_created_at):
        """Sets the user_workspace_created_at of this UserWorkspace.


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

        self._user_workspace_created_at = user_workspace_created_at

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


        :return: The user_workspace_updated_at of this UserWorkspace.  # noqa: E501
        :rtype: datetime
        """
        return self._user_workspace_updated_at

    @user_workspace_updated_at.setter
    def user_workspace_updated_at(self, user_workspace_updated_at):
        """Sets the user_workspace_updated_at of this UserWorkspace.


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

        self._user_workspace_updated_at = user_workspace_updated_at

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


        :return: The user of this UserWorkspace.  # noqa: E501
        :rtype: User
        """
        return self._user

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


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

        self._user = user

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


        :return: The workspace of this UserWorkspace.  # noqa: E501
        :rtype: Workspace
        """
        return self._workspace

    @workspace.setter
    def workspace(self, workspace):
        """Sets the workspace of this UserWorkspace.


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

        self._workspace = workspace

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


        :return: The role of this UserWorkspace.  # noqa: E501
        :rtype: Role
        """
        return self._role

    @role.setter
    def role(self, role):
        """Sets the role of this UserWorkspace.


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

        self._role = role

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

        return self.__dict__ == other.__dict__

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