Skip to content

APIManagement and ACS events update #45281

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

Merged
merged 7 commits into from
May 16, 2025
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
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ com.azure:azure-maps-geolocation;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-maps-render;2.0.0-beta.2;2.0.0-beta.3
com.azure:azure-maps-route;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-maps-search;2.0.0-beta.2;2.0.0-beta.3
com.azure:azure-messaging-eventgrid;4.29.1;4.30.0-beta.1
com.azure:azure-messaging-eventgrid;4.29.1;4.30.0
com.azure:azure-messaging-eventgrid-systemevents;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-messaging-eventgrid-namespaces;1.1.3;1.2.0-beta.1
com.azure:azure-messaging-eventgrid-cloudnative-cloudevents;1.0.0-beta.1;1.0.0-beta.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventgrid</artifactId>
<version>4.30.0-beta.1</version> <!-- {x-version-update;com.azure:azure-messaging-eventgrid;current} -->
<version>4.30.0</version> <!-- {x-version-update;com.azure:azure-messaging-eventgrid;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.2 (2025-05-16)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Added new values to `SystemEventNames` related to Azure Communication Services and Azure Edge.

## 1.0.0-beta.1 (2025-02-26)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

package com.azure.messaging.eventgrid;

import com.azure.messaging.eventgrid.systemevents.AcsCallEndedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsCallParticipantAddedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsCallParticipantRemovedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsCallStartedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsChatAzureBotCommandReceivedInThreadEventData;
import com.azure.messaging.eventgrid.systemevents.AcsChatMessageDeletedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsChatMessageDeletedInThreadEventData;
import com.azure.messaging.eventgrid.systemevents.AcsChatMessageEditedEventData;
Expand All @@ -19,6 +24,7 @@
import com.azure.messaging.eventgrid.systemevents.AcsChatThreadPropertiesUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsChatThreadPropertiesUpdatedPerUserEventData;
import com.azure.messaging.eventgrid.systemevents.AcsChatThreadWithUserDeletedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsChatTypingIndicatorReceivedInThreadEventData;
import com.azure.messaging.eventgrid.systemevents.AcsEmailDeliveryReportReceivedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsEmailEngagementTrackingReportReceivedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsIncomingCallEventData;
Expand Down Expand Up @@ -58,6 +64,8 @@
import com.azure.messaging.eventgrid.systemevents.ApiManagementApiReleaseDeletedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementApiReleaseUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementApiUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementCircuitBreakerClosedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementCircuitBreakerOpenedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementGatewayApiAddedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementGatewayApiRemovedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementGatewayCertificateAuthorityCreatedEventData;
Expand All @@ -68,6 +76,8 @@
import com.azure.messaging.eventgrid.systemevents.ApiManagementGatewayHostnameConfigurationCreatedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementGatewayHostnameConfigurationDeletedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementGatewayHostnameConfigurationUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementGatewayTokenExpiredEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementGatewayTokenNearExpiryEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementGatewayUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementProductCreatedEventData;
import com.azure.messaging.eventgrid.systemevents.ApiManagementProductDeletedEventData;
Expand Down Expand Up @@ -107,6 +117,7 @@
import com.azure.messaging.eventgrid.systemevents.DataBoxCopyCompletedEventData;
import com.azure.messaging.eventgrid.systemevents.DataBoxCopyStartedEventData;
import com.azure.messaging.eventgrid.systemevents.DataBoxOrderCompletedEventData;
import com.azure.messaging.eventgrid.systemevents.EdgeSolutionVersionPublishedEventData;
import com.azure.messaging.eventgrid.systemevents.EventGridMqttClientCreatedOrUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.EventGridMqttClientDeletedEventData;
import com.azure.messaging.eventgrid.systemevents.EventGridMqttClientSessionConnectedEventData;
Expand Down Expand Up @@ -212,6 +223,33 @@
*/
public final class SystemEventNames {

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallEnded event.
*/
public static final String ACS_CALL_ENDED = "Microsoft.Communication.CallEnded";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantAdded event.
*/
public static final String ACS_CALL_PARTICIPANT_ADDED = "Microsoft.Communication.CallParticipantAdded";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantRemoved event.
*/
public static final String ACS_CALL_PARTICIPANT_REMOVED = "Microsoft.Communication.CallParticipantRemoved";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallStarted event.
*/
public static final String ACS_CALL_STARTED = "Microsoft.Communication.CallStarted";

/**
* Schema of the Data property of an EventGridEvent for a
* Microsoft.Communication.ChatAzureBotCommandReceivedInThread event.
*/
public static final String ACS_CHAT_AZURE_BOT_COMMAND_RECEIVED_IN_THREAD
= "Microsoft.Communication.ChatAzureBotCommandReceivedInThread";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageDeleted event.
*/
Expand Down Expand Up @@ -304,6 +342,13 @@ public final class SystemEventNames {
*/
public static final String ACS_CHAT_THREAD_WITH_USER_DELETED = "Microsoft.Communication.ChatThreadWithUserDeleted";

/**
* Schema of the Data property of an EventGridEvent for a
* Microsoft.Communication.ChatTypingIndicatorReceivedInThread event.
*/
public static final String ACS_CHAT_TYPING_INDICATOR_RECEIVED_IN_THREAD
= "Microsoft.Communication.ChatTypingIndicatorReceivedInThread";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.Communication.EmailDeliveryReportReceived event.
*/
Expand Down Expand Up @@ -511,6 +556,16 @@ public final class SystemEventNames {
*/
public static final String API_MANAGEMENT_API_UPDATED = "Microsoft.ApiManagement.APIUpdated";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Closed event.
*/
public static final String API_MANAGEMENT_CIRCUIT_BREAKER_CLOSED = "Microsoft.ApiManagement.CircuitBreaker.Closed";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Opened event.
*/
public static final String API_MANAGEMENT_CIRCUIT_BREAKER_OPENED = "Microsoft.ApiManagement.CircuitBreaker.Opened";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayAPIAdded event.
*/
Expand Down Expand Up @@ -573,6 +628,17 @@ public final class SystemEventNames {
public static final String API_MANAGEMENT_GATEWAY_HOSTNAME_CONFIGURATION_UPDATED
= "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenExpired event.
*/
public static final String API_MANAGEMENT_GATEWAY_TOKEN_EXPIRED = "Microsoft.ApiManagement.GatewayTokenExpired";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenNearExpiry event.
*/
public static final String API_MANAGEMENT_GATEWAY_TOKEN_NEAR_EXPIRY
= "Microsoft.ApiManagement.GatewayTokenNearExpiry";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayUpdated event.
*/
Expand Down Expand Up @@ -775,6 +841,11 @@ public final class SystemEventNames {
*/
public static final String DATA_BOX_ORDER_COMPLETED = "Microsoft.DataBox.OrderCompleted";

/**
* Schema of the Data property of an EventGridEvent for a Microsoft.Edge.SolutionVersionPublished event.
*/
public static final String EDGE_SOLUTION_VERSION_PUBLISHED = "Microsoft.Edge.SolutionVersionPublished";

/**
* Event data for Microsoft.EventGrid.MQTTClientCreatedOrUpdated event.
*/
Expand Down Expand Up @@ -1028,6 +1099,8 @@ public final class SystemEventNames {

/**
* Schema of the Data property of an event grid event for a
* Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event.Schema of the
* Data property of an event grid event for a
* Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event.
*/
public static final String RESOURCE_NOTIFICATIONS_CONTAINER_SERVICE_EVENT_RESOURCES_SCHEDULED
Expand Down Expand Up @@ -1267,6 +1340,11 @@ public final class SystemEventNames {

private static final Map<String, Class<?>> SYSTEM_EVENT_MAPPINGS = new HashMap<String, Class<?>>() {
{
put(ACS_CALL_ENDED, AcsCallEndedEventData.class);
put(ACS_CALL_PARTICIPANT_ADDED, AcsCallParticipantAddedEventData.class);
put(ACS_CALL_PARTICIPANT_REMOVED, AcsCallParticipantRemovedEventData.class);
put(ACS_CALL_STARTED, AcsCallStartedEventData.class);
put(ACS_CHAT_AZURE_BOT_COMMAND_RECEIVED_IN_THREAD, AcsChatAzureBotCommandReceivedInThreadEventData.class);
put(ACS_CHAT_MESSAGE_DELETED, AcsChatMessageDeletedEventData.class);
put(ACS_CHAT_MESSAGE_DELETED_IN_THREAD, AcsChatMessageDeletedInThreadEventData.class);
put(ACS_CHAT_MESSAGE_EDITED, AcsChatMessageEditedEventData.class);
Expand All @@ -1284,6 +1362,7 @@ public final class SystemEventNames {
put(ACS_CHAT_THREAD_PROPERTIES_UPDATED, AcsChatThreadPropertiesUpdatedEventData.class);
put(ACS_CHAT_THREAD_PROPERTIES_UPDATED_PER_USER, AcsChatThreadPropertiesUpdatedPerUserEventData.class);
put(ACS_CHAT_THREAD_WITH_USER_DELETED, AcsChatThreadWithUserDeletedEventData.class);
put(ACS_CHAT_TYPING_INDICATOR_RECEIVED_IN_THREAD, AcsChatTypingIndicatorReceivedInThreadEventData.class);
put(ACS_EMAIL_DELIVERY_REPORT_RECEIVED, AcsEmailDeliveryReportReceivedEventData.class);
put(ACS_EMAIL_ENGAGEMENT_TRACKING_REPORT_RECEIVED, AcsEmailEngagementTrackingReportReceivedEventData.class);
put(ACS_INCOMING_CALL, AcsIncomingCallEventData.class);
Expand Down Expand Up @@ -1323,6 +1402,8 @@ public final class SystemEventNames {
put(API_MANAGEMENT_API_RELEASE_DELETED, ApiManagementApiReleaseDeletedEventData.class);
put(API_MANAGEMENT_API_RELEASE_UPDATED, ApiManagementApiReleaseUpdatedEventData.class);
put(API_MANAGEMENT_API_UPDATED, ApiManagementApiUpdatedEventData.class);
put(API_MANAGEMENT_CIRCUIT_BREAKER_CLOSED, ApiManagementCircuitBreakerClosedEventData.class);
put(API_MANAGEMENT_CIRCUIT_BREAKER_OPENED, ApiManagementCircuitBreakerOpenedEventData.class);
put(API_MANAGEMENT_GATEWAY_API_ADDED, ApiManagementGatewayApiAddedEventData.class);
put(API_MANAGEMENT_GATEWAY_API_REMOVED, ApiManagementGatewayApiRemovedEventData.class);
put(API_MANAGEMENT_GATEWAY_CERTIFICATE_AUTHORITY_CREATED,
Expand All @@ -1339,6 +1420,8 @@ public final class SystemEventNames {
ApiManagementGatewayHostnameConfigurationDeletedEventData.class);
put(API_MANAGEMENT_GATEWAY_HOSTNAME_CONFIGURATION_UPDATED,
ApiManagementGatewayHostnameConfigurationUpdatedEventData.class);
put(API_MANAGEMENT_GATEWAY_TOKEN_EXPIRED, ApiManagementGatewayTokenExpiredEventData.class);
put(API_MANAGEMENT_GATEWAY_TOKEN_NEAR_EXPIRY, ApiManagementGatewayTokenNearExpiryEventData.class);
put(API_MANAGEMENT_GATEWAY_UPDATED, ApiManagementGatewayUpdatedEventData.class);
put(API_MANAGEMENT_PRODUCT_CREATED, ApiManagementProductCreatedEventData.class);
put(API_MANAGEMENT_PRODUCT_DELETED, ApiManagementProductDeletedEventData.class);
Expand Down Expand Up @@ -1379,6 +1462,7 @@ public final class SystemEventNames {
put(DATA_BOX_COPY_COMPLETED, DataBoxCopyCompletedEventData.class);
put(DATA_BOX_COPY_STARTED, DataBoxCopyStartedEventData.class);
put(DATA_BOX_ORDER_COMPLETED, DataBoxOrderCompletedEventData.class);
put(EDGE_SOLUTION_VERSION_PUBLISHED, EdgeSolutionVersionPublishedEventData.class);
put(EVENT_GRID_MQTT_CLIENT_CREATED_OR_UPDATED, EventGridMqttClientCreatedOrUpdatedEventData.class);
put(EVENT_GRID_MQTT_CLIENT_DELETED, EventGridMqttClientDeletedEventData.class);
put(EVENT_GRID_MQTT_CLIENT_SESSION_CONNECTED, EventGridMqttClientSessionConnectedEventData.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,16 @@ public final class AcsRouterCommunicationError implements JsonSerializable<AcsRo
* List of Router Communication Errors
*/
@Generated
private final List<AcsRouterCommunicationError> details;
private List<AcsRouterCommunicationError> details;

/**
* Creates an instance of AcsRouterCommunicationError class.
*
* @param innererror the innererror value to set.
* @param details the details value to set.
*/
@Generated
private AcsRouterCommunicationError(AcsRouterCommunicationError innererror,
List<AcsRouterCommunicationError> details) {
private AcsRouterCommunicationError(AcsRouterCommunicationError innererror) {
this.innererror = innererror;
this.details = details;
}

/**
Expand Down Expand Up @@ -119,7 +116,6 @@ public List<AcsRouterCommunicationError> getDetails() {
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("innererror", this.innererror);
jsonWriter.writeArrayField("details", this.details, (writer, element) -> writer.writeJson(element));
jsonWriter.writeStringField("code", this.code);
jsonWriter.writeStringField("message", this.message);
jsonWriter.writeStringField("target", this.target);
Expand Down Expand Up @@ -162,7 +158,8 @@ public static AcsRouterCommunicationError fromJson(JsonReader jsonReader) throws
}
}
AcsRouterCommunicationError deserializedAcsRouterCommunicationError
= new AcsRouterCommunicationError(innererror, details);
= new AcsRouterCommunicationError(innererror);
deserializedAcsRouterCommunicationError.details = details;
deserializedAcsRouterCommunicationError.code = code;
deserializedAcsRouterCommunicationError.message = message;
deserializedAcsRouterCommunicationError.target = target;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.messaging.eventgrid.systemevents;

import com.azure.core.annotation.Generated;
import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;

/**
* Schema of calling event reason properties.
*/
@Immutable
public final class AcsCallEndReasonProperties implements JsonSerializable<AcsCallEndReasonProperties> {
/*
* Reason code for ending the call.
*/
@Generated
private Integer code;

/*
* Reason subcode for ending the call.
*/
@Generated
private Integer subCode;

/*
* Reason for the ending the call.
*/
@Generated
private String phrase;

/**
* Creates an instance of AcsCallEndReasonProperties class.
*/
@Generated
private AcsCallEndReasonProperties() {
}

/**
* Get the code property: Reason code for ending the call.
*
* @return the code value.
*/
@Generated
public Integer getCode() {
return this.code;
}

/**
* Get the subCode property: Reason subcode for ending the call.
*
* @return the subCode value.
*/
@Generated
public Integer getSubCode() {
return this.subCode;
}

/**
* Get the phrase property: Reason for the ending the call.
*
* @return the phrase value.
*/
@Generated
public String getPhrase() {
return this.phrase;
}

/**
* {@inheritDoc}
*/
@Generated
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeNumberField("code", this.code);
jsonWriter.writeNumberField("subCode", this.subCode);
jsonWriter.writeStringField("phrase", this.phrase);
return jsonWriter.writeEndObject();
}

/**
* Reads an instance of AcsCallEndReasonProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AcsCallEndReasonProperties if the JsonReader was pointing to an instance of it, or null if
* it was pointing to JSON null.
* @throws IOException If an error occurs while reading the AcsCallEndReasonProperties.
*/
@Generated
public static AcsCallEndReasonProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AcsCallEndReasonProperties deserializedAcsCallEndReasonProperties = new AcsCallEndReasonProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();

if ("code".equals(fieldName)) {
deserializedAcsCallEndReasonProperties.code = reader.getNullable(JsonReader::getInt);
} else if ("subCode".equals(fieldName)) {
deserializedAcsCallEndReasonProperties.subCode = reader.getNullable(JsonReader::getInt);
} else if ("phrase".equals(fieldName)) {
deserializedAcsCallEndReasonProperties.phrase = reader.getString();
} else {
reader.skipChildren();
}
}

return deserializedAcsCallEndReasonProperties;
});
}
}
Loading