# coding: utf-8

"""
    DigitalRebar Provision Server

    # An RestFUL API-driven Provisioner and DHCP server  # noqa: E501

    OpenAPI spec version: 4.14.0
    Contact: support@rackn.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from drppy_client.configuration import Configuration


class License(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 = {
        'active': 'bool',
        'contract_termination_date': 'datetime',
        'data': 'object',
        'hard_expire_date': 'datetime',
        'long_license': 'str',
        'name': 'str',
        'purchase_date': 'datetime',
        'short_license': 'str',
        'soft_expire_date': 'datetime',
        'start_date': 'datetime',
        'version': 'str'
    }

    attribute_map = {
        'active': 'Active',
        'contract_termination_date': 'ContractTerminationDate',
        'data': 'Data',
        'hard_expire_date': 'HardExpireDate',
        'long_license': 'LongLicense',
        'name': 'Name',
        'purchase_date': 'PurchaseDate',
        'short_license': 'ShortLicense',
        'soft_expire_date': 'SoftExpireDate',
        'start_date': 'StartDate',
        'version': 'Version'
    }

    def __init__(self, active=None, contract_termination_date=None, data=None, hard_expire_date=None, long_license=None, name=None, purchase_date=None, short_license=None, soft_expire_date=None, start_date=None, version=None, _configuration=None):  # noqa: E501
        """License - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._active = None
        self._contract_termination_date = None
        self._data = None
        self._hard_expire_date = None
        self._long_license = None
        self._name = None
        self._purchase_date = None
        self._short_license = None
        self._soft_expire_date = None
        self._start_date = None
        self._version = None
        self.discriminator = None

        if active is not None:
            self.active = active
        if contract_termination_date is not None:
            self.contract_termination_date = contract_termination_date
        if data is not None:
            self.data = data
        if hard_expire_date is not None:
            self.hard_expire_date = hard_expire_date
        if long_license is not None:
            self.long_license = long_license
        if name is not None:
            self.name = name
        if purchase_date is not None:
            self.purchase_date = purchase_date
        if short_license is not None:
            self.short_license = short_license
        if soft_expire_date is not None:
            self.soft_expire_date = soft_expire_date
        if start_date is not None:
            self.start_date = start_date
        if version is not None:
            self.version = version

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


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

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


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

        self._active = active

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


        :return: The contract_termination_date of this License.  # noqa: E501
        :rtype: datetime
        """
        return self._contract_termination_date

    @contract_termination_date.setter
    def contract_termination_date(self, contract_termination_date):
        """Sets the contract_termination_date of this License.


        :param contract_termination_date: The contract_termination_date of this License.  # noqa: E501
        :type: datetime
        """

        self._contract_termination_date = contract_termination_date

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


        :return: The data of this License.  # noqa: E501
        :rtype: object
        """
        return self._data

    @data.setter
    def data(self, data):
        """Sets the data of this License.


        :param data: The data of this License.  # noqa: E501
        :type: object
        """

        self._data = data

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


        :return: The hard_expire_date of this License.  # noqa: E501
        :rtype: datetime
        """
        return self._hard_expire_date

    @hard_expire_date.setter
    def hard_expire_date(self, hard_expire_date):
        """Sets the hard_expire_date of this License.


        :param hard_expire_date: The hard_expire_date of this License.  # noqa: E501
        :type: datetime
        """

        self._hard_expire_date = hard_expire_date

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


        :return: The long_license of this License.  # noqa: E501
        :rtype: str
        """
        return self._long_license

    @long_license.setter
    def long_license(self, long_license):
        """Sets the long_license of this License.


        :param long_license: The long_license of this License.  # noqa: E501
        :type: str
        """

        self._long_license = long_license

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


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

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


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

        self._name = name

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


        :return: The purchase_date of this License.  # noqa: E501
        :rtype: datetime
        """
        return self._purchase_date

    @purchase_date.setter
    def purchase_date(self, purchase_date):
        """Sets the purchase_date of this License.


        :param purchase_date: The purchase_date of this License.  # noqa: E501
        :type: datetime
        """

        self._purchase_date = purchase_date

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


        :return: The short_license of this License.  # noqa: E501
        :rtype: str
        """
        return self._short_license

    @short_license.setter
    def short_license(self, short_license):
        """Sets the short_license of this License.


        :param short_license: The short_license of this License.  # noqa: E501
        :type: str
        """

        self._short_license = short_license

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


        :return: The soft_expire_date of this License.  # noqa: E501
        :rtype: datetime
        """
        return self._soft_expire_date

    @soft_expire_date.setter
    def soft_expire_date(self, soft_expire_date):
        """Sets the soft_expire_date of this License.


        :param soft_expire_date: The soft_expire_date of this License.  # noqa: E501
        :type: datetime
        """

        self._soft_expire_date = soft_expire_date

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


        :return: The start_date of this License.  # noqa: E501
        :rtype: datetime
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this License.


        :param start_date: The start_date of this License.  # noqa: E501
        :type: datetime
        """

        self._start_date = start_date

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


        :return: The version of this License.  # noqa: E501
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this License.


        :param version: The version of this License.  # noqa: E501
        :type: str
        """

        self._version = version

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

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