From 1a226dbce01f59ccca0eacdb1313dd987a7ab02d Mon Sep 17 00:00:00 2001 From: Richard Park <51494936+richardpark-msft@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:45:11 -0700 Subject: [PATCH] [azsystemevents] Regenerate based on latest update (adding in storage tiers to some system events) (#23269) Some other changes have come along for the ride or been implemented: - Removal of types that were only used as base properties for events, but were not system events on their own. These were things like `ACSChatThreadEventInThreadBaseProperties`. Our generator handles this by just inlining those properties into the child "classes", so the base struct is just vestigial (except in a few cases where the base type is actually a system event). - Updated to proper hash from main. --- .../eventgrid/azsystemevents/CHANGELOG.md | 10 +- .../eventgrid/azsystemevents/constants.go | 27 + .../internal/generate/generate.go | 21 +- .../eventgrid/azsystemevents/models.go | 227 +------ .../eventgrid/azsystemevents/models_serde.go | 593 +----------------- .../azsystemevents/package-lock.json | 6 + .../azsystemevents/system_events2_test.go | 29 +- .../azsystemevents/system_events3_test.go | 22 +- .../azsystemevents/system_events4_test.go | 2 +- .../azsystemevents/testdata/package-lock.json | 360 +++++++---- .../azsystemevents/testdata/package.json | 10 +- .../azsystemevents/testdata/tsp-location.yaml | 2 +- .../azsystemevents/testdata/tspconfig.yaml | 3 + 13 files changed, 349 insertions(+), 963 deletions(-) create mode 100644 sdk/messaging/eventgrid/azsystemevents/package-lock.json diff --git a/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md b/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md index 9b5bf291ec..7131b1cfa4 100644 --- a/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md +++ b/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md @@ -1,14 +1,16 @@ # Release History -## 0.4.1 (Unreleased) +## 0.4.1 (2024-08-20) ### Features Added +- New fields have been added: + - StorageBlobCreatedEventData: AccessTier + - StorageBlobTierChangedEventData: AccessTier and PreviousTier + ### Breaking Changes -### Bugs Fixed - -### Other Changes +- Models that were not system events (ex: ACSChatMessageEventInThreadBaseProperties), or referenced by system events, have been removed. ## 0.4.0 (2024-06-11) diff --git a/sdk/messaging/eventgrid/azsystemevents/constants.go b/sdk/messaging/eventgrid/azsystemevents/constants.go index b8a0996fa6..632a5a0809 100644 --- a/sdk/messaging/eventgrid/azsystemevents/constants.go +++ b/sdk/messaging/eventgrid/azsystemevents/constants.go @@ -1154,6 +1154,33 @@ func PossibleStampKindValues() []StampKind { } } +// StorageBlobAccessTier - The access tier of the blob. +type StorageBlobAccessTier string + +const ( + // StorageBlobAccessTierArchive - The blob is in access tier Archive + StorageBlobAccessTierArchive StorageBlobAccessTier = "Archive" + // StorageBlobAccessTierCold - The blob is in access tier Cold + StorageBlobAccessTierCold StorageBlobAccessTier = "Cold" + // StorageBlobAccessTierCool - The blob is in access tier Cool + StorageBlobAccessTierCool StorageBlobAccessTier = "Cool" + // StorageBlobAccessTierDefault - The blob is in access tier Default(Inferred) + StorageBlobAccessTierDefault StorageBlobAccessTier = "Default" + // StorageBlobAccessTierHot - The blob is in access tier Hot + StorageBlobAccessTierHot StorageBlobAccessTier = "Hot" +) + +// PossibleStorageBlobAccessTierValues returns the possible values for the StorageBlobAccessTier const type. +func PossibleStorageBlobAccessTierValues() []StorageBlobAccessTier { + return []StorageBlobAccessTier{ + StorageBlobAccessTierArchive, + StorageBlobAccessTierCold, + StorageBlobAccessTierCool, + StorageBlobAccessTierDefault, + StorageBlobAccessTierHot, + } +} + // StorageTaskAssignmentCompletedStatus - The status for a storage task. type StorageTaskAssignmentCompletedStatus string diff --git a/sdk/messaging/eventgrid/azsystemevents/internal/generate/generate.go b/sdk/messaging/eventgrid/azsystemevents/internal/generate/generate.go index 455c64a136..43419e2a85 100644 --- a/sdk/messaging/eventgrid/azsystemevents/internal/generate/generate.go +++ b/sdk/messaging/eventgrid/azsystemevents/internal/generate/generate.go @@ -137,11 +137,28 @@ func deleteUnneededFiles() { func doRemove() error { modelsToRemove := []string{ - // these are not events, themselves, but are just contained within - // other events. + // These types are base objects of some of our system events in the TypeSpec, giving them a simple way to share fields. + // Our generator handles this parent/child relationship by just inlining those properties into the children, so the base struct is just vestigial. + // Note that these have been annotated with @output, which is why they're not just clipped out using our normal "unused/unreferenced" type logic + // in the Go emitter. + "ACSChatEventBaseProperties", + "ACSChatEventInThreadBaseProperties", + "ACSChatMessageEventBaseProperties", + "ACSChatMessageEventInThreadBaseProperties", + "ACSChatThreadEventBaseProperties", + "ACSChatThreadEventInThreadBaseProperties", + "ACSRouterEventData", + "ACSRouterJobEventData", + "ACSRouterWorkerEventData", + "ACSSmsEventBaseProperties", + "AppConfigurationSnapshotEventData", "AVSClusterEventData", "AVSPrivateCloudEventData", "AVSScriptExecutionEventData", + "ContainerServiceClusterSupportEventData", + "ContainerServiceNodePoolRollingEventData", + "ResourceNotificationsResourceDeletedEventData", + "ResourceNotificationsResourceUpdatedEventData", } for _, m := range modelsToRemove { diff --git a/sdk/messaging/eventgrid/azsystemevents/models.go b/sdk/messaging/eventgrid/azsystemevents/models.go index e3c2e269f5..3f434b0b46 100644 --- a/sdk/messaging/eventgrid/azsystemevents/models.go +++ b/sdk/messaging/eventgrid/azsystemevents/models.go @@ -6,27 +6,6 @@ package azsystemevents import "time" -// ACSChatEventBaseProperties - Schema of common properties of all chat events -type ACSChatEventBaseProperties struct { - // REQUIRED; The communication identifier of the target user - RecipientCommunicationIdentifier *CommunicationIdentifierModel - - // The chat thread id - ThreadID *string - - // The transaction id will be used as co-relation vector - TransactionID *string -} - -// ACSChatEventInThreadBaseProperties - Schema of common properties of all thread-level chat events -type ACSChatEventInThreadBaseProperties struct { - // The chat thread id - ThreadID *string - - // The transaction id will be used as co-relation vector - TransactionID *string -} - // ACSChatMessageDeletedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageDeleted // event. type ACSChatMessageDeletedEventData struct { @@ -169,63 +148,6 @@ type ACSChatMessageEditedInThreadEventData struct { Version *int64 } -// ACSChatMessageEventBaseProperties - Schema of common properties of all chat message events -type ACSChatMessageEventBaseProperties struct { - // REQUIRED; The original compose time of the message - ComposeTime *time.Time - - // REQUIRED; The communication identifier of the target user - RecipientCommunicationIdentifier *CommunicationIdentifierModel - - // REQUIRED; The communication identifier of the sender - SenderCommunicationIdentifier *CommunicationIdentifierModel - - // The chat message id - MessageID *string - - // The display name of the sender - SenderDisplayName *string - - // The chat thread id - ThreadID *string - - // The transaction id will be used as co-relation vector - TransactionID *string - - // The type of the message - Type *string - - // The version of the message - Version *int64 -} - -// ACSChatMessageEventInThreadBaseProperties - Schema of common properties of all thread-level chat message events -type ACSChatMessageEventInThreadBaseProperties struct { - // REQUIRED; The original compose time of the message - ComposeTime *time.Time - - // REQUIRED; The communication identifier of the sender - SenderCommunicationIdentifier *CommunicationIdentifierModel - - // The chat message id - MessageID *string - - // The display name of the sender - SenderDisplayName *string - - // The chat thread id - ThreadID *string - - // The transaction id will be used as co-relation vector - TransactionID *string - - // The type of the message - Type *string - - // The version of the message - Version *int64 -} - // ACSChatMessageReceivedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageReceived // event. type ACSChatMessageReceivedEventData struct { @@ -478,39 +400,6 @@ type ACSChatThreadDeletedEventData struct { Version *int64 } -// ACSChatThreadEventBaseProperties - Schema of common properties of all chat thread events -type ACSChatThreadEventBaseProperties struct { - // REQUIRED; The original creation time of the thread - CreateTime *time.Time - - // REQUIRED; The communication identifier of the target user - RecipientCommunicationIdentifier *CommunicationIdentifierModel - - // The chat thread id - ThreadID *string - - // The transaction id will be used as co-relation vector - TransactionID *string - - // The version of the thread - Version *int64 -} - -// ACSChatThreadEventInThreadBaseProperties - Schema of common properties of all chat thread events -type ACSChatThreadEventInThreadBaseProperties struct { - // REQUIRED; The original creation time of the thread - CreateTime *time.Time - - // The chat thread id - ThreadID *string - - // The transaction id will be used as co-relation vector - TransactionID *string - - // The version of the thread - Version *int64 -} - // ACSChatThreadParticipantProperties - Schema of the chat thread participant type ACSChatThreadParticipantProperties struct { // REQUIRED; The metadata of the user @@ -898,18 +787,6 @@ type ACSRouterChannelConfiguration struct { MaxNumberOfJobs *int32 } -// ACSRouterEventData - Schema of common properties of all Router events -type ACSRouterEventData struct { - // Router Event Channel ID - ChannelID *string - - // Router Event Channel Reference - ChannelReference *string - - // Router Event Job ID - JobID *string -} - // ACSRouterJobCancelledEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobCancelled // event type ACSRouterJobCancelledEventData struct { @@ -1081,27 +958,6 @@ type ACSRouterJobDeletedEventData struct { QueueID *string } -// ACSRouterJobEventData - Schema of common properties of all Router Job events -type ACSRouterJobEventData struct { - // REQUIRED; Router Job events Labels - Labels map[string]*string - - // REQUIRED; Router Jobs events Tags - Tags map[string]*string - - // Router Event Channel ID - ChannelID *string - - // Router Event Channel Reference - ChannelReference *string - - // Router Event Job ID - JobID *string - - // Router Job events Queue Id - QueueID *string -} - // ACSRouterJobExceptionTriggeredEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobExceptionTriggered // event type ACSRouterJobExceptionTriggeredEventData struct { @@ -1366,21 +1222,6 @@ type ACSRouterWorkerDeregisteredEventData struct { WorkerID *string } -// ACSRouterWorkerEventData - Schema of common properties of all Router Worker events -type ACSRouterWorkerEventData struct { - // Router Event Channel ID - ChannelID *string - - // Router Event Channel Reference - ChannelReference *string - - // Router Event Job ID - JobID *string - - // Router Worker events Worker Id - WorkerID *string -} - // ACSRouterWorkerOfferAcceptedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferAccepted // event type ACSRouterWorkerOfferAcceptedEventData struct { @@ -1638,18 +1479,6 @@ type ACSSmsDeliveryReportReceivedEventData struct { To *string } -// ACSSmsEventBaseProperties - Schema of common properties of all SMS events -type ACSSmsEventBaseProperties struct { - // The identity of SMS message sender - From *string - - // The identity of the SMS message - MessageID *string - - // The identity of SMS message receiver - To *string -} - // ACSSmsReceivedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSReceived event. type ACSSmsReceivedEventData struct { // REQUIRED; The time at which the SMS was received @@ -2123,18 +1952,6 @@ type AppConfigurationSnapshotCreatedEventData struct { SyncToken *string } -// AppConfigurationSnapshotEventData - Schema of common properties of snapshot events -type AppConfigurationSnapshotEventData struct { - // The etag representing the new state of the snapshot. - Etag *string - - // The name of the snapshot. - Name *string - - // The sync token representing the server state after the event. - SyncToken *string -} - // AppConfigurationSnapshotModifiedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.SnapshotModified // event. type AppConfigurationSnapshotModifiedEventData struct { @@ -2463,12 +2280,6 @@ type ContainerServiceClusterSupportEndingEventData struct { KubernetesVersion *string } -// ContainerServiceClusterSupportEventData - Schema of common properties of cluster support events -type ContainerServiceClusterSupportEventData struct { - // The Kubernetes version of the ManagedCluster resource - KubernetesVersion *string -} - // ContainerServiceNewKubernetesVersionAvailableEventData - Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.NewKubernetesVersionAvailable // event type ContainerServiceNewKubernetesVersionAvailableEventData struct { @@ -2486,12 +2297,6 @@ type ContainerServiceNewKubernetesVersionAvailableEventData struct { LowestMinorKubernetesVersion *string } -// ContainerServiceNodePoolRollingEventData - Schema of common properties of node pool rolling events -type ContainerServiceNodePoolRollingEventData struct { - // The name of the node pool in the ManagedCluster resource - NodePoolName *string -} - // ContainerServiceNodePoolRollingFailedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.NodePoolRollingFailed // event type ContainerServiceNodePoolRollingFailedEventData struct { @@ -4430,16 +4235,6 @@ type ResourceNotificationsResourceDeletedDetails struct { Type *string } -// ResourceNotificationsResourceDeletedEventData - Describes the schema of the common properties across all ARN system topic -// delete events -type ResourceNotificationsResourceDeletedEventData struct { - // REQUIRED; details about operational info - OperationalDetails *ResourceNotificationsOperationalDetails - - // REQUIRED; resourceInfo details for delete event - ResourceDetails *ResourceNotificationsResourceDeletedDetails -} - // ResourceNotificationsResourceManagementCreatedOrUpdatedEventData - Schema of the Data property of an EventGridEvent for // a // Microsoft.ResourceNotifications.Resources.CreatedOrUpdated event. @@ -4486,19 +4281,6 @@ type ResourceNotificationsResourceUpdatedDetails struct { Type *string } -// ResourceNotificationsResourceUpdatedEventData - Describes the schema of the common properties across all ARN system topic -// events -type ResourceNotificationsResourceUpdatedEventData struct { - // REQUIRED; details about operational info - OperationalDetails *ResourceNotificationsOperationalDetails - - // REQUIRED; resourceInfo details for update event - ResourceDetails *ResourceNotificationsResourceUpdatedDetails - - // api version of the resource properties bag - APIVersion *string -} - // ResourceWriteCancelEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteCancel // event. This is raised when a resource create or update operation is canceled. type ResourceWriteCancelEventData struct { @@ -4775,6 +4557,9 @@ type StorageAsyncOperationInitiatedEventData struct { // StorageBlobCreatedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobCreated event. type StorageBlobCreatedEventData struct { + // REQUIRED; The current tier of the blob. + AccessTier *StorageBlobAccessTier + // REQUIRED; For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should // be ignored by event consumers. StorageDiagnostics map[string]any @@ -4903,6 +4688,12 @@ type StorageBlobRenamedEventData struct { // StorageBlobTierChangedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobTierChanged // event. type StorageBlobTierChangedEventData struct { + // REQUIRED; The current tier of the blob. + AccessTier *StorageBlobAccessTier + + // REQUIRED; The previous tier of the blob. + PreviousTier *StorageBlobAccessTier + // REQUIRED; For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should // be ignored by event consumers. StorageDiagnostics map[string]any diff --git a/sdk/messaging/eventgrid/azsystemevents/models_serde.go b/sdk/messaging/eventgrid/azsystemevents/models_serde.go index 8ae166c7cc..cf7378e728 100644 --- a/sdk/messaging/eventgrid/azsystemevents/models_serde.go +++ b/sdk/messaging/eventgrid/azsystemevents/models_serde.go @@ -12,72 +12,6 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) -// MarshalJSON implements the json.Marshaller interface for type ACSChatEventBaseProperties. -func (a ACSChatEventBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier) - populate(objectMap, "threadId", a.ThreadID) - populate(objectMap, "transactionId", a.TransactionID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatEventBaseProperties. -func (a *ACSChatEventBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "recipientCommunicationIdentifier": - err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) - delete(rawMsg, key) - case "threadId": - err = unpopulate(val, "ThreadID", &a.ThreadID) - delete(rawMsg, key) - case "transactionId": - err = unpopulate(val, "TransactionID", &a.TransactionID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ACSChatEventInThreadBaseProperties. -func (a ACSChatEventInThreadBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "threadId", a.ThreadID) - populate(objectMap, "transactionId", a.TransactionID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatEventInThreadBaseProperties. -func (a *ACSChatEventInThreadBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "threadId": - err = unpopulate(val, "ThreadID", &a.ThreadID) - delete(rawMsg, key) - case "transactionId": - err = unpopulate(val, "TransactionID", &a.TransactionID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ACSChatMessageDeletedEventData. func (a ACSChatMessageDeletedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -338,120 +272,6 @@ func (a *ACSChatMessageEditedInThreadEventData) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageEventBaseProperties. -func (a ACSChatMessageEventBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "composeTime", a.ComposeTime) - populate(objectMap, "messageId", a.MessageID) - populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier) - populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier) - populate(objectMap, "senderDisplayName", a.SenderDisplayName) - populate(objectMap, "threadId", a.ThreadID) - populate(objectMap, "transactionId", a.TransactionID) - populate(objectMap, "type", a.Type) - populate(objectMap, "version", a.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageEventBaseProperties. -func (a *ACSChatMessageEventBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "composeTime": - err = unpopulateDateTimeRFC3339(val, "ComposeTime", &a.ComposeTime) - delete(rawMsg, key) - case "messageId": - err = unpopulate(val, "MessageID", &a.MessageID) - delete(rawMsg, key) - case "recipientCommunicationIdentifier": - err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) - delete(rawMsg, key) - case "senderCommunicationIdentifier": - err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier) - delete(rawMsg, key) - case "senderDisplayName": - err = unpopulate(val, "SenderDisplayName", &a.SenderDisplayName) - delete(rawMsg, key) - case "threadId": - err = unpopulate(val, "ThreadID", &a.ThreadID) - delete(rawMsg, key) - case "transactionId": - err = unpopulate(val, "TransactionID", &a.TransactionID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &a.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageEventInThreadBaseProperties. -func (a ACSChatMessageEventInThreadBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "composeTime", a.ComposeTime) - populate(objectMap, "messageId", a.MessageID) - populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier) - populate(objectMap, "senderDisplayName", a.SenderDisplayName) - populate(objectMap, "threadId", a.ThreadID) - populate(objectMap, "transactionId", a.TransactionID) - populate(objectMap, "type", a.Type) - populate(objectMap, "version", a.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageEventInThreadBaseProperties. -func (a *ACSChatMessageEventInThreadBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "composeTime": - err = unpopulateDateTimeRFC3339(val, "ComposeTime", &a.ComposeTime) - delete(rawMsg, key) - case "messageId": - err = unpopulate(val, "MessageID", &a.MessageID) - delete(rawMsg, key) - case "senderCommunicationIdentifier": - err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier) - delete(rawMsg, key) - case "senderDisplayName": - err = unpopulate(val, "SenderDisplayName", &a.SenderDisplayName) - delete(rawMsg, key) - case "threadId": - err = unpopulate(val, "ThreadID", &a.ThreadID) - delete(rawMsg, key) - case "transactionId": - err = unpopulate(val, "TransactionID", &a.TransactionID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &a.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ACSChatMessageReceivedEventData. func (a ACSChatMessageReceivedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -947,88 +767,6 @@ func (a *ACSChatThreadDeletedEventData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSChatThreadEventBaseProperties. -func (a ACSChatThreadEventBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "createTime", a.CreateTime) - populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier) - populate(objectMap, "threadId", a.ThreadID) - populate(objectMap, "transactionId", a.TransactionID) - populate(objectMap, "version", a.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatThreadEventBaseProperties. -func (a *ACSChatThreadEventBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createTime": - err = unpopulateDateTimeRFC3339(val, "CreateTime", &a.CreateTime) - delete(rawMsg, key) - case "recipientCommunicationIdentifier": - err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) - delete(rawMsg, key) - case "threadId": - err = unpopulate(val, "ThreadID", &a.ThreadID) - delete(rawMsg, key) - case "transactionId": - err = unpopulate(val, "TransactionID", &a.TransactionID) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &a.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ACSChatThreadEventInThreadBaseProperties. -func (a ACSChatThreadEventInThreadBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "createTime", a.CreateTime) - populate(objectMap, "threadId", a.ThreadID) - populate(objectMap, "transactionId", a.TransactionID) - populate(objectMap, "version", a.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatThreadEventInThreadBaseProperties. -func (a *ACSChatThreadEventInThreadBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createTime": - err = unpopulateDateTimeRFC3339(val, "CreateTime", &a.CreateTime) - delete(rawMsg, key) - case "threadId": - err = unpopulate(val, "ThreadID", &a.ThreadID) - delete(rawMsg, key) - case "transactionId": - err = unpopulate(val, "TransactionID", &a.TransactionID) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &a.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ACSChatThreadParticipantProperties. func (a ACSChatThreadParticipantProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1232,7 +970,7 @@ func (a *ACSChatThreadWithUserDeletedEventData) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ACSEmailDeliveryReportReceivedEventData. func (a ACSEmailDeliveryReportReceivedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "deliveryAttemptTimeStamp", a.DeliveryAttemptTimestamp) + populateDateTimeRFC3339(objectMap, "deliveryAttemptTimestamp", a.DeliveryAttemptTimestamp) populate(objectMap, "deliveryStatusDetails", a.DeliveryStatusDetails) populate(objectMap, "messageId", a.MessageID) populate(objectMap, "recipient", a.Recipient) @@ -1250,7 +988,7 @@ func (a *ACSEmailDeliveryReportReceivedEventData) UnmarshalJSON(data []byte) err for key, val := range rawMsg { var err error switch key { - case "deliveryAttemptTimeStamp": + case "deliveryAttemptTimestamp": err = unpopulateDateTimeRFC3339(val, "DeliveryAttemptTimestamp", &a.DeliveryAttemptTimestamp) delete(rawMsg, key) case "deliveryStatusDetails": @@ -1311,7 +1049,7 @@ func (a ACSEmailEngagementTrackingReportReceivedEventData) MarshalJSON() ([]byte populate(objectMap, "messageId", a.MessageID) populate(objectMap, "recipient", a.Recipient) populate(objectMap, "sender", a.Sender) - populateDateTimeRFC3339(objectMap, "userActionTimeStamp", a.UserActionTimestamp) + populateDateTimeRFC3339(objectMap, "userActionTimestamp", a.UserActionTimestamp) populate(objectMap, "userAgent", a.UserAgent) return json.Marshal(objectMap) } @@ -1340,7 +1078,7 @@ func (a *ACSEmailEngagementTrackingReportReceivedEventData) UnmarshalJSON(data [ case "sender": err = unpopulate(val, "Sender", &a.Sender) delete(rawMsg, key) - case "userActionTimeStamp": + case "userActionTimestamp": err = unpopulateDateTimeRFC3339(val, "UserActionTimestamp", &a.UserActionTimestamp) delete(rawMsg, key) case "userAgent": @@ -1951,41 +1689,6 @@ func (a *ACSRouterChannelConfiguration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSRouterEventData. -func (a ACSRouterEventData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "channelId", a.ChannelID) - populate(objectMap, "channelReference", a.ChannelReference) - populate(objectMap, "jobId", a.JobID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterEventData. -func (a *ACSRouterEventData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "channelId": - err = unpopulate(val, "ChannelID", &a.ChannelID) - delete(rawMsg, key) - case "channelReference": - err = unpopulate(val, "ChannelReference", &a.ChannelReference) - delete(rawMsg, key) - case "jobId": - err = unpopulate(val, "JobID", &a.JobID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ACSRouterJobCancelledEventData. func (a ACSRouterJobCancelledEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2320,53 +2023,6 @@ func (a *ACSRouterJobDeletedEventData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSRouterJobEventData. -func (a ACSRouterJobEventData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "channelId", a.ChannelID) - populate(objectMap, "channelReference", a.ChannelReference) - populate(objectMap, "jobId", a.JobID) - populate(objectMap, "labels", a.Labels) - populate(objectMap, "queueId", a.QueueID) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterJobEventData. -func (a *ACSRouterJobEventData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "channelId": - err = unpopulate(val, "ChannelID", &a.ChannelID) - delete(rawMsg, key) - case "channelReference": - err = unpopulate(val, "ChannelReference", &a.ChannelReference) - delete(rawMsg, key) - case "jobId": - err = unpopulate(val, "JobID", &a.JobID) - delete(rawMsg, key) - case "labels": - err = unpopulate(val, "Labels", &a.Labels) - delete(rawMsg, key) - case "queueId": - err = unpopulate(val, "QueueID", &a.QueueID) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ACSRouterJobExceptionTriggeredEventData. func (a ACSRouterJobExceptionTriggeredEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2897,45 +2553,6 @@ func (a *ACSRouterWorkerDeregisteredEventData) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSRouterWorkerEventData. -func (a ACSRouterWorkerEventData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "channelId", a.ChannelID) - populate(objectMap, "channelReference", a.ChannelReference) - populate(objectMap, "jobId", a.JobID) - populate(objectMap, "workerId", a.WorkerID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerEventData. -func (a *ACSRouterWorkerEventData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "channelId": - err = unpopulate(val, "ChannelID", &a.ChannelID) - delete(rawMsg, key) - case "channelReference": - err = unpopulate(val, "ChannelReference", &a.ChannelReference) - delete(rawMsg, key) - case "jobId": - err = unpopulate(val, "JobID", &a.JobID) - delete(rawMsg, key) - case "workerId": - err = unpopulate(val, "WorkerID", &a.WorkerID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ACSRouterWorkerOfferAcceptedEventData. func (a ACSRouterWorkerOfferAcceptedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3458,41 +3075,6 @@ func (a *ACSSmsDeliveryReportReceivedEventData) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSSmsEventBaseProperties. -func (a ACSSmsEventBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "from", a.From) - populate(objectMap, "messageId", a.MessageID) - populate(objectMap, "to", a.To) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSSmsEventBaseProperties. -func (a *ACSSmsEventBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "from": - err = unpopulate(val, "From", &a.From) - delete(rawMsg, key) - case "messageId": - err = unpopulate(val, "MessageID", &a.MessageID) - delete(rawMsg, key) - case "to": - err = unpopulate(val, "To", &a.To) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ACSSmsReceivedEventData. func (a ACSSmsReceivedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4911,41 +4493,6 @@ func (a *AppConfigurationSnapshotCreatedEventData) UnmarshalJSON(data []byte) er return nil } -// MarshalJSON implements the json.Marshaller interface for type AppConfigurationSnapshotEventData. -func (a AppConfigurationSnapshotEventData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "name", a.Name) - populate(objectMap, "syncToken", a.SyncToken) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AppConfigurationSnapshotEventData. -func (a *AppConfigurationSnapshotEventData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "syncToken": - err = unpopulate(val, "SyncToken", &a.SyncToken) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type AppConfigurationSnapshotModifiedEventData. func (a AppConfigurationSnapshotModifiedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5719,33 +5266,6 @@ func (c *ContainerServiceClusterSupportEndingEventData) UnmarshalJSON(data []byt return nil } -// MarshalJSON implements the json.Marshaller interface for type ContainerServiceClusterSupportEventData. -func (c ContainerServiceClusterSupportEventData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "kubernetesVersion", c.KubernetesVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerServiceClusterSupportEventData. -func (c *ContainerServiceClusterSupportEventData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "kubernetesVersion": - err = unpopulate(val, "KubernetesVersion", &c.KubernetesVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ContainerServiceNewKubernetesVersionAvailableEventData. func (c ContainerServiceNewKubernetesVersionAvailableEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5785,33 +5305,6 @@ func (c *ContainerServiceNewKubernetesVersionAvailableEventData) UnmarshalJSON(d return nil } -// MarshalJSON implements the json.Marshaller interface for type ContainerServiceNodePoolRollingEventData. -func (c ContainerServiceNodePoolRollingEventData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nodePoolName", c.NodePoolName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerServiceNodePoolRollingEventData. -func (c *ContainerServiceNodePoolRollingEventData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nodePoolName": - err = unpopulate(val, "NodePoolName", &c.NodePoolName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ContainerServiceNodePoolRollingFailedEventData. func (c ContainerServiceNodePoolRollingFailedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -10165,37 +9658,6 @@ func (r *ResourceNotificationsResourceDeletedDetails) UnmarshalJSON(data []byte) return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceNotificationsResourceDeletedEventData. -func (r ResourceNotificationsResourceDeletedEventData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "operationalInfo", r.OperationalDetails) - populate(objectMap, "resourceInfo", r.ResourceDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNotificationsResourceDeletedEventData. -func (r *ResourceNotificationsResourceDeletedEventData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "operationalInfo": - err = unpopulate(val, "OperationalDetails", &r.OperationalDetails) - delete(rawMsg, key) - case "resourceInfo": - err = unpopulate(val, "ResourceDetails", &r.ResourceDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ResourceNotificationsResourceManagementCreatedOrUpdatedEventData. func (r ResourceNotificationsResourceManagementCreatedOrUpdatedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -10309,41 +9771,6 @@ func (r *ResourceNotificationsResourceUpdatedDetails) UnmarshalJSON(data []byte) return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceNotificationsResourceUpdatedEventData. -func (r ResourceNotificationsResourceUpdatedEventData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiVersion", r.APIVersion) - populate(objectMap, "operationalInfo", r.OperationalDetails) - populate(objectMap, "resourceInfo", r.ResourceDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNotificationsResourceUpdatedEventData. -func (r *ResourceNotificationsResourceUpdatedEventData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiVersion": - err = unpopulate(val, "APIVersion", &r.APIVersion) - delete(rawMsg, key) - case "operationalInfo": - err = unpopulate(val, "OperationalDetails", &r.OperationalDetails) - delete(rawMsg, key) - case "resourceInfo": - err = unpopulate(val, "ResourceDetails", &r.ResourceDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ResourceWriteCancelEventData. func (r ResourceWriteCancelEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -10882,6 +10309,7 @@ func (s *StorageAsyncOperationInitiatedEventData) UnmarshalJSON(data []byte) err func (s StorageBlobCreatedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "api", s.API) + populate(objectMap, "accessTier", s.AccessTier) populate(objectMap, "blobType", s.BlobType) populate(objectMap, "clientRequestId", s.ClientRequestID) populate(objectMap, "contentLength", s.ContentLength) @@ -10908,6 +10336,9 @@ func (s *StorageBlobCreatedEventData) UnmarshalJSON(data []byte) error { case "api": err = unpopulate(val, "API", &s.API) delete(rawMsg, key) + case "accessTier": + err = unpopulate(val, "AccessTier", &s.AccessTier) + delete(rawMsg, key) case "blobType": err = unpopulate(val, "BlobType", &s.BlobType) delete(rawMsg, key) @@ -11118,11 +10549,13 @@ func (s *StorageBlobRenamedEventData) UnmarshalJSON(data []byte) error { func (s StorageBlobTierChangedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "api", s.API) + populate(objectMap, "accessTier", s.AccessTier) populate(objectMap, "blobType", s.BlobType) populate(objectMap, "clientRequestId", s.ClientRequestID) populate(objectMap, "contentLength", s.ContentLength) populate(objectMap, "contentType", s.ContentType) populate(objectMap, "identity", s.Identity) + populate(objectMap, "previousTier", s.PreviousTier) populate(objectMap, "requestId", s.RequestID) populate(objectMap, "sequencer", s.Sequencer) populate(objectMap, "storageDiagnostics", s.StorageDiagnostics) @@ -11142,6 +10575,9 @@ func (s *StorageBlobTierChangedEventData) UnmarshalJSON(data []byte) error { case "api": err = unpopulate(val, "API", &s.API) delete(rawMsg, key) + case "accessTier": + err = unpopulate(val, "AccessTier", &s.AccessTier) + delete(rawMsg, key) case "blobType": err = unpopulate(val, "BlobType", &s.BlobType) delete(rawMsg, key) @@ -11157,6 +10593,9 @@ func (s *StorageBlobTierChangedEventData) UnmarshalJSON(data []byte) error { case "identity": err = unpopulate(val, "Identity", &s.Identity) delete(rawMsg, key) + case "previousTier": + err = unpopulate(val, "PreviousTier", &s.PreviousTier) + delete(rawMsg, key) case "requestId": err = unpopulate(val, "RequestID", &s.RequestID) delete(rawMsg, key) diff --git a/sdk/messaging/eventgrid/azsystemevents/package-lock.json b/sdk/messaging/eventgrid/azsystemevents/package-lock.json new file mode 100644 index 0000000000..3d7e8a7294 --- /dev/null +++ b/sdk/messaging/eventgrid/azsystemevents/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "azsystemevents", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/sdk/messaging/eventgrid/azsystemevents/system_events2_test.go b/sdk/messaging/eventgrid/azsystemevents/system_events2_test.go index 976525b98e..b00e7c8116 100644 --- a/sdk/messaging/eventgrid/azsystemevents/system_events2_test.go +++ b/sdk/messaging/eventgrid/azsystemevents/system_events2_test.go @@ -212,11 +212,8 @@ func TestConsumeContainerServiceSupportEndedEvent(t *testing.T) { event := parseEvent(t, requestContent) - sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEventData](t, event.Data) + sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEndedEventData](t, event.Data) require.Equal(t, "1.23.15", *sysEvent.KubernetesVersion) - - sysEvent2 := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEndedEventData](t, event.Data) - require.Equal(t, "1.23.15", *sysEvent2.KubernetesVersion) } func TestConsumeContainerServiceSupportEndingEvent(t *testing.T) { @@ -237,11 +234,8 @@ func TestConsumeContainerServiceSupportEndingEvent(t *testing.T) { event := parseEvent(t, requestContent) require.NotEmpty(t, event) - sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEventData](t, event.Data) + sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEndingEventData](t, event.Data) require.Equal(t, "1.23.15", *sysEvent.KubernetesVersion) - - sysEvent2 := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEndingEventData](t, event.Data) - require.Equal(t, "1.23.15", *sysEvent2.KubernetesVersion) } func TestConsumeContainerServiceNodePoolRollingFailed(t *testing.T) { @@ -263,11 +257,8 @@ func TestConsumeContainerServiceNodePoolRollingFailed(t *testing.T) { require.NotEmpty(t, event) - sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingEventData](t, event.Data) + sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingFailedEventData](t, event.Data) require.Equal(t, "nodepool1", *sysEvent.NodePoolName) - - sysEvent2 := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingFailedEventData](t, event.Data) - require.Equal(t, "nodepool1", *sysEvent2.NodePoolName) } func TestConsumeContainerServiceNodePoolRollingStarted(t *testing.T) { @@ -286,13 +277,10 @@ func TestConsumeContainerServiceNodePoolRollingStarted(t *testing.T) { }` event := parseEvent(t, requestContent) - require.NotEmpty(t, event) - sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingEventData](t, event.Data) - require.Equal(t, "nodepool1", *sysEvent.NodePoolName) - sysEvent2 := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingStartedEventData](t, event.Data) - require.Equal(t, "nodepool1", *sysEvent2.NodePoolName) + sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingStartedEventData](t, event.Data) + require.Equal(t, "nodepool1", *sysEvent.NodePoolName) } func TestConsumeContainerServiceNodePoolRollingSucceeded(t *testing.T) { @@ -312,11 +300,8 @@ func TestConsumeContainerServiceNodePoolRollingSucceeded(t *testing.T) { event := parseEvent(t, requestContent) - sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingEventData](t, event.Data) + sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingSucceededEventData](t, event.Data) require.Equal(t, "nodepool1", *sysEvent.NodePoolName) - - sysEvent2 := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingSucceededEventData](t, event.Data) - require.Equal(t, "nodepool1", *sysEvent2.NodePoolName) } func TestConsumeIoTHubDeviceCreatedEvent(t *testing.T) { @@ -1399,7 +1384,7 @@ func TestConsumeAcsEmailDeliveryReportReceivedEvent(t *testing.T) { "recipient": "test1@contoso.com", "messageId": "950850f5-bcdf-4315-b77a-6447cf56fac9", "status": "Delivered", - "deliveryAttemptTimeStamp": "2023-02-09T19:46:12.2480265+00:00", + "deliveryAttemptTimestamp": "2023-02-09T19:46:12.2480265+00:00", "deliveryStatusDetails": { "statusMessage": "DestinationMailboxFull" } diff --git a/sdk/messaging/eventgrid/azsystemevents/system_events3_test.go b/sdk/messaging/eventgrid/azsystemevents/system_events3_test.go index 461aeeab57..54de9d62b8 100644 --- a/sdk/messaging/eventgrid/azsystemevents/system_events3_test.go +++ b/sdk/messaging/eventgrid/azsystemevents/system_events3_test.go @@ -109,11 +109,8 @@ func TestConsumeCloudEventContainerServiceSupportEndedEvent(t *testing.T) { event := parseCloudEvent(t, requestContent) - sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEventData](t, event.Data) + sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEndedEventData](t, event.Data) require.Equal(t, "1.23.15", *sysEvent.KubernetesVersion) - - sysEvent2 := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEndedEventData](t, event.Data) - require.Equal(t, "1.23.15", *sysEvent2.KubernetesVersion) } func TestConsumeCloudEventContainerServiceSupportEndingEvent(t *testing.T) { @@ -131,13 +128,10 @@ func TestConsumeCloudEventContainerServiceSupportEndingEvent(t *testing.T) { }` event := parseCloudEvent(t, requestContent) - require.NotEmpty(t, event) - sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEventData](t, event.Data) - require.Equal(t, "1.23.15", *sysEvent.KubernetesVersion) - sysEvent2 := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEndingEventData](t, event.Data) - require.Equal(t, "1.23.15", *sysEvent2.KubernetesVersion) + sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceClusterSupportEndingEventData](t, event.Data) + require.Equal(t, "1.23.15", *sysEvent.KubernetesVersion) } func TestConsumeCloudEventContainerServiceNodePoolRollingFailed(t *testing.T) { @@ -156,11 +150,8 @@ func TestConsumeCloudEventContainerServiceNodePoolRollingFailed(t *testing.T) { event := parseCloudEvent(t, requestContent) - sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingEventData](t, event.Data) + sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingFailedEventData](t, event.Data) require.Equal(t, "nodepool1", *sysEvent.NodePoolName) - - sysEvent2 := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingFailedEventData](t, event.Data) - require.Equal(t, "nodepool1", *sysEvent2.NodePoolName) } func TestConsumeCloudEventContainerServiceNodePoolRollingStarted(t *testing.T) { @@ -180,7 +171,7 @@ func TestConsumeCloudEventContainerServiceNodePoolRollingStarted(t *testing.T) { event := parseCloudEvent(t, requestContent) require.NotEmpty(t, event) - sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingEventData](t, event.Data) + sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingStartedEventData](t, event.Data) require.Equal(t, "nodepool1", *sysEvent.NodePoolName) } @@ -199,10 +190,7 @@ func TestConsumeCloudEventContainerServiceNodePoolRollingSucceeded(t *testing.T) }` event := parseCloudEvent(t, requestContent) - require.NotEmpty(t, event) - sysEvent := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingEventData](t, event.Data) - require.Equal(t, "nodepool1", *sysEvent.NodePoolName) sysEvent2 := deserializeSystemEvent[azsystemevents.ContainerServiceNodePoolRollingSucceededEventData](t, event.Data) require.Equal(t, "nodepool1", *sysEvent2.NodePoolName) diff --git a/sdk/messaging/eventgrid/azsystemevents/system_events4_test.go b/sdk/messaging/eventgrid/azsystemevents/system_events4_test.go index 74abf2fb72..b052de1783 100644 --- a/sdk/messaging/eventgrid/azsystemevents/system_events4_test.go +++ b/sdk/messaging/eventgrid/azsystemevents/system_events4_test.go @@ -850,7 +850,7 @@ func TestConsumeCloudEventAcsEmailDeliveryReportReceivedEvent(t *testing.T) { "deliveryStatusDetails": { "statusMessage": "DestinationMailboxFull" }, - "deliveryAttemptTimeStamp": "2023-02-09T19:46:12.2480265+00:00" + "deliveryAttemptTimestamp": "2023-02-09T19:46:12.2480265+00:00" }, "type": "Microsoft.Communication.EmailDeliveryReportReceived", "time": "2023-02-09T19:46:12.2478002Z", diff --git a/sdk/messaging/eventgrid/azsystemevents/testdata/package-lock.json b/sdk/messaging/eventgrid/azsystemevents/testdata/package-lock.json index 708c67abcc..bc8c8fcaa6 100644 --- a/sdk/messaging/eventgrid/azsystemevents/testdata/package-lock.json +++ b/sdk/messaging/eventgrid/azsystemevents/testdata/package-lock.json @@ -8,10 +8,12 @@ "name": "testdata", "version": "0.1.0", "dependencies": { - "@azure-tools/typespec-client-generator-core": "^0.42.0", - "@azure-tools/typespec-go": "https://github.com/Azure/autorest.go/releases/download/v0.1.0-dev.3-20240508.1/azure-tools-typespec-go-0.1.0-dev.3-20240508.1.tgz", - "@typespec/compiler": "^0.56.0", - "@typespec/versioning": "^0.56.0" + "@azure-tools/typespec-azure-core": "^0.45.0", + "@azure-tools/typespec-client-generator-core": "^0.45.2", + "@azure-tools/typespec-go": "^0.3.1", + "@typespec/compiler": "^0.59.1", + "@typespec/versioning": "^0.59.0", + "testdata": "^0.1.4" } }, "../../../../../../autorest-use-joel-typespec/packages/autorest.go": { @@ -105,22 +107,22 @@ } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.42.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.42.0.tgz", - "integrity": "sha512-8C96RkgSWtgqsaHRMWCd2iDltFJZTGmFQiTZazZj/uRy0Wn1ikjSriSN8t1puL5SiUPd0BVJP/YXiwAfjfZYDA==", + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.45.0.tgz", + "integrity": "sha512-GycGMCmaIVSN+TftPtlPJLyeOrglbLmH08ZiZaVMjSih/TQEJM21RGR6d8QdjlkQWN61ntNDRD+RP2uv9tHmqw==", "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.56.0", - "@typespec/http": "~0.56.0", - "@typespec/rest": "~0.56.0" + "@typespec/compiler": "~0.59.0", + "@typespec/http": "~0.59.0", + "@typespec/rest": "~0.59.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.42.3", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.42.3.tgz", - "integrity": "sha512-ZDVVIY1uJ8EaI4QhCdQmTdKVACm4xYn/I7ySpwv4oxk9X8kZFhxx+PKNHAlx34mhOf4oF0PW3wCN5DMeU6asYg==", + "version": "0.45.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.45.2.tgz", + "integrity": "sha512-y/grc0XDFU7q7mTZtiiJmbaoVzRZAks64y9ugKK4T9P9MLdHCj5Wl+Phbkl2tya9P4gklgLcxUlFJRJCR2Rr7A==", "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0" @@ -129,27 +131,27 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.42.0", - "@typespec/compiler": "~0.56.0", - "@typespec/http": "~0.56.0", - "@typespec/rest": "~0.56.0", - "@typespec/versioning": "~0.56.0" + "@azure-tools/typespec-azure-core": "~0.45.0", + "@typespec/compiler": "~0.59.0", + "@typespec/http": "~0.59.0", + "@typespec/openapi": "~0.59.0", + "@typespec/rest": "~0.59.0", + "@typespec/versioning": "~0.59.0" } }, "node_modules/@azure-tools/typespec-go": { - "version": "0.1.0-dev.3-20240508.1", - "resolved": "https://github.com/Azure/autorest.go/releases/download/v0.1.0-dev.3-20240508.1/azure-tools-typespec-go-0.1.0-dev.3-20240508.1.tgz", - "integrity": "sha512-bs10bSV6OJqndvo3UV4Cv19jGOH5H+bR+Ak6LW/y5tOsri+cqW0zu4foM9KLOQ45286FveN+COacG71OHQ9l7A==", - "license": "MIT", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-go/-/typespec-go-0.3.1.tgz", + "integrity": "sha512-XLzCk+exmxXJ55JAUKM29PytRnqVGEsZcULOf24+CLIVRA6a3bg6WH5a/ktIiwl56KoCUKepZcKZuHD7Cpc7AA==", "dependencies": { "@azure-tools/codegen": "~2.9.2", "@azure-tools/linq": "~3.1.0", - "@azure-tools/typespec-azure-core": ">=0.41.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": "0.42.0", - "@typespec/compiler": ">=0.55.0 <1.0.0", - "@typespec/http": ">=0.55.0 <1.0.0", - "@typespec/rest": ">=0.55.0 <1.0.0", - "@typespec/versioning": ">=0.55.0 <1.0.0", + "@azure-tools/typespec-azure-core": ">=0.44.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": "0.44.3", + "@typespec/compiler": "0.58.1", + "@typespec/http": "0.58.0", + "@typespec/rest": "0.58.0", + "@typespec/versioning": "0.58.0", "js-yaml": "~4.1.0", "source-map-support": "0.5.21" }, @@ -157,10 +159,23 @@ "node": ">=12.0.0" } }, + "node_modules/@azure-tools/typespec-go/node_modules/@azure-tools/typespec-azure-core": { + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.44.0.tgz", + "integrity": "sha512-d11QK2v5fOZH8YUqf42FsqHEirKCHzeKFq4Uo/51BXCXmJJahsTaFMAG2M0GoJe8tmTHeMijStnVMfzcGNqCAA==", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.58.0", + "@typespec/http": "~0.58.0", + "@typespec/rest": "~0.58.0" + } + }, "node_modules/@azure-tools/typespec-go/node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.42.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.42.0.tgz", - "integrity": "sha512-yjT71LdErZ4/BNwTrfvqCcaZqYhZm/E5/58LibbQ/5xJusaacBjTGe5iRpDi5Xf5ETQ6twFlZ6Y1ovWwgYDZag==", + "version": "0.44.3", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.44.3.tgz", + "integrity": "sha512-HXjxQs7ELrTuIDqOjlYhP4rM4AXb143klbiM8dkEGtqNBRCk77gVCGYVH1M3kWKAEs0dQKhzoUukscqRsfELuw==", "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0" @@ -169,19 +184,110 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.42.0", - "@typespec/compiler": "~0.56.0", - "@typespec/http": "~0.56.0", - "@typespec/rest": "~0.56.0", - "@typespec/versioning": "~0.56.0" + "@azure-tools/typespec-azure-core": "~0.44.0", + "@typespec/compiler": "~0.58.0", + "@typespec/http": "~0.58.0", + "@typespec/openapi": "~0.58.0", + "@typespec/rest": "~0.58.0", + "@typespec/versioning": "~0.58.0" + } + }, + "node_modules/@azure-tools/typespec-go/node_modules/@typespec/compiler": { + "version": "0.58.1", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.58.1.tgz", + "integrity": "sha512-bVxxM35r40OtuL4+/9W/g1EevlnWnW6i151nsZAFOJj1xWHoE2G9zkx5/Feic8OlzArjhGGLJOLH3Ez1Wrw35A==", + "dependencies": { + "@babel/code-frame": "~7.24.7", + "ajv": "~8.16.0", + "change-case": "~5.4.4", + "globby": "~14.0.2", + "mustache": "~4.2.0", + "picocolors": "~1.0.1", + "prettier": "~3.3.2", + "prompts": "~2.4.2", + "semver": "^7.6.2", + "temporal-polyfill": "^0.2.5", + "vscode-languageserver": "~9.0.1", + "vscode-languageserver-textdocument": "~1.0.11", + "yaml": "~2.4.5", + "yargs": "~17.7.2" + }, + "bin": { + "tsp": "cmd/tsp.js", + "tsp-server": "cmd/tsp-server.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@azure-tools/typespec-go/node_modules/@typespec/http": { + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.58.0.tgz", + "integrity": "sha512-jQpkugg9AZVrNDMkDIgZRpIoRkkU2b0LtKWqMGg33MItYj9/DYSgDtY7xb7oCBppRtFFZ/h138HyhYl3zQxZRg==", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.58.0" + } + }, + "node_modules/@azure-tools/typespec-go/node_modules/@typespec/openapi": { + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.58.0.tgz", + "integrity": "sha512-gu6nXfmpfZrfq8Etpgl1dpMfsXii7EzQyhZgsPhIy7ZwV5bDmFk1/oyhTqIpWrnr4pD3r151T2BQjzJefjf15A==", + "peer": true, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.58.0", + "@typespec/http": "~0.58.0" + } + }, + "node_modules/@azure-tools/typespec-go/node_modules/@typespec/rest": { + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.58.0.tgz", + "integrity": "sha512-QBxkED0/KQKG22pwzis0n7BY+uLMSZZPSoVe/ESBFika9n5/yyeQ0l58xbFFwwfxAxe4xwuZ5PNwTdEXZbzr5g==", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.58.0", + "@typespec/http": "~0.58.0" + } + }, + "node_modules/@azure-tools/typespec-go/node_modules/@typespec/versioning": { + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.58.0.tgz", + "integrity": "sha512-brnQQ3wKWh4AbgqmnVLj+8zyOaDk9VPWg4QBecdQxzz7PrSrlAzIzRfeIyr67+hwi/0SvkTAB6GNH7YYTypKGA==", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.58.0" + } + }, + "node_modules/@azure-tools/typespec-go/node_modules/ajv": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dependencies": { - "@babel/highlight": "^7.24.2", + "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" }, "engines": { @@ -189,19 +295,19 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", - "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", - "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.24.5", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -254,22 +360,23 @@ } }, "node_modules/@typespec/compiler": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.56.0.tgz", - "integrity": "sha512-K+VhXycoeqcoSGtB0/l1XYco4V2qRsCOOwqklVM4Yew7kTcKVfz7CT7a6a2OKWDMNg5iijZtRBoM5YF50XtQug==", + "version": "0.59.1", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.59.1.tgz", + "integrity": "sha512-O2ljgr6YoFaIH6a8lWc90/czdv4B2X6N9wz4WsnQnVvgO0Tj0s+3xkvp4Tv59RKMhT0f3fK6dL8oEGO32FYk1A==", "dependencies": { - "@babel/code-frame": "~7.24.2", - "ajv": "~8.12.0", + "@babel/code-frame": "~7.24.7", + "ajv": "~8.17.1", "change-case": "~5.4.4", - "globby": "~14.0.1", + "globby": "~14.0.2", "mustache": "~4.2.0", - "picocolors": "~1.0.0", - "prettier": "~3.2.5", + "picocolors": "~1.0.1", + "prettier": "~3.3.3", "prompts": "~2.4.2", - "semver": "^7.6.0", + "semver": "^7.6.3", + "temporal-polyfill": "^0.2.5", "vscode-languageserver": "~9.0.1", "vscode-languageserver-textdocument": "~1.0.11", - "yaml": "~2.4.1", + "yaml": "~2.4.5", "yargs": "~17.7.2" }, "bin": { @@ -281,48 +388,63 @@ } }, "node_modules/@typespec/http": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.56.0.tgz", - "integrity": "sha512-f/tpHRWev9bnAtNPFkfCU/5SFou9glA/rPDY0m2W5bK6EG1/6/TKKKz5FoKPA4xvc2dQ5vu/ouGLb4i5UzXvWQ==", + "version": "0.59.1", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.59.1.tgz", + "integrity": "sha512-Ai8oCAO+Bw1HMSZ9gOI5Od4fNn/ul4HrVtTB01xFuLK6FQj854pxhzao8ylPnr7gIRQ327FV12/QfXR87yCiYQ==", + "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.56.0" + "@typespec/compiler": "~0.59.0" + } + }, + "node_modules/@typespec/openapi": { + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.59.0.tgz", + "integrity": "sha512-do1Dm5w0MuK3994gYTBg6qMfgeIxmmsDqnz3zimYKMPpbnUBi4F6/o4iCfn0Fn9kaNl+H6UlOzZpsZW9xHui1Q==", + "peer": true, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.59.0", + "@typespec/http": "~0.59.0" } }, "node_modules/@typespec/rest": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.56.0.tgz", - "integrity": "sha512-8w4WhWDcpEQNW8bB1BHhiBxIQUChDJtyq/n9p2OI/Bm1wncd61y/ZNOtcxmlKq8uB9d+dzHiZdEfqFCR8HF8/Q==", + "version": "0.59.1", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.59.1.tgz", + "integrity": "sha512-uKU431jBYL2tVQWG5THA75+OtXDa1e8cMAafYK/JJRRiVRd8D/Epd8fp07dzlB8tFGrhCaGlekRMqFPFrHh2/A==", + "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.56.0", - "@typespec/http": "~0.56.0" + "@typespec/compiler": "~0.59.0", + "@typespec/http": "~0.59.1" } }, "node_modules/@typespec/versioning": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.56.0.tgz", - "integrity": "sha512-j7IN9XFyGn3LH6IOJkinEvk9sDncsxiWPULOAe0VQ+D/dtCfLawDMUALnvklMDRKeD1OOUPSCjjUAp9OB0f7YA==", + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.59.0.tgz", + "integrity": "sha512-aihO/ux0lLmsuYAdGVkiBflSudcZokYG42SELk1FtMFo609G3Pd7ep7hau6unBnMIceQZejB0ow5UGRupK4X5A==", "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.56.0" + "@typespec/compiler": "~0.59.0" } }, "node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -454,6 +576,11 @@ "node": ">=8.6.0" } }, + "node_modules/fast-uri": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==" + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -493,9 +620,9 @@ } }, "node_modules/globby": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.1.tgz", - "integrity": "sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", + "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", "dependencies": { "@sindresorhus/merge-streams": "^2.1.0", "fast-glob": "^3.3.2", @@ -596,17 +723,6 @@ "node": ">=6" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -616,11 +732,11 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -647,9 +763,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -671,9 +787,9 @@ } }, "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -709,9 +825,9 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } @@ -791,12 +907,9 @@ } }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "bin": { "semver": "bin/semver.js" }, @@ -872,6 +985,24 @@ "node": ">=4" } }, + "node_modules/temporal-polyfill": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.2.5.tgz", + "integrity": "sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==", + "dependencies": { + "temporal-spec": "^0.2.4" + } + }, + "node_modules/temporal-spec": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.2.4.tgz", + "integrity": "sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==" + }, + "node_modules/testdata": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/testdata/-/testdata-0.1.4.tgz", + "integrity": "sha512-tz2ly2UW9oE6EvoaIofyEyMAJm5YHT4WKsec78+XvYDzBHOK7yl0ONORXWlsb3/YgXyC9+HncRo0q1tK+l58qg==" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -994,15 +1125,10 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/yaml": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz", - "integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", + "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", "bin": { "yaml": "bin.mjs" }, diff --git a/sdk/messaging/eventgrid/azsystemevents/testdata/package.json b/sdk/messaging/eventgrid/azsystemevents/testdata/package.json index 02409f78b7..0c1980e9c2 100644 --- a/sdk/messaging/eventgrid/azsystemevents/testdata/package.json +++ b/sdk/messaging/eventgrid/azsystemevents/testdata/package.json @@ -7,10 +7,12 @@ "build": "tsp compile ./TempTypeSpecFiles/Azure.Messaging.EventGrid.SystemEvents/client.tsp" }, "dependencies": { - "@azure-tools/typespec-client-generator-core": "^0.42.0", - "@azure-tools/typespec-go": "https://github.com/Azure/autorest.go/releases/download/v0.1.0-dev.3-20240508.1/azure-tools-typespec-go-0.1.0-dev.3-20240508.1.tgz", - "@typespec/compiler": "^0.56.0", - "@typespec/versioning": "^0.56.0" + "@azure-tools/typespec-azure-core": "^0.45.0", + "@azure-tools/typespec-client-generator-core": "^0.45.2", + "@azure-tools/typespec-go": "^0.3.1", + "@typespec/compiler": "^0.59.1", + "@typespec/versioning": "^0.59.0", + "testdata": "^0.1.4" }, "overrides": { "braces": "^3.0.3" diff --git a/sdk/messaging/eventgrid/azsystemevents/testdata/tsp-location.yaml b/sdk/messaging/eventgrid/azsystemevents/testdata/tsp-location.yaml index 28b0bbac81..78f5d30a3d 100644 --- a/sdk/messaging/eventgrid/azsystemevents/testdata/tsp-location.yaml +++ b/sdk/messaging/eventgrid/azsystemevents/testdata/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents -commit: a58614a53ecd06c6e6638b58c407d5bd8e61c009 +commit: 0d023bd802cde559706b5865f685a10a88516e09 repo: Azure/azure-rest-api-specs diff --git a/sdk/messaging/eventgrid/azsystemevents/testdata/tspconfig.yaml b/sdk/messaging/eventgrid/azsystemevents/testdata/tspconfig.yaml index 52a234b4e1..90ff0bda81 100644 --- a/sdk/messaging/eventgrid/azsystemevents/testdata/tspconfig.yaml +++ b/sdk/messaging/eventgrid/azsystemevents/testdata/tspconfig.yaml @@ -11,3 +11,6 @@ options: module-version: "0.0.1" emitter-output-dir: "{project-root}/../../azsystemevents" slice-elements-byval: "true" +linter: + extends: + - "@azure-tools/typespec-azure-core/all"