# coding: utf-8

"""
    Mauve Admin API

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

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

import pprint
import re  # noqa: F401

import six

class Availibity(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 = {
        'sku': 'str',
        'stock': 'int',
        'always_in_stock': 'bool',
        'pharmacy_wholesaler_availabilities': 'list[PharmacyWholesalerAvailability]'
    }

    attribute_map = {
        'sku': 'sku',
        'stock': 'stock',
        'always_in_stock': 'alwaysInStock',
        'pharmacy_wholesaler_availabilities': 'pharmacyWholesalerAvailabilities'
    }

    def __init__(self, sku=None, stock=None, always_in_stock=None, pharmacy_wholesaler_availabilities=None):  # noqa: E501
        """Availibity - a model defined in Swagger"""  # noqa: E501
        self._sku = None
        self._stock = None
        self._always_in_stock = None
        self._pharmacy_wholesaler_availabilities = None
        self.discriminator = None
        self.sku = sku
        self.stock = stock
        if always_in_stock is not None:
            self.always_in_stock = always_in_stock
        if pharmacy_wholesaler_availabilities is not None:
            self.pharmacy_wholesaler_availabilities = pharmacy_wholesaler_availabilities

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

        Stock Keeping Unit (e.g. PZN)  # noqa: E501

        :return: The sku of this Availibity.  # noqa: E501
        :rtype: str
        """
        return self._sku

    @sku.setter
    def sku(self, sku):
        """Sets the sku of this Availibity.

        Stock Keeping Unit (e.g. PZN)  # noqa: E501

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

        self._sku = sku

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

        The stock of a product  # noqa: E501

        :return: The stock of this Availibity.  # noqa: E501
        :rtype: int
        """
        return self._stock

    @stock.setter
    def stock(self, stock):
        """Sets the stock of this Availibity.

        The stock of a product  # noqa: E501

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

        self._stock = stock

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

        Indicates whether this product is marked as always in stock (in Mauve System3: Lagerartikel)  # noqa: E501

        :return: The always_in_stock of this Availibity.  # noqa: E501
        :rtype: bool
        """
        return self._always_in_stock

    @always_in_stock.setter
    def always_in_stock(self, always_in_stock):
        """Sets the always_in_stock of this Availibity.

        Indicates whether this product is marked as always in stock (in Mauve System3: Lagerartikel)  # noqa: E501

        :param always_in_stock: The always_in_stock of this Availibity.  # noqa: E501
        :type: bool
        """

        self._always_in_stock = always_in_stock

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

        List of pharmacy wholesalers where the product is available  # noqa: E501

        :return: The pharmacy_wholesaler_availabilities of this Availibity.  # noqa: E501
        :rtype: list[PharmacyWholesalerAvailability]
        """
        return self._pharmacy_wholesaler_availabilities

    @pharmacy_wholesaler_availabilities.setter
    def pharmacy_wholesaler_availabilities(self, pharmacy_wholesaler_availabilities):
        """Sets the pharmacy_wholesaler_availabilities of this Availibity.

        List of pharmacy wholesalers where the product is available  # noqa: E501

        :param pharmacy_wholesaler_availabilities: The pharmacy_wholesaler_availabilities of this Availibity.  # noqa: E501
        :type: list[PharmacyWholesalerAvailability]
        """

        self._pharmacy_wholesaler_availabilities = pharmacy_wholesaler_availabilities

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

        return self.__dict__ == other.__dict__

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