Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR eventgrid/data-plane] [Event-Grid Maps] Add Maps publisher schema to EventGrid data-plane #4293

Merged
merged 2 commits into from
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions azure-eventgrid/azure/eventgrid/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@
from .media_live_event_incoming_data_chunk_dropped_event_data_py3 import MediaLiveEventIncomingDataChunkDroppedEventData
from .media_live_event_ingest_heartbeat_event_data_py3 import MediaLiveEventIngestHeartbeatEventData
from .media_live_event_track_discontinuity_detected_event_data_py3 import MediaLiveEventTrackDiscontinuityDetectedEventData
from .maps_geofence_entered_event_data_py3 import MapsGeofenceEnteredEventData
from .maps_geofence_exited_event_data_py3 import MapsGeofenceExitedEventData
from .maps_geofence_result_event_data_py3 import MapsGeofenceResultEventData
from .maps_geofence_geometry_py3 import MapsGeofenceGeometry
from .maps_geofence_event_properties_py3 import MapsGeofenceEventProperties
except (SyntaxError, ImportError):
from .storage_blob_created_event_data import StorageBlobCreatedEventData
from .storage_blob_deleted_event_data import StorageBlobDeletedEventData
Expand Down Expand Up @@ -149,6 +154,11 @@
from .media_live_event_incoming_data_chunk_dropped_event_data import MediaLiveEventIncomingDataChunkDroppedEventData
from .media_live_event_ingest_heartbeat_event_data import MediaLiveEventIngestHeartbeatEventData
from .media_live_event_track_discontinuity_detected_event_data import MediaLiveEventTrackDiscontinuityDetectedEventData
from .maps_geofence_entered_event_data import MapsGeofenceEnteredEventData
from .maps_geofence_exited_event_data import MapsGeofenceExitedEventData
from .maps_geofence_result_event_data import MapsGeofenceResultEventData
from .maps_geofence_geometry import MapsGeofenceGeometry
from .maps_geofence_event_properties import MapsGeofenceEventProperties
from .event_grid_client_enums import (
MediaJobState,
MediaJobErrorCode,
Expand Down Expand Up @@ -226,6 +236,11 @@
'MediaLiveEventIncomingDataChunkDroppedEventData',
'MediaLiveEventIngestHeartbeatEventData',
'MediaLiveEventTrackDiscontinuityDetectedEventData',
'MapsGeofenceEnteredEventData',
'MapsGeofenceExitedEventData',
'MapsGeofenceResultEventData',
'MapsGeofenceGeometry',
'MapsGeofenceEventProperties',
'MediaJobState',
'MediaJobErrorCode',
'MediaJobErrorCategory',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .maps_geofence_event_properties import MapsGeofenceEventProperties


class MapsGeofenceEnteredEventData(MapsGeofenceEventProperties):
"""Schema of the Data property of an EventGridEvent for a
Microsoft.Maps.GeofenceEntered event.

:param expired_geofence_geometry_id: Lists of the geometry ID of the
geofence which is expired relative to the user time in the request.
:type expired_geofence_geometry_id: list[str]
:param geometries: Lists the fence geometries that either fully contain
the coordinate position or have an overlap with the searchBuffer around
the fence.
:type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry]
:param invalid_period_geofence_geometry_id: Lists of the geometry ID of
the geofence which is in invalid period relative to the user time in the
request.
:type invalid_period_geofence_geometry_id: list[str]
:param is_event_published: True if at least one event is published to the
Azure Maps event subscriber, false if no event is published to the Azure
Maps event subscriber.
:type is_event_published: bool
"""

_attribute_map = {
'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'},
'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'},
'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'},
'is_event_published': {'key': 'isEventPublished', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(MapsGeofenceEnteredEventData, self).__init__(**kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .maps_geofence_event_properties_py3 import MapsGeofenceEventProperties


class MapsGeofenceEnteredEventData(MapsGeofenceEventProperties):
"""Schema of the Data property of an EventGridEvent for a
Microsoft.Maps.GeofenceEntered event.

:param expired_geofence_geometry_id: Lists of the geometry ID of the
geofence which is expired relative to the user time in the request.
:type expired_geofence_geometry_id: list[str]
:param geometries: Lists the fence geometries that either fully contain
the coordinate position or have an overlap with the searchBuffer around
the fence.
:type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry]
:param invalid_period_geofence_geometry_id: Lists of the geometry ID of
the geofence which is in invalid period relative to the user time in the
request.
:type invalid_period_geofence_geometry_id: list[str]
:param is_event_published: True if at least one event is published to the
Azure Maps event subscriber, false if no event is published to the Azure
Maps event subscriber.
:type is_event_published: bool
"""

_attribute_map = {
'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'},
'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'},
'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'},
'is_event_published': {'key': 'isEventPublished', 'type': 'bool'},
}

def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None:
super(MapsGeofenceEnteredEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class MapsGeofenceEventProperties(Model):
"""Schema of the Data property of an EventGridEvent for a Geofence event
(GeofenceEntered, GeofenceExited, GeofenceResult).

:param expired_geofence_geometry_id: Lists of the geometry ID of the
geofence which is expired relative to the user time in the request.
:type expired_geofence_geometry_id: list[str]
:param geometries: Lists the fence geometries that either fully contain
the coordinate position or have an overlap with the searchBuffer around
the fence.
:type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry]
:param invalid_period_geofence_geometry_id: Lists of the geometry ID of
the geofence which is in invalid period relative to the user time in the
request.
:type invalid_period_geofence_geometry_id: list[str]
:param is_event_published: True if at least one event is published to the
Azure Maps event subscriber, false if no event is published to the Azure
Maps event subscriber.
:type is_event_published: bool
"""

_attribute_map = {
'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'},
'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'},
'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'},
'is_event_published': {'key': 'isEventPublished', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(MapsGeofenceEventProperties, self).__init__(**kwargs)
self.expired_geofence_geometry_id = kwargs.get('expired_geofence_geometry_id', None)
self.geometries = kwargs.get('geometries', None)
self.invalid_period_geofence_geometry_id = kwargs.get('invalid_period_geofence_geometry_id', None)
self.is_event_published = kwargs.get('is_event_published', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class MapsGeofenceEventProperties(Model):
"""Schema of the Data property of an EventGridEvent for a Geofence event
(GeofenceEntered, GeofenceExited, GeofenceResult).

:param expired_geofence_geometry_id: Lists of the geometry ID of the
geofence which is expired relative to the user time in the request.
:type expired_geofence_geometry_id: list[str]
:param geometries: Lists the fence geometries that either fully contain
the coordinate position or have an overlap with the searchBuffer around
the fence.
:type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry]
:param invalid_period_geofence_geometry_id: Lists of the geometry ID of
the geofence which is in invalid period relative to the user time in the
request.
:type invalid_period_geofence_geometry_id: list[str]
:param is_event_published: True if at least one event is published to the
Azure Maps event subscriber, false if no event is published to the Azure
Maps event subscriber.
:type is_event_published: bool
"""

_attribute_map = {
'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'},
'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'},
'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'},
'is_event_published': {'key': 'isEventPublished', 'type': 'bool'},
}

def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None:
super(MapsGeofenceEventProperties, self).__init__(**kwargs)
self.expired_geofence_geometry_id = expired_geofence_geometry_id
self.geometries = geometries
self.invalid_period_geofence_geometry_id = invalid_period_geofence_geometry_id
self.is_event_published = is_event_published
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .maps_geofence_event_properties import MapsGeofenceEventProperties


class MapsGeofenceExitedEventData(MapsGeofenceEventProperties):
"""Schema of the Data property of an EventGridEvent for a
Microsoft.Maps.GeofenceExited event.

:param expired_geofence_geometry_id: Lists of the geometry ID of the
geofence which is expired relative to the user time in the request.
:type expired_geofence_geometry_id: list[str]
:param geometries: Lists the fence geometries that either fully contain
the coordinate position or have an overlap with the searchBuffer around
the fence.
:type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry]
:param invalid_period_geofence_geometry_id: Lists of the geometry ID of
the geofence which is in invalid period relative to the user time in the
request.
:type invalid_period_geofence_geometry_id: list[str]
:param is_event_published: True if at least one event is published to the
Azure Maps event subscriber, false if no event is published to the Azure
Maps event subscriber.
:type is_event_published: bool
"""

_attribute_map = {
'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'},
'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'},
'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'},
'is_event_published': {'key': 'isEventPublished', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(MapsGeofenceExitedEventData, self).__init__(**kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .maps_geofence_event_properties_py3 import MapsGeofenceEventProperties


class MapsGeofenceExitedEventData(MapsGeofenceEventProperties):
"""Schema of the Data property of an EventGridEvent for a
Microsoft.Maps.GeofenceExited event.

:param expired_geofence_geometry_id: Lists of the geometry ID of the
geofence which is expired relative to the user time in the request.
:type expired_geofence_geometry_id: list[str]
:param geometries: Lists the fence geometries that either fully contain
the coordinate position or have an overlap with the searchBuffer around
the fence.
:type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry]
:param invalid_period_geofence_geometry_id: Lists of the geometry ID of
the geofence which is in invalid period relative to the user time in the
request.
:type invalid_period_geofence_geometry_id: list[str]
:param is_event_published: True if at least one event is published to the
Azure Maps event subscriber, false if no event is published to the Azure
Maps event subscriber.
:type is_event_published: bool
"""

_attribute_map = {
'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'},
'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'},
'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'},
'is_event_published': {'key': 'isEventPublished', 'type': 'bool'},
}

def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None:
super(MapsGeofenceExitedEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs)
58 changes: 58 additions & 0 deletions azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class MapsGeofenceGeometry(Model):
"""The geofence geometry.

:param device_id: ID of the device.
:type device_id: str
:param distance: Distance from the coordinate to the closest border of the
geofence. Positive means the coordinate is outside of the geofence. If the
coordinate is outside of the geofence, but more than the value of
searchBuffer away from the closest geofence border, then the value is 999.
Negative means the coordinate is inside of the geofence. If the coordinate
is inside the polygon, but more than the value of searchBuffer away from
the closest geofencing border,then the value is -999. A value of 999 means
that there is great confidence the coordinate is well outside the
geofence. A value of -999 means that there is great confidence the
coordinate is well within the geofence.
:type distance: float
:param geometry_id: The unique ID for the geofence geometry.
:type geometry_id: str
:param nearest_lat: Latitude of the nearest point of the geometry.
:type nearest_lat: float
:param nearest_lon: Longitude of the nearest point of the geometry.
:type nearest_lon: float
:param ud_id: The unique id returned from user upload service when
uploading a geofence. Will not be included in geofencing post API.
:type ud_id: str
"""

_attribute_map = {
'device_id': {'key': 'deviceId', 'type': 'str'},
'distance': {'key': 'distance', 'type': 'float'},
'geometry_id': {'key': 'geometryId', 'type': 'str'},
'nearest_lat': {'key': 'nearestLat', 'type': 'float'},
'nearest_lon': {'key': 'nearestLon', 'type': 'float'},
'ud_id': {'key': 'udId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(MapsGeofenceGeometry, self).__init__(**kwargs)
self.device_id = kwargs.get('device_id', None)
self.distance = kwargs.get('distance', None)
self.geometry_id = kwargs.get('geometry_id', None)
self.nearest_lat = kwargs.get('nearest_lat', None)
self.nearest_lon = kwargs.get('nearest_lon', None)
self.ud_id = kwargs.get('ud_id', None)
Loading