Skip to content

Commit 5ec90f0

Browse files
authored
November EG System Events (Azure#37622)
* November EG System Events * fixes * use logger * pr feedback
1 parent ec73f53 commit 5ec90f0

12 files changed

+459
-29
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@
167167
import com.azure.messaging.eventgrid.systemevents.ResourceDeleteSuccessEventData;
168168
import com.azure.messaging.eventgrid.systemevents.ResourceNotificationsHealthResourcesAnnotatedEventData;
169169
import com.azure.messaging.eventgrid.systemevents.ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData;
170+
import com.azure.messaging.eventgrid.systemevents.ResourceNotificationsResourceManagementCreatedOrUpdatedEventData;
171+
import com.azure.messaging.eventgrid.systemevents.ResourceNotificationsResourceManagementDeletedEventData;
170172
import com.azure.messaging.eventgrid.systemevents.ResourceWriteCancelEventData;
171173
import com.azure.messaging.eventgrid.systemevents.ResourceWriteFailureEventData;
172174
import com.azure.messaging.eventgrid.systemevents.ResourceWriteSuccessEventData;
@@ -936,6 +938,19 @@ public final class SystemEventNames {
936938
public static final String RESOURCE_NOTIFICATIONS_HEALTH_RESOURCES_AVAILABILITY_STATUS_CHANGED =
937939
"Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged";
938940

941+
/**
942+
* Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.Resources.CreatedOrUpdated
943+
* event.
944+
*/
945+
public static final String RESOURCE_NOTIFICATIONS_RESOURCE_MANAGEMENT_CREATED_OR_UPDATED =
946+
"Microsoft.ResourceNotifications.Resources.CreatedOrUpdated";
947+
948+
/**
949+
* Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.Resources.Deleted event.
950+
*/
951+
public static final String RESOURCE_NOTIFICATIONS_RESOURCE_MANAGEMENT_DELETED =
952+
"Microsoft.ResourceNotifications.Resources.Deleted";
953+
939954
/**
940955
* Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteCancel event. This is
941956
* raised when a resource create or update operation is canceled.
@@ -1312,6 +1327,12 @@ public final class SystemEventNames {
13121327
put(
13131328
RESOURCE_NOTIFICATIONS_HEALTH_RESOURCES_AVAILABILITY_STATUS_CHANGED,
13141329
ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.class);
1330+
put(
1331+
RESOURCE_NOTIFICATIONS_RESOURCE_MANAGEMENT_CREATED_OR_UPDATED,
1332+
ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.class);
1333+
put(
1334+
RESOURCE_NOTIFICATIONS_RESOURCE_MANAGEMENT_DELETED,
1335+
ResourceNotificationsResourceManagementDeletedEventData.class);
13151336
put(RESOURCE_WRITE_CANCEL, ResourceWriteCancelEventData.class);
13161337
put(RESOURCE_WRITE_FAILURE, ResourceWriteFailureEventData.class);
13171338
put(RESOURCE_WRITE_SUCCESS, ResourceWriteSuccessEventData.class);

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ public final class AcsChatThreadCreatedWithUserEventData extends AcsChatThreadEv
2525
@JsonProperty(value = "properties")
2626
private Map<String, Object> properties;
2727

28+
/*
29+
* The thread metadata
30+
*/
31+
@JsonProperty(value = "metadata")
32+
private Map<String, String> metadata;
33+
2834
/*
2935
* The list of properties of participants who are part of the thread
3036
*/
@@ -77,6 +83,26 @@ public AcsChatThreadCreatedWithUserEventData setProperties(Map<String, Object> p
7783
return this;
7884
}
7985

86+
/**
87+
* Get the metadata property: The thread metadata.
88+
*
89+
* @return the metadata value.
90+
*/
91+
public Map<String, String> getMetadata() {
92+
return this.metadata;
93+
}
94+
95+
/**
96+
* Set the metadata property: The thread metadata.
97+
*
98+
* @param metadata the metadata value to set.
99+
* @return the AcsChatThreadCreatedWithUserEventData object itself.
100+
*/
101+
public AcsChatThreadCreatedWithUserEventData setMetadata(Map<String, String> metadata) {
102+
this.metadata = metadata;
103+
return this;
104+
}
105+
80106
/**
81107
* Get the participants property: The list of properties of participants who are part of the thread.
82108
*

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import com.azure.core.annotation.Fluent;
88
import com.fasterxml.jackson.annotation.JsonProperty;
9+
import java.util.Map;
910

1011
/** Schema of the chat thread participant. */
1112
@Fluent
@@ -22,6 +23,12 @@ public final class AcsChatThreadParticipantProperties {
2223
@JsonProperty(value = "participantCommunicationIdentifier")
2324
private CommunicationIdentifierModel participantCommunicationIdentifier;
2425

26+
/*
27+
* The metadata of the user
28+
*/
29+
@JsonProperty(value = "metadata")
30+
private Map<String, String> metadata;
31+
2532
/** Creates an instance of AcsChatThreadParticipantProperties class. */
2633
public AcsChatThreadParticipantProperties() {}
2734

@@ -65,4 +72,24 @@ public AcsChatThreadParticipantProperties setParticipantCommunicationIdentifier(
6572
this.participantCommunicationIdentifier = participantCommunicationIdentifier;
6673
return this;
6774
}
75+
76+
/**
77+
* Get the metadata property: The metadata of the user.
78+
*
79+
* @return the metadata value.
80+
*/
81+
public Map<String, String> getMetadata() {
82+
return this.metadata;
83+
}
84+
85+
/**
86+
* Set the metadata property: The metadata of the user.
87+
*
88+
* @param metadata the metadata value to set.
89+
* @return the AcsChatThreadParticipantProperties object itself.
90+
*/
91+
public AcsChatThreadParticipantProperties setMetadata(Map<String, String> metadata) {
92+
this.metadata = metadata;
93+
return this;
94+
}
6895
}

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ public final class AcsChatThreadPropertiesUpdatedEventData extends AcsChatThread
3030
@JsonProperty(value = "properties")
3131
private Map<String, Object> properties;
3232

33+
/*
34+
* The thread metadata
35+
*/
36+
@JsonProperty(value = "metadata")
37+
private Map<String, String> metadata;
38+
3339
/** Creates an instance of AcsChatThreadPropertiesUpdatedEventData class. */
3440
public AcsChatThreadPropertiesUpdatedEventData() {}
3541

@@ -96,6 +102,26 @@ public AcsChatThreadPropertiesUpdatedEventData setProperties(Map<String, Object>
96102
return this;
97103
}
98104

105+
/**
106+
* Get the metadata property: The thread metadata.
107+
*
108+
* @return the metadata value.
109+
*/
110+
public Map<String, String> getMetadata() {
111+
return this.metadata;
112+
}
113+
114+
/**
115+
* Set the metadata property: The thread metadata.
116+
*
117+
* @param metadata the metadata value to set.
118+
* @return the AcsChatThreadPropertiesUpdatedEventData object itself.
119+
*/
120+
public AcsChatThreadPropertiesUpdatedEventData setMetadata(Map<String, String> metadata) {
121+
this.metadata = metadata;
122+
return this;
123+
}
124+
99125
/** {@inheritDoc} */
100126
@Override
101127
public AcsChatThreadPropertiesUpdatedEventData setCreateTime(OffsetDateTime createTime) {

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ public final class AcsChatThreadPropertiesUpdatedPerUserEventData extends AcsCha
2727
@JsonProperty(value = "editTime")
2828
private OffsetDateTime editTime;
2929

30+
/*
31+
* The thread metadata
32+
*/
33+
@JsonProperty(value = "metadata")
34+
private Map<String, String> metadata;
35+
3036
/*
3137
* The updated thread properties
3238
*/
@@ -79,6 +85,26 @@ public AcsChatThreadPropertiesUpdatedPerUserEventData setEditTime(OffsetDateTime
7985
return this;
8086
}
8187

88+
/**
89+
* Get the metadata property: The thread metadata.
90+
*
91+
* @return the metadata value.
92+
*/
93+
public Map<String, String> getMetadata() {
94+
return this.metadata;
95+
}
96+
97+
/**
98+
* Set the metadata property: The thread metadata.
99+
*
100+
* @param metadata the metadata value to set.
101+
* @return the AcsChatThreadPropertiesUpdatedPerUserEventData object itself.
102+
*/
103+
public AcsChatThreadPropertiesUpdatedPerUserEventData setMetadata(Map<String, String> metadata) {
104+
this.metadata = metadata;
105+
return this;
106+
}
107+
82108
/**
83109
* Get the properties property: The updated thread properties.
84110
*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
5+
package com.azure.messaging.eventgrid.systemevents;
6+
7+
import com.azure.core.annotation.Fluent;
8+
import com.fasterxml.jackson.annotation.JsonProperty;
9+
10+
/**
11+
* Describes the schema of the properties under resource info which are common across all ARN system topic delete
12+
* events.
13+
*/
14+
@Fluent
15+
public final class ResourceNotificationsResourceDeletedDetails {
16+
/*
17+
* id of the resource for which the event is being emitted
18+
*/
19+
@JsonProperty(value = "id")
20+
private String id;
21+
22+
/*
23+
* name of the resource for which the event is being emitted
24+
*/
25+
@JsonProperty(value = "name")
26+
private String name;
27+
28+
/*
29+
* the type of the resource for which the event is being emitted
30+
*/
31+
@JsonProperty(value = "type")
32+
private String type;
33+
34+
/** Creates an instance of ResourceNotificationsResourceDeletedDetails class. */
35+
public ResourceNotificationsResourceDeletedDetails() {}
36+
37+
/**
38+
* Get the id property: id of the resource for which the event is being emitted.
39+
*
40+
* @return the id value.
41+
*/
42+
public String getId() {
43+
return this.id;
44+
}
45+
46+
/**
47+
* Set the id property: id of the resource for which the event is being emitted.
48+
*
49+
* @param id the id value to set.
50+
* @return the ResourceNotificationsResourceDeletedDetails object itself.
51+
*/
52+
public ResourceNotificationsResourceDeletedDetails setId(String id) {
53+
this.id = id;
54+
return this;
55+
}
56+
57+
/**
58+
* Get the name property: name of the resource for which the event is being emitted.
59+
*
60+
* @return the name value.
61+
*/
62+
public String getName() {
63+
return this.name;
64+
}
65+
66+
/**
67+
* Set the name property: name of the resource for which the event is being emitted.
68+
*
69+
* @param name the name value to set.
70+
* @return the ResourceNotificationsResourceDeletedDetails object itself.
71+
*/
72+
public ResourceNotificationsResourceDeletedDetails setName(String name) {
73+
this.name = name;
74+
return this;
75+
}
76+
77+
/**
78+
* Get the type property: the type of the resource for which the event is being emitted.
79+
*
80+
* @return the type value.
81+
*/
82+
public String getType() {
83+
return this.type;
84+
}
85+
86+
/**
87+
* Set the type property: the type of the resource for which the event is being emitted.
88+
*
89+
* @param type the type value to set.
90+
* @return the ResourceNotificationsResourceDeletedDetails object itself.
91+
*/
92+
public ResourceNotificationsResourceDeletedDetails setType(String type) {
93+
this.type = type;
94+
return this;
95+
}
96+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
5+
package com.azure.messaging.eventgrid.systemevents;
6+
7+
import com.azure.core.annotation.Fluent;
8+
import com.fasterxml.jackson.annotation.JsonProperty;
9+
10+
/** Describes the schema of the common properties across all ARN system topic delete events. */
11+
@Fluent
12+
public class ResourceNotificationsResourceDeletedEventData {
13+
/*
14+
* resourceInfo details for delete event
15+
*/
16+
@JsonProperty(value = "resourceInfo")
17+
private ResourceNotificationsResourceDeletedDetails resourceDetails;
18+
19+
/*
20+
* details about operational info
21+
*/
22+
@JsonProperty(value = "operationalInfo")
23+
private ResourceNotificationsOperationalDetails operationalDetails;
24+
25+
/** Creates an instance of ResourceNotificationsResourceDeletedEventData class. */
26+
public ResourceNotificationsResourceDeletedEventData() {}
27+
28+
/**
29+
* Get the resourceDetails property: resourceInfo details for delete event.
30+
*
31+
* @return the resourceDetails value.
32+
*/
33+
public ResourceNotificationsResourceDeletedDetails getResourceDetails() {
34+
return this.resourceDetails;
35+
}
36+
37+
/**
38+
* Set the resourceDetails property: resourceInfo details for delete event.
39+
*
40+
* @param resourceDetails the resourceDetails value to set.
41+
* @return the ResourceNotificationsResourceDeletedEventData object itself.
42+
*/
43+
public ResourceNotificationsResourceDeletedEventData setResourceDetails(
44+
ResourceNotificationsResourceDeletedDetails resourceDetails) {
45+
this.resourceDetails = resourceDetails;
46+
return this;
47+
}
48+
49+
/**
50+
* Get the operationalDetails property: details about operational info.
51+
*
52+
* @return the operationalDetails value.
53+
*/
54+
public ResourceNotificationsOperationalDetails getOperationalDetails() {
55+
return this.operationalDetails;
56+
}
57+
58+
/**
59+
* Set the operationalDetails property: details about operational info.
60+
*
61+
* @param operationalDetails the operationalDetails value to set.
62+
* @return the ResourceNotificationsResourceDeletedEventData object itself.
63+
*/
64+
public ResourceNotificationsResourceDeletedEventData setOperationalDetails(
65+
ResourceNotificationsOperationalDetails operationalDetails) {
66+
this.operationalDetails = operationalDetails;
67+
return this;
68+
}
69+
}

0 commit comments

Comments
 (0)