# coding: utf-8

"""
    PirlPay API

    The PirlPay API for automated payment processing  # noqa: E501

    OpenAPI spec version: v1
    Contact: support@pirl.io
    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 = {
        'id': 'str',
        'date_billing_end': 'datetime',
        'active': 'bool',
        'cancelled': 'bool',
        'suspend': 'bool'
    }

    attribute_map = {
        'id': 'id',
        'date_billing_end': 'date_billing_end',
        'active': 'active',
        'cancelled': 'cancelled',
        'suspend': 'suspend'
    }

    def __init__(self, id=None, date_billing_end=None, active=None, cancelled=None, suspend=None):  # noqa: E501
        """Subscription - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._date_billing_end = None
        self._active = None
        self._cancelled = None
        self._suspend = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if date_billing_end is not None:
            self.date_billing_end = date_billing_end
        if active is not None:
            self.active = active
        if cancelled is not None:
            self.cancelled = cancelled
        if suspend is not None:
            self.suspend = suspend

    @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 date_billing_end(self):
        """Gets the date_billing_end of this Subscription.  # noqa: E501

        the date to finish billing this subscription  # noqa: E501

        :return: The date_billing_end of this Subscription.  # noqa: E501
        :rtype: datetime
        """
        return self._date_billing_end

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

        the date to finish billing this subscription  # noqa: E501

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

        self._date_billing_end = date_billing_end

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

        whether this subscription is active or not  # noqa: E501

        :return: The active of this Subscription.  # noqa: E501
        :rtype: bool
        """
        return self._active

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

        whether this subscription is active or not  # noqa: E501

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

        self._active = active

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

        whether this subscription is cancelled or not  # noqa: E501

        :return: The cancelled of this Subscription.  # noqa: E501
        :rtype: bool
        """
        return self._cancelled

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

        whether this subscription is cancelled or not  # noqa: E501

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

        self._cancelled = cancelled

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

        whether this subscription is suspended or not  # noqa: E501

        :return: The suspend of this Subscription.  # noqa: E501
        :rtype: bool
        """
        return self._suspend

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

        whether this subscription is suspended or not  # noqa: E501

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

        self._suspend = suspend

    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
