# coding: utf-8

"""
    Paragon Insights APIs

    API interface for PI application  # noqa: E501

    OpenAPI spec version: 4.0.0
    Contact: healthbot-feedback@juniper.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class LicenseKeySchema(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 = {
        'license_id': 'str',
        'start_date': 'datetime',
        'end_date': 'datetime',
        'validity_type': 'str',
        'version': 'int',
        'sku_name': 'str',
        'customer_id': 'str',
        'order_type': 'str',
        'sw_serial_id': 'str',
        'mode': 'str',
        'features': 'list[LicensekeySchemaFeatures]'
    }

    attribute_map = {
        'license_id': 'license-id',
        'start_date': 'start-date',
        'end_date': 'end-date',
        'validity_type': 'validity-type',
        'version': 'version',
        'sku_name': 'sku-name',
        'customer_id': 'customer-id',
        'order_type': 'order-type',
        'sw_serial_id': 'sw-serial-id',
        'mode': 'mode',
        'features': 'features'
    }

    def __init__(self, license_id=None, start_date=None, end_date=None, validity_type=None, version=None, sku_name=None, customer_id=None, order_type=None, sw_serial_id=None, mode=None, features=None):  # noqa: E501
        """LicenseKeySchema - a model defined in Swagger"""  # noqa: E501

        self._license_id = None
        self._start_date = None
        self._end_date = None
        self._validity_type = None
        self._version = None
        self._sku_name = None
        self._customer_id = None
        self._order_type = None
        self._sw_serial_id = None
        self._mode = None
        self._features = None
        self.discriminator = None

        self.license_id = license_id
        self.start_date = start_date
        self.end_date = end_date
        self.validity_type = validity_type
        self.version = version
        self.sku_name = sku_name
        self.customer_id = customer_id
        self.order_type = order_type
        if sw_serial_id is not None:
            self.sw_serial_id = sw_serial_id
        if mode is not None:
            self.mode = mode
        self.features = features

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

        Unique ID of the license  # noqa: E501

        :return: The license_id of this LicenseKeySchema.  # noqa: E501
        :rtype: str
        """
        return self._license_id

    @license_id.setter
    def license_id(self, license_id):
        """Sets the license_id of this LicenseKeySchema.

        Unique ID of the license  # noqa: E501

        :param license_id: The license_id of this LicenseKeySchema.  # noqa: E501
        :type: str
        """
        if license_id is None:
            raise ValueError("Invalid value for `license_id`, must not be `None`")  # noqa: E501

        self._license_id = license_id

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

        License start date and time  # noqa: E501

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

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

        License start date and time  # noqa: E501

        :param start_date: The start_date of this LicenseKeySchema.  # noqa: E501
        :type: datetime
        """
        if start_date is None:
            raise ValueError("Invalid value for `start_date`, must not be `None`")  # noqa: E501

        self._start_date = start_date

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

        License end date and time  # noqa: E501

        :return: The end_date of this LicenseKeySchema.  # noqa: E501
        :rtype: datetime
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """Sets the end_date of this LicenseKeySchema.

        License end date and time  # noqa: E501

        :param end_date: The end_date of this LicenseKeySchema.  # noqa: E501
        :type: datetime
        """
        if end_date is None:
            raise ValueError("Invalid value for `end_date`, must not be `None`")  # noqa: E501

        self._end_date = end_date

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

        License validity type  # noqa: E501

        :return: The validity_type of this LicenseKeySchema.  # noqa: E501
        :rtype: str
        """
        return self._validity_type

    @validity_type.setter
    def validity_type(self, validity_type):
        """Sets the validity_type of this LicenseKeySchema.

        License validity type  # noqa: E501

        :param validity_type: The validity_type of this LicenseKeySchema.  # noqa: E501
        :type: str
        """
        if validity_type is None:
            raise ValueError("Invalid value for `validity_type`, must not be `None`")  # noqa: E501
        allowed_values = ["invalid", "countdown", "date-based", "permanent"]  # noqa: E501
        if validity_type not in allowed_values:
            raise ValueError(
                "Invalid value for `validity_type` ({0}), must be one of {1}"  # noqa: E501
                .format(validity_type, allowed_values)
            )

        self._validity_type = validity_type

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

        License key version, an integer value indicating version of license vendor info  # noqa: E501

        :return: The version of this LicenseKeySchema.  # noqa: E501
        :rtype: int
        """
        return self._version

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

        License key version, an integer value indicating version of license vendor info  # noqa: E501

        :param version: The version of this LicenseKeySchema.  # noqa: E501
        :type: int
        """
        if version is None:
            raise ValueError("Invalid value for `version`, must not be `None`")  # noqa: E501
        if version is not None and version < 1:  # noqa: E501
            raise ValueError("Invalid value for `version`, must be a value greater than or equal to `1`")  # noqa: E501

        self._version = version

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

        License stock keeping unit name, indicates category of purchased license  # noqa: E501

        :return: The sku_name of this LicenseKeySchema.  # noqa: E501
        :rtype: str
        """
        return self._sku_name

    @sku_name.setter
    def sku_name(self, sku_name):
        """Sets the sku_name of this LicenseKeySchema.

        License stock keeping unit name, indicates category of purchased license  # noqa: E501

        :param sku_name: The sku_name of this LicenseKeySchema.  # noqa: E501
        :type: str
        """
        if sku_name is None:
            raise ValueError("Invalid value for `sku_name`, must not be `None`")  # noqa: E501

        self._sku_name = sku_name

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

        Identification of customer who has purchased this license  # noqa: E501

        :return: The customer_id of this LicenseKeySchema.  # noqa: E501
        :rtype: str
        """
        return self._customer_id

    @customer_id.setter
    def customer_id(self, customer_id):
        """Sets the customer_id of this LicenseKeySchema.

        Identification of customer who has purchased this license  # noqa: E501

        :param customer_id: The customer_id of this LicenseKeySchema.  # noqa: E501
        :type: str
        """
        if customer_id is None:
            raise ValueError("Invalid value for `customer_id`, must not be `None`")  # noqa: E501

        self._customer_id = customer_id

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

        License purchase order type  # noqa: E501

        :return: The order_type of this LicenseKeySchema.  # noqa: E501
        :rtype: str
        """
        return self._order_type

    @order_type.setter
    def order_type(self, order_type):
        """Sets the order_type of this LicenseKeySchema.

        License purchase order type  # noqa: E501

        :param order_type: The order_type of this LicenseKeySchema.  # noqa: E501
        :type: str
        """
        if order_type is None:
            raise ValueError("Invalid value for `order_type`, must not be `None`")  # noqa: E501
        allowed_values = ["unknown", "commercial", "trial", "demo", "emergency", "lab", "education"]  # noqa: E501
        if order_type not in allowed_values:
            raise ValueError(
                "Invalid value for `order_type` ({0}), must be one of {1}"  # noqa: E501
                .format(order_type, allowed_values)
            )

        self._order_type = order_type

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

        Software serial number used for license activation  # noqa: E501

        :return: The sw_serial_id of this LicenseKeySchema.  # noqa: E501
        :rtype: str
        """
        return self._sw_serial_id

    @sw_serial_id.setter
    def sw_serial_id(self, sw_serial_id):
        """Sets the sw_serial_id of this LicenseKeySchema.

        Software serial number used for license activation  # noqa: E501

        :param sw_serial_id: The sw_serial_id of this LicenseKeySchema.  # noqa: E501
        :type: str
        """

        self._sw_serial_id = sw_serial_id

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

        License mode of operation  # noqa: E501

        :return: The mode of this LicenseKeySchema.  # noqa: E501
        :rtype: str
        """
        return self._mode

    @mode.setter
    def mode(self, mode):
        """Sets the mode of this LicenseKeySchema.

        License mode of operation  # noqa: E501

        :param mode: The mode of this LicenseKeySchema.  # noqa: E501
        :type: str
        """
        allowed_values = ["invalid", "standalone", "network"]  # noqa: E501
        if mode not in allowed_values:
            raise ValueError(
                "Invalid value for `mode` ({0}), must be one of {1}"  # noqa: E501
                .format(mode, allowed_values)
            )

        self._mode = mode

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

        Features which are part of the license  # noqa: E501

        :return: The features of this LicenseKeySchema.  # noqa: E501
        :rtype: list[LicensekeySchemaFeatures]
        """
        return self._features

    @features.setter
    def features(self, features):
        """Sets the features of this LicenseKeySchema.

        Features which are part of the license  # noqa: E501

        :param features: The features of this LicenseKeySchema.  # noqa: E501
        :type: list[LicensekeySchemaFeatures]
        """
        if features is None:
            raise ValueError("Invalid value for `features`, must not be `None`")  # noqa: E501

        self._features = features

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

        return self.__dict__ == other.__dict__

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