# coding: utf-8

"""
    CyberSource Merged Spec

    All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html

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


from pprint import pformat
from six import iteritems
import re


class TokenizeParameters(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 = {
        'key_id': 'str',
        'card_info': 'TokenizeParametersCardInfo'
    }

    attribute_map = {
        'key_id': 'keyId',
        'card_info': 'cardInfo'
    }

    def __init__(self, key_id=None, card_info=None):
        """
        TokenizeParameters - a model defined in Swagger
        """

        self._key_id = None
        self._card_info = None

        self.key_id = key_id
        if card_info is not None:
          self.card_info = card_info

    @property
    def key_id(self):
        """
        Gets the key_id of this TokenizeParameters.
        Unique identifier for the generated token. This is obtained from the Generate Key request. See the [Java Script and Java examples](http://apps.cybersource.com/library/documentation/dev_guides/Secure_Acceptance_Flex/Key/html) on how to import the key and encrypt using the imported key.

        :return: The key_id of this TokenizeParameters.
        :rtype: str
        """
        return self._key_id

    @key_id.setter
    def key_id(self, key_id):
        """
        Sets the key_id of this TokenizeParameters.
        Unique identifier for the generated token. This is obtained from the Generate Key request. See the [Java Script and Java examples](http://apps.cybersource.com/library/documentation/dev_guides/Secure_Acceptance_Flex/Key/html) on how to import the key and encrypt using the imported key.

        :param key_id: The key_id of this TokenizeParameters.
        :type: str
        """
        if key_id is None:
            raise ValueError("Invalid value for `key_id`, must not be `None`")

        self._key_id = key_id

    @property
    def card_info(self):
        """
        Gets the card_info of this TokenizeParameters.

        :return: The card_info of this TokenizeParameters.
        :rtype: TokenizeParametersCardInfo
        """
        return self._card_info

    @card_info.setter
    def card_info(self, card_info):
        """
        Sets the card_info of this TokenizeParameters.

        :param card_info: The card_info of this TokenizeParameters.
        :type: TokenizeParametersCardInfo
        """

        self._card_info = card_info

    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
        """
        if not isinstance(other, TokenizeParameters):
            return False

        return self.__dict__ == other.__dict__

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