Skip to content

Commit a6ea562

Browse files
authored
EventGrid fixes Communication event types (Azure#20031)
1 parent 1fc1bf8 commit a6ea562

23 files changed

+430
-14
lines changed

eng/code-quality-reports/src/main/resources/revapi/revapi.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,18 @@
398398
"code": "java\\.annotation\\.(added|attributeValueChanged|attributeAdded)",
399399
"new": "(class|method void|parameter void) com\\.azure\\.search\\.documents\\.indexes\\.models\\..*",
400400
"justification": "Generated classes were moved into public API, these annotations were already being used in implementation used during serialization and deserialization."
401+
},
402+
{
403+
"code": "java.field.constantValueChanged",
404+
"old": "field com.azure.messaging.eventgrid.SystemEventNames.COMMUNICATION_CHAT_MESSAGE_REMOVED_FROM_THREAD",
405+
"new": "field com.azure.messaging.eventgrid.SystemEventNames.COMMUNICATION_CHAT_MESSAGE_REMOVED_FROM_THREAD",
406+
"justification": "Correct the event type defined in swagger file"
407+
},
408+
{
409+
"code": "java.field.constantValueChanged",
410+
"old": "field com.azure.messaging.eventgrid.SystemEventNames.COMMUNICATION_CHAT_PARTICIPANT_ADDED_TO_THREAD",
411+
"new": "field com.azure.messaging.eventgrid.SystemEventNames.COMMUNICATION_CHAT_PARTICIPANT_ADDED_TO_THREAD",
412+
"justification": "Correct the event type defined in swagger file"
401413
}
402414
]
403415
}

eng/jacoco-test-coverage/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
<dependency>
195195
<groupId>com.azure</groupId>
196196
<artifactId>azure-messaging-eventgrid</artifactId>
197-
<version>4.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-messaging-eventgrid;current} -->
197+
<version>4.1.0</version> <!-- {x-version-update;com.azure:azure-messaging-eventgrid;current} -->
198198
</dependency>
199199
<dependency>
200200
<groupId>com.azure</groupId>

eng/versioning/version_client.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ com.azure:azure-e2e;1.0.0-beta.1;1.0.0-beta.1
7878
com.azure:azure-identity;1.2.4;1.3.0-beta.3
7979
com.azure:azure-identity-perf;1.0.0-beta.1;1.0.0-beta.1
8080
com.azure:azure-iot-deviceupdate;1.0.0-beta.1;1.0.0-beta.2
81+
com.azure:azure-messaging-eventgrid;4.0.0;4.1.0
8182
com.azure:azure-iot-modelsrepository;1.0.0-beta.1;1.0.0-beta.1
82-
com.azure:azure-messaging-eventgrid;4.0.0;4.1.0-beta.1
8383
com.azure:azure-messaging-eventhubs;5.6.0;5.7.0-beta.1
8484
com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.5.1;1.6.0-beta.1
8585
com.azure:azure-messaging-servicebus;7.1.0;7.2.0-beta.1

sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# Release History
22

3-
## 4.1.0-beta.1 (Unreleased)
3+
## 4.1.0 (2020-03-25)
4+
### New Features
5+
- Added new system event model class `AcsRecordingFileStatusUpdatedEventData`.
6+
- Added new attribute `transactionId` to `AcsChatEventInThreadBaseProperties`.
7+
- Added new attribute `tag` to `AcsSmsDeliveryReportReceivedEventData`.
48

9+
### Bug Fixes
10+
- Fixed event types in `SystemEventNames` for system event data `AcsChatParticipantRemovedFromThreadEventData` and `AcsChatParticipantAddedToThreadEventData`.
11+
- Added `COMMUNICATION_CHAT_PARTICIPANT_REMOVED_FROM_THREAD` to `SystemEventNames` and deprecated `COMMUNICATION_CHAT_MESSAGE_REMOVED_FROM_THREAD`.
12+
- Added `COMMUNICATION_CHAT_PARTICIPANT_REMOVED_FROM_THREAD_WITH_USER` to `SystemEventNames` and deprecated `COMMUNICATION_CHAT_MESSAGE_REMOVED_FROM_THREAD_WITH_USER`.
513

614
## 4.0.0 (2020-03-11)
715
### New Features

sdk/eventgrid/azure-messaging-eventgrid/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ az eventgrid domain create --location <location> --resource-group <your-resource
4747
<dependency>
4848
<groupId>com.azure</groupId>
4949
<artifactId>azure-messaging-eventgrid</artifactId>
50-
<version>4.0.0</version>
50+
<version>4.1.0</version>
5151
</dependency>
5252
```
5353
[//]: # ({x-version-update-end})

sdk/eventgrid/azure-messaging-eventgrid/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<groupId>com.azure</groupId>
1414
<artifactId>azure-messaging-eventgrid</artifactId>
15-
<version>4.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-messaging-eventgrid;current} -->
15+
<version>4.1.0</version> <!-- {x-version-update;com.azure:azure-messaging-eventgrid;current} -->
1616

1717
<packaging>jar</packaging>
1818
<name>Microsoft Azure SDK for eventgrid</name>

sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.azure.messaging.eventgrid.systemevents.AcsChatThreadPropertiesUpdatedEventData;
2222
import com.azure.messaging.eventgrid.systemevents.AcsChatThreadPropertiesUpdatedPerUserEventData;
2323
import com.azure.messaging.eventgrid.systemevents.AcsChatThreadWithUserDeletedEventData;
24+
import com.azure.messaging.eventgrid.systemevents.AcsRecordingFileStatusUpdatedEventData;
2425
import com.azure.messaging.eventgrid.systemevents.AcsSmsDeliveryReportReceivedEventData;
2526
import com.azure.messaging.eventgrid.systemevents.AcsSmsReceivedEventData;
2627
import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueDeletedEventData;
@@ -442,19 +443,36 @@ public final class SystemEventNames {
442443
public static final String COMMUNICATION_CHAT_MESSAGE_RECEIVED_IN_THREAD =
443444
"Microsoft.Communication.ChatMessageReceivedInThread";
444445
public static final String COMMUNICATION_CHAT_PARTICIPANT_ADDED_TO_THREAD =
445-
"Microsoft.Communication.ChatParticipantAddedToThread";
446+
"Microsoft.Communication.ChatThreadParticipantAdded";
446447
public static final String COMMUNICATION_CHAT_PARTICIPANT_ADDED_TO_THREAD_WITH_USER =
447448
"Microsoft.Communication.ChatParticipantAddedToThreadWithUser";
449+
450+
/**
451+
* @deprecated As of 4.1.0, replaced by {@link #COMMUNICATION_CHAT_PARTICIPANT_REMOVED_FROM_THREAD}.
452+
*/
453+
@Deprecated
448454
public static final String COMMUNICATION_CHAT_MESSAGE_REMOVED_FROM_THREAD =
449-
"Microsoft.Communication.ChatParticipantRemovedFromThread";
455+
"Microsoft.Communication.ChatThreadParticipantRemoved";
456+
public static final String COMMUNICATION_CHAT_PARTICIPANT_REMOVED_FROM_THREAD =
457+
"Microsoft.Communication.ChatThreadParticipantRemoved";
458+
459+
/**
460+
* @deprecated @deprecated As of 4.1.0, replaced by {@link #COMMUNICATION_CHAT_PARTICIPANT_REMOVED_FROM_THREAD_WITH_USER}.
461+
*/
462+
@Deprecated
450463
public static final String COMMUNICATION_CHAT_MESSAGE_REMOVED_FROM_THREAD_WITH_USER =
451464
"Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser";
465+
public static final String COMMUNICATION_CHAT_PARTICIPANT_REMOVED_FROM_THREAD_WITH_USER =
466+
"Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser";
467+
452468
public static final String COMMUNICATION_CHAT_THREAD_CREATED =
453469
"Microsoft.Communication.ChatThreadCreated";
454470
public static final String COMMUNICATION_CHAT_THREAD_DELETED =
455471
"Microsoft.Communication.ChatThreadDeleted";
456472
public static final String COMMUNICATION_CHAT_THREAD_PROPERTIES_UPDATED =
457473
"Microsoft.Communication.ChatThreadPropertiesUpdated";
474+
public static final String COMMUNICATION_RECORDING_FILE_STATUS_UPDATED =
475+
"Microsoft.Communication.RecordingFileStatusUpdated";
458476

459477
// Web
460478
public static final String WEB_APP_UPDATED = "Microsoft.Web.AppUpdated";
@@ -599,10 +617,13 @@ public final class SystemEventNames {
599617
put(COMMUNICATION_CHAT_PARTICIPANT_ADDED_TO_THREAD, AcsChatParticipantAddedToThreadEventData.class);
600618
put(COMMUNICATION_CHAT_PARTICIPANT_ADDED_TO_THREAD_WITH_USER, AcsChatParticipantAddedToThreadWithUserEventData.class);
601619
put(COMMUNICATION_CHAT_MESSAGE_REMOVED_FROM_THREAD, AcsChatParticipantRemovedFromThreadEventData.class);
620+
put(COMMUNICATION_CHAT_PARTICIPANT_REMOVED_FROM_THREAD, AcsChatParticipantRemovedFromThreadEventData.class);
602621
put(COMMUNICATION_CHAT_MESSAGE_REMOVED_FROM_THREAD_WITH_USER, AcsChatParticipantRemovedFromThreadWithUserEventData.class);
622+
put(COMMUNICATION_CHAT_PARTICIPANT_REMOVED_FROM_THREAD_WITH_USER, AcsChatParticipantRemovedFromThreadWithUserEventData.class);
603623
put(COMMUNICATION_CHAT_THREAD_CREATED, AcsChatThreadCreatedEventData.class);
604624
put(COMMUNICATION_CHAT_THREAD_DELETED, AcsChatThreadDeletedEventData.class);
605625
put(COMMUNICATION_CHAT_THREAD_PROPERTIES_UPDATED, AcsChatThreadPropertiesUpdatedEventData.class);
626+
put(COMMUNICATION_RECORDING_FILE_STATUS_UPDATED, AcsRecordingFileStatusUpdatedEventData.class);
606627

607628
// Web events
608629
put(WEB_APP_UPDATED, WebAppUpdatedEventData.class);

sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatEventInThreadBaseProperties.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,38 @@
1010
/** Schema of common properties of all thread-level chat events. */
1111
@Fluent
1212
public class AcsChatEventInThreadBaseProperties {
13+
/*
14+
* The transaction id will be used as co-relation vector
15+
*/
16+
@JsonProperty(value = "transactionId")
17+
private String transactionId;
18+
1319
/*
1420
* The chat thread id
1521
*/
1622
@JsonProperty(value = "threadId")
1723
private String threadId;
1824

25+
/**
26+
* Get the transactionId property: The transaction id will be used as co-relation vector.
27+
*
28+
* @return the transactionId value.
29+
*/
30+
public String getTransactionId() {
31+
return this.transactionId;
32+
}
33+
34+
/**
35+
* Set the transactionId property: The transaction id will be used as co-relation vector.
36+
*
37+
* @param transactionId the transactionId value to set.
38+
* @return the AcsChatEventInThreadBaseProperties object itself.
39+
*/
40+
public AcsChatEventInThreadBaseProperties setTransactionId(String transactionId) {
41+
this.transactionId = transactionId;
42+
return this;
43+
}
44+
1945
/**
2046
* Get the threadId property: The chat thread id.
2147
*

sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageDeletedInThreadEventData.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ public AcsChatMessageDeletedInThreadEventData setVersion(Long version) {
8080
return this;
8181
}
8282

83+
/** {@inheritDoc} */
84+
@Override
85+
public AcsChatMessageDeletedInThreadEventData setTransactionId(String transactionId) {
86+
super.setTransactionId(transactionId);
87+
return this;
88+
}
89+
8390
/** {@inheritDoc} */
8491
@Override
8592
public AcsChatMessageDeletedInThreadEventData setThreadId(String threadId) {

sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsChatMessageEditedInThreadEventData.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ public AcsChatMessageEditedInThreadEventData setVersion(Long version) {
106106
return this;
107107
}
108108

109+
/** {@inheritDoc} */
110+
@Override
111+
public AcsChatMessageEditedInThreadEventData setTransactionId(String transactionId) {
112+
super.setTransactionId(transactionId);
113+
return this;
114+
}
115+
109116
/** {@inheritDoc} */
110117
@Override
111118
public AcsChatMessageEditedInThreadEventData setThreadId(String threadId) {

0 commit comments

Comments
 (0)