# coding: utf-8

"""
    Netilion API Documentation

    Welcome to the Netilion API Documentation, which provides interactive access and documentation to our REST API. Please visit our developer portal for further instructions and information: https://developer.netilion.endress.com/   # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class AddOnBase(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 = {
        'name': 'str',
        'external_reference': 'str',
        'quantity': 'int',
        'material_number': 'str',
        'product_code': 'str',
        'add_on_type': 'str'
    }

    attribute_map = {
        'name': 'name',
        'external_reference': 'external_reference',
        'quantity': 'quantity',
        'material_number': 'material_number',
        'product_code': 'product_code',
        'add_on_type': 'add_on_type'
    }

    discriminator_value_class_map = {
          'AddOnResponse': 'AddOnResponse'    }

    def __init__(self, name=None, external_reference=None, quantity=None, material_number=None, product_code=None, add_on_type=None):  # noqa: E501
        """AddOnBase - a model defined in Swagger"""  # noqa: E501
        self._name = None
        self._external_reference = None
        self._quantity = None
        self._material_number = None
        self._product_code = None
        self._add_on_type = None
        self.discriminator = 'addOnBaseType'
        self.name = name
        if external_reference is not None:
            self.external_reference = external_reference
        if quantity is not None:
            self.quantity = quantity
        if material_number is not None:
            self.material_number = material_number
        if product_code is not None:
            self.product_code = product_code
        if add_on_type is not None:
            self.add_on_type = add_on_type

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

        Name of the Add On  # noqa: E501

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

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

        Name of the Add On  # noqa: E501

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

        self._name = name

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

        can be used to store id of external subscription managment system  # noqa: E501

        :return: The external_reference of this AddOnBase.  # noqa: E501
        :rtype: str
        """
        return self._external_reference

    @external_reference.setter
    def external_reference(self, external_reference):
        """Sets the external_reference of this AddOnBase.

        can be used to store id of external subscription managment system  # noqa: E501

        :param external_reference: The external_reference of this AddOnBase.  # noqa: E501
        :type: str
        """

        self._external_reference = external_reference

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

        number of bought add ons  # noqa: E501

        :return: The quantity of this AddOnBase.  # noqa: E501
        :rtype: int
        """
        return self._quantity

    @quantity.setter
    def quantity(self, quantity):
        """Sets the quantity of this AddOnBase.

        number of bought add ons  # noqa: E501

        :param quantity: The quantity of this AddOnBase.  # noqa: E501
        :type: int
        """

        self._quantity = quantity

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

        material_number of add on  # noqa: E501

        :return: The material_number of this AddOnBase.  # noqa: E501
        :rtype: str
        """
        return self._material_number

    @material_number.setter
    def material_number(self, material_number):
        """Sets the material_number of this AddOnBase.

        material_number of add on  # noqa: E501

        :param material_number: The material_number of this AddOnBase.  # noqa: E501
        :type: str
        """

        self._material_number = material_number

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

        product code (for edge device related addons)  # noqa: E501

        :return: The product_code of this AddOnBase.  # noqa: E501
        :rtype: str
        """
        return self._product_code

    @product_code.setter
    def product_code(self, product_code):
        """Sets the product_code of this AddOnBase.

        product code (for edge device related addons)  # noqa: E501

        :param product_code: The product_code of this AddOnBase.  # noqa: E501
        :type: str
        """

        self._product_code = product_code

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

        possible values are: connectivity and addon  # noqa: E501

        :return: The add_on_type of this AddOnBase.  # noqa: E501
        :rtype: str
        """
        return self._add_on_type

    @add_on_type.setter
    def add_on_type(self, add_on_type):
        """Sets the add_on_type of this AddOnBase.

        possible values are: connectivity and addon  # noqa: E501

        :param add_on_type: The add_on_type of this AddOnBase.  # noqa: E501
        :type: str
        """

        self._add_on_type = add_on_type

    def get_real_child_model(self, data):
        """Returns the real base class specified by the discriminator"""
        discriminator_value = data[self.discriminator].lower()
        return self.discriminator_value_class_map.get(discriminator_value)

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

        return self.__dict__ == other.__dict__

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