# coding: utf-8

"""
    BIMData API

    BIMData API is a tool to interact with your models stored on BIMData’s servers.     Through the API, you can manage your projects, the clouds, upload your IFC files and manage them through endpoints.  # noqa: E501

    The version of the OpenAPI document: v1
    Contact: support@bimdata.io
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from bimdata_api_client.configuration import Configuration


class Component(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 = {
        'ifc_guid': 'str',
        'originating_system': 'str',
        'authoring_tool_id': 'str'
    }

    attribute_map = {
        'ifc_guid': 'ifc_guid',
        'originating_system': 'originating_system',
        'authoring_tool_id': 'authoring_tool_id'
    }

    def __init__(self, ifc_guid=None, originating_system=None, authoring_tool_id=None, local_vars_configuration=None):  # noqa: E501
        """Component - 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._ifc_guid = None
        self._originating_system = None
        self._authoring_tool_id = None
        self.discriminator = None

        self.ifc_guid = ifc_guid
        self.originating_system = originating_system
        self.authoring_tool_id = authoring_tool_id

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


        :return: The ifc_guid of this Component.  # noqa: E501
        :rtype: str
        """
        return self._ifc_guid

    @ifc_guid.setter
    def ifc_guid(self, ifc_guid):
        """Sets the ifc_guid of this Component.


        :param ifc_guid: The ifc_guid of this Component.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                ifc_guid is not None and len(ifc_guid) > 255):
            raise ValueError("Invalid value for `ifc_guid`, length must be less than or equal to `255`")  # noqa: E501

        self._ifc_guid = ifc_guid

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


        :return: The originating_system of this Component.  # noqa: E501
        :rtype: str
        """
        return self._originating_system

    @originating_system.setter
    def originating_system(self, originating_system):
        """Sets the originating_system of this Component.


        :param originating_system: The originating_system of this Component.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                originating_system is not None and len(originating_system) > 255):
            raise ValueError("Invalid value for `originating_system`, length must be less than or equal to `255`")  # noqa: E501

        self._originating_system = originating_system

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


        :return: The authoring_tool_id of this Component.  # noqa: E501
        :rtype: str
        """
        return self._authoring_tool_id

    @authoring_tool_id.setter
    def authoring_tool_id(self, authoring_tool_id):
        """Sets the authoring_tool_id of this Component.


        :param authoring_tool_id: The authoring_tool_id of this Component.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                authoring_tool_id is not None and len(authoring_tool_id) > 255):
            raise ValueError("Invalid value for `authoring_tool_id`, length must be less than or equal to `255`")  # noqa: E501

        self._authoring_tool_id = authoring_tool_id

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

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