# coding: utf-8

"""
    Sparks OpenAPI

    Generated documentation for the Logicdrop Sparks API and OpenAPI clients.  Logicdrop Sparks lets users build rules, analyze data, and automate documents.  Use it to make decisions faster, generate documents better, and learn from your data.  ### Documentation - [User Documentation](https://docs.logicdrop.com)  ### Modules - [Sparks Compute](https://docs.logicdrop.com/rules/introduction) - [Sparks Decision Tables](https://docs.logicdrop.com/rules/authoring-decision-tables) - [Sparks Documents](https://docs.logicdrop.com/documents/introduction)  ### Clients - [OpenAPI Clients](https://docs.logicdrop.com/development/sample-clients)  ### Security - [Authorizing API Requests](https://docs.logicdrop.com/development/authorization)   # noqa: E501

    The version of the OpenAPI document: v_VERSION_._BUILD_
    Contact: support@logicdrop.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from logicdrop.sparks.openapi.configuration import Configuration


class Subscription(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 = {
        'payment_id': 'str',
        'product_id': 'str',
        'term': 'datetime',
        'product_name': 'str',
        'product_tier': 'str',
        'auto_pay': 'bool',
        'payment_amount': 'float',
        'payment_term': 'str',
        'payment_currency': 'str',
        'id': 'str',
        'cc_last4': 'str',
        'cc_expiration': 'str',
        'company': 'str',
        'name': 'str',
        'address1': 'str',
        'address2': 'str',
        'city': 'str',
        'state': 'str',
        'postal_code': 'str',
        'country': 'str',
        'contact_phone': 'str',
        'contact_email': 'str',
        'modules': 'list[str]',
        'limits': 'dict(str, int)',
        'discounts': 'list[SubscriptionDiscount]'
    }

    attribute_map = {
        'payment_id': 'paymentId',
        'product_id': 'productId',
        'term': 'term',
        'product_name': 'productName',
        'product_tier': 'productTier',
        'auto_pay': 'autoPay',
        'payment_amount': 'paymentAmount',
        'payment_term': 'paymentTerm',
        'payment_currency': 'paymentCurrency',
        'id': 'id',
        'cc_last4': 'ccLast4',
        'cc_expiration': 'ccExpiration',
        'company': 'company',
        'name': 'name',
        'address1': 'address1',
        'address2': 'address2',
        'city': 'city',
        'state': 'state',
        'postal_code': 'postalCode',
        'country': 'country',
        'contact_phone': 'contactPhone',
        'contact_email': 'contactEmail',
        'modules': 'modules',
        'limits': 'limits',
        'discounts': 'discounts'
    }

    def __init__(self, payment_id=None, product_id=None, term=None, product_name=None, product_tier=None, auto_pay=None, payment_amount=None, payment_term=None, payment_currency=None, id=None, cc_last4=None, cc_expiration=None, company=None, name=None, address1=None, address2=None, city=None, state=None, postal_code=None, country=None, contact_phone=None, contact_email=None, modules=None, limits=None, discounts=None, local_vars_configuration=None):  # noqa: E501
        """Subscription - 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._payment_id = None
        self._product_id = None
        self._term = None
        self._product_name = None
        self._product_tier = None
        self._auto_pay = None
        self._payment_amount = None
        self._payment_term = None
        self._payment_currency = None
        self._id = None
        self._cc_last4 = None
        self._cc_expiration = None
        self._company = None
        self._name = None
        self._address1 = None
        self._address2 = None
        self._city = None
        self._state = None
        self._postal_code = None
        self._country = None
        self._contact_phone = None
        self._contact_email = None
        self._modules = None
        self._limits = None
        self._discounts = None
        self.discriminator = None

        if payment_id is not None:
            self.payment_id = payment_id
        if product_id is not None:
            self.product_id = product_id
        if term is not None:
            self.term = term
        if product_name is not None:
            self.product_name = product_name
        if product_tier is not None:
            self.product_tier = product_tier
        if auto_pay is not None:
            self.auto_pay = auto_pay
        if payment_amount is not None:
            self.payment_amount = payment_amount
        if payment_term is not None:
            self.payment_term = payment_term
        if payment_currency is not None:
            self.payment_currency = payment_currency
        if id is not None:
            self.id = id
        if cc_last4 is not None:
            self.cc_last4 = cc_last4
        if cc_expiration is not None:
            self.cc_expiration = cc_expiration
        if company is not None:
            self.company = company
        if name is not None:
            self.name = name
        if address1 is not None:
            self.address1 = address1
        if address2 is not None:
            self.address2 = address2
        if city is not None:
            self.city = city
        if state is not None:
            self.state = state
        if postal_code is not None:
            self.postal_code = postal_code
        if country is not None:
            self.country = country
        if contact_phone is not None:
            self.contact_phone = contact_phone
        if contact_email is not None:
            self.contact_email = contact_email
        if modules is not None:
            self.modules = modules
        if limits is not None:
            self.limits = limits
        if discounts is not None:
            self.discounts = discounts

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


        :return: The payment_id of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._payment_id

    @payment_id.setter
    def payment_id(self, payment_id):
        """Sets the payment_id of this Subscription.


        :param payment_id: The payment_id of this Subscription.  # noqa: E501
        :type: str
        """

        self._payment_id = payment_id

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


        :return: The product_id of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._product_id

    @product_id.setter
    def product_id(self, product_id):
        """Sets the product_id of this Subscription.


        :param product_id: The product_id of this Subscription.  # noqa: E501
        :type: str
        """

        self._product_id = product_id

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


        :return: The term of this Subscription.  # noqa: E501
        :rtype: datetime
        """
        return self._term

    @term.setter
    def term(self, term):
        """Sets the term of this Subscription.


        :param term: The term of this Subscription.  # noqa: E501
        :type: datetime
        """

        self._term = term

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


        :return: The product_name of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._product_name

    @product_name.setter
    def product_name(self, product_name):
        """Sets the product_name of this Subscription.


        :param product_name: The product_name of this Subscription.  # noqa: E501
        :type: str
        """

        self._product_name = product_name

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


        :return: The product_tier of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._product_tier

    @product_tier.setter
    def product_tier(self, product_tier):
        """Sets the product_tier of this Subscription.


        :param product_tier: The product_tier of this Subscription.  # noqa: E501
        :type: str
        """

        self._product_tier = product_tier

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


        :return: The auto_pay of this Subscription.  # noqa: E501
        :rtype: bool
        """
        return self._auto_pay

    @auto_pay.setter
    def auto_pay(self, auto_pay):
        """Sets the auto_pay of this Subscription.


        :param auto_pay: The auto_pay of this Subscription.  # noqa: E501
        :type: bool
        """

        self._auto_pay = auto_pay

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


        :return: The payment_amount of this Subscription.  # noqa: E501
        :rtype: float
        """
        return self._payment_amount

    @payment_amount.setter
    def payment_amount(self, payment_amount):
        """Sets the payment_amount of this Subscription.


        :param payment_amount: The payment_amount of this Subscription.  # noqa: E501
        :type: float
        """

        self._payment_amount = payment_amount

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


        :return: The payment_term of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._payment_term

    @payment_term.setter
    def payment_term(self, payment_term):
        """Sets the payment_term of this Subscription.


        :param payment_term: The payment_term of this Subscription.  # noqa: E501
        :type: str
        """

        self._payment_term = payment_term

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


        :return: The payment_currency of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._payment_currency

    @payment_currency.setter
    def payment_currency(self, payment_currency):
        """Sets the payment_currency of this Subscription.


        :param payment_currency: The payment_currency of this Subscription.  # noqa: E501
        :type: str
        """

        self._payment_currency = payment_currency

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


        :return: The id of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Subscription.


        :param id: The id of this Subscription.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The cc_last4 of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._cc_last4

    @cc_last4.setter
    def cc_last4(self, cc_last4):
        """Sets the cc_last4 of this Subscription.


        :param cc_last4: The cc_last4 of this Subscription.  # noqa: E501
        :type: str
        """

        self._cc_last4 = cc_last4

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


        :return: The cc_expiration of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._cc_expiration

    @cc_expiration.setter
    def cc_expiration(self, cc_expiration):
        """Sets the cc_expiration of this Subscription.


        :param cc_expiration: The cc_expiration of this Subscription.  # noqa: E501
        :type: str
        """

        self._cc_expiration = cc_expiration

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


        :return: The company of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._company

    @company.setter
    def company(self, company):
        """Sets the company of this Subscription.


        :param company: The company of this Subscription.  # noqa: E501
        :type: str
        """

        self._company = company

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


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

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


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

        self._name = name

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


        :return: The address1 of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._address1

    @address1.setter
    def address1(self, address1):
        """Sets the address1 of this Subscription.


        :param address1: The address1 of this Subscription.  # noqa: E501
        :type: str
        """

        self._address1 = address1

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


        :return: The address2 of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._address2

    @address2.setter
    def address2(self, address2):
        """Sets the address2 of this Subscription.


        :param address2: The address2 of this Subscription.  # noqa: E501
        :type: str
        """

        self._address2 = address2

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


        :return: The city of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._city

    @city.setter
    def city(self, city):
        """Sets the city of this Subscription.


        :param city: The city of this Subscription.  # noqa: E501
        :type: str
        """

        self._city = city

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


        :return: The state of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this Subscription.


        :param state: The state of this Subscription.  # noqa: E501
        :type: str
        """

        self._state = state

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


        :return: The postal_code of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._postal_code

    @postal_code.setter
    def postal_code(self, postal_code):
        """Sets the postal_code of this Subscription.


        :param postal_code: The postal_code of this Subscription.  # noqa: E501
        :type: str
        """

        self._postal_code = postal_code

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


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

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


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

        self._country = country

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


        :return: The contact_phone of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._contact_phone

    @contact_phone.setter
    def contact_phone(self, contact_phone):
        """Sets the contact_phone of this Subscription.


        :param contact_phone: The contact_phone of this Subscription.  # noqa: E501
        :type: str
        """

        self._contact_phone = contact_phone

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


        :return: The contact_email of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._contact_email

    @contact_email.setter
    def contact_email(self, contact_email):
        """Sets the contact_email of this Subscription.


        :param contact_email: The contact_email of this Subscription.  # noqa: E501
        :type: str
        """

        self._contact_email = contact_email

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


        :return: The modules of this Subscription.  # noqa: E501
        :rtype: list[str]
        """
        return self._modules

    @modules.setter
    def modules(self, modules):
        """Sets the modules of this Subscription.


        :param modules: The modules of this Subscription.  # noqa: E501
        :type: list[str]
        """

        self._modules = modules

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


        :return: The limits of this Subscription.  # noqa: E501
        :rtype: dict(str, int)
        """
        return self._limits

    @limits.setter
    def limits(self, limits):
        """Sets the limits of this Subscription.


        :param limits: The limits of this Subscription.  # noqa: E501
        :type: dict(str, int)
        """

        self._limits = limits

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


        :return: The discounts of this Subscription.  # noqa: E501
        :rtype: list[SubscriptionDiscount]
        """
        return self._discounts

    @discounts.setter
    def discounts(self, discounts):
        """Sets the discounts of this Subscription.


        :param discounts: The discounts of this Subscription.  # noqa: E501
        :type: list[SubscriptionDiscount]
        """

        self._discounts = discounts

    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, Subscription):
            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, Subscription):
            return True

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