diff --git a/lib/services/eventgrid/lib/models/index.d.ts b/lib/services/eventgrid/lib/models/index.d.ts index 5bcb226a5c..89330e0e5e 100644 --- a/lib/services/eventgrid/lib/models/index.d.ts +++ b/lib/services/eventgrid/lib/models/index.d.ts @@ -1632,3 +1632,95 @@ export interface MediaLiveEventTrackDiscontinuityDetectedEventData { readonly discontinuityGap?: string; } +/** + * @class + * Initializes a new instance of the MapsGeofenceEventProperties class. + * @constructor + * Schema of the Data property of an EventGridEvent for a Geofence event + * (GeofenceEntered, GeofenceExited, GeofenceResult). + * + * @member {array} [expiredGeofenceGeometryId] Lists of the geometry ID of the + * geofence which is expired relative to the user time in the request. + * @member {array} [geometries] Lists the fence geometries that either fully + * contain the coordinate position or have an overlap with the searchBuffer + * around the fence. + * @member {array} [invalidPeriodGeofenceGeometryId] Lists of the geometry ID + * of the geofence which is in invalid period relative to the user time in the + * request. + * @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. + */ +export interface MapsGeofenceEventProperties { + expiredGeofenceGeometryId?: string[]; + geometries?: MapsGeofenceGeometry[]; + invalidPeriodGeofenceGeometryId?: string[]; + isEventPublished?: boolean; +} + +/** + * @class + * Initializes a new instance of the MapsGeofenceEnteredEventData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceEntered event. + * + */ +export interface MapsGeofenceEnteredEventData extends MapsGeofenceEventProperties { +} + +/** + * @class + * Initializes a new instance of the MapsGeofenceExitedEventData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceExited event. + * + */ +export interface MapsGeofenceExitedEventData extends MapsGeofenceEventProperties { +} + +/** + * @class + * Initializes a new instance of the MapsGeofenceResultEventData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceResult event. + * + */ +export interface MapsGeofenceResultEventData extends MapsGeofenceEventProperties { +} + +/** + * @class + * Initializes a new instance of the MapsGeofenceGeometry class. + * @constructor + * The geofence geometry. + * + * @member {string} [deviceId] ID of the device. + * @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. + * @member {string} [geometryId] The unique ID for the geofence geometry. + * @member {number} [nearestLat] Latitude of the nearest point of the geometry. + * @member {number} [nearestLon] Longitude of the nearest point of the + * geometry. + * @member {string} [udId] The unique id returned from user upload service when + * uploading a geofence. Will not be included in geofencing post API. + */ +export interface MapsGeofenceGeometry { + deviceId?: string; + distance?: number; + geometryId?: string; + nearestLat?: number; + nearestLon?: number; + udId?: string; +} + diff --git a/lib/services/eventgrid/lib/models/index.js b/lib/services/eventgrid/lib/models/index.js index 946440f902..055c0365e1 100644 --- a/lib/services/eventgrid/lib/models/index.js +++ b/lib/services/eventgrid/lib/models/index.js @@ -87,6 +87,11 @@ exports.MediaLiveEventIncomingVideoStreamsOutOfSyncEventData = require('./mediaL exports.MediaLiveEventIncomingDataChunkDroppedEventData = require('./mediaLiveEventIncomingDataChunkDroppedEventData'); exports.MediaLiveEventIngestHeartbeatEventData = require('./mediaLiveEventIngestHeartbeatEventData'); exports.MediaLiveEventTrackDiscontinuityDetectedEventData = require('./mediaLiveEventTrackDiscontinuityDetectedEventData'); +exports.MapsGeofenceEventProperties = require('./mapsGeofenceEventProperties'); +exports.MapsGeofenceEnteredEventData = require('./mapsGeofenceEnteredEventData'); +exports.MapsGeofenceExitedEventData = require('./mapsGeofenceExitedEventData'); +exports.MapsGeofenceResultEventData = require('./mapsGeofenceResultEventData'); +exports.MapsGeofenceGeometry = require('./mapsGeofenceGeometry'); exports.discriminators = { 'MediaJobOutput' : exports.MediaJobOutput, 'MediaJobOutput.#Microsoft.Media.JobOutputAsset' : exports.MediaJobOutputAsset diff --git a/lib/services/eventgrid/lib/models/mapsGeofenceEnteredEventData.js b/lib/services/eventgrid/lib/models/mapsGeofenceEnteredEventData.js new file mode 100644 index 0000000000..8830567e85 --- /dev/null +++ b/lib/services/eventgrid/lib/models/mapsGeofenceEnteredEventData.js @@ -0,0 +1,99 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceEntered event. + * + * @extends models['MapsGeofenceEventProperties'] + */ +class MapsGeofenceEnteredEventData extends models['MapsGeofenceEventProperties'] { + /** + * Create a MapsGeofenceEnteredEventData. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of MapsGeofenceEnteredEventData + * + * @returns {object} metadata of MapsGeofenceEnteredEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'MapsGeofenceEnteredEventData', + type: { + name: 'Composite', + className: 'MapsGeofenceEnteredEventData', + modelProperties: { + expiredGeofenceGeometryId: { + required: false, + serializedName: 'expiredGeofenceGeometryId', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + geometries: { + required: false, + serializedName: 'geometries', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MapsGeofenceGeometryElementType', + type: { + name: 'Composite', + className: 'MapsGeofenceGeometry' + } + } + } + }, + invalidPeriodGeofenceGeometryId: { + required: false, + serializedName: 'invalidPeriodGeofenceGeometryId', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + isEventPublished: { + required: false, + serializedName: 'isEventPublished', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = MapsGeofenceEnteredEventData; diff --git a/lib/services/eventgrid/lib/models/mapsGeofenceEventProperties.js b/lib/services/eventgrid/lib/models/mapsGeofenceEventProperties.js new file mode 100644 index 0000000000..247b839505 --- /dev/null +++ b/lib/services/eventgrid/lib/models/mapsGeofenceEventProperties.js @@ -0,0 +1,106 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Schema of the Data property of an EventGridEvent for a Geofence event + * (GeofenceEntered, GeofenceExited, GeofenceResult). + * + */ +class MapsGeofenceEventProperties { + /** + * Create a MapsGeofenceEventProperties. + * @member {array} [expiredGeofenceGeometryId] Lists of the geometry ID of + * the geofence which is expired relative to the user time in the request. + * @member {array} [geometries] Lists the fence geometries that either fully + * contain the coordinate position or have an overlap with the searchBuffer + * around the fence. + * @member {array} [invalidPeriodGeofenceGeometryId] Lists of the geometry ID + * of the geofence which is in invalid period relative to the user time in + * the request. + * @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. + */ + constructor() { + } + + /** + * Defines the metadata of MapsGeofenceEventProperties + * + * @returns {object} metadata of MapsGeofenceEventProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'MapsGeofenceEventProperties', + type: { + name: 'Composite', + className: 'MapsGeofenceEventProperties', + modelProperties: { + expiredGeofenceGeometryId: { + required: false, + serializedName: 'expiredGeofenceGeometryId', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + geometries: { + required: false, + serializedName: 'geometries', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MapsGeofenceGeometryElementType', + type: { + name: 'Composite', + className: 'MapsGeofenceGeometry' + } + } + } + }, + invalidPeriodGeofenceGeometryId: { + required: false, + serializedName: 'invalidPeriodGeofenceGeometryId', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + isEventPublished: { + required: false, + serializedName: 'isEventPublished', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = MapsGeofenceEventProperties; diff --git a/lib/services/eventgrid/lib/models/mapsGeofenceExitedEventData.js b/lib/services/eventgrid/lib/models/mapsGeofenceExitedEventData.js new file mode 100644 index 0000000000..5c7ce7ba07 --- /dev/null +++ b/lib/services/eventgrid/lib/models/mapsGeofenceExitedEventData.js @@ -0,0 +1,99 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceExited event. + * + * @extends models['MapsGeofenceEventProperties'] + */ +class MapsGeofenceExitedEventData extends models['MapsGeofenceEventProperties'] { + /** + * Create a MapsGeofenceExitedEventData. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of MapsGeofenceExitedEventData + * + * @returns {object} metadata of MapsGeofenceExitedEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'MapsGeofenceExitedEventData', + type: { + name: 'Composite', + className: 'MapsGeofenceExitedEventData', + modelProperties: { + expiredGeofenceGeometryId: { + required: false, + serializedName: 'expiredGeofenceGeometryId', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + geometries: { + required: false, + serializedName: 'geometries', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MapsGeofenceGeometryElementType', + type: { + name: 'Composite', + className: 'MapsGeofenceGeometry' + } + } + } + }, + invalidPeriodGeofenceGeometryId: { + required: false, + serializedName: 'invalidPeriodGeofenceGeometryId', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + isEventPublished: { + required: false, + serializedName: 'isEventPublished', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = MapsGeofenceExitedEventData; diff --git a/lib/services/eventgrid/lib/models/mapsGeofenceGeometry.js b/lib/services/eventgrid/lib/models/mapsGeofenceGeometry.js new file mode 100644 index 0000000000..cf2cc880f1 --- /dev/null +++ b/lib/services/eventgrid/lib/models/mapsGeofenceGeometry.js @@ -0,0 +1,104 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The geofence geometry. + * + */ +class MapsGeofenceGeometry { + /** + * Create a MapsGeofenceGeometry. + * @member {string} [deviceId] ID of the device. + * @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. + * @member {string} [geometryId] The unique ID for the geofence geometry. + * @member {number} [nearestLat] Latitude of the nearest point of the + * geometry. + * @member {number} [nearestLon] Longitude of the nearest point of the + * geometry. + * @member {string} [udId] The unique id returned from user upload service + * when uploading a geofence. Will not be included in geofencing post API. + */ + constructor() { + } + + /** + * Defines the metadata of MapsGeofenceGeometry + * + * @returns {object} metadata of MapsGeofenceGeometry + * + */ + mapper() { + return { + required: false, + serializedName: 'MapsGeofenceGeometry', + type: { + name: 'Composite', + className: 'MapsGeofenceGeometry', + modelProperties: { + deviceId: { + required: false, + serializedName: 'deviceId', + type: { + name: 'String' + } + }, + distance: { + required: false, + serializedName: 'distance', + type: { + name: 'Number' + } + }, + geometryId: { + required: false, + serializedName: 'geometryId', + type: { + name: 'String' + } + }, + nearestLat: { + required: false, + serializedName: 'nearestLat', + type: { + name: 'Number' + } + }, + nearestLon: { + required: false, + serializedName: 'nearestLon', + type: { + name: 'Number' + } + }, + udId: { + required: false, + serializedName: 'udId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = MapsGeofenceGeometry; diff --git a/lib/services/eventgrid/lib/models/mapsGeofenceResultEventData.js b/lib/services/eventgrid/lib/models/mapsGeofenceResultEventData.js new file mode 100644 index 0000000000..6c0bd1bbdd --- /dev/null +++ b/lib/services/eventgrid/lib/models/mapsGeofenceResultEventData.js @@ -0,0 +1,99 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceResult event. + * + * @extends models['MapsGeofenceEventProperties'] + */ +class MapsGeofenceResultEventData extends models['MapsGeofenceEventProperties'] { + /** + * Create a MapsGeofenceResultEventData. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of MapsGeofenceResultEventData + * + * @returns {object} metadata of MapsGeofenceResultEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'MapsGeofenceResultEventData', + type: { + name: 'Composite', + className: 'MapsGeofenceResultEventData', + modelProperties: { + expiredGeofenceGeometryId: { + required: false, + serializedName: 'expiredGeofenceGeometryId', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + geometries: { + required: false, + serializedName: 'geometries', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MapsGeofenceGeometryElementType', + type: { + name: 'Composite', + className: 'MapsGeofenceGeometry' + } + } + } + }, + invalidPeriodGeofenceGeometryId: { + required: false, + serializedName: 'invalidPeriodGeofenceGeometryId', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + isEventPublished: { + required: false, + serializedName: 'isEventPublished', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = MapsGeofenceResultEventData;