diff --git a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.ApiManagement/ApiManagement.tsp b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.ApiManagement/ApiManagement.tsp index 5ff9ff8b32ab..6bbce213d5c5 100644 --- a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.ApiManagement/ApiManagement.tsp +++ b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.ApiManagement/ApiManagement.tsp @@ -1,4 +1,6 @@ import "./ApiManagementExample.tsp"; +using TypeSpec.Versioning; + /** Describes the schema of the Azure API Management events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent. */ namespace Microsoft.EventGrid.SystemEvents; @@ -204,12 +206,14 @@ model ApiManagementCircuitBreakerProperties { /** Information related to a gateway token that has expired for a self-hosted gateway deployment. */ model ApiManagementExpiredGatewayTokenProperties { /** Timestamp when the gateway token has expired. */ + @madeRequired(ServiceApiVersions.v2024_01_01) expiredAtUtc: utcDateTime; } /** Information related to a gateway token that is near expiry for a self-hosted gateway deployment. */ model ApiManagementNearExpiryGatewayTokenProperties { /** Timestamp when the gateway token will expire. */ + @madeRequired(ServiceApiVersions.v2024_01_01) expiredAtUtc: utcDateTime; } diff --git a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Communication/AzureCommunicationServices.tsp b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Communication/AzureCommunicationServices.tsp index 794d09ab4a3c..77c637f817bc 100644 --- a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Communication/AzureCommunicationServices.tsp +++ b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Communication/AzureCommunicationServices.tsp @@ -1133,6 +1133,7 @@ model AcsCallEndedByProperties { communicationIdentifier: CommunicationIdentifierModel; /** The type of call ended by. */ + @madeRequired(ServiceApiVersions.v2024_01_01) type: AcsCallEndedByKind; /** The name of the call ended by. */ @@ -1316,6 +1317,9 @@ union CommunicationIdentifierModelKind { /** Microsoft Teams User */ "microsoftTeamsUser", + /** Microsoft Teams App */ + "microsoftTeamsApp", + string, } diff --git a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Communication/client.tsp b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Communication/client.tsp index e79d186c0b4d..4f6ae92885dc 100644 --- a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Communication/client.tsp +++ b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Communication/client.tsp @@ -606,6 +606,9 @@ using Azure.ClientGenerator.Core; @@useSystemTextJsonConverter(Microsoft.EventGrid.SystemEvents.AcsCallParticipantAddedEventData, "csharp" ); +@@useSystemTextJsonConverter(Microsoft.EventGrid.SystemEvents.AcsCallParticipantEventData, + "csharp" +); @@useSystemTextJsonConverter(Microsoft.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData, "csharp" ); diff --git a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.EventGrid/client.tsp b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.EventGrid/client.tsp index 5ff535011d87..14e32d082cc0 100644 --- a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.EventGrid/client.tsp +++ b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.EventGrid/client.tsp @@ -86,3 +86,6 @@ using Azure.ClientGenerator.Core; @@useSystemTextJsonConverter(Microsoft.EventGrid.SystemEvents.EventGridMQTTClientSessionDisconnectedEventData, "csharp" ); +@@useSystemTextJsonConverter(Microsoft.EventGrid.SystemEvents.SubscriptionValidationResponse, + "csharp" +); diff --git a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/propertyNameOverride.tsp b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/propertyNameOverride.tsp index ed8e16d2e733..c4f2f1cd5c6f 100644 --- a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/propertyNameOverride.tsp +++ b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/propertyNameOverride.tsp @@ -17,168 +17,97 @@ import "@azure-tools/typespec-client-generator-core"; using Microsoft.EventGrid.SystemEvents; using Azure.ClientGenerator.Core; +// Renames applying to all languages @@clientName(ApiManagementNearExpiryGatewayTokenProperties.expiredAtUtc, - "expiresOn", - "autorest" + "expiresOn" ); @@clientName(ApiManagementExpiredGatewayTokenProperties.expiredAtUtc, - "expiresOn", - "autorest" + "expiresOn" ); @@clientName(ApiManagementGatewayTokenNearExpiryEventData.gatewayInfo, - "gateway", - "autorest" -); -@@clientName(ApiManagementGatewayTokenNearExpiryEventData.tokenInfo, - "token", - "autorest" -); -@@clientName(ApiManagementGatewayTokenExpiredEventData.gatewayInfo, - "gateway", - "autorest" -); -@@clientName(ApiManagementGatewayTokenExpiredEventData.tokenInfo, - "token", - "autorest" -); -@@clientName(AcsIncomingCallEventData.to, - "toCommunicationIdentifier", - "autorest" -); -@@clientName(AcsIncomingCallEventData.from, - "fromCommunicationIdentifier", - "autorest" -); -@@clientName(AcsRouterWorkerSelector.value, "labelValue", "autorest"); - + "gateway" +); +@@clientName(ApiManagementGatewayTokenNearExpiryEventData.tokenInfo, "token"); +@@clientName(ApiManagementGatewayTokenExpiredEventData.gatewayInfo, "gateway"); +@@clientName(ApiManagementGatewayTokenExpiredEventData.tokenInfo, "token"); +@@clientName(AcsIncomingCallEventData.to, "toCommunicationIdentifier"); +@@clientName(AcsIncomingCallEventData.from, "fromCommunicationIdentifier"); +@@clientName(AcsRouterWorkerSelector.value, "labelValue"); @@clientName(AcsEmailEngagementTrackingReportReceivedEventData.engagementType, - "engagement", - "autorest" + "engagement" ); - -@@clientName(EventHubCaptureFileCreatedEventData.fileUrl, - "fileurl", - "autorest" -); - +@@clientName(EventHubCaptureFileCreatedEventData.fileUrl, "fileurl"); @@clientName(HealthcareFhirResourceCreatedEventData.resourceFhirAccount, - "FhirServiceHostName", - "autorest" + "FhirServiceHostName" ); @@clientName(HealthcareFhirResourceCreatedEventData.resourceFhirId, - "FhirResourceId", - "autorest" + "FhirResourceId" ); @@clientName(HealthcareFhirResourceCreatedEventData.resourceVersionId, - "FhirResourceVersionId", - "autorest" + "FhirResourceVersionId" ); @@clientName(HealthcareFhirResourceCreatedEventData.resourceType, - "FhirResourceType", - "autorest" + "FhirResourceType" ); @@clientName(HealthcareFhirResourceUpdatedEventData.resourceFhirAccount, - "FhirServiceHostName", - "autorest" + "FhirServiceHostName" ); @@clientName(HealthcareFhirResourceUpdatedEventData.resourceFhirId, - "FhirResourceId", - "autorest" + "FhirResourceId" ); @@clientName(HealthcareFhirResourceUpdatedEventData.resourceVersionId, - "FhirResourceVersionId", - "autorest" + "FhirResourceVersionId" ); @@clientName(HealthcareFhirResourceUpdatedEventData.resourceType, - "FhirResourceType", - "autorest" + "FhirResourceType" ); @@clientName(HealthcareFhirResourceDeletedEventData.resourceFhirAccount, "FhirServiceHostName", "autorest" ); @@clientName(HealthcareFhirResourceDeletedEventData.resourceFhirId, - "FhirResourceId", - "autorest" + "FhirResourceId" ); @@clientName(HealthcareFhirResourceDeletedEventData.resourceVersionId, - "FhirResourceVersionId", - "autorest" + "FhirResourceVersionId" ); @@clientName(HealthcareFhirResourceDeletedEventData.resourceType, - "FhirResourceType", - "autorest" + "FhirResourceType" ); - -@@clientName(DeviceTwinMetadata.lastUpdated, "$lastUpdated", "autorest"); -@@clientName(DeviceTwinProperties.metadata, "$metadata", "autorest"); -@@clientName(DeviceTwinProperties.version, "$version", "autorest"); - @@clientName(ResourceNotificationsResourceUpdatedEventData.resourceInfo, - "resourceDetails", - "autorest" + "resourceDetails" ); @@clientName(ResourceNotificationsResourceUpdatedEventData.operationalInfo, - "operationalDetails", - "autorest" + "operationalDetails" ); @@clientName(ResourceNotificationsResourceDeletedEventData.resourceInfo, - "resourceDetails", - "autorest" + "resourceDetails" ); @@clientName(ResourceNotificationsResourceDeletedEventData.operationalInfo, - "operationalDetails", - "autorest" -); - -@@clientName(StorageTaskAssignmentQueuedEventData.queuedDateTime, - "queuedOn", - "autorest" + "operationalDetails" ); +@@clientName(StorageTaskAssignmentQueuedEventData.queuedDateTime, "queuedOn"); @@clientName(StorageTaskAssignmentCompletedEventData.completedDateTime, - "completedOn", - "autorest" + "completedOn" ); @@clientName(StorageTaskAssignmentCompletedEventData.summaryReportBlobUrl, - "summaryReportBlobUri", - "autorest" + "summaryReportBlobUri" ); - -@@clientName(AcsMessageDeliveryStatusUpdatedEventData.channelType, - "channelKind", - "autorest" +@@clientName(StorageTaskCompletedEventData.summaryReportBlobUrl, + "summaryReportBlobUri" ); - -@@clientName(AcsMessageReceivedEventData.channelType, - "channelKind", - "autorest" -); - -@@clientName(AcsMessageReceivedEventData.media, "mediaContent", "autorest"); - -@@clientName(AcsMessageReceivedEventData.interactive, - "interactiveContent", - "autorest" -); - -@@clientName(AcsMessageMediaContent.id, "mediaId", "autorest"); - -@@clientName(AcsMessageContext.id, "messageId", "autorest"); - -@@clientName(AcsMessageInteractiveContent.type, "replyKind", "autorest"); - -@@clientName(AcsMessageInteractiveButtonReplyContent.id, - "buttonId", - "autorest" -); - -@@clientName(AcsMessageInteractiveListReplyContent.id, - "listItemId", - "autorest" -); -@@clientName(AcsCallEndedByProperties.type, "kind", "autorest"); - -// Renames applying to all languages +@@clientName(AcsMessageDeliveryStatusUpdatedEventData.channelType, + "channelKind" +); +@@clientName(AcsMessageReceivedEventData.channelType, "channelKind"); +@@clientName(AcsMessageReceivedEventData.media, "mediaContent"); +@@clientName(AcsMessageReceivedEventData.interactive, "interactiveContent"); +@@clientName(AcsMessageMediaContent.id, "mediaId"); +@@clientName(AcsMessageContext.id, "messageId"); +@@clientName(AcsMessageInteractiveContent.type, "replyKind"); +@@clientName(AcsMessageInteractiveButtonReplyContent.id, "buttonId"); +@@clientName(AcsMessageInteractiveListReplyContent.id, "listItemId"); +@@clientName(AcsCallEndedByProperties.type, "kind"); @@clientName(recordingChannelType, "AcsRecordingChannelType"); @@clientName(recordingContentType, "AcsRecordingContentType"); @@clientName(recordingFormatType, "AcsRecordingFormatType"); @@ -202,3 +131,8 @@ using Azure.ClientGenerator.Core; @@clientName(KeyVaultSecretNearExpiryEventData.EXP, "Exp"); @@clientName(KeyVaultSecretNewVersionCreatedEventData.NBF, "Nbf"); @@clientName(KeyVaultSecretNewVersionCreatedEventData.EXP, "Exp"); + +// autorest specific renames +@@clientName(DeviceTwinMetadata.lastUpdated, "$lastUpdated", "autorest"); +@@clientName(DeviceTwinProperties.metadata, "$metadata", "autorest"); +@@clientName(DeviceTwinProperties.version, "$version", "autorest"); diff --git a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/propertyNameOverrideCsharp.tsp b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/propertyNameOverrideCsharp.tsp index ee906930a7ba..7be43c2314c1 100644 --- a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/propertyNameOverrideCsharp.tsp +++ b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/propertyNameOverrideCsharp.tsp @@ -246,5 +246,4 @@ using Microsoft.EventGrid.SystemEvents; ); @@clientName(AcsRouterWorkerSelector.state, "SelectorState", "csharp"); -@@clientName(AcsRouterWorkerSelector.ttlSeconds, "TimeToLive", "csharp"); @@clientName(AcsRouterWorkerSelector.value, "labelValue", "csharp"); diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/GeneratedSystemEvents.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/GeneratedSystemEvents.json index 2a75065bcdcd..0d424096937f 100644 --- a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/GeneratedSystemEvents.json +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/GeneratedSystemEvents.json @@ -86,7 +86,6 @@ }, "required": [ "communicationIdentifier", - "type", "name" ] }, @@ -3127,10 +3126,7 @@ "description": "Timestamp when the gateway token has expired.", "x-ms-client-name": "expiresOn" } - }, - "required": [ - "expiredAtUtc" - ] + } }, "ApiManagementGatewayApiAddedEventData": { "type": "object", @@ -3310,10 +3306,7 @@ "description": "Timestamp when the gateway token will expire.", "x-ms-client-name": "expiresOn" } - }, - "required": [ - "expiredAtUtc" - ] + } }, "ApiManagementProductCreatedEventData": { "type": "object", @@ -3912,7 +3905,8 @@ "unknown", "communicationUser", "phoneNumber", - "microsoftTeamsUser" + "microsoftTeamsUser", + "microsoftTeamsApp" ], "x-ms-enum": { "name": "CommunicationIdentifierModelKind", @@ -3937,6 +3931,11 @@ "name": "microsoftTeamsUser", "value": "microsoftTeamsUser", "description": "Microsoft Teams User" + }, + { + "name": "microsoftTeamsApp", + "value": "microsoftTeamsApp", + "description": "Microsoft Teams App" } ] } @@ -8840,7 +8839,8 @@ "summaryReportBlobUrl": { "type": "string", "format": "uri", - "description": "The summary report blob url for a storage task" + "description": "The summary report blob url for a storage task", + "x-ms-client-name": "summaryReportBlobUri" } }, "required": [ diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2024-01-01/GeneratedSystemEvents.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2024-01-01/GeneratedSystemEvents.json index 2eb621c1f2a0..70750f080f23 100644 --- a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2024-01-01/GeneratedSystemEvents.json +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2024-01-01/GeneratedSystemEvents.json @@ -3987,7 +3987,8 @@ "unknown", "communicationUser", "phoneNumber", - "microsoftTeamsUser" + "microsoftTeamsUser", + "microsoftTeamsApp" ], "x-ms-enum": { "name": "CommunicationIdentifierModelKind", @@ -4012,6 +4013,11 @@ "name": "microsoftTeamsUser", "value": "microsoftTeamsUser", "description": "Microsoft Teams User" + }, + { + "name": "microsoftTeamsApp", + "value": "microsoftTeamsApp", + "description": "Microsoft Teams App" } ] } @@ -8992,7 +8998,8 @@ "summaryReportBlobUrl": { "type": "string", "format": "uri", - "description": "The summary report blob url for a storage task" + "description": "The summary report blob url for a storage task", + "x-ms-client-name": "summaryReportBlobUri" } }, "required": [