# coding: utf-8

"""
    Key Management API

    Due to regulatory requirements applicable to our EU/UK sellers, for certain APIs, developers need to add digital signatures to the respective HTTP call. The Key Management API creates keypairs that are required when creating digital signatures for the following APIs:<ul><li>All methods in the <a href=\"/api-docs/sell/finances/resources/methods \" target=\"_blank \">Finances API</a></li><li><a href=\"/api-docs/sell/fulfillment/resources/order/methods/issueRefund \" target=\"_blank \">issueRefund</a> in the Fulfillment API</li><li><a href=\"/Devzone/XML/docs/Reference/eBay/GetAccount.html \" target=\"_blank \">GetAccount</a> in the Trading API</li><li>The following methods in the Post-Order API:<ul><li><a href=\"/Devzone/post-order/post-order_v2_inquiry-inquiryid_issue_refund__post.html \" target=\"_blank \">Issue Inquiry Refund</a></li><li><a href=\"/Devzone/post-order/post-order_v2_casemanagement-caseid_issue_refund__post.html \" target=\"_blank \">Issue case refund</a></li><li><a href=\"/Devzone/post-order/post-order_v2_return-returnid_issue_refund__post.html \" target=\"_blank \">Issue return refund</a></li><li><a href=\"/Devzone/post-order/post-order_v2_return-returnid_decide__post.html \" target=\"_blank \">Process Return Request</a></li><li><a href=\"/devzone/post-order/post-order_v2_cancellation-cancelid_approve__post.html \" target=\"_blank \">Approve Cancellation Request</a></li><li><a href=\"/devzone/post-order/post-order_v2_cancellation__post.html \" target=\"_blank \">Create Cancellation Request</a></li></ul></li></ul><span class=\"tablenote\"><b>Note:</b> For additional information about keypairs and creating Message Signatures, refer to <a href= \"/develop/guides/digital-signatures-for-apis \" target= \"_blank \">Digital Signatures for APIs</a>.</span>  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class SigningKey(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 = {
        'creation_time': 'int',
        'expiration_time': 'int',
        'jwe': 'str',
        'private_key': 'str',
        'public_key': 'str',
        'signing_key_cipher': 'str',
        'signing_key_id': 'str'
    }

    attribute_map = {
        'creation_time': 'creationTime',
        'expiration_time': 'expirationTime',
        'jwe': 'jwe',
        'private_key': 'privateKey',
        'public_key': 'publicKey',
        'signing_key_cipher': 'signingKeyCipher',
        'signing_key_id': 'signingKeyId'
    }

    def __init__(self, creation_time=None, expiration_time=None, jwe=None, private_key=None, public_key=None, signing_key_cipher=None, signing_key_id=None):  # noqa: E501
        """SigningKey - a model defined in Swagger"""  # noqa: E501
        self._creation_time = None
        self._expiration_time = None
        self._jwe = None
        self._private_key = None
        self._public_key = None
        self._signing_key_cipher = None
        self._signing_key_id = None
        self.discriminator = None
        if creation_time is not None:
            self.creation_time = creation_time
        if expiration_time is not None:
            self.expiration_time = expiration_time
        if jwe is not None:
            self.jwe = jwe
        if private_key is not None:
            self.private_key = private_key
        if public_key is not None:
            self.public_key = public_key
        if signing_key_cipher is not None:
            self.signing_key_cipher = signing_key_cipher
        if signing_key_id is not None:
            self.signing_key_id = signing_key_id

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

        The UNIX timestamp when the <code>SigningKey</code> was created. This time is represented as the number of seconds from \"1970-01-01T00:00:00Z\", as measured in UTC, until the date and time the <code>SigningKey</code> was created.  # noqa: E501

        :return: The creation_time of this SigningKey.  # noqa: E501
        :rtype: int
        """
        return self._creation_time

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

        The UNIX timestamp when the <code>SigningKey</code> was created. This time is represented as the number of seconds from \"1970-01-01T00:00:00Z\", as measured in UTC, until the date and time the <code>SigningKey</code> was created.  # noqa: E501

        :param creation_time: The creation_time of this SigningKey.  # noqa: E501
        :type: int
        """

        self._creation_time = creation_time

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

        The UNIX timestamp when the <code>SigningKey</code> expires. This time is represented as the number of seconds from \"1970-01-01T00:00:00Z\", as measured in UTC, until the date and time the <code>SigningKey</code> expires.<br/><span class=\"tablenote\"><b>Note:</b> All keys have an expiration date of three (3) years after their <code>creationTime</code>.</span>  # noqa: E501

        :return: The expiration_time of this SigningKey.  # noqa: E501
        :rtype: int
        """
        return self._expiration_time

    @expiration_time.setter
    def expiration_time(self, expiration_time):
        """Sets the expiration_time of this SigningKey.

        The UNIX timestamp when the <code>SigningKey</code> expires. This time is represented as the number of seconds from \"1970-01-01T00:00:00Z\", as measured in UTC, until the date and time the <code>SigningKey</code> expires.<br/><span class=\"tablenote\"><b>Note:</b> All keys have an expiration date of three (3) years after their <code>creationTime</code>.</span>  # noqa: E501

        :param expiration_time: The expiration_time of this SigningKey.  # noqa: E501
        :type: int
        """

        self._expiration_time = expiration_time

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

        This is the JSON Web Encrypted (JWE) value for the <code>publicKey</code>.  # noqa: E501

        :return: The jwe of this SigningKey.  # noqa: E501
        :rtype: str
        """
        return self._jwe

    @jwe.setter
    def jwe(self, jwe):
        """Sets the jwe of this SigningKey.

        This is the JSON Web Encrypted (JWE) value for the <code>publicKey</code>.  # noqa: E501

        :param jwe: The jwe of this SigningKey.  # noqa: E501
        :type: str
        """

        self._jwe = jwe

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

        This is the Private Key that has been generated using the specified <code>signingKeyCipher</code>.<br/><span class=\"tablenote\"><b>Note:</b> The <code>privateKey</code> value will <b>only</b> be returned in the response payload of the  <code>createSigningKey</code> method.<br/><br/>It will <i>never</i> be returned by the <code>getSigningKey</code> or <code>getSigningKeys</code> methods.</span>Developers are <b>strongly advised</b> to download their <code>privateKey</code> value as Privacy Enhance Mail (PEM) format and store it locally for future reference. In order to guarantee the security of confidential client information, eBay does not store <code>privateKey</code> values on any system.<br/><span class=\"tablenote\"><b>Note:</b> If a developer loses their <code>privateKey</code> they must generate new keypairs set using the <code>createSigningKey</code> method.</span>  # noqa: E501

        :return: The private_key of this SigningKey.  # noqa: E501
        :rtype: str
        """
        return self._private_key

    @private_key.setter
    def private_key(self, private_key):
        """Sets the private_key of this SigningKey.

        This is the Private Key that has been generated using the specified <code>signingKeyCipher</code>.<br/><span class=\"tablenote\"><b>Note:</b> The <code>privateKey</code> value will <b>only</b> be returned in the response payload of the  <code>createSigningKey</code> method.<br/><br/>It will <i>never</i> be returned by the <code>getSigningKey</code> or <code>getSigningKeys</code> methods.</span>Developers are <b>strongly advised</b> to download their <code>privateKey</code> value as Privacy Enhance Mail (PEM) format and store it locally for future reference. In order to guarantee the security of confidential client information, eBay does not store <code>privateKey</code> values on any system.<br/><span class=\"tablenote\"><b>Note:</b> If a developer loses their <code>privateKey</code> they must generate new keypairs set using the <code>createSigningKey</code> method.</span>  # noqa: E501

        :param private_key: The private_key of this SigningKey.  # noqa: E501
        :type: str
        """

        self._private_key = private_key

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

        This is the Public Key that has been generated using the specified <code>signingKeyCipher</code>.<br/><br/>As a matter of good practice, developers are <b>strongly advised</b> to download this value and store it locally for safe-keeping and future reference.  # noqa: E501

        :return: The public_key of this SigningKey.  # noqa: E501
        :rtype: str
        """
        return self._public_key

    @public_key.setter
    def public_key(self, public_key):
        """Sets the public_key of this SigningKey.

        This is the Public Key that has been generated using the specified <code>signingKeyCipher</code>.<br/><br/>As a matter of good practice, developers are <b>strongly advised</b> to download this value and store it locally for safe-keeping and future reference.  # noqa: E501

        :param public_key: The public_key of this SigningKey.  # noqa: E501
        :type: str
        """

        self._public_key = public_key

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

        Indicates the cipher used to create the keypairs. Refer to <a href= \"/api-docs/developer/key-management/types/api:SigningKeyCipher\" target= \"_blank\">SigningKeyCiper</a> for the list of supported enum values. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/developer/key_management/types/api:SigningKeyCipher'>eBay API documentation</a>  # noqa: E501

        :return: The signing_key_cipher of this SigningKey.  # noqa: E501
        :rtype: str
        """
        return self._signing_key_cipher

    @signing_key_cipher.setter
    def signing_key_cipher(self, signing_key_cipher):
        """Sets the signing_key_cipher of this SigningKey.

        Indicates the cipher used to create the keypairs. Refer to <a href= \"/api-docs/developer/key-management/types/api:SigningKeyCipher\" target= \"_blank\">SigningKeyCiper</a> for the list of supported enum values. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/developer/key_management/types/api:SigningKeyCipher'>eBay API documentation</a>  # noqa: E501

        :param signing_key_cipher: The signing_key_cipher of this SigningKey.  # noqa: E501
        :type: str
        """

        self._signing_key_cipher = signing_key_cipher

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

        The system-generated eBay ID for the keypairs.  # noqa: E501

        :return: The signing_key_id of this SigningKey.  # noqa: E501
        :rtype: str
        """
        return self._signing_key_id

    @signing_key_id.setter
    def signing_key_id(self, signing_key_id):
        """Sets the signing_key_id of this SigningKey.

        The system-generated eBay ID for the keypairs.  # noqa: E501

        :param signing_key_id: The signing_key_id of this SigningKey.  # noqa: E501
        :type: str
        """

        self._signing_key_id = signing_key_id

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

        return self.__dict__ == other.__dict__

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