Skip to content

Commit a58614a

Browse files
l0lawrencesarangan12ripark
authored
[EG] System events reformat (#28706)
* refactor * updayrd * format * add apicenter * update new events * tsp format * new events * modelAsString for Media Union as False * tsp format * Revert "tsp format" This reverts commit 1a01cf8de33e48e80ccde56cf1748f68a4ff86b8. * Revert "modelAsString for Media Union as False" This reverts commit 6b605812192def3ba6baef1894f53ea5ea71c854. * remove ReadOnly * rename resources * remove duplicate vault * remove Optional from Nullable Types part 1 * add csharp to x-ms-client-names * typo * swagger typo * formatting * Client Name Overrides JS EG System Events * Adding in renames for Go * fix RecordingDurationMs casing * Fixing something that Libba refused to for like months now. * Removing SystemEvents from the constant names * Should be a number == float64. * Field name is labelOperator, not operator. (as shown here: https://github.com/Azure/azure-rest-api-specs/blob/0a8300f818c1df4018e2586540bed4c72c7c5375/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json#L2120) * Field is state, not selectorState: https://github.com/Azure/azure-rest-api-specs/blob/0a8300f818c1df4018e2586540bed4c72c7c5375/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json#L2171 * More renames to bring us to par with what we had before. * Adding in some docs that were missing for unions. * format * fix warnigns * moving around clientNames * spellcheck * try to update csharp clientNames * tsp format * missing labelValue x-ms-client-name * format * nit typo * update csharp --------- Co-authored-by: Sarangan Rajamanickam <[email protected]> Co-authored-by: ripark <[email protected]>
1 parent 8713240 commit a58614a

File tree

56 files changed

+4790
-2325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+4790
-2325
lines changed

cSpell.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,12 @@
378378
"clientsession"
379379
]
380380
},
381+
{
382+
"filename": "**/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2024-01-01/SystemEvents.json",
383+
"words": [
384+
"whatsapp"
385+
]
386+
},
381387
{
382388
"filename": "**/specification/eventgrid/data-plane/Microsoft.EventGrid/**/EventGrid.json",
383389
"words": [

specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/AVS.tsp renamed to specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.AVS/AVS.tsp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ model AvsClusterFailedEventData extends AvsClusterEventData {
3939
failureMessage?: string;
4040
}
4141

42+
/** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ScriptExecutionStarted event. */
43+
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "Maintain compatibility with existing models."
44+
model AvsScriptExecutionStartedEventData extends AvsScriptExecutionEventData {}
45+
4246
/** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ScriptExecutionFinished event. */
4347
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "Maintain compatibility with existing models."
4448
model AvsScriptExecutionFinishedEventData extends AvsScriptExecutionEventData {
4549
/** Named outputs of completed execution, if any. */
46-
namedOutputs?: Record<string>;
50+
namedOutputs: Record<string>;
4751
}
4852

4953
/** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ScriptExecutionCancelled event. */
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
import "@azure-tools/typespec-client-generator-core";
2+
3+
using Azure.ClientGenerator.Core;
4+
//Models
5+
@@usage(Microsoft.EventGrid.SystemEvents.AvsPrivateCloudUpdatingEventData,
6+
Usage.output
7+
);
8+
@@access(Microsoft.EventGrid.SystemEvents.AvsPrivateCloudUpdatingEventData,
9+
Access.public
10+
);
11+
@@usage(Microsoft.EventGrid.SystemEvents.AvsPrivateCloudUpdatedEventData,
12+
Usage.output
13+
);
14+
@@access(Microsoft.EventGrid.SystemEvents.AvsPrivateCloudUpdatedEventData,
15+
Access.public
16+
);
17+
@@usage(Microsoft.EventGrid.SystemEvents.AvsPrivateCloudFailedEventData,
18+
Usage.output
19+
);
20+
@@access(Microsoft.EventGrid.SystemEvents.AvsPrivateCloudFailedEventData,
21+
Access.public
22+
);
23+
@@usage(Microsoft.EventGrid.SystemEvents.AvsClusterCreatedEventData,
24+
Usage.output
25+
);
26+
@@access(Microsoft.EventGrid.SystemEvents.AvsClusterCreatedEventData,
27+
Access.public
28+
);
29+
@@usage(Microsoft.EventGrid.SystemEvents.AvsClusterDeletedEventData,
30+
Usage.output
31+
);
32+
@@access(Microsoft.EventGrid.SystemEvents.AvsClusterDeletedEventData,
33+
Access.public
34+
);
35+
@@usage(Microsoft.EventGrid.SystemEvents.AvsClusterUpdatingEventData,
36+
Usage.output
37+
);
38+
@@access(Microsoft.EventGrid.SystemEvents.AvsClusterUpdatingEventData,
39+
Access.public
40+
);
41+
@@usage(Microsoft.EventGrid.SystemEvents.AvsClusterUpdatedEventData,
42+
Usage.output
43+
);
44+
@@access(Microsoft.EventGrid.SystemEvents.AvsClusterUpdatedEventData,
45+
Access.public
46+
);
47+
@@usage(Microsoft.EventGrid.SystemEvents.AvsClusterFailedEventData,
48+
Usage.output
49+
);
50+
@@access(Microsoft.EventGrid.SystemEvents.AvsClusterFailedEventData,
51+
Access.public
52+
);
53+
@@usage(Microsoft.EventGrid.SystemEvents.AvsScriptExecutionStartedEventData,
54+
Usage.output
55+
);
56+
@@access(Microsoft.EventGrid.SystemEvents.AvsScriptExecutionStartedEventData,
57+
Access.public
58+
);
59+
@@usage(Microsoft.EventGrid.SystemEvents.AvsScriptExecutionFinishedEventData,
60+
Usage.output
61+
);
62+
@@access(Microsoft.EventGrid.SystemEvents.AvsScriptExecutionFinishedEventData,
63+
Access.public
64+
);
65+
@@usage(Microsoft.EventGrid.SystemEvents.AvsScriptExecutionCancelledEventData,
66+
Usage.output
67+
);
68+
@@access(Microsoft.EventGrid.SystemEvents.AvsScriptExecutionCancelledEventData,
69+
Access.public
70+
);
71+
@@usage(Microsoft.EventGrid.SystemEvents.AvsScriptExecutionFailedEventData,
72+
Usage.output
73+
);
74+
@@access(Microsoft.EventGrid.SystemEvents.AvsScriptExecutionFailedEventData,
75+
Access.public
76+
);
77+
@@usage(Microsoft.EventGrid.SystemEvents.AvsPrivateCloudEventData,
78+
Usage.output
79+
);
80+
@@access(Microsoft.EventGrid.SystemEvents.AvsPrivateCloudEventData,
81+
Access.public
82+
);
83+
@@usage(Microsoft.EventGrid.SystemEvents.AvsClusterEventData, Usage.output);
84+
@@access(Microsoft.EventGrid.SystemEvents.AvsClusterEventData, Access.public);
85+
@@usage(Microsoft.EventGrid.SystemEvents.AvsScriptExecutionEventData,
86+
Usage.output
87+
);
88+
@@access(Microsoft.EventGrid.SystemEvents.AvsScriptExecutionEventData,
89+
Access.public
90+
);
91+
//Enums
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/** Describes the schema of the Azure API Center events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent. */
2+
namespace Microsoft.EventGrid.SystemEvents;
3+
4+
/** Schema of the data property of an EventGridEvent for a Microsoft.ApiCenter.ApiDefinitionAdded event. */
5+
model ApiCenterApiDefinitionAddedEventData {
6+
/** API definition title. */
7+
title?: string;
8+
9+
/** API definition description. */
10+
description?: string;
11+
12+
/** API definition specification. */
13+
specification: ApiCenterApiSpecification;
14+
}
15+
16+
/** Schema of the data property of an EventGridEvent for a Microsoft.ApiCenter.ApiDefinitionUpdated event. */
17+
model ApiCenterApiDefinitionUpdatedEventData {
18+
/** API definition title. */
19+
title?: string;
20+
21+
/** API definition description. */
22+
description?: string;
23+
24+
/** API definition specification. */
25+
specification: ApiCenterApiSpecification;
26+
}
27+
28+
/** API specification details. */
29+
model ApiCenterApiSpecification {
30+
/** Specification name. */
31+
name?: string;
32+
33+
/** Specification version. */
34+
version?: string;
35+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import "@azure-tools/typespec-client-generator-core";
2+
3+
using Azure.ClientGenerator.Core;
4+
//Models
5+
@@usage(Microsoft.EventGrid.SystemEvents.ApiCenterApiDefinitionAddedEventData,
6+
Usage.output
7+
);
8+
@@access(Microsoft.EventGrid.SystemEvents.ApiCenterApiDefinitionAddedEventData,
9+
Access.public
10+
);
11+
@@usage(Microsoft.EventGrid.SystemEvents.ApiCenterApiDefinitionUpdatedEventData,
12+
Usage.output
13+
);
14+
@@access(Microsoft.EventGrid.SystemEvents.ApiCenterApiDefinitionUpdatedEventData,
15+
Access.public
16+
);
17+
@@usage(Microsoft.EventGrid.SystemEvents.ApiCenterApiSpecification,
18+
Usage.output
19+
);
20+
@@access(Microsoft.EventGrid.SystemEvents.ApiCenterApiSpecification,
21+
Access.public
22+
);
23+
//Enums
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
import "@azure-tools/typespec-client-generator-core";
2+
3+
using Azure.ClientGenerator.Core;
4+
//Models
5+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementUserCreatedEventData,
6+
Usage.output
7+
);
8+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementUserCreatedEventData,
9+
Access.public
10+
);
11+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementUserUpdatedEventData,
12+
Usage.output
13+
);
14+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementUserUpdatedEventData,
15+
Access.public
16+
);
17+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementUserDeletedEventData,
18+
Usage.output
19+
);
20+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementUserDeletedEventData,
21+
Access.public
22+
);
23+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementSubscriptionCreatedEventData,
24+
Usage.output
25+
);
26+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementSubscriptionCreatedEventData,
27+
Access.public
28+
);
29+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementSubscriptionUpdatedEventData,
30+
Usage.output
31+
);
32+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementSubscriptionUpdatedEventData,
33+
Access.public
34+
);
35+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementSubscriptionDeletedEventData,
36+
Usage.output
37+
);
38+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementSubscriptionDeletedEventData,
39+
Access.public
40+
);
41+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementProductCreatedEventData,
42+
Usage.output
43+
);
44+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementProductCreatedEventData,
45+
Access.public
46+
);
47+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementProductUpdatedEventData,
48+
Usage.output
49+
);
50+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementProductUpdatedEventData,
51+
Access.public
52+
);
53+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementProductDeletedEventData,
54+
Usage.output
55+
);
56+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementProductDeletedEventData,
57+
Access.public
58+
);
59+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementApiCreatedEventData,
60+
Usage.output
61+
);
62+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementApiCreatedEventData,
63+
Access.public
64+
);
65+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData,
66+
Usage.output
67+
);
68+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData,
69+
Access.public
70+
);
71+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementApiDeletedEventData,
72+
Usage.output
73+
);
74+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementApiDeletedEventData,
75+
Access.public
76+
);
77+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementApiReleaseCreatedEventData,
78+
Usage.output
79+
);
80+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementApiReleaseCreatedEventData,
81+
Access.public
82+
);
83+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData,
84+
Usage.output
85+
);
86+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData,
87+
Access.public
88+
);
89+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData,
90+
Usage.output
91+
);
92+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData,
93+
Access.public
94+
);
95+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayCreatedEventData,
96+
Usage.output
97+
);
98+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayCreatedEventData,
99+
Access.public
100+
);
101+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData,
102+
Usage.output
103+
);
104+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData,
105+
Access.public
106+
);
107+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayDeletedEventData,
108+
Usage.output
109+
);
110+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayDeletedEventData,
111+
Access.public
112+
);
113+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData,
114+
Usage.output
115+
);
116+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData,
117+
Access.public
118+
);
119+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData,
120+
Usage.output
121+
);
122+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData,
123+
Access.public
124+
);
125+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData,
126+
Usage.output
127+
);
128+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData,
129+
Access.public
130+
);
131+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData,
132+
Usage.output
133+
);
134+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData,
135+
Access.public
136+
);
137+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityUpdatedEventData,
138+
Usage.output
139+
);
140+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityUpdatedEventData,
141+
Access.public
142+
);
143+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityDeletedEventData,
144+
Usage.output
145+
);
146+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityDeletedEventData,
147+
Access.public
148+
);
149+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData,
150+
Usage.output
151+
);
152+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData,
153+
Access.public
154+
);
155+
@@usage(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData,
156+
Usage.output
157+
);
158+
@@access(Microsoft.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData,
159+
Access.public
160+
);
161+
//Enums
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import "@azure-tools/typespec-client-generator-core";
2+
3+
using Azure.ClientGenerator.Core;
4+
//Models
5+
@@usage(Microsoft.EventGrid.SystemEvents.AppConfigurationKeyValueModifiedEventData,
6+
Usage.output
7+
);
8+
@@access(Microsoft.EventGrid.SystemEvents.AppConfigurationKeyValueModifiedEventData,
9+
Access.public
10+
);
11+
@@usage(Microsoft.EventGrid.SystemEvents.AppConfigurationKeyValueDeletedEventData,
12+
Usage.output
13+
);
14+
@@access(Microsoft.EventGrid.SystemEvents.AppConfigurationKeyValueDeletedEventData,
15+
Access.public
16+
);
17+
@@usage(Microsoft.EventGrid.SystemEvents.AppConfigurationSnapshotEventData,
18+
Usage.output
19+
);
20+
@@access(Microsoft.EventGrid.SystemEvents.AppConfigurationSnapshotEventData,
21+
Access.public
22+
);
23+
@@usage(Microsoft.EventGrid.SystemEvents.AppConfigurationSnapshotCreatedEventData,
24+
Usage.output
25+
);
26+
@@access(Microsoft.EventGrid.SystemEvents.AppConfigurationSnapshotCreatedEventData,
27+
Access.public
28+
);
29+
@@usage(Microsoft.EventGrid.SystemEvents.AppConfigurationSnapshotModifiedEventData,
30+
Usage.output
31+
);
32+
@@access(Microsoft.EventGrid.SystemEvents.AppConfigurationSnapshotModifiedEventData,
33+
Access.public
34+
);
35+
//Enums

specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/RedisCache.tsp renamed to specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Cache/RedisCache.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
namespace Microsoft.EventGrid.SystemEvents {
33
alias RedisBaseEventData = {
44
/** The time at which the event occurred. */
5-
timestamp?: utcDateTime;
5+
timestamp: utcDateTime;
66

77
/** The name of this event. */
88
name?: string;

0 commit comments

Comments
 (0)