# coding: utf-8

"""
Copyright 2017 Square, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""


from pprint import pformat
from six import iteritems
import re


class V1EmployeeRole(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, name=None, permissions=None, is_owner=None, created_at=None, updated_at=None):
        """
        V1EmployeeRole - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'id': 'str',
            'name': 'str',
            'permissions': 'list[str]',
            'is_owner': 'bool',
            'created_at': 'str',
            'updated_at': 'str'
        }

        self.attribute_map = {
            'id': 'id',
            'name': 'name',
            'permissions': 'permissions',
            'is_owner': 'is_owner',
            'created_at': 'created_at',
            'updated_at': 'updated_at'
        }

        self._id = id
        self._name = name
        self._permissions = permissions
        self._is_owner = is_owner
        self._created_at = created_at
        self._updated_at = updated_at

    @property
    def id(self):
        """
        Gets the id of this V1EmployeeRole.
        The role's unique ID, Can only be set by Square.

        :return: The id of this V1EmployeeRole.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this V1EmployeeRole.
        The role's unique ID, Can only be set by Square.

        :param id: The id of this V1EmployeeRole.
        :type: str
        """

        self._id = id

    @property
    def name(self):
        """
        Gets the name of this V1EmployeeRole.
        The role's merchant-defined name.

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

    @name.setter
    def name(self, name):
        """
        Sets the name of this V1EmployeeRole.
        The role's merchant-defined name.

        :param name: The name of this V1EmployeeRole.
        :type: str
        """

        self._name = name

    @property
    def permissions(self):
        """
        Gets the permissions of this V1EmployeeRole.
        The role's permissions. See [V1EmployeeRolePermissions](#type-v1employeerolepermissions) for possible values

        :return: The permissions of this V1EmployeeRole.
        :rtype: list[str]
        """
        return self._permissions

    @permissions.setter
    def permissions(self, permissions):
        """
        Sets the permissions of this V1EmployeeRole.
        The role's permissions. See [V1EmployeeRolePermissions](#type-v1employeerolepermissions) for possible values

        :param permissions: The permissions of this V1EmployeeRole.
        :type: list[str]
        """

        self._permissions = permissions

    @property
    def is_owner(self):
        """
        Gets the is_owner of this V1EmployeeRole.
        If true, employees with this role have all permissions, regardless of the values indicated in permissions.

        :return: The is_owner of this V1EmployeeRole.
        :rtype: bool
        """
        return self._is_owner

    @is_owner.setter
    def is_owner(self, is_owner):
        """
        Sets the is_owner of this V1EmployeeRole.
        If true, employees with this role have all permissions, regardless of the values indicated in permissions.

        :param is_owner: The is_owner of this V1EmployeeRole.
        :type: bool
        """

        self._is_owner = is_owner

    @property
    def created_at(self):
        """
        Gets the created_at of this V1EmployeeRole.
        The time when the employee entity was created, in ISO 8601 format. Is set by Square when the Role is created.

        :return: The created_at of this V1EmployeeRole.
        :rtype: str
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """
        Sets the created_at of this V1EmployeeRole.
        The time when the employee entity was created, in ISO 8601 format. Is set by Square when the Role is created.

        :param created_at: The created_at of this V1EmployeeRole.
        :type: str
        """

        self._created_at = created_at

    @property
    def updated_at(self):
        """
        Gets the updated_at of this V1EmployeeRole.
        The time when the employee entity was most recently updated, in ISO 8601 format. Is set by Square when the Role updated.

        :return: The updated_at of this V1EmployeeRole.
        :rtype: str
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """
        Sets the updated_at of this V1EmployeeRole.
        The time when the employee entity was most recently updated, in ISO 8601 format. Is set by Square when the Role updated.

        :param updated_at: The updated_at of this V1EmployeeRole.
        :type: str
        """

        self._updated_at = updated_at

    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
        """
        return self.__dict__ == other.__dict__

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