# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.1.3, generator: {generator})
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import msrest.serialization


class Entity(msrest.serialization.Model):
    """Entity.

    All required parameters must be populated in order to send to Azure.

    :param id: Entity's id.
    :type id: str
    :param external_id: Entity's external id.
    :type external_id: str
    :param name: Required. Entity's name.
    :type name: str
    :param type: Required. Entity's type.
    :type type: str
    :param layer_id: Required. The containing layer id.
    :type layer_id: str
    :param created_at: Timestamp of the last update, ISO-8601 formatted.
    :type created_at: ~datetime.datetime
    :param updated_at: Timestamp of the last update, ISO-8601 formatted.
    :type updated_at: ~datetime.datetime
    :param geo_data: A GeoJson data object.
    :type geo_data: object
    """

    _validation = {
        'name': {'required': True},
        'type': {'required': True},
        'layer_id': {'required': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'external_id': {'key': 'externalId', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'layer_id': {'key': 'layerId', 'type': 'str'},
        'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
        'updated_at': {'key': 'updatedAt', 'type': 'iso-8601'},
        'geo_data': {'key': 'geoData', 'type': 'object'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(Entity, self).__init__(**kwargs)
        self.id = kwargs.get('id', None)
        self.external_id = kwargs.get('external_id', None)
        self.name = kwargs['name']
        self.type = kwargs['type']
        self.layer_id = kwargs['layer_id']
        self.created_at = kwargs.get('created_at', None)
        self.updated_at = kwargs.get('updated_at', None)
        self.geo_data = kwargs.get('geo_data', None)


class Error(msrest.serialization.Model):
    """Error.

    :param message:
    :type message: str
    """

    _attribute_map = {
        'message': {'key': 'message', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(Error, self).__init__(**kwargs)
        self.message = kwargs.get('message', None)


class Feature(msrest.serialization.Model):
    """GeoJson 'Feature' object.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar type:  Default value: "Feature".
    :vartype type: str
    :param geometry:
    :type geometry: object
    :param properties: Any object.
    :type properties: object
    """

    _validation = {
        'type': {'constant': True},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'geometry': {'key': 'geometry', 'type': 'object'},
        'properties': {'key': 'properties', 'type': 'object'},
    }

    type = "Feature"

    def __init__(
        self,
        **kwargs
    ):
        super(Feature, self).__init__(**kwargs)
        self.geometry = kwargs.get('geometry', None)
        self.properties = kwargs.get('properties', None)


class FeatureCollection(msrest.serialization.Model):
    """GeoJson Feature Collection.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar type:  Default value: "FeatureCollection".
    :vartype type: str
    :param features:
    :type features: list[~layers_manager.models.Feature]
    """

    _validation = {
        'type': {'constant': True},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'features': {'key': 'features', 'type': '[Feature]'},
    }

    type = "FeatureCollection"

    def __init__(
        self,
        **kwargs
    ):
        super(FeatureCollection, self).__init__(**kwargs)
        self.features = kwargs.get('features', None)


class Layer(msrest.serialization.Model):
    """Layer.

    All required parameters must be populated in order to send to Azure.

    :param id: Layer's id.
    :type id: str
    :param name: Required. Layer's name.
    :type name: str
    :param created_at: Timestamp of the last update, ISO-8601 formatted.
    :type created_at: ~datetime.datetime
    :param updated_at: Timestamp of the last update, ISO-8601 formatted.
    :type updated_at: ~datetime.datetime
    :param entities: A list of the layer's entities.
    :type entities: list[~layers_manager.models.Entity]
    """

    _validation = {
        'name': {'required': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
        'updated_at': {'key': 'updatedAt', 'type': 'iso-8601'},
        'entities': {'key': 'entities', 'type': '[Entity]'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(Layer, self).__init__(**kwargs)
        self.id = kwargs.get('id', None)
        self.name = kwargs['name']
        self.created_at = kwargs.get('created_at', None)
        self.updated_at = kwargs.get('updated_at', None)
        self.entities = kwargs.get('entities', None)


class LayerQuery(msrest.serialization.Model):
    """LayerQuery.

    All required parameters must be populated in order to send to Azure.

    :param layers: Required. A subset of layer ids to query.
    :type layers: list[str]
    :param since: A timestamp, ISO-8601 formatted. If provided, entities updated since the
     timestamp will be fetched.
    :type since: ~datetime.datetime
    :param bbox: A geo bounding box. If provided, entities within the box will be fetched.
    :type bbox: list[float]
    """

    _validation = {
        'layers': {'required': True, 'min_items': 1},
        'bbox': {'max_items': 4, 'min_items': 4},
    }

    _attribute_map = {
        'layers': {'key': 'layers', 'type': '[str]'},
        'since': {'key': 'since', 'type': 'iso-8601'},
        'bbox': {'key': 'bbox', 'type': '[float]'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(LayerQuery, self).__init__(**kwargs)
        self.layers = kwargs['layers']
        self.since = kwargs.get('since', None)
        self.bbox = kwargs.get('bbox', None)


class LineString(msrest.serialization.Model):
    """GeoJson 'LineString' object.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar type:  Default value: "LineString".
    :vartype type: str
    :param coordinates: An array of at least 2 Point Coordinates, required to draw a line.
    :type coordinates: list[list[float]]
    """

    _validation = {
        'type': {'constant': True},
        'coordinates': {'min_items': 2},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'coordinates': {'key': 'coordinates', 'type': '[[float]]'},
    }

    type = "LineString"

    def __init__(
        self,
        **kwargs
    ):
        super(LineString, self).__init__(**kwargs)
        self.coordinates = kwargs.get('coordinates', None)


class MultiLineString(msrest.serialization.Model):
    """GeoJson 'MultiLineString' object.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar type:  Default value: "MultiLineString".
    :vartype type: str
    :param coordinates: An array of LineString Coordinates.
    :type coordinates: list[list[list[float]]]
    """

    _validation = {
        'type': {'constant': True},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'coordinates': {'key': 'coordinates', 'type': '[[[float]]]'},
    }

    type = "MultiLineString"

    def __init__(
        self,
        **kwargs
    ):
        super(MultiLineString, self).__init__(**kwargs)
        self.coordinates = kwargs.get('coordinates', None)


class MultiPoint(msrest.serialization.Model):
    """GeoJson 'MultiPoint' object.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar type:  Default value: "MultiPoint".
    :vartype type: str
    :param coordinates: An array of Point Coordinates.
    :type coordinates: list[list[float]]
    """

    _validation = {
        'type': {'constant': True},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'coordinates': {'key': 'coordinates', 'type': '[[float]]'},
    }

    type = "MultiPoint"

    def __init__(
        self,
        **kwargs
    ):
        super(MultiPoint, self).__init__(**kwargs)
        self.coordinates = kwargs.get('coordinates', None)


class MultiPolygon(msrest.serialization.Model):
    """GeoJson 'MultiPolygon' object.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar type:  Default value: "MultiPolygon".
    :vartype type: str
    :param coordinates: An array of Polygon Coordinates.
    :type coordinates: list[list[list[list[float]]]]
    """

    _validation = {
        'type': {'constant': True},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'coordinates': {'key': 'coordinates', 'type': '[[[[float]]]]'},
    }

    type = "MultiPolygon"

    def __init__(
        self,
        **kwargs
    ):
        super(MultiPolygon, self).__init__(**kwargs)
        self.coordinates = kwargs.get('coordinates', None)


class Point(msrest.serialization.Model):
    """GeoJson 'Point' object.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar type:  Default value: "Point".
    :vartype type: str
    :param coordinates: Coordinates of a single point.
    :type coordinates: list[float]
    """

    _validation = {
        'type': {'constant': True},
        'coordinates': {'max_items': 2, 'min_items': 2},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'coordinates': {'key': 'coordinates', 'type': '[float]'},
    }

    type = "Point"

    def __init__(
        self,
        **kwargs
    ):
        super(Point, self).__init__(**kwargs)
        self.coordinates = kwargs.get('coordinates', None)


class Polygon(msrest.serialization.Model):
    """GeoJson 'Polygon' object.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar type:  Default value: "Polygon".
    :vartype type: str
    :param coordinates: An array of Linear Rings Coordinates, where the first ring describes the
     contour polygon and the following rings describes the inner polygons.
    :type coordinates: list[list[list[float]]]
    """

    _validation = {
        'type': {'constant': True},
        'coordinates': {'min_items': 1},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'coordinates': {'key': 'coordinates', 'type': '[[[float]]]'},
    }

    type = "Polygon"

    def __init__(
        self,
        **kwargs
    ):
        super(Polygon, self).__init__(**kwargs)
        self.coordinates = kwargs.get('coordinates', None)
