# coding: utf-8

"""
    digital-twin-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_digital_twin_service.configuration import Configuration


class Point(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 = {
        'factory': 'GeometryFactory',
        'user_data': 'Null',
        'srid': 'int',
        'precision_model': 'PrecisionModel',
        'num_geometries': 'int',
        'is_simple': 'bool',
        'is_valid': 'bool',
        'area': 'float',
        'length': 'float',
        'centroid': 'Point',
        'interior_point': 'Point',
        'point_on_surface': 'Point',
        'envelope': 'Geometry',
        'envelope_internal': 'Envelope',
        'is_rectangle': 'bool',
        'coordinate_sequence': 'CoordinateSequence',
        'coordinates': 'list[Coordinate]',
        'num_points': 'int',
        'is_empty': 'bool',
        'dimension': 'int',
        'boundary_dimension': 'int',
        'x': 'float',
        'y': 'float',
        'coordinate': 'Coordinate',
        'geometry_type': 'str',
        'ogc_geometry_type': 'int',
        'boundary': 'Geometry',
        'z': 'float',
        'm': 'float'
    }

    attribute_map = {
        'factory': 'factory',
        'user_data': 'userData',
        'srid': 'srid',
        'precision_model': 'precisionModel',
        'num_geometries': 'numGeometries',
        'is_simple': 'isSimple',
        'is_valid': 'isValid',
        'area': 'area',
        'length': 'length',
        'centroid': 'centroid',
        'interior_point': 'interiorPoint',
        'point_on_surface': 'pointOnSurface',
        'envelope': 'envelope',
        'envelope_internal': 'envelopeInternal',
        'is_rectangle': 'isRectangle',
        'coordinate_sequence': 'coordinateSequence',
        'coordinates': 'coordinates',
        'num_points': 'numPoints',
        'is_empty': 'isEmpty',
        'dimension': 'dimension',
        'boundary_dimension': 'boundaryDimension',
        'x': 'x',
        'y': 'y',
        'coordinate': 'coordinate',
        'geometry_type': 'geometryType',
        'ogc_geometry_type': 'ogcGeometryType',
        'boundary': 'boundary',
        'z': 'z',
        'm': 'm'
    }

    def __init__(self, factory=None, user_data=None, srid=None, precision_model=None, num_geometries=None, is_simple=None, is_valid=None, area=None, length=None, centroid=None, interior_point=None, point_on_surface=None, envelope=None, envelope_internal=None, is_rectangle=None, coordinate_sequence=None, coordinates=None, num_points=None, is_empty=None, dimension=None, boundary_dimension=None, x=None, y=None, coordinate=None, geometry_type=None, ogc_geometry_type=None, boundary=None, z=None, m=None, local_vars_configuration=None):  # noqa: E501
        """Point - 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._factory = None
        self._user_data = None
        self._srid = None
        self._precision_model = None
        self._num_geometries = None
        self._is_simple = None
        self._is_valid = None
        self._area = None
        self._length = None
        self._centroid = None
        self._interior_point = None
        self._point_on_surface = None
        self._envelope = None
        self._envelope_internal = None
        self._is_rectangle = None
        self._coordinate_sequence = None
        self._coordinates = None
        self._num_points = None
        self._is_empty = None
        self._dimension = None
        self._boundary_dimension = None
        self._x = None
        self._y = None
        self._coordinate = None
        self._geometry_type = None
        self._ogc_geometry_type = None
        self._boundary = None
        self._z = None
        self._m = None
        self.discriminator = None

        if factory is not None:
            self.factory = factory
        if user_data is not None:
            self.user_data = user_data
        if srid is not None:
            self.srid = srid
        if precision_model is not None:
            self.precision_model = precision_model
        if num_geometries is not None:
            self.num_geometries = num_geometries
        if is_simple is not None:
            self.is_simple = is_simple
        if is_valid is not None:
            self.is_valid = is_valid
        if area is not None:
            self.area = area
        if length is not None:
            self.length = length
        if centroid is not None:
            self.centroid = centroid
        if interior_point is not None:
            self.interior_point = interior_point
        if point_on_surface is not None:
            self.point_on_surface = point_on_surface
        if envelope is not None:
            self.envelope = envelope
        if envelope_internal is not None:
            self.envelope_internal = envelope_internal
        if is_rectangle is not None:
            self.is_rectangle = is_rectangle
        if coordinate_sequence is not None:
            self.coordinate_sequence = coordinate_sequence
        self.coordinates = coordinates
        if num_points is not None:
            self.num_points = num_points
        if is_empty is not None:
            self.is_empty = is_empty
        if dimension is not None:
            self.dimension = dimension
        if boundary_dimension is not None:
            self.boundary_dimension = boundary_dimension
        if x is not None:
            self.x = x
        if y is not None:
            self.y = y
        if coordinate is not None:
            self.coordinate = coordinate
        self.geometry_type = geometry_type
        if ogc_geometry_type is not None:
            self.ogc_geometry_type = ogc_geometry_type
        if boundary is not None:
            self.boundary = boundary
        if z is not None:
            self.z = z
        if m is not None:
            self.m = m

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


        :return: The factory of this Point.  # noqa: E501
        :rtype: GeometryFactory
        """
        return self._factory

    @factory.setter
    def factory(self, factory):
        """Sets the factory of this Point.


        :param factory: The factory of this Point.  # noqa: E501
        :type: GeometryFactory
        """

        self._factory = factory

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


        :return: The user_data of this Point.  # noqa: E501
        :rtype: Null
        """
        return self._user_data

    @user_data.setter
    def user_data(self, user_data):
        """Sets the user_data of this Point.


        :param user_data: The user_data of this Point.  # noqa: E501
        :type: Null
        """

        self._user_data = user_data

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


        :return: The srid of this Point.  # noqa: E501
        :rtype: int
        """
        return self._srid

    @srid.setter
    def srid(self, srid):
        """Sets the srid of this Point.


        :param srid: The srid of this Point.  # noqa: E501
        :type: int
        """

        self._srid = srid

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


        :return: The precision_model of this Point.  # noqa: E501
        :rtype: PrecisionModel
        """
        return self._precision_model

    @precision_model.setter
    def precision_model(self, precision_model):
        """Sets the precision_model of this Point.


        :param precision_model: The precision_model of this Point.  # noqa: E501
        :type: PrecisionModel
        """

        self._precision_model = precision_model

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


        :return: The num_geometries of this Point.  # noqa: E501
        :rtype: int
        """
        return self._num_geometries

    @num_geometries.setter
    def num_geometries(self, num_geometries):
        """Sets the num_geometries of this Point.


        :param num_geometries: The num_geometries of this Point.  # noqa: E501
        :type: int
        """

        self._num_geometries = num_geometries

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


        :return: The is_simple of this Point.  # noqa: E501
        :rtype: bool
        """
        return self._is_simple

    @is_simple.setter
    def is_simple(self, is_simple):
        """Sets the is_simple of this Point.


        :param is_simple: The is_simple of this Point.  # noqa: E501
        :type: bool
        """

        self._is_simple = is_simple

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


        :return: The is_valid of this Point.  # noqa: E501
        :rtype: bool
        """
        return self._is_valid

    @is_valid.setter
    def is_valid(self, is_valid):
        """Sets the is_valid of this Point.


        :param is_valid: The is_valid of this Point.  # noqa: E501
        :type: bool
        """

        self._is_valid = is_valid

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


        :return: The area of this Point.  # noqa: E501
        :rtype: float
        """
        return self._area

    @area.setter
    def area(self, area):
        """Sets the area of this Point.


        :param area: The area of this Point.  # noqa: E501
        :type: float
        """

        self._area = area

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


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

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


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

        self._length = length

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


        :return: The centroid of this Point.  # noqa: E501
        :rtype: Point
        """
        return self._centroid

    @centroid.setter
    def centroid(self, centroid):
        """Sets the centroid of this Point.


        :param centroid: The centroid of this Point.  # noqa: E501
        :type: Point
        """

        self._centroid = centroid

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


        :return: The interior_point of this Point.  # noqa: E501
        :rtype: Point
        """
        return self._interior_point

    @interior_point.setter
    def interior_point(self, interior_point):
        """Sets the interior_point of this Point.


        :param interior_point: The interior_point of this Point.  # noqa: E501
        :type: Point
        """

        self._interior_point = interior_point

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


        :return: The point_on_surface of this Point.  # noqa: E501
        :rtype: Point
        """
        return self._point_on_surface

    @point_on_surface.setter
    def point_on_surface(self, point_on_surface):
        """Sets the point_on_surface of this Point.


        :param point_on_surface: The point_on_surface of this Point.  # noqa: E501
        :type: Point
        """

        self._point_on_surface = point_on_surface

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


        :return: The envelope of this Point.  # noqa: E501
        :rtype: Geometry
        """
        return self._envelope

    @envelope.setter
    def envelope(self, envelope):
        """Sets the envelope of this Point.


        :param envelope: The envelope of this Point.  # noqa: E501
        :type: Geometry
        """

        self._envelope = envelope

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


        :return: The envelope_internal of this Point.  # noqa: E501
        :rtype: Envelope
        """
        return self._envelope_internal

    @envelope_internal.setter
    def envelope_internal(self, envelope_internal):
        """Sets the envelope_internal of this Point.


        :param envelope_internal: The envelope_internal of this Point.  # noqa: E501
        :type: Envelope
        """

        self._envelope_internal = envelope_internal

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


        :return: The is_rectangle of this Point.  # noqa: E501
        :rtype: bool
        """
        return self._is_rectangle

    @is_rectangle.setter
    def is_rectangle(self, is_rectangle):
        """Sets the is_rectangle of this Point.


        :param is_rectangle: The is_rectangle of this Point.  # noqa: E501
        :type: bool
        """

        self._is_rectangle = is_rectangle

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


        :return: The coordinate_sequence of this Point.  # noqa: E501
        :rtype: CoordinateSequence
        """
        return self._coordinate_sequence

    @coordinate_sequence.setter
    def coordinate_sequence(self, coordinate_sequence):
        """Sets the coordinate_sequence of this Point.


        :param coordinate_sequence: The coordinate_sequence of this Point.  # noqa: E501
        :type: CoordinateSequence
        """

        self._coordinate_sequence = coordinate_sequence

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


        :return: The coordinates of this Point.  # noqa: E501
        :rtype: list[Coordinate]
        """
        return self._coordinates

    @coordinates.setter
    def coordinates(self, coordinates):
        """Sets the coordinates of this Point.


        :param coordinates: The coordinates of this Point.  # noqa: E501
        :type: list[Coordinate]
        """

        self._coordinates = coordinates

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


        :return: The num_points of this Point.  # noqa: E501
        :rtype: int
        """
        return self._num_points

    @num_points.setter
    def num_points(self, num_points):
        """Sets the num_points of this Point.


        :param num_points: The num_points of this Point.  # noqa: E501
        :type: int
        """

        self._num_points = num_points

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


        :return: The is_empty of this Point.  # noqa: E501
        :rtype: bool
        """
        return self._is_empty

    @is_empty.setter
    def is_empty(self, is_empty):
        """Sets the is_empty of this Point.


        :param is_empty: The is_empty of this Point.  # noqa: E501
        :type: bool
        """

        self._is_empty = is_empty

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

        0-P 0-Point 1-Curve 1-L 2-A 2-Surface 3-Collapse -3-Dontcare -2-True -1-Unknown -1-False   # noqa: E501

        :return: The dimension of this Point.  # noqa: E501
        :rtype: int
        """
        return self._dimension

    @dimension.setter
    def dimension(self, dimension):
        """Sets the dimension of this Point.

        0-P 0-Point 1-Curve 1-L 2-A 2-Surface 3-Collapse -3-Dontcare -2-True -1-Unknown -1-False   # noqa: E501

        :param dimension: The dimension of this Point.  # noqa: E501
        :type: int
        """
        allowed_values = [0, 1, 2, 3, -3, -2, -1]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and dimension not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `dimension` ({0}), must be one of {1}"  # noqa: E501
                .format(dimension, allowed_values)
            )

        self._dimension = dimension

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

        0-P 0-Point 1-Curve 1-L 2-A 2-Surface 3-Collapse -3-Dontcare -2-True -1-Unknown -1-False   # noqa: E501

        :return: The boundary_dimension of this Point.  # noqa: E501
        :rtype: int
        """
        return self._boundary_dimension

    @boundary_dimension.setter
    def boundary_dimension(self, boundary_dimension):
        """Sets the boundary_dimension of this Point.

        0-P 0-Point 1-Curve 1-L 2-A 2-Surface 3-Collapse -3-Dontcare -2-True -1-Unknown -1-False   # noqa: E501

        :param boundary_dimension: The boundary_dimension of this Point.  # noqa: E501
        :type: int
        """
        allowed_values = [0, 1, 2, 3, -3, -2, -1]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and boundary_dimension not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `boundary_dimension` ({0}), must be one of {1}"  # noqa: E501
                .format(boundary_dimension, allowed_values)
            )

        self._boundary_dimension = boundary_dimension

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


        :return: The x of this Point.  # noqa: E501
        :rtype: float
        """
        return self._x

    @x.setter
    def x(self, x):
        """Sets the x of this Point.


        :param x: The x of this Point.  # noqa: E501
        :type: float
        """

        self._x = x

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


        :return: The y of this Point.  # noqa: E501
        :rtype: float
        """
        return self._y

    @y.setter
    def y(self, y):
        """Sets the y of this Point.


        :param y: The y of this Point.  # noqa: E501
        :type: float
        """

        self._y = y

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


        :return: The coordinate of this Point.  # noqa: E501
        :rtype: Coordinate
        """
        return self._coordinate

    @coordinate.setter
    def coordinate(self, coordinate):
        """Sets the coordinate of this Point.


        :param coordinate: The coordinate of this Point.  # noqa: E501
        :type: Coordinate
        """

        self._coordinate = coordinate

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


        :return: The geometry_type of this Point.  # noqa: E501
        :rtype: str
        """
        return self._geometry_type

    @geometry_type.setter
    def geometry_type(self, geometry_type):
        """Sets the geometry_type of this Point.


        :param geometry_type: The geometry_type of this Point.  # noqa: E501
        :type: str
        """

        self._geometry_type = geometry_type

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

        1-Point 2-LineString 3-Polygon 4-MultiPoint 5-MultiLineString 6-MultiPolygon 7-GeometryCollection 8-CircularString 9-CompoundCurve 10-CurvePolygon 11-MultiCurve 12-MultiSurface 13-Curve 14-Surface 15-PolyhedralSurface 16-TIN   # noqa: E501

        :return: The ogc_geometry_type of this Point.  # noqa: E501
        :rtype: int
        """
        return self._ogc_geometry_type

    @ogc_geometry_type.setter
    def ogc_geometry_type(self, ogc_geometry_type):
        """Sets the ogc_geometry_type of this Point.

        1-Point 2-LineString 3-Polygon 4-MultiPoint 5-MultiLineString 6-MultiPolygon 7-GeometryCollection 8-CircularString 9-CompoundCurve 10-CurvePolygon 11-MultiCurve 12-MultiSurface 13-Curve 14-Surface 15-PolyhedralSurface 16-TIN   # noqa: E501

        :param ogc_geometry_type: The ogc_geometry_type of this Point.  # noqa: E501
        :type: int
        """
        allowed_values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and ogc_geometry_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `ogc_geometry_type` ({0}), must be one of {1}"  # noqa: E501
                .format(ogc_geometry_type, allowed_values)
            )

        self._ogc_geometry_type = ogc_geometry_type

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


        :return: The boundary of this Point.  # noqa: E501
        :rtype: Geometry
        """
        return self._boundary

    @boundary.setter
    def boundary(self, boundary):
        """Sets the boundary of this Point.


        :param boundary: The boundary of this Point.  # noqa: E501
        :type: Geometry
        """

        self._boundary = boundary

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


        :return: The z of this Point.  # noqa: E501
        :rtype: float
        """
        return self._z

    @z.setter
    def z(self, z):
        """Sets the z of this Point.


        :param z: The z of this Point.  # noqa: E501
        :type: float
        """

        self._z = z

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


        :return: The m of this Point.  # noqa: E501
        :rtype: float
        """
        return self._m

    @m.setter
    def m(self, m):
        """Sets the m of this Point.


        :param m: The m of this Point.  # noqa: E501
        :type: float
        """

        self._m = m

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

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