# coding: utf-8

"""
    Managed Ray API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class ApiKeyInfo(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'hex_hashed_id': 'str',
        'display_id': 'str',
        'created_at': 'datetime',
        'expires_at': 'datetime',
        'name': 'str',
        'created_by': 'str',
        'revoked_at': 'datetime'
    }

    attribute_map = {
        'hex_hashed_id': 'hex_hashed_id',
        'display_id': 'display_id',
        'created_at': 'created_at',
        'expires_at': 'expires_at',
        'name': 'name',
        'created_by': 'created_by',
        'revoked_at': 'revoked_at'
    }

    def __init__(self, hex_hashed_id=None, display_id=None, created_at=None, expires_at=None, name=None, created_by=None, revoked_at=None, local_vars_configuration=None):  # noqa: E501
        """ApiKeyInfo - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._hex_hashed_id = None
        self._display_id = None
        self._created_at = None
        self._expires_at = None
        self._name = None
        self._created_by = None
        self._revoked_at = None
        self.discriminator = None

        self.hex_hashed_id = hex_hashed_id
        self.display_id = display_id
        self.created_at = created_at
        self.expires_at = expires_at
        if name is not None:
            self.name = name
        if created_by is not None:
            self.created_by = created_by
        if revoked_at is not None:
            self.revoked_at = revoked_at

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


        :return: The hex_hashed_id of this ApiKeyInfo.  # noqa: E501
        :rtype: str
        """
        return self._hex_hashed_id

    @hex_hashed_id.setter
    def hex_hashed_id(self, hex_hashed_id):
        """Sets the hex_hashed_id of this ApiKeyInfo.


        :param hex_hashed_id: The hex_hashed_id of this ApiKeyInfo.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and hex_hashed_id is None:  # noqa: E501
            raise ValueError("Invalid value for `hex_hashed_id`, must not be `None`")  # noqa: E501

        self._hex_hashed_id = hex_hashed_id

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


        :return: The display_id of this ApiKeyInfo.  # noqa: E501
        :rtype: str
        """
        return self._display_id

    @display_id.setter
    def display_id(self, display_id):
        """Sets the display_id of this ApiKeyInfo.


        :param display_id: The display_id of this ApiKeyInfo.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and display_id is None:  # noqa: E501
            raise ValueError("Invalid value for `display_id`, must not be `None`")  # noqa: E501

        self._display_id = display_id

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


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

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


        :param created_at: The created_at of this ApiKeyInfo.  # noqa: E501
        :type: datetime
        """
        if self.local_vars_configuration.client_side_validation and created_at is None:  # noqa: E501
            raise ValueError("Invalid value for `created_at`, must not be `None`")  # noqa: E501

        self._created_at = created_at

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


        :return: The expires_at of this ApiKeyInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._expires_at

    @expires_at.setter
    def expires_at(self, expires_at):
        """Sets the expires_at of this ApiKeyInfo.


        :param expires_at: The expires_at of this ApiKeyInfo.  # noqa: E501
        :type: datetime
        """
        if self.local_vars_configuration.client_side_validation and expires_at is None:  # noqa: E501
            raise ValueError("Invalid value for `expires_at`, must not be `None`")  # noqa: E501

        self._expires_at = expires_at

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


        :return: The name of this ApiKeyInfo.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ApiKeyInfo.


        :param name: The name of this ApiKeyInfo.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The created_by of this ApiKeyInfo.  # noqa: E501
        :rtype: str
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this ApiKeyInfo.


        :param created_by: The created_by of this ApiKeyInfo.  # noqa: E501
        :type: str
        """

        self._created_by = created_by

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


        :return: The revoked_at of this ApiKeyInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._revoked_at

    @revoked_at.setter
    def revoked_at(self, revoked_at):
        """Sets the revoked_at of this ApiKeyInfo.


        :param revoked_at: The revoked_at of this ApiKeyInfo.  # noqa: E501
        :type: datetime
        """

        self._revoked_at = revoked_at

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

        for attr, _ in six.iteritems(self.openapi_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, ApiKeyInfo):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
