# coding: utf-8

"""
    CartoVista REST API

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

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

import pprint
import re  # noqa: F401

import six

class AccessKeyDTO(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 = {
        'access_key': 'str',
        'access_key_string': 'str',
        'has_access_key': 'bool',
        'has_secret_key': 'bool',
        'mode': 'ApiModeEnum',
        'enabled': 'bool',
        'user_id': 'str',
        'tenant_id': 'str',
        'creation_time': 'datetime',
        'last_used_time': 'datetime',
        'ip_whitelisting': 'list[str]',
        'notes': 'str'
    }

    attribute_map = {
        'access_key': 'accessKey',
        'access_key_string': 'accessKeyString',
        'has_access_key': 'hasAccessKey',
        'has_secret_key': 'hasSecretKey',
        'mode': 'mode',
        'enabled': 'enabled',
        'user_id': 'userId',
        'tenant_id': 'tenantId',
        'creation_time': 'creationTime',
        'last_used_time': 'lastUsedTime',
        'ip_whitelisting': 'ipWhitelisting',
        'notes': 'notes'
    }

    def __init__(self, access_key=None, access_key_string=None, has_access_key=None, has_secret_key=None, mode=None, enabled=None, user_id=None, tenant_id=None, creation_time=None, last_used_time=None, ip_whitelisting=None, notes=None):  # noqa: E501
        """AccessKeyDTO - a model defined in Swagger"""  # noqa: E501
        self._access_key = None
        self._access_key_string = None
        self._has_access_key = None
        self._has_secret_key = None
        self._mode = None
        self._enabled = None
        self._user_id = None
        self._tenant_id = None
        self._creation_time = None
        self._last_used_time = None
        self._ip_whitelisting = None
        self._notes = None
        self.discriminator = None
        if access_key is not None:
            self.access_key = access_key
        if access_key_string is not None:
            self.access_key_string = access_key_string
        if has_access_key is not None:
            self.has_access_key = has_access_key
        if has_secret_key is not None:
            self.has_secret_key = has_secret_key
        if mode is not None:
            self.mode = mode
        if enabled is not None:
            self.enabled = enabled
        if user_id is not None:
            self.user_id = user_id
        if tenant_id is not None:
            self.tenant_id = tenant_id
        if creation_time is not None:
            self.creation_time = creation_time
        if last_used_time is not None:
            self.last_used_time = last_used_time
        if ip_whitelisting is not None:
            self.ip_whitelisting = ip_whitelisting
        if notes is not None:
            self.notes = notes

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


        :return: The access_key of this AccessKeyDTO.  # noqa: E501
        :rtype: str
        """
        return self._access_key

    @access_key.setter
    def access_key(self, access_key):
        """Sets the access_key of this AccessKeyDTO.


        :param access_key: The access_key of this AccessKeyDTO.  # noqa: E501
        :type: str
        """

        self._access_key = access_key

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


        :return: The access_key_string of this AccessKeyDTO.  # noqa: E501
        :rtype: str
        """
        return self._access_key_string

    @access_key_string.setter
    def access_key_string(self, access_key_string):
        """Sets the access_key_string of this AccessKeyDTO.


        :param access_key_string: The access_key_string of this AccessKeyDTO.  # noqa: E501
        :type: str
        """

        self._access_key_string = access_key_string

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


        :return: The has_access_key of this AccessKeyDTO.  # noqa: E501
        :rtype: bool
        """
        return self._has_access_key

    @has_access_key.setter
    def has_access_key(self, has_access_key):
        """Sets the has_access_key of this AccessKeyDTO.


        :param has_access_key: The has_access_key of this AccessKeyDTO.  # noqa: E501
        :type: bool
        """

        self._has_access_key = has_access_key

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


        :return: The has_secret_key of this AccessKeyDTO.  # noqa: E501
        :rtype: bool
        """
        return self._has_secret_key

    @has_secret_key.setter
    def has_secret_key(self, has_secret_key):
        """Sets the has_secret_key of this AccessKeyDTO.


        :param has_secret_key: The has_secret_key of this AccessKeyDTO.  # noqa: E501
        :type: bool
        """

        self._has_secret_key = has_secret_key

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


        :return: The mode of this AccessKeyDTO.  # noqa: E501
        :rtype: ApiModeEnum
        """
        return self._mode

    @mode.setter
    def mode(self, mode):
        """Sets the mode of this AccessKeyDTO.


        :param mode: The mode of this AccessKeyDTO.  # noqa: E501
        :type: ApiModeEnum
        """

        self._mode = mode

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


        :return: The enabled of this AccessKeyDTO.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this AccessKeyDTO.


        :param enabled: The enabled of this AccessKeyDTO.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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


        :return: The user_id of this AccessKeyDTO.  # noqa: E501
        :rtype: str
        """
        return self._user_id

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


        :param user_id: The user_id of this AccessKeyDTO.  # noqa: E501
        :type: str
        """

        self._user_id = user_id

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


        :return: The tenant_id of this AccessKeyDTO.  # noqa: E501
        :rtype: str
        """
        return self._tenant_id

    @tenant_id.setter
    def tenant_id(self, tenant_id):
        """Sets the tenant_id of this AccessKeyDTO.


        :param tenant_id: The tenant_id of this AccessKeyDTO.  # noqa: E501
        :type: str
        """

        self._tenant_id = tenant_id

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


        :return: The creation_time of this AccessKeyDTO.  # noqa: E501
        :rtype: datetime
        """
        return self._creation_time

    @creation_time.setter
    def creation_time(self, creation_time):
        """Sets the creation_time of this AccessKeyDTO.


        :param creation_time: The creation_time of this AccessKeyDTO.  # noqa: E501
        :type: datetime
        """

        self._creation_time = creation_time

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


        :return: The last_used_time of this AccessKeyDTO.  # noqa: E501
        :rtype: datetime
        """
        return self._last_used_time

    @last_used_time.setter
    def last_used_time(self, last_used_time):
        """Sets the last_used_time of this AccessKeyDTO.


        :param last_used_time: The last_used_time of this AccessKeyDTO.  # noqa: E501
        :type: datetime
        """

        self._last_used_time = last_used_time

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


        :return: The ip_whitelisting of this AccessKeyDTO.  # noqa: E501
        :rtype: list[str]
        """
        return self._ip_whitelisting

    @ip_whitelisting.setter
    def ip_whitelisting(self, ip_whitelisting):
        """Sets the ip_whitelisting of this AccessKeyDTO.


        :param ip_whitelisting: The ip_whitelisting of this AccessKeyDTO.  # noqa: E501
        :type: list[str]
        """

        self._ip_whitelisting = ip_whitelisting

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


        :return: The notes of this AccessKeyDTO.  # noqa: E501
        :rtype: str
        """
        return self._notes

    @notes.setter
    def notes(self, notes):
        """Sets the notes of this AccessKeyDTO.


        :param notes: The notes of this AccessKeyDTO.  # noqa: E501
        :type: str
        """

        self._notes = notes

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

        return self.__dict__ == other.__dict__

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