# 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 UpdateAccessKeyDTO(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',
        'enabled': 'bool',
        'ip_whitelisting': 'list[str]',
        'notes': 'str'
    }

    attribute_map = {
        'access_key': 'accessKey',
        'enabled': 'enabled',
        'ip_whitelisting': 'ipWhitelisting',
        'notes': 'notes'
    }

    def __init__(self, access_key=None, enabled=None, ip_whitelisting=None, notes=None):  # noqa: E501
        """UpdateAccessKeyDTO - a model defined in Swagger"""  # noqa: E501
        self._access_key = None
        self._enabled = None
        self._ip_whitelisting = None
        self._notes = None
        self.discriminator = None
        self.access_key = access_key
        self.enabled = enabled
        self.ip_whitelisting = ip_whitelisting
        if notes is not None:
            self.notes = notes

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


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

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


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

        self._access_key = access_key

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


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

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


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

        self._enabled = enabled

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


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

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


        :param ip_whitelisting: The ip_whitelisting of this UpdateAccessKeyDTO.  # noqa: E501
        :type: list[str]
        """
        if ip_whitelisting is None:
            raise ValueError("Invalid value for `ip_whitelisting`, must not be `None`")  # noqa: E501

        self._ip_whitelisting = ip_whitelisting

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


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

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


        :param notes: The notes of this UpdateAccessKeyDTO.  # 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(UpdateAccessKeyDTO, 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, UpdateAccessKeyDTO):
            return False

        return self.__dict__ == other.__dict__

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