# coding: utf-8

"""
    result-analysis-service

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from dhicn_result_analysis_service.configuration import Configuration


class PipeProfileItem(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 = {
        'pipe_id': 'str',
        'diameter': 'float',
        'length': 'float',
        'from_node': 'NodeItem',
        'to_node': 'NodeItem'
    }

    attribute_map = {
        'pipe_id': 'pipeID',
        'diameter': 'diameter',
        'length': 'length',
        'from_node': 'fromNode',
        'to_node': 'toNode'
    }

    def __init__(self, pipe_id=None, diameter=None, length=None, from_node=None, to_node=None, local_vars_configuration=None):  # noqa: E501
        """PipeProfileItem - 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._pipe_id = None
        self._diameter = None
        self._length = None
        self._from_node = None
        self._to_node = None
        self.discriminator = None

        self.pipe_id = pipe_id
        if diameter is not None:
            self.diameter = diameter
        if length is not None:
            self.length = length
        if from_node is not None:
            self.from_node = from_node
        if to_node is not None:
            self.to_node = to_node

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

        管段ID pipe ID  # noqa: E501

        :return: The pipe_id of this PipeProfileItem.  # noqa: E501
        :rtype: str
        """
        return self._pipe_id

    @pipe_id.setter
    def pipe_id(self, pipe_id):
        """Sets the pipe_id of this PipeProfileItem.

        管段ID pipe ID  # noqa: E501

        :param pipe_id: The pipe_id of this PipeProfileItem.  # noqa: E501
        :type: str
        """

        self._pipe_id = pipe_id

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

        管径或管高 pipe diameter or height  # noqa: E501

        :return: The diameter of this PipeProfileItem.  # noqa: E501
        :rtype: float
        """
        return self._diameter

    @diameter.setter
    def diameter(self, diameter):
        """Sets the diameter of this PipeProfileItem.

        管径或管高 pipe diameter or height  # noqa: E501

        :param diameter: The diameter of this PipeProfileItem.  # noqa: E501
        :type: float
        """

        self._diameter = diameter

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

        管长 pipe length  # noqa: E501

        :return: The length of this PipeProfileItem.  # noqa: E501
        :rtype: float
        """
        return self._length

    @length.setter
    def length(self, length):
        """Sets the length of this PipeProfileItem.

        管长 pipe length  # noqa: E501

        :param length: The length of this PipeProfileItem.  # noqa: E501
        :type: float
        """

        self._length = length

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


        :return: The from_node of this PipeProfileItem.  # noqa: E501
        :rtype: NodeItem
        """
        return self._from_node

    @from_node.setter
    def from_node(self, from_node):
        """Sets the from_node of this PipeProfileItem.


        :param from_node: The from_node of this PipeProfileItem.  # noqa: E501
        :type: NodeItem
        """

        self._from_node = from_node

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


        :return: The to_node of this PipeProfileItem.  # noqa: E501
        :rtype: NodeItem
        """
        return self._to_node

    @to_node.setter
    def to_node(self, to_node):
        """Sets the to_node of this PipeProfileItem.


        :param to_node: The to_node of this PipeProfileItem.  # noqa: E501
        :type: NodeItem
        """

        self._to_node = to_node

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

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