# coding: utf-8

"""
    CartoVista REST API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class Subscription(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 = {
        'tenant_id': 'str',
        'is_managed': 'bool',
        'is_license': 'bool',
        'package': 'SubscriptionPackage',
        'billing_cycle_end': 'datetime',
        'max_users': 'int',
        'geocoding_remaining': 'int',
        'industry': 'OneOfSubscriptionIndustry',
        'has_expired': 'bool',
        'grace_period_end': 'datetime',
        'is_monthly': 'bool',
        'max_geocoding_transaction': 'int',
        'current_geocoding_transaction': 'int',
        'active_users': 'int',
        'data_usage_gb': 'float',
        'data_usage_limit_gb': 'float',
        'max_maps': 'int',
        'layers_per_map': 'int',
        'features_per_layer': 'int',
        'has_invoices': 'bool',
        'scheduled_changes': 'ScheduledSubscriptionChanges',
        'payment_failed': 'bool'
    }

    attribute_map = {
        'tenant_id': 'tenantId',
        'is_managed': 'isManaged',
        'is_license': 'isLicense',
        'package': 'package',
        'billing_cycle_end': 'billingCycleEnd',
        'max_users': 'maxUsers',
        'geocoding_remaining': 'geocodingRemaining',
        'industry': 'industry',
        'has_expired': 'hasExpired',
        'grace_period_end': 'gracePeriodEnd',
        'is_monthly': 'isMonthly',
        'max_geocoding_transaction': 'maxGeocodingTransaction',
        'current_geocoding_transaction': 'currentGeocodingTransaction',
        'active_users': 'activeUsers',
        'data_usage_gb': 'dataUsageGB',
        'data_usage_limit_gb': 'dataUsageLimitGB',
        'max_maps': 'maxMaps',
        'layers_per_map': 'layersPerMap',
        'features_per_layer': 'featuresPerLayer',
        'has_invoices': 'hasInvoices',
        'scheduled_changes': 'scheduledChanges',
        'payment_failed': 'paymentFailed'
    }

    def __init__(self, tenant_id=None, is_managed=None, is_license=None, package=None, billing_cycle_end=None, max_users=None, geocoding_remaining=None, industry=None, has_expired=None, grace_period_end=None, is_monthly=None, max_geocoding_transaction=None, current_geocoding_transaction=None, active_users=None, data_usage_gb=None, data_usage_limit_gb=None, max_maps=None, layers_per_map=None, features_per_layer=None, has_invoices=None, scheduled_changes=None, payment_failed=None):  # noqa: E501
        """Subscription - a model defined in Swagger"""  # noqa: E501
        self._tenant_id = None
        self._is_managed = None
        self._is_license = None
        self._package = None
        self._billing_cycle_end = None
        self._max_users = None
        self._geocoding_remaining = None
        self._industry = None
        self._has_expired = None
        self._grace_period_end = None
        self._is_monthly = None
        self._max_geocoding_transaction = None
        self._current_geocoding_transaction = None
        self._active_users = None
        self._data_usage_gb = None
        self._data_usage_limit_gb = None
        self._max_maps = None
        self._layers_per_map = None
        self._features_per_layer = None
        self._has_invoices = None
        self._scheduled_changes = None
        self._payment_failed = None
        self.discriminator = None
        if tenant_id is not None:
            self.tenant_id = tenant_id
        if is_managed is not None:
            self.is_managed = is_managed
        if is_license is not None:
            self.is_license = is_license
        if package is not None:
            self.package = package
        if billing_cycle_end is not None:
            self.billing_cycle_end = billing_cycle_end
        if max_users is not None:
            self.max_users = max_users
        if geocoding_remaining is not None:
            self.geocoding_remaining = geocoding_remaining
        if industry is not None:
            self.industry = industry
        if has_expired is not None:
            self.has_expired = has_expired
        if grace_period_end is not None:
            self.grace_period_end = grace_period_end
        if is_monthly is not None:
            self.is_monthly = is_monthly
        if max_geocoding_transaction is not None:
            self.max_geocoding_transaction = max_geocoding_transaction
        if current_geocoding_transaction is not None:
            self.current_geocoding_transaction = current_geocoding_transaction
        if active_users is not None:
            self.active_users = active_users
        if data_usage_gb is not None:
            self.data_usage_gb = data_usage_gb
        if data_usage_limit_gb is not None:
            self.data_usage_limit_gb = data_usage_limit_gb
        if max_maps is not None:
            self.max_maps = max_maps
        if layers_per_map is not None:
            self.layers_per_map = layers_per_map
        if features_per_layer is not None:
            self.features_per_layer = features_per_layer
        if has_invoices is not None:
            self.has_invoices = has_invoices
        if scheduled_changes is not None:
            self.scheduled_changes = scheduled_changes
        if payment_failed is not None:
            self.payment_failed = payment_failed

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


        :return: The tenant_id of this Subscription.  # noqa: E501
        :rtype: str
        """
        return self._tenant_id

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


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

        self._tenant_id = tenant_id

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


        :return: The is_managed of this Subscription.  # noqa: E501
        :rtype: bool
        """
        return self._is_managed

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


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

        self._is_managed = is_managed

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


        :return: The is_license of this Subscription.  # noqa: E501
        :rtype: bool
        """
        return self._is_license

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


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

        self._is_license = is_license

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


        :return: The package of this Subscription.  # noqa: E501
        :rtype: SubscriptionPackage
        """
        return self._package

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


        :param package: The package of this Subscription.  # noqa: E501
        :type: SubscriptionPackage
        """

        self._package = package

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


        :return: The billing_cycle_end of this Subscription.  # noqa: E501
        :rtype: datetime
        """
        return self._billing_cycle_end

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


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

        self._billing_cycle_end = billing_cycle_end

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


        :return: The max_users of this Subscription.  # noqa: E501
        :rtype: int
        """
        return self._max_users

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


        :param max_users: The max_users of this Subscription.  # noqa: E501
        :type: int
        """

        self._max_users = max_users

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


        :return: The geocoding_remaining of this Subscription.  # noqa: E501
        :rtype: int
        """
        return self._geocoding_remaining

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


        :param geocoding_remaining: The geocoding_remaining of this Subscription.  # noqa: E501
        :type: int
        """

        self._geocoding_remaining = geocoding_remaining

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


        :return: The industry of this Subscription.  # noqa: E501
        :rtype: OneOfSubscriptionIndustry
        """
        return self._industry

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


        :param industry: The industry of this Subscription.  # noqa: E501
        :type: OneOfSubscriptionIndustry
        """

        self._industry = industry

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


        :return: The has_expired of this Subscription.  # noqa: E501
        :rtype: bool
        """
        return self._has_expired

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


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

        self._has_expired = has_expired

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


        :return: The grace_period_end of this Subscription.  # noqa: E501
        :rtype: datetime
        """
        return self._grace_period_end

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


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

        self._grace_period_end = grace_period_end

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


        :return: The is_monthly of this Subscription.  # noqa: E501
        :rtype: bool
        """
        return self._is_monthly

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


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

        self._is_monthly = is_monthly

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


        :return: The max_geocoding_transaction of this Subscription.  # noqa: E501
        :rtype: int
        """
        return self._max_geocoding_transaction

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


        :param max_geocoding_transaction: The max_geocoding_transaction of this Subscription.  # noqa: E501
        :type: int
        """

        self._max_geocoding_transaction = max_geocoding_transaction

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


        :return: The current_geocoding_transaction of this Subscription.  # noqa: E501
        :rtype: int
        """
        return self._current_geocoding_transaction

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


        :param current_geocoding_transaction: The current_geocoding_transaction of this Subscription.  # noqa: E501
        :type: int
        """

        self._current_geocoding_transaction = current_geocoding_transaction

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


        :return: The active_users of this Subscription.  # noqa: E501
        :rtype: int
        """
        return self._active_users

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


        :param active_users: The active_users of this Subscription.  # noqa: E501
        :type: int
        """

        self._active_users = active_users

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


        :return: The data_usage_gb of this Subscription.  # noqa: E501
        :rtype: float
        """
        return self._data_usage_gb

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


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

        self._data_usage_gb = data_usage_gb

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


        :return: The data_usage_limit_gb of this Subscription.  # noqa: E501
        :rtype: float
        """
        return self._data_usage_limit_gb

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


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

        self._data_usage_limit_gb = data_usage_limit_gb

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


        :return: The max_maps of this Subscription.  # noqa: E501
        :rtype: int
        """
        return self._max_maps

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


        :param max_maps: The max_maps of this Subscription.  # noqa: E501
        :type: int
        """

        self._max_maps = max_maps

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


        :return: The layers_per_map of this Subscription.  # noqa: E501
        :rtype: int
        """
        return self._layers_per_map

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


        :param layers_per_map: The layers_per_map of this Subscription.  # noqa: E501
        :type: int
        """

        self._layers_per_map = layers_per_map

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


        :return: The features_per_layer of this Subscription.  # noqa: E501
        :rtype: int
        """
        return self._features_per_layer

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


        :param features_per_layer: The features_per_layer of this Subscription.  # noqa: E501
        :type: int
        """

        self._features_per_layer = features_per_layer

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


        :return: The has_invoices of this Subscription.  # noqa: E501
        :rtype: bool
        """
        return self._has_invoices

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


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

        self._has_invoices = has_invoices

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


        :return: The scheduled_changes of this Subscription.  # noqa: E501
        :rtype: ScheduledSubscriptionChanges
        """
        return self._scheduled_changes

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


        :param scheduled_changes: The scheduled_changes of this Subscription.  # noqa: E501
        :type: ScheduledSubscriptionChanges
        """

        self._scheduled_changes = scheduled_changes

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


        :return: The payment_failed of this Subscription.  # noqa: E501
        :rtype: bool
        """
        return self._payment_failed

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


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

        self._payment_failed = payment_failed

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

        return self.__dict__ == other.__dict__

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