Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new system events #39202

Merged
merged 3 commits into from
Oct 11, 2023
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
8 changes: 2 additions & 6 deletions sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Release History

## 4.19.0-beta.1 (Unreleased)
## 4.19.0 (2023-10-11)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Added new system events for Resource Notifications and Azure Communication Services.

## 4.18.0 (2023-09-12)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public override void VisitNamedType(INamedTypeSymbol symbol)
XmlDocument xmlDoc = new();
xmlDoc.LoadXml(symbol.GetDocumentationCommentXml());
var xmlNode = xmlDoc.SelectSingleNode("member/summary");
var match = Regex.Match(xmlNode.InnerText, "[a-zA-Z]+\\.[a-zA-Z]+\\.[a-zA-Z]+");
// the event name is either 3 or 4 parts, e.g. Microsoft.AppConfiguration.KeyValueDeleted or Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged
var match = Regex.Match(xmlNode.InnerText, "[a-zA-Z]+\\.[a-zA-Z]+\\.[a-zA-Z]+(\\.[a-zA-Z]+)?");
if (!match.Success)
{
// We expect some EventData to not have event types if they are base types,
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Description>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.</Description>
<AssemblyTitle>Microsoft Azure.Messaging.EventGrid client library</AssemblyTitle>
<Version>4.19.0-beta.1</Version>
<Version>4.19.0</Version>
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
<ApiCompatVersion>4.18.0</ApiCompatVersion>
<PackageTags>Microsoft Azure EventGrid;Event Grid;Event Grid Publishing;</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

namespace Azure.Messaging.EventGrid.SystemEvents
{
internal partial class AcsRouterCommunicationError
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Azure.Core;

namespace Azure.Messaging.EventGrid.SystemEvents
{
/// <summary> Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobClassificationFailed event. </summary>
public partial class AcsRouterJobClassificationFailedEventData
{
/// <summary> List of Router Communication Errors. </summary>
[CodeGenMember("Errors")]
internal IReadOnlyList<AcsRouterCommunicationError> ErrorsInternal { get; }

/// <summary> List of Router Communication Errors. </summary>
public IReadOnlyList<ResponseError> Errors
{
get
{
if (_errors == null)
{
// Need to re-serialize to be able to deserialize as ResponseError with the internal properties populated.
JoshLove-msft marked this conversation as resolved.
Show resolved Hide resolved
var serialized = JsonSerializer.Serialize(
ErrorsInternal,
new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
});
_errors = JsonSerializer.Deserialize<List<ResponseError>>(serialized);
JoshLove-msft marked this conversation as resolved.
Show resolved Hide resolved
}

return _errors;
}
}

private List<ResponseError> _errors;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using Azure.Core;

namespace Azure.Messaging.EventGrid.SystemEvents
{
/// <summary> Router Job Worker Selector. </summary>
public partial class AcsRouterWorkerSelector
{
internal float? TtlSeconds { get; }

/// <summary> Router Job Worker Selector TTL. </summary>
public TimeSpan? TimeToLive => TtlSeconds.HasValue ? TimeSpan.FromSeconds(TtlSeconds.Value) : null;
JoshLove-msft marked this conversation as resolved.
Show resolved Hide resolved
}
}

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading