# 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 DeliveryBase(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 = {
        'number': 'str',
        'name': 'str',
        'customer_number': 'str',
        'description': 'str',
        'date_of_shipment': 'str'
    }

    attribute_map = {
        'number': 'number',
        'name': 'name',
        'customer_number': 'customer_number',
        'description': 'description',
        'date_of_shipment': 'date_of_shipment'
    }

    discriminator_value_class_map = {
          'DeliveryResponse': 'DeliveryResponse',
'DeliveryRequest': 'DeliveryRequest'    }

    def __init__(self, number=None, name=None, customer_number=None, description=None, date_of_shipment=None):  # noqa: E501
        """DeliveryBase - a model defined in Swagger"""  # noqa: E501
        self._number = None
        self._name = None
        self._customer_number = None
        self._description = None
        self._date_of_shipment = None
        self.discriminator = 'deliveryBaseType'
        self.number = number
        if name is not None:
            self.name = name
        if customer_number is not None:
            self.customer_number = customer_number
        if description is not None:
            self.description = description
        if date_of_shipment is not None:
            self.date_of_shipment = date_of_shipment

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

        Number of the delivery  # noqa: E501

        :return: The number of this DeliveryBase.  # noqa: E501
        :rtype: str
        """
        return self._number

    @number.setter
    def number(self, number):
        """Sets the number of this DeliveryBase.

        Number of the delivery  # noqa: E501

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

        self._number = number

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

        Name of the delivery  # noqa: E501

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

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

        Name of the delivery  # noqa: E501

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

        self._name = name

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

        Customer number, the delivery was shipped to  # noqa: E501

        :return: The customer_number of this DeliveryBase.  # noqa: E501
        :rtype: str
        """
        return self._customer_number

    @customer_number.setter
    def customer_number(self, customer_number):
        """Sets the customer_number of this DeliveryBase.

        Customer number, the delivery was shipped to  # noqa: E501

        :param customer_number: The customer_number of this DeliveryBase.  # noqa: E501
        :type: str
        """

        self._customer_number = customer_number

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

        description text of the delivery  # noqa: E501

        :return: The description of this DeliveryBase.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this DeliveryBase.

        description text of the delivery  # noqa: E501

        :param description: The description of this DeliveryBase.  # noqa: E501
        :type: str
        """

        self._description = description

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

        date of the delivery: format example: 2016-01-01T18:30:00  # noqa: E501

        :return: The date_of_shipment of this DeliveryBase.  # noqa: E501
        :rtype: str
        """
        return self._date_of_shipment

    @date_of_shipment.setter
    def date_of_shipment(self, date_of_shipment):
        """Sets the date_of_shipment of this DeliveryBase.

        date of the delivery: format example: 2016-01-01T18:30:00  # noqa: E501

        :param date_of_shipment: The date_of_shipment of this DeliveryBase.  # noqa: E501
        :type: str
        """

        self._date_of_shipment = date_of_shipment

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

        return self.__dict__ == other.__dict__

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