Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Generated from d9d758deedea5c67d4b7d065126b5a1061b17934 (#4629)
Browse files Browse the repository at this point in the history
[Maps] Updated Event Grid publisher data schema
  • Loading branch information
AutorestCI authored Feb 11, 2019
1 parent 4c4cc9a commit a195901
Show file tree
Hide file tree
Showing 7 changed files with 604 additions and 0 deletions.
92 changes: 92 additions & 0 deletions lib/services/eventgrid/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

5 changes: 5 additions & 0 deletions lib/services/eventgrid/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
99 changes: 99 additions & 0 deletions lib/services/eventgrid/lib/models/mapsGeofenceEnteredEventData.js
Original file line number Diff line number Diff line change
@@ -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;
106 changes: 106 additions & 0 deletions lib/services/eventgrid/lib/models/mapsGeofenceEventProperties.js
Original file line number Diff line number Diff line change
@@ -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;
Loading

0 comments on commit a195901

Please sign in to comment.