# coding: utf-8

"""
    shado-python-client

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

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


import pprint
import re  # noqa: F401

import six

from shado_client.models.object_id import ObjectID  # noqa: F401,E501


class Membership(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 = {
        'is_group_admin': 'bool',
        'created_at': 'datetime',
        'id': 'ObjectID',
        'owner_id': 'ObjectID',
        'invited_by': 'ObjectID',
        'group_id': 'ObjectID'
    }

    attribute_map = {
        'is_group_admin': 'isGroupAdmin',
        'created_at': 'createdAt',
        'id': 'id',
        'owner_id': 'ownerId',
        'invited_by': 'invitedBy',
        'group_id': 'groupId'
    }

    def __init__(self, is_group_admin=False, created_at=None, id=None, owner_id=None, invited_by=None, group_id=None):  # noqa: E501
        """Membership - a model defined in Swagger"""  # noqa: E501

        self._is_group_admin = None
        self._created_at = None
        self._id = None
        self._owner_id = None
        self._invited_by = None
        self._group_id = None
        self.discriminator = None

        if is_group_admin is not None:
            self.is_group_admin = is_group_admin
        if created_at is not None:
            self.created_at = created_at
        if id is not None:
            self.id = id
        if owner_id is not None:
            self.owner_id = owner_id
        if invited_by is not None:
            self.invited_by = invited_by
        if group_id is not None:
            self.group_id = group_id

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


        :return: The is_group_admin of this Membership.  # noqa: E501
        :rtype: bool
        """
        return self._is_group_admin

    @is_group_admin.setter
    def is_group_admin(self, is_group_admin):
        """Sets the is_group_admin of this Membership.


        :param is_group_admin: The is_group_admin of this Membership.  # noqa: E501
        :type: bool
        """

        self._is_group_admin = is_group_admin

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


        :return: The created_at of this Membership.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Membership.


        :param created_at: The created_at of this Membership.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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


        :return: The id of this Membership.  # noqa: E501
        :rtype: ObjectID
        """
        return self._id

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


        :param id: The id of this Membership.  # noqa: E501
        :type: ObjectID
        """

        self._id = id

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


        :return: The owner_id of this Membership.  # noqa: E501
        :rtype: ObjectID
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this Membership.


        :param owner_id: The owner_id of this Membership.  # noqa: E501
        :type: ObjectID
        """

        self._owner_id = owner_id

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


        :return: The invited_by of this Membership.  # noqa: E501
        :rtype: ObjectID
        """
        return self._invited_by

    @invited_by.setter
    def invited_by(self, invited_by):
        """Sets the invited_by of this Membership.


        :param invited_by: The invited_by of this Membership.  # noqa: E501
        :type: ObjectID
        """

        self._invited_by = invited_by

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


        :return: The group_id of this Membership.  # noqa: E501
        :rtype: ObjectID
        """
        return self._group_id

    @group_id.setter
    def group_id(self, group_id):
        """Sets the group_id of this Membership.


        :param group_id: The group_id of this Membership.  # noqa: E501
        :type: ObjectID
        """

        self._group_id = group_id

    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

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

        return self.__dict__ == other.__dict__

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