| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 3 | | // license information. |
| | 4 | |
|
| | 5 | | using Microsoft.Azure.EventGrid.Models; |
| | 6 | | using System; |
| | 7 | | using System.Collections.Generic; |
| | 8 | |
|
| | 9 | | namespace Microsoft.Azure.EventGrid |
| | 10 | | { |
| | 11 | | internal static class SystemEventTypeMappings |
| | 12 | | { |
| 1 | 13 | | public static readonly IReadOnlyDictionary<String, Type> SystemEventMappings = new Dictionary<string, Type>(Stri |
| 1 | 14 | | { |
| 1 | 15 | | // KEEP THIS SORTED BY THE NAME OF THE PUBLISHING SERVICE |
| 1 | 16 | | // Add handling for additional event types here. |
| 1 | 17 | | // NOTE: If any of the event data fields is polymorphic, remember to add an entry for the discriminator/Base |
| 1 | 18 | | // in EventGridSubscriber.GetJsonSerializerWithPolymorphicSupport() |
| 1 | 19 | | // Example: jsonSerializer.Converters.Add(new PolymorphicDeserializeJsonConverter<JobOutput>("@odata.type")) |
| 1 | 20 | |
|
| 1 | 21 | | // AppConfiguration events |
| 1 | 22 | | { EventTypes.AppConfigurationKeyValueDeletedEvent, typeof(AppConfigurationKeyValueDeletedEventData) }, |
| 1 | 23 | | { EventTypes.AppConfigurationKeyValueModifiedEvent, typeof(AppConfigurationKeyValueModifiedEventData) }, |
| 1 | 24 | |
|
| 1 | 25 | | // ContainerRegistry events |
| 1 | 26 | | { EventTypes.ContainerRegistryImagePushedEvent, typeof(ContainerRegistryImagePushedEventData) }, |
| 1 | 27 | | { EventTypes.ContainerRegistryImageDeletedEvent, typeof(ContainerRegistryImageDeletedEventData) }, |
| 1 | 28 | | { EventTypes.ContainerRegistryChartDeletedEvent, typeof(ContainerRegistryChartDeletedEventData) }, |
| 1 | 29 | | { EventTypes.ContainerRegistryChartPushedEvent, typeof(ContainerRegistryChartPushedEventData) }, |
| 1 | 30 | |
|
| 1 | 31 | | // IoTHub Device events |
| 1 | 32 | | { EventTypes.IoTHubDeviceCreatedEvent, typeof(IotHubDeviceCreatedEventData) }, |
| 1 | 33 | | { EventTypes.IoTHubDeviceDeletedEvent, typeof(IotHubDeviceDeletedEventData) }, |
| 1 | 34 | | { EventTypes.IoTHubDeviceConnectedEvent, typeof(IotHubDeviceConnectedEventData) }, |
| 1 | 35 | | { EventTypes.IoTHubDeviceDisconnectedEvent, typeof(IotHubDeviceDisconnectedEventData) }, |
| 1 | 36 | | { EventTypes.IotHubDeviceTelemetryEvent, typeof(IotHubDeviceTelemetryEventData) }, |
| 1 | 37 | |
|
| 1 | 38 | | // EventGrid events |
| 1 | 39 | | { EventTypes.EventGridSubscriptionValidationEvent, typeof(SubscriptionValidationEventData) }, |
| 1 | 40 | | { EventTypes.EventGridSubscriptionDeletedEvent, typeof(SubscriptionDeletedEventData) }, |
| 1 | 41 | |
|
| 1 | 42 | | // Event Hub events |
| 1 | 43 | | { EventTypes.EventHubCaptureFileCreatedEvent, typeof(EventHubCaptureFileCreatedEventData) }, |
| 1 | 44 | |
|
| 1 | 45 | | // MachineLearningServices events |
| 1 | 46 | | { EventTypes.MachineLearningServicesDatasetDriftDetectedEvent, typeof(MachineLearningServicesDatasetDriftDet |
| 1 | 47 | | { EventTypes.MachineLearningServicesModelDeployedEvent, typeof(MachineLearningServicesModelDeployedEventData |
| 1 | 48 | | { EventTypes.MachineLearningServicesModelRegisteredEvent, typeof(MachineLearningServicesModelRegisteredEvent |
| 1 | 49 | | { EventTypes.MachineLearningServicesRunCompletedEvent, typeof(MachineLearningServicesRunCompletedEventData) |
| 1 | 50 | | { EventTypes.MachineLearningServicesRunStatusChangedEvent, typeof(MachineLearningServicesRunStatusChangedEve |
| 1 | 51 | |
|
| 1 | 52 | | // Maps events |
| 1 | 53 | | { EventTypes.MapsGeofenceEnteredEvent, typeof(MapsGeofenceEnteredEventData) }, |
| 1 | 54 | | { EventTypes.MapsGeofenceExitedEvent, typeof(MapsGeofenceExitedEventData) }, |
| 1 | 55 | | { EventTypes.MapsGeofenceResultEvent, typeof(MapsGeofenceResultEventData) }, |
| 1 | 56 | |
|
| 1 | 57 | | // Media Services events |
| 1 | 58 | | { EventTypes.MediaJobStateChangeEvent, typeof(MediaJobStateChangeEventData) }, |
| 1 | 59 | | { EventTypes.MediaJobOutputStateChangeEvent, typeof(MediaJobOutputStateChangeEventData) }, |
| 1 | 60 | | { EventTypes.MediaJobScheduledEvent, typeof(MediaJobScheduledEventData) }, |
| 1 | 61 | | { EventTypes.MediaJobProcessingEvent, typeof(MediaJobProcessingEventData) }, |
| 1 | 62 | | { EventTypes.MediaJobCancelingEvent, typeof(MediaJobCancelingEventData) }, |
| 1 | 63 | | { EventTypes.MediaJobFinishedEvent, typeof(MediaJobFinishedEventData) }, |
| 1 | 64 | | { EventTypes.MediaJobCanceledEvent, typeof(MediaJobCanceledEventData) }, |
| 1 | 65 | | { EventTypes.MediaJobErroredEvent, typeof(MediaJobErroredEventData) }, |
| 1 | 66 | | { EventTypes.MediaJobOutputCanceledEvent, typeof(MediaJobOutputCanceledEventData) }, |
| 1 | 67 | | { EventTypes.MediaJobOutputCancelingEvent, typeof(MediaJobOutputCancelingEventData) }, |
| 1 | 68 | | { EventTypes.MediaJobOutputErroredEvent, typeof(MediaJobOutputErroredEventData) }, |
| 1 | 69 | | { EventTypes.MediaJobOutputFinishedEvent, typeof(MediaJobOutputFinishedEventData) }, |
| 1 | 70 | | { EventTypes.MediaJobOutputProcessingEvent, typeof(MediaJobOutputProcessingEventData) }, |
| 1 | 71 | | { EventTypes.MediaJobOutputScheduledEvent, typeof(MediaJobOutputScheduledEventData) }, |
| 1 | 72 | | { EventTypes.MediaJobOutputProgressEvent, typeof(MediaJobOutputProgressEventData) }, |
| 1 | 73 | | { EventTypes.MediaLiveEventEncoderConnectedEvent, typeof(MediaLiveEventEncoderConnectedEventData) }, |
| 1 | 74 | | { EventTypes.MediaLiveEventConnectionRejectedEvent, typeof(MediaLiveEventConnectionRejectedEventData) }, |
| 1 | 75 | | { EventTypes.MediaLiveEventEncoderDisconnectedEvent, typeof(MediaLiveEventEncoderDisconnectedEventData) }, |
| 1 | 76 | | { EventTypes.MediaLiveEventIncomingStreamReceivedEvent, typeof(MediaLiveEventIncomingStreamReceivedEventData |
| 1 | 77 | | { EventTypes.MediaLiveEventIncomingStreamsOutOfSyncEvent, typeof(MediaLiveEventIncomingStreamsOutOfSyncEvent |
| 1 | 78 | | { EventTypes.MediaLiveEventIncomingVideoStreamsOutOfSyncEvent, typeof(MediaLiveEventIncomingVideoStreamsOutO |
| 1 | 79 | | { EventTypes.MediaLiveEventIncomingChunkDroppedEvent, typeof(MediaLiveEventIncomingDataChunkDroppedEventData |
| 1 | 80 | | { EventTypes.MediaLiveEventIngestHeartbeatEvent, typeof(MediaLiveEventIngestHeartbeatEventData) }, |
| 1 | 81 | | { EventTypes.MediaLiveEventTrackDiscontinuityDetectedEvent, typeof(MediaLiveEventTrackDiscontinuityDetectedE |
| 1 | 82 | |
|
| 1 | 83 | | // Resource Manager (Azure Subscription/Resource Group) events |
| 1 | 84 | | { EventTypes.ResourceWriteSuccessEvent, typeof(ResourceWriteSuccessData) }, |
| 1 | 85 | | { EventTypes.ResourceWriteFailureEvent, typeof(ResourceWriteFailureData) }, |
| 1 | 86 | | { EventTypes.ResourceWriteCancelEvent, typeof(ResourceWriteCancelData) }, |
| 1 | 87 | | { EventTypes.ResourceDeleteSuccessEvent, typeof(ResourceDeleteSuccessData) }, |
| 1 | 88 | | { EventTypes.ResourceDeleteFailureEvent, typeof(ResourceDeleteFailureData) }, |
| 1 | 89 | | { EventTypes.ResourceDeleteCancelEvent, typeof(ResourceDeleteCancelData) }, |
| 1 | 90 | | { EventTypes.ResourceActionSuccessEvent, typeof(ResourceActionSuccessData) }, |
| 1 | 91 | | { EventTypes.ResourceActionFailureEvent, typeof(ResourceActionFailureData) }, |
| 1 | 92 | | { EventTypes.ResourceActionCancelEvent, typeof(ResourceActionCancelData) }, |
| 1 | 93 | |
|
| 1 | 94 | | // ServiceBus events |
| 1 | 95 | | { EventTypes.ServiceBusActiveMessagesAvailableWithNoListenersEvent, typeof(ServiceBusActiveMessagesAvailable |
| 1 | 96 | | { EventTypes.ServiceBusDeadletterMessagesAvailableWithNoListenerEvent, typeof(ServiceBusDeadletterMessagesAv |
| 1 | 97 | |
|
| 1 | 98 | | // Storage events |
| 1 | 99 | | { EventTypes.StorageBlobCreatedEvent, typeof(StorageBlobCreatedEventData) }, |
| 1 | 100 | | { EventTypes.StorageBlobDeletedEvent, typeof(StorageBlobDeletedEventData) }, |
| 1 | 101 | | { EventTypes.StorageBlobRenamedEvent, typeof(StorageBlobRenamedEventData) }, |
| 1 | 102 | | { EventTypes.StorageDirectoryCreatedEvent, typeof(StorageDirectoryCreatedEventData) }, |
| 1 | 103 | | { EventTypes.StorageDirectoryDeletedEvent, typeof(StorageDirectoryDeletedEventData) }, |
| 1 | 104 | | { EventTypes.StorageDirectoryRenamedEvent, typeof(StorageDirectoryRenamedEventData) }, |
| 1 | 105 | |
|
| 1 | 106 | | // App Service |
| 1 | 107 | | { EventTypes.WebAppUpdated, typeof(WebAppUpdatedEventData) }, |
| 1 | 108 | | { EventTypes.WebBackupOperationStarted, typeof(WebBackupOperationStartedEventData) }, |
| 1 | 109 | | { EventTypes.WebBackupOperationCompleted, typeof(WebBackupOperationCompletedEventData) }, |
| 1 | 110 | | { EventTypes.WebBackupOperationFailed, typeof(WebBackupOperationFailedEventData) }, |
| 1 | 111 | | { EventTypes.WebRestoreOperationStarted, typeof(WebRestoreOperationStartedEventData) }, |
| 1 | 112 | | { EventTypes.WebRestoreOperationCompleted, typeof(WebRestoreOperationCompletedEventData) }, |
| 1 | 113 | | { EventTypes.WebRestoreOperationFailed, typeof(WebRestoreOperationFailedEventData) }, |
| 1 | 114 | | { EventTypes.WebSlotSwapStarted, typeof(WebSlotSwapStartedEventData) }, |
| 1 | 115 | | { EventTypes.WebSlotSwapCompleted, typeof(WebSlotSwapCompletedEventData) }, |
| 1 | 116 | | { EventTypes.WebSlotSwapFailed, typeof(WebSlotSwapFailedEventData) }, |
| 1 | 117 | | { EventTypes.WebSlotSwapWithPreviewStarted, typeof(WebSlotSwapWithPreviewStartedEventData) }, |
| 1 | 118 | | { EventTypes.WebSlotSwapWithPreviewCancelled, typeof(WebSlotSwapWithPreviewCancelledEventData) }, |
| 1 | 119 | | { EventTypes.WebAppServicePlanUpdated, typeof(WebAppServicePlanUpdatedEventData) } |
| 1 | 120 | | }; |
| | 121 | | } |
| | 122 | | } |