# coding: utf-8

"""
    Knetik Platform API Documentation latest 

    This is the spec for the Knetik API.  Use this in conjunction with the documentation found at https://knetikcloud.com.

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


from pprint import pformat
from six import iteritems
import re


class PermissionResource(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 = {
        'created_date': 'int',
        'description': 'str',
        'locked': 'bool',
        'name': 'str',
        'parent': 'str',
        'permission': 'str',
        'updated_date': 'int'
    }

    attribute_map = {
        'created_date': 'created_date',
        'description': 'description',
        'locked': 'locked',
        'name': 'name',
        'parent': 'parent',
        'permission': 'permission',
        'updated_date': 'updated_date'
    }

    def __init__(self, created_date=None, description=None, locked=None, name=None, parent=None, permission=None, updated_date=None):
        """
        PermissionResource - a model defined in Swagger
        """

        self._created_date = None
        self._description = None
        self._locked = None
        self._name = None
        self._parent = None
        self._permission = None
        self._updated_date = None
        self.discriminator = None

        if created_date is not None:
          self.created_date = created_date
        if description is not None:
          self.description = description
        if locked is not None:
          self.locked = locked
        self.name = name
        if parent is not None:
          self.parent = parent
        self.permission = permission
        if updated_date is not None:
          self.updated_date = updated_date

    @property
    def created_date(self):
        """
        Gets the created_date of this PermissionResource.
        The date the permission was added. Unix timestamp in seconds

        :return: The created_date of this PermissionResource.
        :rtype: int
        """
        return self._created_date

    @created_date.setter
    def created_date(self, created_date):
        """
        Sets the created_date of this PermissionResource.
        The date the permission was added. Unix timestamp in seconds

        :param created_date: The created_date of this PermissionResource.
        :type: int
        """

        self._created_date = created_date

    @property
    def description(self):
        """
        Gets the description of this PermissionResource.
        The description of the permission

        :return: The description of this PermissionResource.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """
        Sets the description of this PermissionResource.
        The description of the permission

        :param description: The description of this PermissionResource.
        :type: str
        """

        self._description = description

    @property
    def locked(self):
        """
        Gets the locked of this PermissionResource.
        Whether a permission is locked from being deleted

        :return: The locked of this PermissionResource.
        :rtype: bool
        """
        return self._locked

    @locked.setter
    def locked(self, locked):
        """
        Sets the locked of this PermissionResource.
        Whether a permission is locked from being deleted

        :param locked: The locked of this PermissionResource.
        :type: bool
        """

        self._locked = locked

    @property
    def name(self):
        """
        Gets the name of this PermissionResource.
        The name of the permission used for display purposes

        :return: The name of this PermissionResource.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this PermissionResource.
        The name of the permission used for display purposes

        :param name: The name of this PermissionResource.
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")

        self._name = name

    @property
    def parent(self):
        """
        Gets the parent of this PermissionResource.
        The name of the parent of the permission

        :return: The parent of this PermissionResource.
        :rtype: str
        """
        return self._parent

    @parent.setter
    def parent(self, parent):
        """
        Sets the parent of this PermissionResource.
        The name of the parent of the permission

        :param parent: The parent of this PermissionResource.
        :type: str
        """

        self._parent = parent

    @property
    def permission(self):
        """
        Gets the permission of this PermissionResource.
        The keyword that defines the permission

        :return: The permission of this PermissionResource.
        :rtype: str
        """
        return self._permission

    @permission.setter
    def permission(self, permission):
        """
        Sets the permission of this PermissionResource.
        The keyword that defines the permission

        :param permission: The permission of this PermissionResource.
        :type: str
        """
        if permission is None:
            raise ValueError("Invalid value for `permission`, must not be `None`")

        self._permission = permission

    @property
    def updated_date(self):
        """
        Gets the updated_date of this PermissionResource.
        The date the permission was updated. Unix timestamp in seconds

        :return: The updated_date of this PermissionResource.
        :rtype: int
        """
        return self._updated_date

    @updated_date.setter
    def updated_date(self, updated_date):
        """
        Sets the updated_date of this PermissionResource.
        The date the permission was updated. Unix timestamp in seconds

        :param updated_date: The updated_date of this PermissionResource.
        :type: int
        """

        self._updated_date = updated_date

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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 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, PermissionResource):
            return False

        return self.__dict__ == other.__dict__

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