# coding: utf-8

"""
    CardPay REST API

    Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to create payments, refunds, payouts or recurrings, check or update transaction status and get information about created transactions. In API authentication process based on [OAuth 2.0](https://oauth.net/2/) standard. For recent changes see changelog section.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class CardInfoResponse(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 = {
        "bin": "str",
        "card_brand": "str",
        "card_issuer": "str",
        "card_type": "str",
        "country": "str",
    }

    attribute_map = {
        "bin": "bin",
        "card_brand": "card_brand",
        "card_issuer": "card_issuer",
        "card_type": "card_type",
        "country": "country",
    }

    def __init__(
        self, bin=None, card_brand=None, card_issuer=None, card_type=None, country=None
    ):  # noqa: E501
        """CardInfoResponse - a model defined in Swagger"""  # noqa: E501

        self._bin = None
        self._card_brand = None
        self._card_issuer = None
        self._card_type = None
        self._country = None
        self.discriminator = None

        if bin is not None:
            self.bin = bin
        if card_brand is not None:
            self.card_brand = card_brand
        if card_issuer is not None:
            self.card_issuer = card_issuer
        if card_type is not None:
            self.card_type = card_type
        if country is not None:
            self.country = country

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

        Card BIN  # noqa: E501

        :return: The bin of this CardInfoResponse.  # noqa: E501
        :rtype: str
        """
        return self._bin

    @bin.setter
    def bin(self, bin):
        """Sets the bin of this CardInfoResponse.

        Card BIN  # noqa: E501

        :param bin: The bin of this CardInfoResponse.  # noqa: E501
        :type: str
        """

        self._bin = bin

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

        Card brand  # noqa: E501

        :return: The card_brand of this CardInfoResponse.  # noqa: E501
        :rtype: str
        """
        return self._card_brand

    @card_brand.setter
    def card_brand(self, card_brand):
        """Sets the card_brand of this CardInfoResponse.

        Card brand  # noqa: E501

        :param card_brand: The card_brand of this CardInfoResponse.  # noqa: E501
        :type: str
        """

        self._card_brand = card_brand

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

        Card issuer name  # noqa: E501

        :return: The card_issuer of this CardInfoResponse.  # noqa: E501
        :rtype: str
        """
        return self._card_issuer

    @card_issuer.setter
    def card_issuer(self, card_issuer):
        """Sets the card_issuer of this CardInfoResponse.

        Card issuer name  # noqa: E501

        :param card_issuer: The card_issuer of this CardInfoResponse.  # noqa: E501
        :type: str
        """

        self._card_issuer = card_issuer

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

        Card type  # noqa: E501

        :return: The card_type of this CardInfoResponse.  # noqa: E501
        :rtype: str
        """
        return self._card_type

    @card_type.setter
    def card_type(self, card_type):
        """Sets the card_type of this CardInfoResponse.

        Card type  # noqa: E501

        :param card_type: The card_type of this CardInfoResponse.  # noqa: E501
        :type: str
        """

        self._card_type = card_type

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

        Country code in [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha-2 code format  # noqa: E501

        :return: The country of this CardInfoResponse.  # noqa: E501
        :rtype: str
        """
        return self._country

    @country.setter
    def country(self, country):
        """Sets the country of this CardInfoResponse.

        Country code in [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha-2 code format  # noqa: E501

        :param country: The country of this CardInfoResponse.  # noqa: E501
        :type: str
        """

        self._country = country

    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:
                if value is not None:
                    result[attr] = value
        if issubclass(CardInfoResponse, 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, CardInfoResponse):
            return False

        return self.__dict__ == other.__dict__

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