From f869d21f4db13df0c5950de3967fedd4c356f103 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 1 Feb 2019 20:39:20 +0000 Subject: [PATCH] Generated from d9d758deedea5c67d4b7d065126b5a1061b17934 [Maps] Updated Event Grid publisher data schema --- packages/@azure/eventgrid/lib/models/index.ts | 111 +++++++++++++++ .../@azure/eventgrid/lib/models/mappers.ts | 129 ++++++++++++++++++ 2 files changed, 240 insertions(+) diff --git a/packages/@azure/eventgrid/lib/models/index.ts b/packages/@azure/eventgrid/lib/models/index.ts index 0b7a2787a1fc..a11edbe9062c 100644 --- a/packages/@azure/eventgrid/lib/models/index.ts +++ b/packages/@azure/eventgrid/lib/models/index.ts @@ -2206,6 +2206,117 @@ export interface MediaLiveEventTrackDiscontinuityDetectedEventData { readonly discontinuityGap?: string; } +/** + * @interface + * An interface representing MapsGeofenceEventProperties. + * Schema of the Data property of an EventGridEvent for a Geofence event + * (GeofenceEntered, GeofenceExited, GeofenceResult). + * + */ +export interface MapsGeofenceEventProperties { + /** + * @member {string[]} [expiredGeofenceGeometryId] Lists of the geometry ID of + * the geofence which is expired relative to the user time in the request. + */ + expiredGeofenceGeometryId?: string[]; + /** + * @member {MapsGeofenceGeometry[]} [geometries] Lists the fence geometries + * that either fully contain the coordinate position or have an overlap with + * the searchBuffer around the fence. + */ + geometries?: MapsGeofenceGeometry[]; + /** + * @member {string[]} [invalidPeriodGeofenceGeometryId] Lists of the geometry + * ID of the geofence which is in invalid period relative to the user time in + * the request. + */ + invalidPeriodGeofenceGeometryId?: string[]; + /** + * @member {boolean} [isEventPublished] 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. + */ + isEventPublished?: boolean; +} + +/** + * @interface + * An interface representing MapsGeofenceEnteredEventData. + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceEntered event. + * + * @extends MapsGeofenceEventProperties + */ +export interface MapsGeofenceEnteredEventData extends MapsGeofenceEventProperties { +} + +/** + * @interface + * An interface representing MapsGeofenceExitedEventData. + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceExited event. + * + * @extends MapsGeofenceEventProperties + */ +export interface MapsGeofenceExitedEventData extends MapsGeofenceEventProperties { +} + +/** + * @interface + * An interface representing MapsGeofenceResultEventData. + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceResult event. + * + * @extends MapsGeofenceEventProperties + */ +export interface MapsGeofenceResultEventData extends MapsGeofenceEventProperties { +} + +/** + * @interface + * An interface representing MapsGeofenceGeometry. + * The geofence geometry. + * + */ +export interface MapsGeofenceGeometry { + /** + * @member {string} [deviceId] ID of the device. + */ + deviceId?: string; + /** + * @member {number} [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. + */ + distance?: number; + /** + * @member {string} [geometryId] The unique ID for the geofence geometry. + */ + geometryId?: string; + /** + * @member {number} [nearestLat] Latitude of the nearest point of the + * geometry. + */ + nearestLat?: number; + /** + * @member {number} [nearestLon] Longitude of the nearest point of the + * geometry. + */ + nearestLon?: number; + /** + * @member {string} [udId] The unique id returned from user upload service + * when uploading a geofence. Will not be included in geofencing post API. + */ + udId?: string; +} + /** * Defines values for MediaJobState. diff --git a/packages/@azure/eventgrid/lib/models/mappers.ts b/packages/@azure/eventgrid/lib/models/mappers.ts index 9d6ffb41fd7e..7e093609519c 100644 --- a/packages/@azure/eventgrid/lib/models/mappers.ts +++ b/packages/@azure/eventgrid/lib/models/mappers.ts @@ -2689,6 +2689,135 @@ export const MediaLiveEventTrackDiscontinuityDetectedEventData: msRest.Composite } }; +export const MapsGeofenceEventProperties: msRest.CompositeMapper = { + serializedName: "MapsGeofenceEventProperties", + type: { + name: "Composite", + className: "MapsGeofenceEventProperties", + modelProperties: { + expiredGeofenceGeometryId: { + serializedName: "expiredGeofenceGeometryId", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + geometries: { + serializedName: "geometries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MapsGeofenceGeometry" + } + } + } + }, + invalidPeriodGeofenceGeometryId: { + serializedName: "invalidPeriodGeofenceGeometryId", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + isEventPublished: { + serializedName: "isEventPublished", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MapsGeofenceEnteredEventData: msRest.CompositeMapper = { + serializedName: "MapsGeofenceEnteredEventData", + type: { + name: "Composite", + className: "MapsGeofenceEnteredEventData", + modelProperties: { + ...MapsGeofenceEventProperties.type.modelProperties + } + } +}; + +export const MapsGeofenceExitedEventData: msRest.CompositeMapper = { + serializedName: "MapsGeofenceExitedEventData", + type: { + name: "Composite", + className: "MapsGeofenceExitedEventData", + modelProperties: { + ...MapsGeofenceEventProperties.type.modelProperties + } + } +}; + +export const MapsGeofenceResultEventData: msRest.CompositeMapper = { + serializedName: "MapsGeofenceResultEventData", + type: { + name: "Composite", + className: "MapsGeofenceResultEventData", + modelProperties: { + ...MapsGeofenceEventProperties.type.modelProperties + } + } +}; + +export const MapsGeofenceGeometry: msRest.CompositeMapper = { + serializedName: "MapsGeofenceGeometry", + type: { + name: "Composite", + className: "MapsGeofenceGeometry", + modelProperties: { + deviceId: { + serializedName: "deviceId", + type: { + name: "String" + } + }, + distance: { + serializedName: "distance", + type: { + name: "Number" + } + }, + geometryId: { + serializedName: "geometryId", + type: { + name: "String" + } + }, + nearestLat: { + serializedName: "nearestLat", + type: { + name: "Number" + } + }, + nearestLon: { + serializedName: "nearestLon", + type: { + name: "Number" + } + }, + udId: { + serializedName: "udId", + type: { + name: "String" + } + } + } + } +}; + export const discriminators = { 'MediaJobOutput' : MediaJobOutput, 'MediaJobOutput.#Microsoft.Media.JobOutputAsset' : MediaJobOutputAsset