# coding: utf-8

"""
    ARLAS Exploration API

    Explore the content of ARLAS collections  # noqa: E501

    OpenAPI spec version: 19.0.1
    Contact: contact@gisaia.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class ExtentSpatial(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 = {
        'bbox': 'list[list[float]]',
        'crs': 'str'
    }

    attribute_map = {
        'bbox': 'bbox',
        'crs': 'crs'
    }

    def __init__(self, bbox=None, crs=None):  # noqa: E501
        """ExtentSpatial - a model defined in Swagger"""  # noqa: E501

        self._bbox = None
        self._crs = None
        self.discriminator = None

        self.bbox = bbox
        if crs is not None:
            self.crs = crs

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

        One or more bounding boxes that describe the spatial extent of the dataset.  The first bounding box describes the overall spatial extent of the data. All subsequent bounding boxes describe  more precise bounding boxes, e.g., to identify clusters of data. Clients only interested in the overall spatial extent will only need to access the first item in each array.  # noqa: E501

        :return: The bbox of this ExtentSpatial.  # noqa: E501
        :rtype: list[list[float]]
        """
        return self._bbox

    @bbox.setter
    def bbox(self, bbox):
        """Sets the bbox of this ExtentSpatial.

        One or more bounding boxes that describe the spatial extent of the dataset.  The first bounding box describes the overall spatial extent of the data. All subsequent bounding boxes describe  more precise bounding boxes, e.g., to identify clusters of data. Clients only interested in the overall spatial extent will only need to access the first item in each array.  # noqa: E501

        :param bbox: The bbox of this ExtentSpatial.  # noqa: E501
        :type: list[list[float]]
        """
        if bbox is None:
            raise ValueError("Invalid value for `bbox`, must not be `None`")  # noqa: E501

        self._bbox = bbox

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

        Coordinate reference system of the coordinates in the spatial extent (property `bbox`). The default reference system is WGS 84 longitude/latitude. In the Core this is the only supported coordinate reference system. Extensions may support additional coordinate reference systems and add additional enum values.  # noqa: E501

        :return: The crs of this ExtentSpatial.  # noqa: E501
        :rtype: str
        """
        return self._crs

    @crs.setter
    def crs(self, crs):
        """Sets the crs of this ExtentSpatial.

        Coordinate reference system of the coordinates in the spatial extent (property `bbox`). The default reference system is WGS 84 longitude/latitude. In the Core this is the only supported coordinate reference system. Extensions may support additional coordinate reference systems and add additional enum values.  # noqa: E501

        :param crs: The crs of this ExtentSpatial.  # noqa: E501
        :type: str
        """
        allowed_values = ["HTTP_WWW_OPENGIS_NET_DEF_CRS_OGC_1_3_CRS84"]  # noqa: E501
        if crs not in allowed_values:
            raise ValueError(
                "Invalid value for `crs` ({0}), must be one of {1}"  # noqa: E501
                .format(crs, allowed_values)
            )

        self._crs = crs

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

        return self.__dict__ == other.__dict__

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