diff --git a/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid.Tests/Tests/ConsumeEventTests.cs b/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid.Tests/Tests/ConsumeEventTests.cs
index 1837f8ef570e..3653e26c8c1b 100644
--- a/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid.Tests/Tests/ConsumeEventTests.cs
+++ b/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid.Tests/Tests/ConsumeEventTests.cs
@@ -566,6 +566,24 @@ public void ConsumeMediaJobOutputScheduledEvent()
Assert.True(eventData.Output is MediaJobOutputAsset);
}
+ [Fact]
+ public void ConsumeMediaJobOutputProgressEvent()
+ {
+ string requestContent = "[{ \"topic\": \"/subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Media/mediaservices/{account name}\", \"subject\": \"transforms/VideoAnalyzerTransform/jobs/job-2ac2fe75-6557-4de5-ab25-5713b74a6981\", \"eventType\": \"Microsoft.Media.JobOutputProgress\", \"eventTime\": \"2018-10-12T15:14:11.2244618\", \"id\": \"635ca6ea-5306-4590-b2e1-22f172759336\", \"data\": { \"jobCorrelationData\": { \"Field1\": \"test1\", \"Field2\": \"test2\" }, \"label\": \"TestLabel\", \"progress\": 50 }, \"dataVersion\": \"1.0\", \"metadataVersion\": \"1\"}]";
+
+ var events = this.eventGridSubscriber.DeserializeEventGridEvents(requestContent);
+
+ Assert.NotNull(events);
+ Assert.True(events[0].Data is MediaJobOutputProgressEventData);
+ MediaJobOutputProgressEventData eventData = (MediaJobOutputProgressEventData)events[0].Data;
+ Assert.Equal("TestLabel", eventData.Label);
+ Assert.Equal(50, eventData.Progress);
+ Assert.True(eventData.JobCorrelationData.ContainsKey("Field1"));
+ Assert.Equal("test1", eventData.JobCorrelationData["Field1"]);
+ Assert.True(eventData.JobCorrelationData.ContainsKey("Field2"));
+ Assert.Equal("test2", eventData.JobCorrelationData["Field2"]);
+ }
+
[Fact]
public void ConsumeMediaLiveEventEncoderConnectedEvent()
{
diff --git a/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Customization/EventTypes.cs b/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Customization/EventTypes.cs
index 00e9cf429588..ba34a196a23d 100644
--- a/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Customization/EventTypes.cs
+++ b/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Customization/EventTypes.cs
@@ -44,6 +44,7 @@ public class EventTypes
public const string MediaJobOutputFinishedEvent = "Microsoft.Media.JobOutputFinished";
public const string MediaJobOutputProcessingEvent = "Microsoft.Media.JobOutputProcessing";
public const string MediaJobOutputScheduledEvent = "Microsoft.Media.JobOutputScheduled";
+ public const string MediaJobOutputProgressEvent = "Microsoft.Media.JobOutputProgress";
public const string MediaLiveEventEncoderConnectedEvent = "Microsoft.Media.LiveEventEncoderConnected";
public const string MediaLiveEventConnectionRejectedEvent = "Microsoft.Media.LiveEventConnectionRejected";
public const string MediaLiveEventEncoderDisconnectedEvent = "Microsoft.Media.LiveEventEncoderDisconnected";
diff --git a/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Customization/SystemEventTypeMappings.cs b/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Customization/SystemEventTypeMappings.cs
index 4046ac38c024..b2b18927d58f 100644
--- a/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Customization/SystemEventTypeMappings.cs
+++ b/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Customization/SystemEventTypeMappings.cs
@@ -50,6 +50,7 @@ internal static class SystemEventTypeMappings
{ EventTypes.MediaJobOutputFinishedEvent, typeof(MediaJobOutputFinishedEventData) },
{ EventTypes.MediaJobOutputProcessingEvent, typeof(MediaJobOutputProcessingEventData) },
{ EventTypes.MediaJobOutputScheduledEvent, typeof(MediaJobOutputScheduledEventData) },
+ { EventTypes.MediaJobOutputProgressEvent, typeof(MediaJobOutputProgressEventData) },
{ EventTypes.MediaLiveEventEncoderConnectedEvent, typeof(MediaLiveEventEncoderConnectedEventData) },
{ EventTypes.MediaLiveEventConnectionRejectedEvent, typeof(MediaLiveEventConnectionRejectedEventData) },
{ EventTypes.MediaLiveEventEncoderDisconnectedEvent, typeof(MediaLiveEventEncoderDisconnectedEventData) },
diff --git a/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Generated/Models/MediaJobOutputProgressEventData.cs b/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Generated/Models/MediaJobOutputProgressEventData.cs
new file mode 100644
index 000000000000..1fc19c1b46f4
--- /dev/null
+++ b/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Generated/Models/MediaJobOutputProgressEventData.cs
@@ -0,0 +1,72 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.EventGrid.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Job Output Progress Event Data.
+ ///
+ public partial class MediaJobOutputProgressEventData
+ {
+ ///
+ /// Initializes a new instance of the MediaJobOutputProgressEventData
+ /// class.
+ ///
+ public MediaJobOutputProgressEventData()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MediaJobOutputProgressEventData
+ /// class.
+ ///
+ /// Gets the Job output label.
+ /// Gets the Job output progress.
+ /// Gets the Job correlation
+ /// data.
+ public MediaJobOutputProgressEventData(string label = default(string), long? progress = default(long?), IDictionary jobCorrelationData = default(IDictionary))
+ {
+ Label = label;
+ Progress = progress;
+ JobCorrelationData = jobCorrelationData;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the Job output label.
+ ///
+ [JsonProperty(PropertyName = "label")]
+ public string Label { get; set; }
+
+ ///
+ /// Gets the Job output progress.
+ ///
+ [JsonProperty(PropertyName = "progress")]
+ public long? Progress { get; set; }
+
+ ///
+ /// Gets the Job correlation data.
+ ///
+ [JsonProperty(PropertyName = "jobCorrelationData")]
+ public IDictionary JobCorrelationData { get; set; }
+
+ }
+}
diff --git a/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Microsoft.Azure.EventGrid.csproj b/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Microsoft.Azure.EventGrid.csproj
index 4c487ff61704..d1e8def47074 100644
--- a/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Microsoft.Azure.EventGrid.csproj
+++ b/src/SDKs/EventGrid/DataPlane/Microsoft.Azure.EventGrid/Microsoft.Azure.EventGrid.csproj
@@ -6,10 +6,10 @@
Microsoft.Azure.EventGrid
This library can be used to publish events to Azure Event Grid and to consume events delivered by EventGrid. It also defines the event schemas for the events published to EventGrid by various Azure services.
- 3.0.0
+ 3.1.0
Microsoft.Azure.EventGrid
Microsoft Azure EventGrid;Event Grid;Event Grid Publishing;
- Added support for the new Azure Media Services event types for tracking state changes of Media Jobs and Media JobOutputs. The existing MediaJobStateChangeEvent can be used to get all state change events for a Job but there are now separate events for each state like MediaJobScheduledEvent, MediaJobFinishedEvent, etc. These allow subscribing for just the desired events. Likewise a MediaJobOutputStateChangeEvent was added to get events for all MediaJobOutput state changes along with individual events for each JobOutput state. This change also adds support for events related to Media LiveEvents to get notifications related to the ingestion of live streams (encoder connected, encoder disconnected, discontinuity, chunk dropped, etc). Note JobState was renamed to MediaJobState to follow the Media prefix that all of the other Media Services Event classes use. This is a breaking change, albeit a small one.
+ Added support for the new Azure Media Services event types for tracking state changes of Media Jobs and Media JobOutputs. The existing MediaJobStateChangeEvent can be used to get all state change events for a Job but there are now separate events for each state like MediaJobScheduledEvent, MediaJobFinishedEvent, etc. These allow subscribing for just the desired events. Likewise a MediaJobOutputStateChangeEvent was added to get events for all MediaJobOutput state changes along with individual events for each JobOutput state. MediaJobOutputProgressEvent was added to get events for Job output progress value, label and correlation data. This change also adds support for events related to Media LiveEvents to get notifications related to the ingestion of live streams (encoder connected, encoder disconnected, discontinuity, chunk dropped, etc). Note JobState was renamed to MediaJobState to follow the Media prefix that all of the other Media Services Event classes use. This is a breaking change, albeit a small one.
net452;netstandard1.4
diff --git a/src/SDKs/_metadata/eventgrid_data-plane.txt b/src/SDKs/_metadata/eventgrid_data-plane.txt
index bc5b5d8da06f..14326e77646d 100644
--- a/src/SDKs/_metadata/eventgrid_data-plane.txt
+++ b/src/SDKs/_metadata/eventgrid_data-plane.txt
@@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
-cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\github\azure-sdk-for-net-qb\src\SDKs
-2018-10-23 13:09:57 UTC
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\Users\jinshang\Desktop\azure-sdk-for-net\azure-sdk-for-net\src\SDKs
+2019-01-18 21:30:32 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
-Commit: 15095b486206899c2ec77d2abddbaee9480021e3
+Commit: 17b815413d93945f0248bfdb678432a80037cefa
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283