Skip to content
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
111 changes: 111 additions & 0 deletions packages/@azure/eventgrid/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
129 changes: 129 additions & 0 deletions packages/@azure/eventgrid/lib/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down