From a04788100418ac3d4ca155ddb64fa1b702edc7ab Mon Sep 17 00:00:00 2001 From: l0lawrence Date: Wed, 24 Apr 2024 15:35:17 -0700 Subject: [PATCH] Revert "modelAsString for Media Union as False" This reverts commit 6b605812192def3ba6baef1894f53ea5ea71c854. --- .../Microsoft.Media/MediaServices.tsp | 10 ++++++---- .../stable/2024-01-01/SystemEvents.json | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Media/MediaServices.tsp b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Media/MediaServices.tsp index c3cc07cc1313..cc7faf2af749 100644 --- a/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Media/MediaServices.tsp +++ b/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents/Microsoft.Media/MediaServices.tsp @@ -1,6 +1,5 @@ /** Describes the schema of the Azure Media Services events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent. */ namespace Microsoft.EventGrid.SystemEvents { - # suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" "Suppressing literal union type for compatibility with existing models." /** State of a Media Job. */ union MediaJobState { /** The job was canceled. This is a final state for the job. */ @@ -23,9 +22,10 @@ namespace Microsoft.EventGrid.SystemEvents { /** The job is being scheduled to run on an available resource. This is a transient state, between queued and processing states. */ "Scheduled", + + string, } - # suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" "Suppressing literal union type for compatibility with existing models." /** Media Job Error Codes. */ union MediaJobErrorCode { /** Fatal service error, please contact support. */ @@ -57,9 +57,10 @@ namespace Microsoft.EventGrid.SystemEvents { /** There is an error verifying to the account identity. Check and fix the identity configurations and retry. If unsuccessful, please contact support. */ "IdentityUnsupported", + + string, } - # suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" "Suppressing literal union type for compatibility with existing models." /** Error categories for Media Job Errors. */ union MediaJobErrorCategory { /** The error is service related. */ @@ -80,9 +81,9 @@ namespace Microsoft.EventGrid.SystemEvents { /** The error is related to account information. */ "Account", + string, } - # suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" "Suppressing literal union type for compatibility with existing models." /** Media Job Retry Options. */ union MediaJobRetry { /** Issue needs to be investigated and then the job resubmitted with corrections or retried once the underlying issue has been corrected. */ @@ -91,6 +92,7 @@ namespace Microsoft.EventGrid.SystemEvents { /** Issue may be resolved after waiting for a period of time and resubmitting the same Job. */ "MayRetry", + string, } /** diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2024-01-01/SystemEvents.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2024-01-01/SystemEvents.json index e86da184cd91..3373d3293b55 100644 --- a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2024-01-01/SystemEvents.json +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2024-01-01/SystemEvents.json @@ -5769,7 +5769,7 @@ ], "x-ms-enum": { "name": "MediaJobErrorCategory", - "modelAsString": false, + "modelAsString": true, "values": [ { "name": "Service", @@ -5821,7 +5821,7 @@ ], "x-ms-enum": { "name": "MediaJobErrorCode", - "modelAsString": false, + "modelAsString": true, "values": [ { "name": "ServiceError", @@ -6095,7 +6095,7 @@ ], "x-ms-enum": { "name": "MediaJobRetry", - "modelAsString": false, + "modelAsString": true, "values": [ { "name": "DoNotRetry", @@ -6133,7 +6133,7 @@ ], "x-ms-enum": { "name": "MediaJobState", - "modelAsString": false, + "modelAsString": true, "values": [ { "name": "Canceled",