# coding: utf-8

"""
    Component Database API

    The API that provides access to Component Database data.  # noqa: E501

    The version of the OpenAPI document: 3.8.0
    Contact: djarosz@anl.gov
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from cdbApi.configuration import Configuration


class ItemDomainInventoryAllOf(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'tag': 'str',
        'catalog_item': 'ItemDomainCatalog',
        'serial_number': 'str'
    }

    attribute_map = {
        'tag': 'tag',
        'catalog_item': 'catalogItem',
        'serial_number': 'serialNumber'
    }

    def __init__(self, tag=None, catalog_item=None, serial_number=None, local_vars_configuration=None):  # noqa: E501
        """ItemDomainInventoryAllOf - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._tag = None
        self._catalog_item = None
        self._serial_number = None
        self.discriminator = None

        if tag is not None:
            self.tag = tag
        if catalog_item is not None:
            self.catalog_item = catalog_item
        if serial_number is not None:
            self.serial_number = serial_number

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


        :return: The tag of this ItemDomainInventoryAllOf.  # noqa: E501
        :rtype: str
        """
        return self._tag

    @tag.setter
    def tag(self, tag):
        """Sets the tag of this ItemDomainInventoryAllOf.


        :param tag: The tag of this ItemDomainInventoryAllOf.  # noqa: E501
        :type: str
        """

        self._tag = tag

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


        :return: The catalog_item of this ItemDomainInventoryAllOf.  # noqa: E501
        :rtype: ItemDomainCatalog
        """
        return self._catalog_item

    @catalog_item.setter
    def catalog_item(self, catalog_item):
        """Sets the catalog_item of this ItemDomainInventoryAllOf.


        :param catalog_item: The catalog_item of this ItemDomainInventoryAllOf.  # noqa: E501
        :type: ItemDomainCatalog
        """

        self._catalog_item = catalog_item

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


        :return: The serial_number of this ItemDomainInventoryAllOf.  # noqa: E501
        :rtype: str
        """
        return self._serial_number

    @serial_number.setter
    def serial_number(self, serial_number):
        """Sets the serial_number of this ItemDomainInventoryAllOf.


        :param serial_number: The serial_number of this ItemDomainInventoryAllOf.  # noqa: E501
        :type: str
        """

        self._serial_number = serial_number

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

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