-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR eventgrid/data-plane] [Event-Grid Maps] Add Maps publisher sc…
…hema to EventGrid data-plane (#4293) * Generated from d9d758deedea5c67d4b7d065126b5a1061b17934 [Maps] Updated Event Grid publisher data schema * Generated from d9d758deedea5c67d4b7d065126b5a1061b17934 [Maps] Updated Event Grid publisher data schema
- Loading branch information
1 parent
bca552c
commit 460244a
Showing
11 changed files
with
491 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
44 changes: 44 additions & 0 deletions
44
azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
48 changes: 48 additions & 0 deletions
48
azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
48 changes: 48 additions & 0 deletions
48
azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
44 changes: 44 additions & 0 deletions
44
azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
44 changes: 44 additions & 0 deletions
44
azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
58
azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.