diff --git a/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md b/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md index ac40b2915569..20a5e4e5fe52 100644 --- a/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md +++ b/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md @@ -1,5 +1,55 @@ # Release History +## 1.0.0 (2025-04-23) +### Breaking Changes + +- Type of `ACSMessageDeliveryStatusUpdatedEventData.Error` has been changed from `*Error` to `*InternalACSMessageChannelEventError` +- Type of `ACSMessageReceivedEventData.Error` has been changed from `*Error` to `*InternalACSMessageChannelEventError` +- Type of `ACSRouterJobClassificationFailedEventData.Errors` has been changed from `[]*Error` to `[]InternalACSRouterCommunicationError` + +### Features Added + +- New value `TypeACSCallEnded`, `TypeACSCallParticipantAdded`, `TypeACSCallParticipantRemoved`, `TypeACSCallStarted`, `TypeACSChatAzureBotCommandReceivedInThread`, `TypeACSChatTypingIndicatorReceivedInThread` added to enum type `string` +- New struct `ACSChatEventBaseProperties` +- New struct `ACSChatEventInThreadBaseProperties` +- New struct `ACSChatMessageEventBaseProperties` +- New struct `ACSChatMessageEventInThreadBaseProperties` +- New struct `ACSChatThreadEventBaseProperties` +- New struct `ACSChatThreadEventInThreadBaseProperties` +- New struct `ACSMessageEventData` +- New struct `ACSRouterEventData` +- New struct `ACSRouterJobEventData` +- New struct `ACSRouterWorkerEventData` +- New struct `ACSSMSEventBaseProperties` +- New struct `APIManagementCircuitBreakerClosedEventData` +- New struct `APIManagementCircuitBreakerOpenedEventData` +- New struct `APIManagementCircuitBreakerProperties` +- New struct `APIManagementCircuitBreakerPropertiesRule` +- New struct `APIManagementExpiredGatewayTokenProperties` +- New struct `APIManagementGatewayProperties` +- New struct `APIManagementGatewayTokenExpiredEventData` +- New struct `APIManagementGatewayTokenNearExpiryEventData` +- New struct `APIManagementNearExpiryGatewayTokenProperties` +- New struct `AVSClusterEventData` +- New struct `AVSPrivateCloudEventData` +- New struct `AVSScriptExecutionEventData` +- New struct `AppConfigurationSnapshotEventData` +- New struct `ContainerRegistryArtifactEventData` +- New struct `ContainerRegistryEventData` +- New struct `ContainerServiceClusterSupportEventData` +- New struct `ContainerServiceNodePoolRollingEventData` +- New struct `DeviceConnectionStateEventProperties` +- New struct `DeviceLifeCycleEventProperties` +- New struct `DeviceTelemetryEventProperties` +- New struct `EdgeSolutionVersionPublishedEventData` +- New struct `EventGridMQTTClientEventData` +- New struct `InternalACSMessageChannelEventError` +- New struct `InternalACSRouterCommunicationError` +- New struct `MapsGeofenceEventProperties` +- New struct `ResourceNotificationsResourceDeletedEventData` +- New struct `ResourceNotificationsResourceUpdatedEventData` + + ## 0.6.2 (2025-05-06) ### Features Added diff --git a/sdk/messaging/eventgrid/azsystemevents/build.go b/sdk/messaging/eventgrid/azsystemevents/build.go deleted file mode 100644 index e22b15cc1977..000000000000 --- a/sdk/messaging/eventgrid/azsystemevents/build.go +++ /dev/null @@ -1,12 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -//go:generate tsp-client update -//go:generate goimports -w . -//go:generate go run ./internal/generate -//go:generate goimports -w ./.. - -package azsystemevents diff --git a/sdk/messaging/eventgrid/azsystemevents/constants.go b/sdk/messaging/eventgrid/azsystemevents/constants.go index f4437dd1f2b7..4afe33ece5ca 100644 --- a/sdk/messaging/eventgrid/azsystemevents/constants.go +++ b/sdk/messaging/eventgrid/azsystemevents/constants.go @@ -4,24 +4,6 @@ package azsystemevents -// ACSCallEndedByKind - Call ended participant kind. -type ACSCallEndedByKind string - -const ( - // ACSCallEndedByKindMicrosoftInternal - MicrosoftInternal - ACSCallEndedByKindMicrosoftInternal ACSCallEndedByKind = "MicrosoftInternal" - // ACSCallEndedByKindParticipant - Participant - ACSCallEndedByKindParticipant ACSCallEndedByKind = "Participant" -) - -// PossibleACSCallEndedByKindValues returns the possible values for the ACSCallEndedByKind const type. -func PossibleACSCallEndedByKindValues() []ACSCallEndedByKind { - return []ACSCallEndedByKind{ - ACSCallEndedByKindMicrosoftInternal, - ACSCallEndedByKindParticipant, - } -} - // ACSEmailDeliveryReportStatus - The status of the email. Any value other than Delivered is considered failed. type ACSEmailDeliveryReportStatus string diff --git a/sdk/messaging/eventgrid/azsystemevents/models.go b/sdk/messaging/eventgrid/azsystemevents/models.go index 60e62244b03b..a9f925d8cc82 100644 --- a/sdk/messaging/eventgrid/azsystemevents/models.go +++ b/sdk/messaging/eventgrid/azsystemevents/models.go @@ -6,272 +6,23 @@ package azsystemevents import "time" -// ACSCallEndReasonProperties - Schema of calling event reason properties -type ACSCallEndReasonProperties struct { - // Reason code for ending the call. - Code *int32 - - // Reason for the ending the call. - Phrase *string - - // Reason subcode for ending the call. - SubCode *int32 -} - -// ACSCallEndedByProperties - Schema of calling event endedby properties -type ACSCallEndedByProperties struct { - // REQUIRED; The communication identifier of the call ended by - CommunicationIdentifier *CommunicationIdentifierModel - - // REQUIRED; The name of the call ended by. - Name *string - - // REQUIRED; The type of call ended by. - Type *ACSCallEndedByKind -} - -// ACSCallEndedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallEnded event. -type ACSCallEndedEventData struct { - // REQUIRED; The correlationId of calling event - CorrelationID *string - - // REQUIRED; The call id of the server - ServerCallID *string - - // REQUIRED; The call participant who initiated the call. - StartedBy *ACSCallParticipantProperties - - // Duration of the call in seconds. - CallDurationInSeconds *float64 - - // The communication identifier of the user who was disconnected - EndedBy *ACSCallEndedByProperties - - // The group metadata - Group *ACSCallGroupProperties - - // Is the calling event a room call. - IsRoomsCall *bool - - // Is two-party in calling event. - IsTwoParty *bool - - // The reason for ending the call. - Reason *ACSCallEndReasonProperties - - // The room metadata - Room *ACSCallRoomProperties -} - -// ACSCallGroupProperties - Schema of calling event group properties -type ACSCallGroupProperties struct { - // Group Id. - ID *string -} - -// ACSCallParticipantAddedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantAdded -// event. -type ACSCallParticipantAddedEventData struct { - // REQUIRED; The correlationId of calling event - CorrelationID *string - - // REQUIRED; The call id of the server - ServerCallID *string - - // REQUIRED; The call participant who initiated the call. - StartedBy *ACSCallParticipantProperties - - // The display name of the participant. - DisplayName *string - - // The group metadata - Group *ACSCallGroupProperties - - // Is the calling event a room call. - IsRoomsCall *bool - - // Is two-party in calling event. - IsTwoParty *bool - - // The id of the participant. - ParticipantID *string - - // The room metadata - Room *ACSCallRoomProperties - - // The user of the call participant - User *ACSCallParticipantProperties - - // The user agent of the participant. - UserAgent *string -} - -// ACSCallParticipantEventProperties - Schema of common properties of all participant events -type ACSCallParticipantEventProperties struct { - // REQUIRED; The correlationId of calling event - CorrelationID *string - - // REQUIRED; The call id of the server - ServerCallID *string - - // REQUIRED; The call participant who initiated the call. - StartedBy *ACSCallParticipantProperties - - // The display name of the participant. - DisplayName *string - - // The group metadata - Group *ACSCallGroupProperties - - // Is the calling event a room call. - IsRoomsCall *bool - - // Is two-party in calling event. - IsTwoParty *bool - - // The id of the participant. - ParticipantID *string - - // The room metadata - Room *ACSCallRoomProperties - - // The user of the call participant - User *ACSCallParticipantProperties - - // The user agent of the participant. - UserAgent *string -} - -// ACSCallParticipantProperties - Schema of common properties of all participant event user -type ACSCallParticipantProperties struct { - // The communication identifier of the participant user - CommunicationIdentifier *CommunicationIdentifierModel - - // The role of the participant - Role *string -} - -// ACSCallParticipantRemovedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantRemoved -// event. -type ACSCallParticipantRemovedEventData struct { - // REQUIRED; The correlationId of calling event - CorrelationID *string - - // REQUIRED; The call id of the server - ServerCallID *string - - // REQUIRED; The call participant who initiated the call. - StartedBy *ACSCallParticipantProperties - - // The display name of the participant. - DisplayName *string - - // The group metadata - Group *ACSCallGroupProperties - - // Is the calling event a room call. - IsRoomsCall *bool - - // Is two-party in calling event. - IsTwoParty *bool - - // The id of the participant. - ParticipantID *string - - // The room metadata - Room *ACSCallRoomProperties - - // The user of the call participant - User *ACSCallParticipantProperties - - // The user agent of the participant. - UserAgent *string -} - -// ACSCallRoomProperties - Schema of calling event room properties -type ACSCallRoomProperties struct { - // Room Id. - ID *string -} - -// ACSCallStartedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallStarted event. -type ACSCallStartedEventData struct { - // REQUIRED; The correlationId of calling event - CorrelationID *string - - // REQUIRED; The call id of the server - ServerCallID *string - - // REQUIRED; The call participant who initiated the call. - StartedBy *ACSCallParticipantProperties - - // The group metadata - Group *ACSCallGroupProperties - - // Is the calling event a room call. - IsRoomsCall *bool - - // Is two-party in calling event. - IsTwoParty *bool - - // The room metadata - Room *ACSCallRoomProperties -} - -// ACSCallingEventProperties - Schema of common properties of all calling events -type ACSCallingEventProperties struct { - // REQUIRED; The correlationId of calling event - CorrelationID *string - - // REQUIRED; The call id of the server - ServerCallID *string - - // REQUIRED; The call participant who initiated the call. - StartedBy *ACSCallParticipantProperties - - // The group metadata - Group *ACSCallGroupProperties - - // Is the calling event a room call. - IsRoomsCall *bool +// ACSChatEventBaseProperties - Schema of common properties of all chat events +type ACSChatEventBaseProperties struct { + // REQUIRED; The communication identifier of the target user + RecipientCommunicationIdentifier *CommunicationIdentifierModel - // Is two-party in calling event. - IsTwoParty *bool + // The chat thread id + ThreadID *string - // The room metadata - Room *ACSCallRoomProperties + // The transaction id will be used as co-relation vector + TransactionID *string } -// ACSChatAzureBotCommandReceivedInThreadEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatAzureBotCommandReceivedInThread -// event. -type ACSChatAzureBotCommandReceivedInThreadEventData struct { - // REQUIRED; The original compose time of the message - ComposeTime *time.Time - - // REQUIRED; The body of the chat message - MessageBody *string - - // REQUIRED; The chat message id - MessageID *string - - // REQUIRED; The communication identifier of the sender - SenderCommunicationIdentifier *CommunicationIdentifierModel - - // REQUIRED; The chat thread id +// ACSChatEventInThreadBaseProperties - Schema of common properties of all thread-level chat events +type ACSChatEventInThreadBaseProperties struct { + // The chat thread id ThreadID *string - // REQUIRED; The type of the message - Type *string - - // REQUIRED; The version of the message - Version *int64 - - // The chat message metadata - Metadata map[string]*string - - // The display name of the sender - SenderDisplayName *string - // The transaction id will be used as co-relation vector TransactionID *string } @@ -285,29 +36,29 @@ type ACSChatMessageDeletedEventData struct { // REQUIRED; The time at which the message was deleted DeleteTime *time.Time - // REQUIRED; The chat message id - MessageID *string - // REQUIRED; The communication identifier of the target user RecipientCommunicationIdentifier *CommunicationIdentifierModel // REQUIRED; The communication identifier of the sender SenderCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The chat thread id - ThreadID *string - - // REQUIRED; The type of the message - Type *string - - // REQUIRED; The version of the message - Version *int64 + // 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 } // ACSChatMessageDeletedInThreadEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageDeletedInThread @@ -319,26 +70,26 @@ type ACSChatMessageDeletedInThreadEventData struct { // REQUIRED; The time at which the message was deleted DeleteTime *time.Time - // REQUIRED; The chat message id - MessageID *string - // REQUIRED; The communication identifier of the sender SenderCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The chat thread id - ThreadID *string - - // REQUIRED; The type of the message - Type *string - - // REQUIRED; The version of the message - Version *int64 + // 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 } // ACSChatMessageEditedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageEdited @@ -350,11 +101,8 @@ type ACSChatMessageEditedEventData struct { // REQUIRED; The time at which the message was edited EditTime *time.Time - // REQUIRED; The body of the chat message - MessageBody *string - - // REQUIRED; The chat message id - MessageID *string + // REQUIRED; The chat message metadata + Metadata map[string]*string // REQUIRED; The communication identifier of the target user RecipientCommunicationIdentifier *CommunicationIdentifierModel @@ -362,23 +110,26 @@ type ACSChatMessageEditedEventData struct { // REQUIRED; The communication identifier of the sender SenderCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The chat thread id - ThreadID *string - - // REQUIRED; The type of the message - Type *string - - // REQUIRED; The version of the message - Version *int64 + // The body of the chat message + MessageBody *string - // The chat message metadata - Metadata map[string]*string + // 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 } // ACSChatMessageEditedInThreadEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageEditedInThread @@ -390,32 +141,89 @@ type ACSChatMessageEditedInThreadEventData struct { // REQUIRED; The time at which the message was edited EditTime *time.Time - // REQUIRED; The body of the chat message + // REQUIRED; The chat message metadata + Metadata map[string]*string + + // REQUIRED; The communication identifier of the sender + SenderCommunicationIdentifier *CommunicationIdentifierModel + + // The body of the chat message MessageBody *string - // REQUIRED; The chat message id + // 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 +} + +// 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 - // REQUIRED; The chat thread id + // The chat message id + MessageID *string + + // The display name of the sender + SenderDisplayName *string + + // The chat thread id ThreadID *string - // REQUIRED; The type of the message + // The transaction id will be used as co-relation vector + TransactionID *string + + // The type of the message Type *string - // REQUIRED; The version of the message + // The version of the message Version *int64 +} - // The chat message metadata - Metadata map[string]*string +// 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 @@ -424,11 +232,8 @@ type ACSChatMessageReceivedEventData struct { // REQUIRED; The original compose time of the message ComposeTime *time.Time - // REQUIRED; The body of the chat message - MessageBody *string - - // REQUIRED; The chat message id - MessageID *string + // REQUIRED; The chat message metadata + Metadata map[string]*string // REQUIRED; The communication identifier of the target user RecipientCommunicationIdentifier *CommunicationIdentifierModel @@ -436,23 +241,26 @@ type ACSChatMessageReceivedEventData struct { // REQUIRED; The communication identifier of the sender SenderCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The chat thread id - ThreadID *string - - // REQUIRED; The type of the message - Type *string - - // REQUIRED; The version of the message - Version *int64 + // The body of the chat message + MessageBody *string - // The chat message metadata - Metadata map[string]*string + // 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 } // ACSChatMessageReceivedInThreadEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageReceivedInThread @@ -461,32 +269,32 @@ type ACSChatMessageReceivedInThreadEventData struct { // REQUIRED; The original compose time of the message ComposeTime *time.Time - // REQUIRED; The body of the chat message - MessageBody *string - - // REQUIRED; The chat message id - MessageID *string + // REQUIRED; The chat message metadata + Metadata map[string]*string // REQUIRED; The communication identifier of the sender SenderCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The chat thread id - ThreadID *string - - // REQUIRED; The type of the message - Type *string - - // REQUIRED; The version of the message - Version *int64 + // The body of the chat message + MessageBody *string - // The chat message metadata - Metadata map[string]*string + // 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 } // ACSChatParticipantAddedToThreadEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadParticipantAdded @@ -498,12 +306,12 @@ type ACSChatParticipantAddedToThreadEventData struct { // REQUIRED; The details of the user who was added ParticipantAdded *ACSChatThreadParticipantProperties - // REQUIRED; The chat thread id - ThreadID *string - // REQUIRED; The time at which the user was added to the thread Time *time.Time + // The chat thread id + ThreadID *string + // The transaction id will be used as co-relation vector TransactionID *string @@ -526,12 +334,12 @@ type ACSChatParticipantAddedToThreadWithUserEventData struct { // REQUIRED; The communication identifier of the target user RecipientCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The chat thread id - ThreadID *string - // REQUIRED; The time at which the user was added to the thread Time *time.Time + // The chat thread id + ThreadID *string + // The transaction id will be used as co-relation vector TransactionID *string @@ -548,12 +356,12 @@ type ACSChatParticipantRemovedFromThreadEventData struct { // REQUIRED; The communication identifier of the user who removed the user RemovedByCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The chat thread id - ThreadID *string - // REQUIRED; The time at which the user was removed to the thread Time *time.Time + // The chat thread id + ThreadID *string + // The transaction id will be used as co-relation vector TransactionID *string @@ -576,12 +384,12 @@ type ACSChatParticipantRemovedFromThreadWithUserEventData struct { // REQUIRED; The communication identifier of the user who removed the user RemovedByCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The chat thread id - ThreadID *string - // REQUIRED; The time at which the user was removed to the thread Time *time.Time + // The chat thread id + ThreadID *string + // The transaction id will be used as co-relation vector TransactionID *string @@ -598,23 +406,23 @@ type ACSChatThreadCreatedEventData struct { // REQUIRED; The communication identifier of the user who created the thread CreatedByCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The list of properties of participants who are part of the thread - Participants []ACSChatThreadParticipantProperties + // REQUIRED; The thread metadata + Metadata map[string]*string // REQUIRED; The thread properties Properties map[string]any - // REQUIRED; The chat thread id + // The chat thread id ThreadID *string - // The thread metadata - Metadata map[string]*string - // The transaction id will be used as co-relation vector TransactionID *string // The version of the thread Version *int64 + + // READ-ONLY; The list of properties of participants who are part of the thread + Participants []ACSChatThreadParticipantProperties } // ACSChatThreadCreatedWithUserEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadCreatedWithUser @@ -626,21 +434,61 @@ type ACSChatThreadCreatedWithUserEventData struct { // REQUIRED; The communication identifier of the user who created the thread CreatedByCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The list of properties of participants who are part of the thread + // REQUIRED; The thread metadata + Metadata map[string]*string + + // REQUIRED; The thread properties + Properties map[string]any + + // 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 + + // READ-ONLY; The list of properties of participants who are part of the thread Participants []ACSChatThreadParticipantProperties +} + +// ACSChatThreadDeletedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadDeleted +// event. +type ACSChatThreadDeletedEventData struct { + // REQUIRED; The original creation time of the thread + CreateTime *time.Time + + // REQUIRED; The deletion time of the thread + DeleteTime *time.Time + + // REQUIRED; The communication identifier of the user who deleted the thread + DeletedByCommunicationIdentifier *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 +} - // REQUIRED; The thread properties - Properties map[string]any +// 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 - // REQUIRED; The chat thread id + // The chat thread id ThreadID *string - // The thread metadata - Metadata map[string]*string - // The transaction id will be used as co-relation vector TransactionID *string @@ -648,19 +496,12 @@ type ACSChatThreadCreatedWithUserEventData struct { Version *int64 } -// ACSChatThreadDeletedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadDeleted -// event. -type ACSChatThreadDeletedEventData struct { +// ACSChatThreadEventInThreadBaseProperties - Schema of common properties of all chat thread events +type ACSChatThreadEventInThreadBaseProperties struct { // REQUIRED; The original creation time of the thread CreateTime *time.Time - // REQUIRED; The deletion time of the thread - DeleteTime *time.Time - - // REQUIRED; The communication identifier of the user who deleted the thread - DeletedByCommunicationIdentifier *CommunicationIdentifierModel - - // REQUIRED; The chat thread id + // The chat thread id ThreadID *string // The transaction id will be used as co-relation vector @@ -672,14 +513,14 @@ type ACSChatThreadDeletedEventData struct { // ACSChatThreadParticipantProperties - Schema of the chat thread participant type ACSChatThreadParticipantProperties struct { + // REQUIRED; The metadata of the user + Metadata map[string]*string + // REQUIRED; The communication identifier of the user ParticipantCommunicationIdentifier *CommunicationIdentifierModel // The name of the user DisplayName *string - - // The metadata of the user - Metadata map[string]*string } // ACSChatThreadPropertiesUpdatedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadPropertiesUpdated @@ -700,7 +541,7 @@ type ACSChatThreadPropertiesUpdatedEventData struct { // REQUIRED; The updated thread properties Properties map[string]any - // REQUIRED; The chat thread id + // The chat thread id ThreadID *string // The transaction id will be used as co-relation vector @@ -722,18 +563,18 @@ type ACSChatThreadPropertiesUpdatedPerUserEventData struct { // REQUIRED; The communication identifier of the user who updated the thread properties EditedByCommunicationIdentifier *CommunicationIdentifierModel + // REQUIRED; The thread metadata + Metadata map[string]*string + // REQUIRED; The updated thread properties Properties map[string]any // REQUIRED; The communication identifier of the target user RecipientCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The chat thread id + // The chat thread id ThreadID *string - // The thread metadata - Metadata map[string]*string - // The transaction id will be used as co-relation vector TransactionID *string @@ -756,7 +597,7 @@ type ACSChatThreadWithUserDeletedEventData struct { // REQUIRED; The communication identifier of the target user RecipientCommunicationIdentifier *CommunicationIdentifierModel - // REQUIRED; The chat thread id + // The chat thread id ThreadID *string // The transaction id will be used as co-relation vector @@ -766,40 +607,6 @@ type ACSChatThreadWithUserDeletedEventData struct { Version *int64 } -// ACSChatTypingIndicatorReceivedInThreadEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatTypingIndicatorReceivedInThread -// event. -type ACSChatTypingIndicatorReceivedInThreadEventData struct { - // REQUIRED; The original compose time of the message - ComposeTime *time.Time - - // REQUIRED; The body of the chat message - MessageBody *string - - // REQUIRED; The chat message id - MessageID *string - - // REQUIRED; The communication identifier of the sender - SenderCommunicationIdentifier *CommunicationIdentifierModel - - // REQUIRED; The chat thread id - ThreadID *string - - // REQUIRED; The type of the message - Type *string - - // REQUIRED; The version of the message - Version *int64 - - // The chat message metadata - Metadata map[string]*string - - // The display name of the sender - SenderDisplayName *string - - // The transaction id will be used as co-relation vector - TransactionID *string -} - // ACSEmailDeliveryReportReceivedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.EmailDeliveryReportReceived // event. type ACSEmailDeliveryReportReceivedEventData struct { @@ -933,12 +740,27 @@ type ACSMessageDeliveryStatusUpdatedEventData struct { To *string // The channel event error - Error *Error + Error *InternalACSMessageChannelEventError // The message id MessageID *string } +// ACSMessageEventData - Schema of common properties of all chat thread events +type ACSMessageEventData struct { + // REQUIRED; The message sender + From *string + + // REQUIRED; The time message was received + ReceivedTimestamp *time.Time + + // REQUIRED; The message recipient + To *string + + // The channel event error + Error *InternalACSMessageChannelEventError +} + // ACSMessageInteractiveButtonReplyContent - Message Interactive button reply content for a user to business message type ACSMessageInteractiveButtonReplyContent struct { // The ID of the button @@ -1027,7 +849,7 @@ type ACSMessageReceivedEventData struct { Context *ACSMessageContext // The channel event error - Error *Error + Error *InternalACSMessageChannelEventError // Optional. The received message interactive content InteractiveContent *ACSMessageInteractiveContent @@ -1090,7 +912,7 @@ type ACSRecordingFileStatusUpdatedEventData struct { // ACSRecordingStorageInfoProperties - Schema for all properties of Recording Storage Information. type ACSRecordingStorageInfoProperties struct { - // REQUIRED; List of details of recording chunks information + // READ-ONLY; List of details of recording chunks information RecordingChunks []ACSRecordingChunkInfoProperties } @@ -1106,12 +928,21 @@ 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 { - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job events Labels Labels map[string]*string @@ -1127,6 +958,9 @@ type ACSRouterJobCancelledEventData struct { // Router Job Disposition Code DispositionCode *string + // Router Event Job ID + JobID *string + // Router Job Note Note *string @@ -1137,18 +971,15 @@ type ACSRouterJobCancelledEventData struct { // ACSRouterJobClassificationFailedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobClassificationFailed // event type ACSRouterJobClassificationFailedEventData struct { - // REQUIRED; Router Job Classification Failed Errors - Errors []*Error - - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job events Labels Labels map[string]*string // REQUIRED; Router Jobs events Tags Tags map[string]*string + // READ-ONLY; Router Job Classification Failed Errors + Errors []InternalACSRouterCommunicationError + // Router Event Channel ID ChannelID *string @@ -1158,6 +989,9 @@ type ACSRouterJobClassificationFailedEventData struct { // Router Job Classification Policy Id ClassificationPolicyID *string + // Router Event Job ID + JobID *string + // Router Job events Queue Id QueueID *string } @@ -1165,12 +999,6 @@ type ACSRouterJobClassificationFailedEventData struct { // ACSRouterJobClassifiedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobClassified // event type ACSRouterJobClassifiedEventData struct { - // REQUIRED; Router Job Attached Worker Selector - AttachedWorkerSelectors []ACSRouterWorkerSelector - - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job events Labels Labels map[string]*string @@ -1189,19 +1017,22 @@ type ACSRouterJobClassifiedEventData struct { // Router Job Classification Policy Id ClassificationPolicyID *string + // Router Event Job ID + JobID *string + // Router Job Priority Priority *int32 // Router Job events Queue Id QueueID *string + + // READ-ONLY; Router Job Attached Worker Selector + AttachedWorkerSelectors []ACSRouterWorkerSelector } // ACSRouterJobClosedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobClosed // event type ACSRouterJobClosedEventData struct { - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job events Labels Labels map[string]*string @@ -1220,6 +1051,9 @@ type ACSRouterJobClosedEventData struct { // Router Job Closed Disposition Code DispositionCode *string + // Router Event Job ID + JobID *string + // Router Job events Queue Id QueueID *string @@ -1230,9 +1064,6 @@ type ACSRouterJobClosedEventData struct { // ACSRouterJobCompletedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobCompleted // event type ACSRouterJobCompletedEventData struct { - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job events Labels Labels map[string]*string @@ -1248,6 +1079,9 @@ type ACSRouterJobCompletedEventData struct { // Router Event Channel Reference ChannelReference *string + // Router Event Job ID + JobID *string + // Router Job events Queue Id QueueID *string @@ -1258,9 +1092,27 @@ type ACSRouterJobCompletedEventData struct { // ACSRouterJobDeletedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobDeleted // event type ACSRouterJobDeletedEventData struct { - // REQUIRED; Router Event Job ID + // 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 +} + +// ACSRouterJobEventData - Schema of common properties of all Router Job events +type ACSRouterJobEventData struct { // REQUIRED; Router Job events Labels Labels map[string]*string @@ -1273,6 +1125,9 @@ type ACSRouterJobDeletedEventData struct { // Router Event Channel Reference ChannelReference *string + // Router Event Job ID + JobID *string + // Router Job events Queue Id QueueID *string } @@ -1280,9 +1135,6 @@ type ACSRouterJobDeletedEventData struct { // ACSRouterJobExceptionTriggeredEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobExceptionTriggered // event type ACSRouterJobExceptionTriggeredEventData struct { - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job events Labels Labels map[string]*string @@ -1298,6 +1150,9 @@ type ACSRouterJobExceptionTriggeredEventData struct { // Router Job Exception Triggered Rule Id ExceptionRuleID *string + // Router Event Job ID + JobID *string + // Router Job events Queue Id QueueID *string @@ -1308,49 +1163,43 @@ type ACSRouterJobExceptionTriggeredEventData struct { // ACSRouterJobQueuedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobQueued // event type ACSRouterJobQueuedEventData struct { - // REQUIRED; Router Job Queued Attached Worker Selector - AttachedWorkerSelectors []ACSRouterWorkerSelector - - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job events Labels Labels map[string]*string - // REQUIRED; Router Job Priority - Priority *int32 - - // REQUIRED; Router Job Queued Requested Worker Selector - RequestedWorkerSelectors []ACSRouterWorkerSelector - // REQUIRED; Router Jobs events Tags Tags map[string]*string + // READ-ONLY; Router Job Queued Requested Worker Selector + RequestedWorkerSelectors []ACSRouterWorkerSelector + // Router Event Channel ID ChannelID *string // Router Event Channel Reference ChannelReference *string + // Router Event Job ID + JobID *string + + // Router Job Priority + Priority *int32 + // Router Job events Queue Id QueueID *string + + // READ-ONLY; Router Job Queued Attached Worker Selector + AttachedWorkerSelectors []ACSRouterWorkerSelector } // ACSRouterJobReceivedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobReceived // event type ACSRouterJobReceivedEventData struct { - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job Received Job Status JobStatus *ACSRouterJobStatus // REQUIRED; Router Job events Labels Labels map[string]*string - // REQUIRED; Router Job Received Requested Worker Selectors - RequestedWorkerSelectors []ACSRouterWorkerSelector - // REQUIRED; Router Job Received Scheduled Time in UTC ScheduledOn *time.Time @@ -1360,6 +1209,9 @@ type ACSRouterJobReceivedEventData struct { // REQUIRED; Unavailable For Matching for Router Job Received UnavailableForMatching *bool + // READ-ONLY; Router Job Received Requested Worker Selectors + RequestedWorkerSelectors []ACSRouterWorkerSelector + // Router Event Channel ID ChannelID *string @@ -1369,6 +1221,9 @@ type ACSRouterJobReceivedEventData struct { // Router Job Classification Policy Id ClassificationPolicyID *string + // Router Event Job ID + JobID *string + // Router Job Priority Priority *int32 @@ -1379,27 +1234,21 @@ type ACSRouterJobReceivedEventData struct { // ACSRouterJobSchedulingFailedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobSchedulingFailed // event type ACSRouterJobSchedulingFailedEventData struct { - // REQUIRED; Router Job Scheduling Failed Attached Worker Selector Expired - ExpiredAttachedWorkerSelectors []ACSRouterWorkerSelector - - // REQUIRED; Router Job Scheduling Failed Requested Worker Selector Expired - ExpiredRequestedWorkerSelectors []ACSRouterWorkerSelector - - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job events Labels Labels map[string]*string - // REQUIRED; Router Job Priority - Priority *int32 - // REQUIRED; Router Job Scheduling Failed Scheduled Time in UTC ScheduledOn *time.Time // REQUIRED; Router Jobs events Tags Tags map[string]*string + // READ-ONLY; Router Job Scheduling Failed Attached Worker Selector Expired + ExpiredAttachedWorkerSelectors []ACSRouterWorkerSelector + + // READ-ONLY; Router Job Scheduling Failed Requested Worker Selector Expired + ExpiredRequestedWorkerSelectors []ACSRouterWorkerSelector + // Router Event Channel ID ChannelID *string @@ -1409,6 +1258,12 @@ type ACSRouterJobSchedulingFailedEventData struct { // Router Job Scheduling Failed Reason FailureReason *string + // Router Event Job ID + JobID *string + + // Router Job Priority + Priority *int32 + // Router Job events Queue Id QueueID *string } @@ -1416,9 +1271,6 @@ type ACSRouterJobSchedulingFailedEventData struct { // ACSRouterJobUnassignedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobUnassigned // event type ACSRouterJobUnassignedEventData struct { - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job events Labels Labels map[string]*string @@ -1434,6 +1286,9 @@ type ACSRouterJobUnassignedEventData struct { // Router Event Channel Reference ChannelReference *string + // Router Event Job ID + JobID *string + // Router Job events Queue Id QueueID *string @@ -1444,21 +1299,9 @@ type ACSRouterJobUnassignedEventData struct { // ACSRouterJobWaitingForActivationEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobWaitingForActivation // event type ACSRouterJobWaitingForActivationEventData struct { - // REQUIRED; Router Job Waiting For Activation Worker Selector Expired - ExpiredAttachedWorkerSelectors []ACSRouterWorkerSelector - - // REQUIRED; Router Job Waiting For Activation Requested Worker Selector Expired - ExpiredRequestedWorkerSelectors []ACSRouterWorkerSelector - - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job events Labels Labels map[string]*string - // REQUIRED; Router Job Waiting For Activation Priority - Priority *int32 - // REQUIRED; Router Job Waiting For Activation Scheduled Time in UTC ScheduledOn *time.Time @@ -1468,12 +1311,24 @@ type ACSRouterJobWaitingForActivationEventData struct { // REQUIRED; Router Job Waiting For Activation Unavailable For Matching UnavailableForMatching *bool + // READ-ONLY; Router Job Waiting For Activation Worker Selector Expired + ExpiredAttachedWorkerSelectors []ACSRouterWorkerSelector + + // READ-ONLY; Router Job Waiting For Activation Requested Worker Selector Expired + ExpiredRequestedWorkerSelectors []ACSRouterWorkerSelector + // Router Event Channel ID ChannelID *string // Router Event Channel Reference ChannelReference *string + // Router Event Job ID + JobID *string + + // Router Job Waiting For Activation Priority + Priority *int32 + // Router Job events Queue Id QueueID *string } @@ -1481,27 +1336,27 @@ type ACSRouterJobWaitingForActivationEventData struct { // ACSRouterJobWorkerSelectorsExpiredEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobWorkerSelectorsExpired // event type ACSRouterJobWorkerSelectorsExpiredEventData struct { - // REQUIRED; Router Job Worker Selectors Expired Attached Worker Selectors - ExpiredAttachedWorkerSelectors []ACSRouterWorkerSelector - - // REQUIRED; Router Job Worker Selectors Expired Requested Worker Selectors - ExpiredRequestedWorkerSelectors []ACSRouterWorkerSelector - - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Job events Labels Labels map[string]*string // REQUIRED; Router Jobs events Tags Tags map[string]*string + // READ-ONLY; Router Job Worker Selectors Expired Attached Worker Selectors + ExpiredAttachedWorkerSelectors []ACSRouterWorkerSelector + + // READ-ONLY; Router Job Worker Selectors Expired Requested Worker Selectors + ExpiredRequestedWorkerSelectors []ACSRouterWorkerSelector + // 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 } @@ -1521,15 +1376,15 @@ type ACSRouterQueueDetails struct { // ACSRouterWorkerDeletedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerDeleted // event type ACSRouterWorkerDeletedEventData struct { - // REQUIRED; Router Event Job ID - JobID *string - // 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 } @@ -1541,12 +1396,24 @@ 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 { - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Worker Offer Accepted Job Labels JobLabels map[string]*string @@ -1568,6 +1435,9 @@ type ACSRouterWorkerOfferAcceptedEventData struct { // Router Event Channel Reference ChannelReference *string + // Router Event Job ID + JobID *string + // Router Worker Offer Accepted Job Priority JobPriority *int32 @@ -1584,15 +1454,15 @@ type ACSRouterWorkerOfferAcceptedEventData struct { // ACSRouterWorkerOfferDeclinedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferDeclined // event type ACSRouterWorkerOfferDeclinedEventData struct { - // REQUIRED; Router Event Job ID - JobID *string - // Router Event Channel ID ChannelID *string // Router Event Channel Reference ChannelReference *string + // Router Event Job ID + JobID *string + // Router Worker Offer Declined Offer Id OfferID *string @@ -1606,15 +1476,15 @@ type ACSRouterWorkerOfferDeclinedEventData struct { // ACSRouterWorkerOfferExpiredEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferExpired // event type ACSRouterWorkerOfferExpiredEventData struct { - // REQUIRED; Router Event Job ID - JobID *string - // Router Event Channel ID ChannelID *string // Router Event Channel Reference ChannelReference *string + // Router Event Job ID + JobID *string + // Router Worker Offer Expired Offer Id OfferID *string @@ -1631,9 +1501,6 @@ type ACSRouterWorkerOfferIssuedEventData struct { // REQUIRED; Router Worker Offer Issued Expiration Time in UTC ExpiresOn *time.Time - // REQUIRED; Router Event Job ID - JobID *string - // REQUIRED; Router Worker Offer Issued Job Labels JobLabels map[string]*string @@ -1655,6 +1522,9 @@ type ACSRouterWorkerOfferIssuedEventData struct { // Router Event Channel Reference ChannelReference *string + // Router Event Job ID + JobID *string + // Router Worker Offer Issued Job Priority JobPriority *int32 @@ -1671,15 +1541,15 @@ type ACSRouterWorkerOfferIssuedEventData struct { // ACSRouterWorkerOfferRevokedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferRevoked // event type ACSRouterWorkerOfferRevokedEventData struct { - // REQUIRED; Router Event Job ID - JobID *string - // Router Event Channel ID ChannelID *string // Router Event Channel Reference ChannelReference *string + // Router Event Job ID + JobID *string + // Router Worker Offer Revoked Offer Id OfferID *string @@ -1693,15 +1563,9 @@ type ACSRouterWorkerOfferRevokedEventData struct { // ACSRouterWorkerRegisteredEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerRegistered // event type ACSRouterWorkerRegisteredEventData struct { - // REQUIRED; Router Worker Registered Channel Configuration - ChannelConfigurations []ACSRouterChannelConfiguration - // REQUIRED; Router Worker Registered Labels Labels map[string]*string - // REQUIRED; Router Worker Registered Queue Info - QueueAssignments []ACSRouterQueueDetails - // REQUIRED; Router Worker Registered Tags Tags map[string]*string @@ -1710,6 +1574,12 @@ type ACSRouterWorkerRegisteredEventData struct { // Router Worker Registered Worker Id WorkerID *string + + // READ-ONLY; Router Worker Registered Channel Configuration + ChannelConfigurations []ACSRouterChannelConfiguration + + // READ-ONLY; Router Worker Registered Queue Info + QueueAssignments []ACSRouterQueueDetails } // ACSRouterWorkerSelector - Router Job Worker Selector @@ -1736,19 +1606,13 @@ type ACSRouterWorkerSelector struct { // ACSRouterWorkerUpdatedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerUpdated // event. type ACSRouterWorkerUpdatedEventData struct { - // REQUIRED; Router Worker Updated Channel Configuration - ChannelConfigurations []ACSRouterChannelConfiguration - // REQUIRED; Router Worker Updated Labels Labels map[string]*string - // REQUIRED; Router Worker Updated Queue Info - QueueAssignments []ACSRouterQueueDetails - // REQUIRED; Router Worker Updated Tags Tags map[string]*string - // REQUIRED; Router Worker Properties Updated + // READ-ONLY; Router Worker Properties Updated UpdatedWorkerProperties []ACSRouterUpdatedWorkerProperty // Router Worker Updated Total Capacity @@ -1756,66 +1620,84 @@ type ACSRouterWorkerUpdatedEventData struct { // Router Worker Updated Worker Id WorkerID *string + + // READ-ONLY; Router Worker Updated Channel Configuration + ChannelConfigurations []ACSRouterChannelConfiguration + + // READ-ONLY; Router Worker Updated Queue Info + QueueAssignments []ACSRouterQueueDetails } // ACSSMSDeliveryAttemptProperties - Schema for details of a delivery attempt type ACSSMSDeliveryAttemptProperties struct { - // REQUIRED; Number of segments whose delivery failed + // REQUIRED; TimeStamp when delivery was attempted + Timestamp *time.Time + + // Number of segments whose delivery failed SegmentsFailed *int32 - // REQUIRED; Number of segments that were successfully delivered + // Number of segments that were successfully delivered SegmentsSucceeded *int32 - - // REQUIRED; TimeStamp when delivery was attempted - Timestamp *time.Time } // ACSSMSDeliveryReportReceivedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSDeliveryReportReceived // event. type ACSSMSDeliveryReportReceivedEventData struct { - // REQUIRED; List of details of delivery attempts made - DeliveryAttempts []ACSSMSDeliveryAttemptProperties + // REQUIRED; The time at which the SMS delivery report was received + ReceivedTimestamp *time.Time - // REQUIRED; Status of Delivery + // Status of Delivery DeliveryStatus *string - // REQUIRED; Details about Delivery Status + // Details about Delivery Status DeliveryStatusDetails *string - // REQUIRED; The identity of SMS message sender + // The identity of SMS message sender From *string - // REQUIRED; The identity of the SMS message + // The identity of the SMS message MessageID *string - // REQUIRED; The time at which the SMS delivery report was received - ReceivedTimestamp *time.Time + // Customer Content + Tag *string - // REQUIRED; The identity of SMS message receiver + // The identity of SMS message receiver To *string - // Customer Content - Tag *string + // READ-ONLY; List of details of delivery attempts made + DeliveryAttempts []ACSSMSDeliveryAttemptProperties } -// ACSSMSReceivedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSReceived event. -type ACSSMSReceivedEventData struct { - // REQUIRED; The identity of SMS message sender +// ACSSMSEventBaseProperties - Schema of common properties of all SMS events +type ACSSMSEventBaseProperties struct { + // The identity of SMS message sender From *string - // REQUIRED; The SMS content - Message *string - - // REQUIRED; The identity of the SMS message + // 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 ReceivedTimestamp *time.Time // REQUIRED; Number of segments in the message SegmentCount *int32 - // REQUIRED; The identity of SMS message receiver + // The identity of SMS message sender + From *string + + // The SMS content + Message *string + + // The identity of the SMS message + MessageID *string + + // The identity of SMS message receiver To *string } @@ -1909,6 +1791,42 @@ type APIManagementAPIUpdatedEventData struct { ResourceURI *string } +// APIManagementCircuitBreakerClosedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Closed +// event. +type APIManagementCircuitBreakerClosedEventData struct { + // REQUIRED; Name of the backend for which the circuit has closed. + BackendName *string + + // REQUIRED; Information related to the circuit breaker configured on the backend. + CircuitBreaker *APIManagementCircuitBreakerProperties +} + +// APIManagementCircuitBreakerOpenedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Opened +// event. +type APIManagementCircuitBreakerOpenedEventData struct { + // REQUIRED; Name of the backend for which the circuit has opened. + BackendName *string + + // REQUIRED; Information related to the circuit breaker configured on the backend. + CircuitBreaker *APIManagementCircuitBreakerProperties +} + +// APIManagementCircuitBreakerProperties - Information related to the circuit breaker configured on the backend. +type APIManagementCircuitBreakerProperties struct { + // REQUIRED; Overview of all configured rules and respective details. + Rules map[string]*APIManagementCircuitBreakerPropertiesRule +} + +type APIManagementCircuitBreakerPropertiesRule struct { +} + +// APIManagementExpiredGatewayTokenProperties - Information related to a gateway token that has expired for a self-hosted +// gateway deployment. +type APIManagementExpiredGatewayTokenProperties struct { + // REQUIRED; Timestamp when the gateway token has expired. + ExpiredAtUTC *time.Time +} + // APIManagementGatewayAPIAddedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayAPIAdded // event. type APIManagementGatewayAPIAddedEventData struct { @@ -1989,6 +1907,36 @@ type APIManagementGatewayHostnameConfigurationUpdatedEventData struct { ResourceURI *string } +// APIManagementGatewayProperties - Information related to a given self-hosted gateway deployment. +type APIManagementGatewayProperties struct { + // REQUIRED; Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced + // in the Azure API Management instance. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateway/` + GatewayID *string + + // REQUIRED; Unique instance ID of the deployed gateway + InstanceID *string +} + +// APIManagementGatewayTokenExpiredEventData - Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenExpired +// event. +type APIManagementGatewayTokenExpiredEventData struct { + // REQUIRED; Information related to a given self-hosted gateway deployment. + GatewayInfo *APIManagementGatewayProperties + + // REQUIRED; Information related to a an expired gateway token for a self-hosted gateway deployment. + TokenInfo *APIManagementExpiredGatewayTokenProperties +} + +// APIManagementGatewayTokenNearExpiryEventData - Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenNearExpiry +// event. +type APIManagementGatewayTokenNearExpiryEventData struct { + // REQUIRED; Information related to a given self-hosted gateway deployment. + GatewayInfo *APIManagementGatewayProperties + + // REQUIRED; Information related to a an expired gateway token for a self-hosted gateway deployment. + TokenInfo *APIManagementNearExpiryGatewayTokenProperties +} + // APIManagementGatewayUpdatedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayUpdated // event. type APIManagementGatewayUpdatedEventData struct { @@ -1997,6 +1945,13 @@ type APIManagementGatewayUpdatedEventData struct { ResourceURI *string } +// APIManagementNearExpiryGatewayTokenProperties - Information related to a gateway token that is near expiry for a self-hosted +// gateway deployment. +type APIManagementNearExpiryGatewayTokenProperties struct { + // REQUIRED; Timestamp when the gateway token will expire. + ExpiredAtUTC *time.Time +} + // APIManagementProductCreatedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductCreated // event. type APIManagementProductCreatedEventData struct { @@ -2074,13 +2029,13 @@ type AVSClusterCreatedEventData struct { // REQUIRED; Id of the operation that caused this event. OperationID *string - // Hosts added to the cluster in this event, if any. + // READ-ONLY; Hosts added to the cluster in this event, if any. AddedHostNames []string - // Hosts in Maintenance mode in the cluster, if any. + // READ-ONLY; Hosts in Maintenance mode in the cluster, if any. InMaintenanceHostNames []string - // Hosts removed from the cluster in this event, if any. + // READ-ONLY; Hosts removed from the cluster in this event, if any. RemovedHostNames []string } @@ -2089,31 +2044,46 @@ type AVSClusterDeletedEventData struct { // REQUIRED; Id of the operation that caused this event. OperationID *string - // Hosts added to the cluster in this event, if any. + // READ-ONLY; Hosts added to the cluster in this event, if any. AddedHostNames []string - // Hosts in Maintenance mode in the cluster, if any. + // READ-ONLY; Hosts in Maintenance mode in the cluster, if any. InMaintenanceHostNames []string - // Hosts removed from the cluster in this event, if any. + // READ-ONLY; Hosts removed from the cluster in this event, if any. RemovedHostNames []string } -// AVSClusterFailedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterFailed event. -type AVSClusterFailedEventData struct { +// AVSClusterEventData - Schema of the Data property of an EventGridEvent for Microsoft.AVS/clusters events. +type AVSClusterEventData struct { // REQUIRED; Id of the operation that caused this event. OperationID *string - // Hosts added to the cluster in this event, if any. + // READ-ONLY; Hosts added to the cluster in this event, if any. AddedHostNames []string + // READ-ONLY; Hosts in Maintenance mode in the cluster, if any. + InMaintenanceHostNames []string + + // READ-ONLY; Hosts removed from the cluster in this event, if any. + RemovedHostNames []string +} + +// AVSClusterFailedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterFailed event. +type AVSClusterFailedEventData struct { + // REQUIRED; Id of the operation that caused this event. + OperationID *string + // Failure reason of an event. FailureMessage *string - // Hosts in Maintenance mode in the cluster, if any. + // READ-ONLY; Hosts added to the cluster in this event, if any. + AddedHostNames []string + + // READ-ONLY; Hosts in Maintenance mode in the cluster, if any. InMaintenanceHostNames []string - // Hosts removed from the cluster in this event, if any. + // READ-ONLY; Hosts removed from the cluster in this event, if any. RemovedHostNames []string } @@ -2122,13 +2092,13 @@ type AVSClusterUpdatedEventData struct { // REQUIRED; Id of the operation that caused this event. OperationID *string - // Hosts added to the cluster in this event, if any. + // READ-ONLY; Hosts added to the cluster in this event, if any. AddedHostNames []string - // Hosts in Maintenance mode in the cluster, if any. + // READ-ONLY; Hosts in Maintenance mode in the cluster, if any. InMaintenanceHostNames []string - // Hosts removed from the cluster in this event, if any. + // READ-ONLY; Hosts removed from the cluster in this event, if any. RemovedHostNames []string } @@ -2137,16 +2107,22 @@ type AVSClusterUpdatingEventData struct { // REQUIRED; Id of the operation that caused this event. OperationID *string - // Hosts added to the cluster in this event, if any. + // READ-ONLY; Hosts added to the cluster in this event, if any. AddedHostNames []string - // Hosts in Maintenance mode in the cluster, if any. + // READ-ONLY; Hosts in Maintenance mode in the cluster, if any. InMaintenanceHostNames []string - // Hosts removed from the cluster in this event, if any. + // READ-ONLY; Hosts removed from the cluster in this event, if any. RemovedHostNames []string } +// AVSPrivateCloudEventData - Schema of the Data property of an EventGridEvent for Microsoft.AVS/privateClouds events. +type AVSPrivateCloudEventData struct { + // REQUIRED; Id of the operation that caused this event. + OperationID *string +} + // AVSPrivateCloudFailedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.AVS.PrivateCloudFailed // event. type AVSPrivateCloudFailedEventData struct { @@ -2180,7 +2156,19 @@ type AVSScriptExecutionCancelledEventData struct { // REQUIRED; Id of the operation that caused this event. OperationID *string - // Stdout outputs from the execution, if any. + // READ-ONLY; Stdout outputs from the execution, if any. + Output []string +} + +// AVSScriptExecutionEventData - Schema of the Data property of an EventGridEvent for Microsoft.AVS/scriptExecutions events. +type AVSScriptExecutionEventData struct { + // REQUIRED; Cmdlet referenced in the execution that caused this event. + CmdletID *string + + // REQUIRED; Id of the operation that caused this event. + OperationID *string + + // READ-ONLY; Stdout outputs from the execution, if any. Output []string } @@ -2196,7 +2184,7 @@ type AVSScriptExecutionFailedEventData struct { // Failure reason of an event. FailureMessage *string - // Stdout outputs from the execution, if any. + // READ-ONLY; Stdout outputs from the execution, if any. Output []string } @@ -2212,7 +2200,7 @@ type AVSScriptExecutionFinishedEventData struct { // REQUIRED; Id of the operation that caused this event. OperationID *string - // Stdout outputs from the execution, if any. + // READ-ONLY; Stdout outputs from the execution, if any. Output []string } @@ -2225,7 +2213,7 @@ type AVSScriptExecutionStartedEventData struct { // REQUIRED; Id of the operation that caused this event. OperationID *string - // Stdout outputs from the execution, if any. + // READ-ONLY; Stdout outputs from the execution, if any. Output []string } @@ -2274,6 +2262,18 @@ type AppConfigurationSnapshotCreatedEventData struct { SyncToken *string } +// AppConfigurationSnapshotEventData - Schema of common properties of snapshot events +type AppConfigurationSnapshotEventData struct { + // REQUIRED; The etag representing the new state of the snapshot. + Etag *string + + // REQUIRED; The name of the snapshot. + Name *string + + // REQUIRED; 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 { @@ -2312,20 +2312,20 @@ type CommunicationIdentifierModel struct { // REQUIRED; The communication user. CommunicationUser *CommunicationUserIdentifierModel - // REQUIRED; Raw Id of the identifier. Optional in requests, required in responses. - RawID *string - - // The identifier kind. Only required in responses. + // REQUIRED; The identifier kind. Only required in responses. Kind *CommunicationIdentifierModelKind - // The Microsoft Teams application. + // REQUIRED; The Microsoft Teams application. MicrosoftTeamsApp *MicrosoftTeamsAppIdentifierModel - // The Microsoft Teams user. + // REQUIRED; The Microsoft Teams user. MicrosoftTeamsUser *MicrosoftTeamsUserIdentifierModel - // The phone number. + // REQUIRED; The phone number. PhoneNumber *PhoneNumberIdentifierModel + + // Raw Id of the identifier. Optional in requests, required in responses. + RawID *string } // CommunicationUserIdentifierModel - A user that got created with an Azure Communication Services resource. @@ -2334,6 +2334,27 @@ type CommunicationUserIdentifierModel struct { ID *string } +// ContainerRegistryArtifactEventData - The content of the event request message. +type ContainerRegistryArtifactEventData struct { + // REQUIRED; The action that encompasses the provided event. + Action *string + + // REQUIRED; The event ID. + ID *string + + // REQUIRED; The location of the event. + Location *string + + // REQUIRED; The target of the event. + Target *ContainerRegistryArtifactEventTarget + + // REQUIRED; The time at which the event occurred. + Timestamp *time.Time + + // The connected registry information if the event is generated by a connected registry. + ConnectedRegistry *ContainerRegistryEventConnectedRegistry +} + // ContainerRegistryArtifactEventTarget - The target of the event. type ContainerRegistryArtifactEventTarget struct { // REQUIRED; The MIME type of the artifact. @@ -2415,6 +2436,37 @@ type ContainerRegistryEventConnectedRegistry struct { Name *string } +// ContainerRegistryEventData - The content of the event request message. +type ContainerRegistryEventData struct { + // REQUIRED; The action that encompasses the provided event. + Action *string + + // REQUIRED; The event ID. + ID *string + + // REQUIRED; The location of the event. + Location *string + + // REQUIRED; The target of the event. + Target *ContainerRegistryEventTarget + + // REQUIRED; The time at which the event occurred. + Timestamp *time.Time + + // The agent that initiated the event. For most situations, this could be from the authorization context of the request. + Actor *ContainerRegistryEventActor + + // The connected registry information if the event is generated by a connected registry. + ConnectedRegistry *ContainerRegistryEventConnectedRegistry + + // The request that generated the event. + Request *ContainerRegistryEventRequest + + // The registry node that generated the event. Put differently, while the actor initiates the event, the source generates + // it. + Source *ContainerRegistryEventSource +} + // ContainerRegistryEventRequest - The request that generated the event. type ContainerRegistryEventRequest struct { // REQUIRED; The externally accessible hostname of the registry instance, as specified by the http host header on incoming @@ -2548,6 +2600,12 @@ type ContainerServiceClusterSupportEndingEventData struct { KubernetesVersion *string } +// ContainerServiceClusterSupportEventData - Schema of common properties of cluster support events +type ContainerServiceClusterSupportEventData struct { + // REQUIRED; 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 { @@ -2566,6 +2624,12 @@ type ContainerServiceNewKubernetesVersionAvailableEventData struct { LatestPreviewKubernetesVersion *string } +// ContainerServiceNodePoolRollingEventData - Schema of common properties of node pool rolling events +type ContainerServiceNodePoolRollingEventData struct { + // REQUIRED; 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 { @@ -2636,6 +2700,50 @@ type DeviceConnectionStateEventInfo struct { SequenceNumber *string } +// DeviceConnectionStateEventProperties - Schema of the Data property of an EventGridEvent for a device connection state event +// (DeviceConnected, DeviceDisconnected). +type DeviceConnectionStateEventProperties struct { + // REQUIRED; Information about the device connection state event. + DeviceConnectionStateEventInfo *DeviceConnectionStateEventInfo + + // REQUIRED; The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports + // ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = `@` ; $ '. + DeviceID *string + + // REQUIRED; Name of the IoT Hub where the device was created or deleted. + HubName *string + + // The unique identifier of the module. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit + // alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = `@` ; $ '. + ModuleID *string +} + +// DeviceLifeCycleEventProperties - Schema of the Data property of an EventGridEvent for a device life cycle event (DeviceCreated, +// DeviceDeleted). +type DeviceLifeCycleEventProperties struct { + // REQUIRED; The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports + // ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = `@` ; $ '. + DeviceID *string + + // REQUIRED; Name of the IoT Hub where the device was created or deleted. + HubName *string + + // REQUIRED; Information about the device twin, which is the cloud representation of application device metadata. + Twin *DeviceTwinInfo +} + +// DeviceTelemetryEventProperties - Schema of the Data property of an EventGridEvent for a device telemetry event (DeviceTelemetry). +type DeviceTelemetryEventProperties struct { + // REQUIRED; The content of the message from the device. + Body map[string]any + + // REQUIRED; Application properties are user-defined strings that can be added to the message. These fields are optional. + Properties map[string]*string + + // REQUIRED; System properties help identify contents and source of the messages. + SystemProperties map[string]*string +} + // DeviceTwinInfo - Information about the device twin, which is the cloud representation of application device metadata. type DeviceTwinInfo struct { // REQUIRED; Authentication type used for this device: either SAS, SelfSigned, or CertificateAuthority. @@ -2711,6 +2819,31 @@ type DeviceTwinProperties struct { Version *float32 } +// EdgeSolutionVersionPublishedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Edge.SolutionVersionPublished +// event. +type EdgeSolutionVersionPublishedEventData struct { + // REQUIRED; API Version supported for the resources + APIVersion *string + + // REQUIRED; Direct URL to callback for updating validation status + CallbackURL *string + + // REQUIRED; A GUID to uniquely track External Solution Validation + ExternalValidationID *string + + // REQUIRED; ARM ID of the Solution Template resource + SolutionTemplateID *string + + // REQUIRED; ARM ID of the Solution Template Version resource + SolutionTemplateVersionID *string + + // REQUIRED; ARM ID of the Solution Version resource + SolutionVersionID *string + + // REQUIRED; ARM ID of the Target resource + TargetID *string +} + // EventGridMQTTClientCreatedOrUpdatedEventData - Event data for Microsoft.EventGrid.MQTTClientCreatedOrUpdated event. type EventGridMQTTClientCreatedOrUpdatedEventData struct { // REQUIRED; The key-value attributes that are assigned to the client resource. @@ -2753,6 +2886,20 @@ type EventGridMQTTClientDeletedEventData struct { NamespaceName *string } +// EventGridMQTTClientEventData - Schema of the Data property of an EventGridEvent for MQTT Client state changes. +type EventGridMQTTClientEventData struct { + // REQUIRED; Unique identifier for the MQTT client that the client presents to the service + // for authentication. This case-sensitive string can be up to 128 characters + // long, and supports UTF-8 characters. + ClientAuthenticationName *string + + // REQUIRED; Name of the client resource in the Event Grid namespace. + ClientName *string + + // REQUIRED; Name of the Event Grid namespace where the MQTT client was created or updated. + NamespaceName *string +} + // EventGridMQTTClientSessionConnectedEventData - Event data for Microsoft.EventGrid.MQTTClientSessionConnected event. type EventGridMQTTClientSessionConnectedEventData struct { // REQUIRED; Unique identifier for the MQTT client that the client presents to the service @@ -3023,8 +3170,8 @@ type IOTHubDeviceTelemetryEventData struct { SystemProperties map[string]*string } -// internalACSMessageChannelEventError - Message Channel Event Error -type internalACSMessageChannelEventError struct { +// InternalACSMessageChannelEventError - Message Channel Event Error +type InternalACSMessageChannelEventError struct { // The channel error code ChannelCode *string @@ -3032,22 +3179,22 @@ type internalACSMessageChannelEventError struct { ChannelMessage *string } -// internalACSRouterCommunicationError - Router Communication Error -type internalACSRouterCommunicationError struct { - // REQUIRED; List of Router Communication Errors - Details []internalACSRouterCommunicationError - +// InternalACSRouterCommunicationError - Router Communication Error +type InternalACSRouterCommunicationError struct { // REQUIRED; Router Communication Inner Error - Innererror *internalACSRouterCommunicationError - - // Router Communication Error Code - Code *string + Innererror *InternalACSRouterCommunicationError // Router Communication Error Message Message *string // Router Communication Error Target Target *string + + // READ-ONLY; List of Router Communication Errors + Errors []InternalACSRouterCommunicationError + + // Router Communication Error Code + Code *string } // KeyVaultAccessPolicyChangedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.VaultAccessPolicyChanged @@ -3411,36 +3558,54 @@ type MachineLearningServicesRunStatusChangedEventData struct { // MapsGeofenceEnteredEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceEntered event. type MapsGeofenceEnteredEventData struct { - // REQUIRED; Lists of the geometry ID of the geofence which is expired relative to the user time in the request. + // REQUIRED; True if at least one event is published to the Azure Maps event subscriber, false if no event is published to + // the Azure Maps event subscriber. + IsEventPublished *bool + + // READ-ONLY; Lists of the geometry ID of the geofence which is expired relative to the user time in the request. ExpiredGeofenceGeometryID []string - // REQUIRED; Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer + // READ-ONLY; Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer // around the fence. Geometries []MapsGeofenceGeometry - // REQUIRED; Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. + // READ-ONLY; Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. InvalidPeriodGeofenceGeometryID []string +} +// MapsGeofenceEventProperties - Schema of the Data property of an EventGridEvent for a Geofence event (GeofenceEntered, GeofenceExited, +// GeofenceResult). +type MapsGeofenceEventProperties struct { // REQUIRED; True if at least one event is published to the Azure Maps event subscriber, false if no event is published to // the Azure Maps event subscriber. IsEventPublished *bool -} -// MapsGeofenceExitedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceExited event. -type MapsGeofenceExitedEventData struct { - // REQUIRED; Lists of the geometry ID of the geofence which is expired relative to the user time in the request. + // READ-ONLY; Lists of the geometry ID of the geofence which is expired relative to the user time in the request. ExpiredGeofenceGeometryID []string - // REQUIRED; Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer + // READ-ONLY; Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer // around the fence. Geometries []MapsGeofenceGeometry - // REQUIRED; Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. + // READ-ONLY; Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. InvalidPeriodGeofenceGeometryID []string +} +// MapsGeofenceExitedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceExited event. +type MapsGeofenceExitedEventData struct { // REQUIRED; True if at least one event is published to the Azure Maps event subscriber, false if no event is published to // the Azure Maps event subscriber. IsEventPublished *bool + + // READ-ONLY; Lists of the geometry ID of the geofence which is expired relative to the user time in the request. + ExpiredGeofenceGeometryID []string + + // READ-ONLY; Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer + // around the fence. + Geometries []MapsGeofenceGeometry + + // READ-ONLY; Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. + InvalidPeriodGeofenceGeometryID []string } // MapsGeofenceGeometry - The geofence geometry. @@ -3471,19 +3636,19 @@ type MapsGeofenceGeometry struct { // MapsGeofenceResultEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceResult event. type MapsGeofenceResultEventData struct { - // REQUIRED; Lists of the geometry ID of the geofence which is expired relative to the user time in the request. + // REQUIRED; True if at least one event is published to the Azure Maps event subscriber, false if no event is published to + // the Azure Maps event subscriber. + IsEventPublished *bool + + // READ-ONLY; Lists of the geometry ID of the geofence which is expired relative to the user time in the request. ExpiredGeofenceGeometryID []string - // REQUIRED; Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer + // READ-ONLY; Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer // around the fence. Geometries []MapsGeofenceGeometry - // REQUIRED; Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. + // READ-ONLY; Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. InvalidPeriodGeofenceGeometryID []string - - // REQUIRED; True if at least one event is published to the Azure Maps event subscriber, false if no event is published to - // the Azure Maps event subscriber. - IsEventPublished *bool } // MicrosoftTeamsAppIdentifierModel - A Microsoft Teams application. @@ -3952,6 +4117,16 @@ 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. @@ -3998,6 +4173,19 @@ type ResourceNotificationsResourceUpdatedDetails struct { Tags map[string]*string } +// ResourceNotificationsResourceUpdatedEventData - Describes the schema of the common properties across all ARN system topic +// events +type ResourceNotificationsResourceUpdatedEventData struct { + // REQUIRED; api version of the resource properties bag + APIVersion *string + + // REQUIRED; details about operational info + OperationalDetails *ResourceNotificationsOperationalDetails + + // REQUIRED; resourceInfo details for update event + ResourceDetails *ResourceNotificationsResourceUpdatedDetails +} + // 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 { diff --git a/sdk/messaging/eventgrid/azsystemevents/models_serde.go b/sdk/messaging/eventgrid/azsystemevents/models_serde.go index f235e882c25b..8aca33bd16a4 100644 --- a/sdk/messaging/eventgrid/azsystemevents/models_serde.go +++ b/sdk/messaging/eventgrid/azsystemevents/models_serde.go @@ -7,355 +7,21 @@ package azsystemevents import ( "encoding/json" "fmt" - "reflect" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" ) -// MarshalJSON implements the json.Marshaller interface for type ACSCallEndReasonProperties. -func (a ACSCallEndReasonProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", a.Code) - populate(objectMap, "phrase", a.Phrase) - populate(objectMap, "subCode", a.SubCode) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallEndReasonProperties. -func (a *ACSCallEndReasonProperties) 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 "code": - err = unpopulate(val, "Code", &a.Code) - delete(rawMsg, key) - case "phrase": - err = unpopulate(val, "Phrase", &a.Phrase) - delete(rawMsg, key) - case "subCode": - err = unpopulate(val, "SubCode", &a.SubCode) - 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 ACSCallEndedByProperties. -func (a ACSCallEndedByProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "communicationIdentifier", a.CommunicationIdentifier) - populate(objectMap, "name", a.Name) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallEndedByProperties. -func (a *ACSCallEndedByProperties) 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 "communicationIdentifier": - err = unpopulate(val, "CommunicationIdentifier", &a.CommunicationIdentifier) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - 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 ACSCallEndedEventData. -func (a ACSCallEndedEventData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "callDurationInSeconds", a.CallDurationInSeconds) - populate(objectMap, "correlationId", a.CorrelationID) - populate(objectMap, "endedBy", a.EndedBy) - populate(objectMap, "group", a.Group) - populate(objectMap, "isRoomsCall", a.IsRoomsCall) - populate(objectMap, "isTwoParty", a.IsTwoParty) - populate(objectMap, "reason", a.Reason) - populate(objectMap, "room", a.Room) - populate(objectMap, "serverCallId", a.ServerCallID) - populate(objectMap, "startedBy", a.StartedBy) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallEndedEventData. -func (a *ACSCallEndedEventData) 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 "callDurationInSeconds": - err = unpopulate(val, "CallDurationInSeconds", &a.CallDurationInSeconds) - delete(rawMsg, key) - case "correlationId": - err = unpopulate(val, "CorrelationID", &a.CorrelationID) - delete(rawMsg, key) - case "endedBy": - err = unpopulate(val, "EndedBy", &a.EndedBy) - delete(rawMsg, key) - case "group": - err = unpopulate(val, "Group", &a.Group) - delete(rawMsg, key) - case "isRoomsCall": - err = unpopulate(val, "IsRoomsCall", &a.IsRoomsCall) - delete(rawMsg, key) - case "isTwoParty": - err = unpopulate(val, "IsTwoParty", &a.IsTwoParty) - delete(rawMsg, key) - case "reason": - err = unpopulate(val, "Reason", &a.Reason) - delete(rawMsg, key) - case "room": - err = unpopulate(val, "Room", &a.Room) - delete(rawMsg, key) - case "serverCallId": - err = unpopulate(val, "ServerCallID", &a.ServerCallID) - delete(rawMsg, key) - case "startedBy": - err = unpopulate(val, "StartedBy", &a.StartedBy) - 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 ACSCallGroupProperties. -func (a ACSCallGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallGroupProperties. -func (a *ACSCallGroupProperties) 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 "id": - err = unpopulate(val, "ID", &a.ID) - 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 ACSCallParticipantAddedEventData. -func (a ACSCallParticipantAddedEventData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "correlationId", a.CorrelationID) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "group", a.Group) - populate(objectMap, "isRoomsCall", a.IsRoomsCall) - populate(objectMap, "isTwoParty", a.IsTwoParty) - populate(objectMap, "participantId", a.ParticipantID) - populate(objectMap, "room", a.Room) - populate(objectMap, "serverCallId", a.ServerCallID) - populate(objectMap, "startedBy", a.StartedBy) - populate(objectMap, "user", a.User) - populate(objectMap, "userAgent", a.UserAgent) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallParticipantAddedEventData. -func (a *ACSCallParticipantAddedEventData) 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 "correlationId": - err = unpopulate(val, "CorrelationID", &a.CorrelationID) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "group": - err = unpopulate(val, "Group", &a.Group) - delete(rawMsg, key) - case "isRoomsCall": - err = unpopulate(val, "IsRoomsCall", &a.IsRoomsCall) - delete(rawMsg, key) - case "isTwoParty": - err = unpopulate(val, "IsTwoParty", &a.IsTwoParty) - delete(rawMsg, key) - case "participantId": - err = unpopulate(val, "ParticipantID", &a.ParticipantID) - delete(rawMsg, key) - case "room": - err = unpopulate(val, "Room", &a.Room) - delete(rawMsg, key) - case "serverCallId": - err = unpopulate(val, "ServerCallID", &a.ServerCallID) - delete(rawMsg, key) - case "startedBy": - err = unpopulate(val, "StartedBy", &a.StartedBy) - delete(rawMsg, key) - case "user": - err = unpopulate(val, "User", &a.User) - delete(rawMsg, key) - case "userAgent": - err = unpopulate(val, "UserAgent", &a.UserAgent) - 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 ACSCallParticipantEventProperties. -func (a ACSCallParticipantEventProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "correlationId", a.CorrelationID) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "group", a.Group) - populate(objectMap, "isRoomsCall", a.IsRoomsCall) - populate(objectMap, "isTwoParty", a.IsTwoParty) - populate(objectMap, "participantId", a.ParticipantID) - populate(objectMap, "room", a.Room) - populate(objectMap, "serverCallId", a.ServerCallID) - populate(objectMap, "startedBy", a.StartedBy) - populate(objectMap, "user", a.User) - populate(objectMap, "userAgent", a.UserAgent) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallParticipantEventProperties. -func (a *ACSCallParticipantEventProperties) 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 "correlationId": - err = unpopulate(val, "CorrelationID", &a.CorrelationID) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "group": - err = unpopulate(val, "Group", &a.Group) - delete(rawMsg, key) - case "isRoomsCall": - err = unpopulate(val, "IsRoomsCall", &a.IsRoomsCall) - delete(rawMsg, key) - case "isTwoParty": - err = unpopulate(val, "IsTwoParty", &a.IsTwoParty) - delete(rawMsg, key) - case "participantId": - err = unpopulate(val, "ParticipantID", &a.ParticipantID) - delete(rawMsg, key) - case "room": - err = unpopulate(val, "Room", &a.Room) - delete(rawMsg, key) - case "serverCallId": - err = unpopulate(val, "ServerCallID", &a.ServerCallID) - delete(rawMsg, key) - case "startedBy": - err = unpopulate(val, "StartedBy", &a.StartedBy) - delete(rawMsg, key) - case "user": - err = unpopulate(val, "User", &a.User) - delete(rawMsg, key) - case "userAgent": - err = unpopulate(val, "UserAgent", &a.UserAgent) - 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 ACSCallParticipantProperties. -func (a ACSCallParticipantProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "communicationIdentifier", a.CommunicationIdentifier) - populate(objectMap, "role", a.Role) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallParticipantProperties. -func (a *ACSCallParticipantProperties) 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 "communicationIdentifier": - err = unpopulate(val, "CommunicationIdentifier", &a.CommunicationIdentifier) - delete(rawMsg, key) - case "role": - err = unpopulate(val, "Role", &a.Role) - 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 ACSCallParticipantRemovedEventData. -func (a ACSCallParticipantRemovedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ACSChatEventBaseProperties. +func (a ACSChatEventBaseProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "correlationId", a.CorrelationID) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "group", a.Group) - populate(objectMap, "isRoomsCall", a.IsRoomsCall) - populate(objectMap, "isTwoParty", a.IsTwoParty) - populate(objectMap, "participantId", a.ParticipantID) - populate(objectMap, "room", a.Room) - populate(objectMap, "serverCallId", a.ServerCallID) - populate(objectMap, "startedBy", a.StartedBy) - populate(objectMap, "user", a.User) - populate(objectMap, "userAgent", a.UserAgent) + 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 ACSCallParticipantRemovedEventData. -func (a *ACSCallParticipantRemovedEventData) UnmarshalJSON(data []byte) error { +// 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) @@ -363,65 +29,14 @@ func (a *ACSCallParticipantRemovedEventData) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "correlationId": - err = unpopulate(val, "CorrelationID", &a.CorrelationID) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "group": - err = unpopulate(val, "Group", &a.Group) - delete(rawMsg, key) - case "isRoomsCall": - err = unpopulate(val, "IsRoomsCall", &a.IsRoomsCall) - delete(rawMsg, key) - case "isTwoParty": - err = unpopulate(val, "IsTwoParty", &a.IsTwoParty) - delete(rawMsg, key) - case "participantId": - err = unpopulate(val, "ParticipantID", &a.ParticipantID) - delete(rawMsg, key) - case "room": - err = unpopulate(val, "Room", &a.Room) - delete(rawMsg, key) - case "serverCallId": - err = unpopulate(val, "ServerCallID", &a.ServerCallID) - delete(rawMsg, key) - case "startedBy": - err = unpopulate(val, "StartedBy", &a.StartedBy) - delete(rawMsg, key) - case "user": - err = unpopulate(val, "User", &a.User) + case "recipientCommunicationIdentifier": + err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) delete(rawMsg, key) - case "userAgent": - err = unpopulate(val, "UserAgent", &a.UserAgent) + case "threadId": + err = unpopulate(val, "ThreadID", &a.ThreadID) 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 ACSCallRoomProperties. -func (a ACSCallRoomProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallRoomProperties. -func (a *ACSCallRoomProperties) 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 "id": - err = unpopulate(val, "ID", &a.ID) + case "transactionId": + err = unpopulate(val, "TransactionID", &a.TransactionID) delete(rawMsg, key) } if err != nil { @@ -431,48 +46,28 @@ func (a *ACSCallRoomProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSCallStartedEventData. -func (a ACSCallStartedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ACSChatEventInThreadBaseProperties. +func (a ACSChatEventInThreadBaseProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "correlationId", a.CorrelationID) - populate(objectMap, "group", a.Group) - populate(objectMap, "isRoomsCall", a.IsRoomsCall) - populate(objectMap, "isTwoParty", a.IsTwoParty) - populate(objectMap, "room", a.Room) - populate(objectMap, "serverCallId", a.ServerCallID) - populate(objectMap, "startedBy", a.StartedBy) + populate(objectMap, "threadId", a.ThreadID) + populate(objectMap, "transactionId", a.TransactionID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallStartedEventData. -func (a *ACSCallStartedEventData) UnmarshalJSON(data []byte) error { +// 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 "correlationId": - err = unpopulate(val, "CorrelationID", &a.CorrelationID) - delete(rawMsg, key) - case "group": - err = unpopulate(val, "Group", &a.Group) - delete(rawMsg, key) - case "isRoomsCall": - err = unpopulate(val, "IsRoomsCall", &a.IsRoomsCall) - delete(rawMsg, key) - case "isTwoParty": - err = unpopulate(val, "IsTwoParty", &a.IsTwoParty) - delete(rawMsg, key) - case "room": - err = unpopulate(val, "Room", &a.Room) - delete(rawMsg, key) - case "serverCallId": - err = unpopulate(val, "ServerCallID", &a.ServerCallID) + var err error + switch key { + case "threadId": + err = unpopulate(val, "ThreadID", &a.ThreadID) delete(rawMsg, key) - case "startedBy": - err = unpopulate(val, "StartedBy", &a.StartedBy) + case "transactionId": + err = unpopulate(val, "TransactionID", &a.TransactionID) delete(rawMsg, key) } if err != nil { @@ -482,21 +77,24 @@ func (a *ACSCallStartedEventData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSCallingEventProperties. -func (a ACSCallingEventProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageDeletedEventData. +func (a ACSChatMessageDeletedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "correlationId", a.CorrelationID) - populate(objectMap, "group", a.Group) - populate(objectMap, "isRoomsCall", a.IsRoomsCall) - populate(objectMap, "isTwoParty", a.IsTwoParty) - populate(objectMap, "room", a.Room) - populate(objectMap, "serverCallId", a.ServerCallID) - populate(objectMap, "startedBy", a.StartedBy) + populateDateTimeRFC3339(objectMap, "composeTime", a.ComposeTime) + populateDateTimeRFC3339(objectMap, "deleteTime", a.DeleteTime) + 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 ACSCallingEventProperties. -func (a *ACSCallingEventProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageDeletedEventData. +func (a *ACSChatMessageDeletedEventData) 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) @@ -504,26 +102,35 @@ func (a *ACSCallingEventProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "correlationId": - err = unpopulate(val, "CorrelationID", &a.CorrelationID) + case "composeTime": + err = unpopulateDateTimeRFC3339(val, "ComposeTime", &a.ComposeTime) + delete(rawMsg, key) + case "deleteTime": + err = unpopulateDateTimeRFC3339(val, "DeleteTime", &a.DeleteTime) + delete(rawMsg, key) + case "messageId": + err = unpopulate(val, "MessageID", &a.MessageID) delete(rawMsg, key) - case "group": - err = unpopulate(val, "Group", &a.Group) + case "recipientCommunicationIdentifier": + err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) + delete(rawMsg, key) + case "senderCommunicationIdentifier": + err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier) delete(rawMsg, key) - case "isRoomsCall": - err = unpopulate(val, "IsRoomsCall", &a.IsRoomsCall) + case "senderDisplayName": + err = unpopulate(val, "SenderDisplayName", &a.SenderDisplayName) delete(rawMsg, key) - case "isTwoParty": - err = unpopulate(val, "IsTwoParty", &a.IsTwoParty) + case "threadId": + err = unpopulate(val, "ThreadID", &a.ThreadID) delete(rawMsg, key) - case "room": - err = unpopulate(val, "Room", &a.Room) + case "transactionId": + err = unpopulate(val, "TransactionID", &a.TransactionID) delete(rawMsg, key) - case "serverCallId": - err = unpopulate(val, "ServerCallID", &a.ServerCallID) + case "type": + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) - case "startedBy": - err = unpopulate(val, "StartedBy", &a.StartedBy) + case "version": + err = unpopulate(val, "Version", &a.Version) delete(rawMsg, key) } if err != nil { @@ -533,13 +140,12 @@ func (a *ACSCallingEventProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSChatAzureBotCommandReceivedInThreadEventData. -func (a ACSChatAzureBotCommandReceivedInThreadEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageDeletedInThreadEventData. +func (a ACSChatMessageDeletedInThreadEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populateDateTimeRFC3339(objectMap, "composeTime", a.ComposeTime) - populate(objectMap, "messageBody", a.MessageBody) + populateDateTimeRFC3339(objectMap, "deleteTime", a.DeleteTime) populate(objectMap, "messageId", a.MessageID) - populate(objectMap, "metadata", a.Metadata) populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier) populate(objectMap, "senderDisplayName", a.SenderDisplayName) populate(objectMap, "threadId", a.ThreadID) @@ -549,8 +155,8 @@ func (a ACSChatAzureBotCommandReceivedInThreadEventData) MarshalJSON() ([]byte, return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatAzureBotCommandReceivedInThreadEventData. -func (a *ACSChatAzureBotCommandReceivedInThreadEventData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageDeletedInThreadEventData. +func (a *ACSChatMessageDeletedInThreadEventData) 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) @@ -561,15 +167,12 @@ func (a *ACSChatAzureBotCommandReceivedInThreadEventData) UnmarshalJSON(data []b case "composeTime": err = unpopulateDateTimeRFC3339(val, "ComposeTime", &a.ComposeTime) delete(rawMsg, key) - case "messageBody": - err = unpopulate(val, "MessageBody", &a.MessageBody) + case "deleteTime": + err = unpopulateDateTimeRFC3339(val, "DeleteTime", &a.DeleteTime) delete(rawMsg, key) case "messageId": err = unpopulate(val, "MessageID", &a.MessageID) delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &a.Metadata) - delete(rawMsg, key) case "senderCommunicationIdentifier": err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier) delete(rawMsg, key) @@ -596,12 +199,14 @@ func (a *ACSChatAzureBotCommandReceivedInThreadEventData) UnmarshalJSON(data []b return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageDeletedEventData. -func (a ACSChatMessageDeletedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageEditedEventData. +func (a ACSChatMessageEditedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populateDateTimeRFC3339(objectMap, "composeTime", a.ComposeTime) - populateDateTimeRFC3339(objectMap, "deleteTime", a.DeleteTime) + populateDateTimeRFC3339(objectMap, "editTime", a.EditTime) + populate(objectMap, "messageBody", a.MessageBody) populate(objectMap, "messageId", a.MessageID) + populate(objectMap, "metadata", a.Metadata) populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier) populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier) populate(objectMap, "senderDisplayName", a.SenderDisplayName) @@ -612,8 +217,8 @@ func (a ACSChatMessageDeletedEventData) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageDeletedEventData. -func (a *ACSChatMessageDeletedEventData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageEditedEventData. +func (a *ACSChatMessageEditedEventData) 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) @@ -624,12 +229,18 @@ func (a *ACSChatMessageDeletedEventData) UnmarshalJSON(data []byte) error { case "composeTime": err = unpopulateDateTimeRFC3339(val, "ComposeTime", &a.ComposeTime) delete(rawMsg, key) - case "deleteTime": - err = unpopulateDateTimeRFC3339(val, "DeleteTime", &a.DeleteTime) + case "editTime": + err = unpopulateDateTimeRFC3339(val, "EditTime", &a.EditTime) + delete(rawMsg, key) + case "messageBody": + err = unpopulate(val, "MessageBody", &a.MessageBody) delete(rawMsg, key) case "messageId": err = unpopulate(val, "MessageID", &a.MessageID) delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &a.Metadata) + delete(rawMsg, key) case "recipientCommunicationIdentifier": err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) delete(rawMsg, key) @@ -659,12 +270,14 @@ func (a *ACSChatMessageDeletedEventData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageDeletedInThreadEventData. -func (a ACSChatMessageDeletedInThreadEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageEditedInThreadEventData. +func (a ACSChatMessageEditedInThreadEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populateDateTimeRFC3339(objectMap, "composeTime", a.ComposeTime) - populateDateTimeRFC3339(objectMap, "deleteTime", a.DeleteTime) + populateDateTimeRFC3339(objectMap, "editTime", a.EditTime) + populate(objectMap, "messageBody", a.MessageBody) populate(objectMap, "messageId", a.MessageID) + populate(objectMap, "metadata", a.Metadata) populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier) populate(objectMap, "senderDisplayName", a.SenderDisplayName) populate(objectMap, "threadId", a.ThreadID) @@ -674,8 +287,8 @@ func (a ACSChatMessageDeletedInThreadEventData) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageDeletedInThreadEventData. -func (a *ACSChatMessageDeletedInThreadEventData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageEditedInThreadEventData. +func (a *ACSChatMessageEditedInThreadEventData) 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) @@ -686,12 +299,18 @@ func (a *ACSChatMessageDeletedInThreadEventData) UnmarshalJSON(data []byte) erro case "composeTime": err = unpopulateDateTimeRFC3339(val, "ComposeTime", &a.ComposeTime) delete(rawMsg, key) - case "deleteTime": - err = unpopulateDateTimeRFC3339(val, "DeleteTime", &a.DeleteTime) + case "editTime": + err = unpopulateDateTimeRFC3339(val, "EditTime", &a.EditTime) + delete(rawMsg, key) + case "messageBody": + err = unpopulate(val, "MessageBody", &a.MessageBody) delete(rawMsg, key) case "messageId": err = unpopulate(val, "MessageID", &a.MessageID) delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &a.Metadata) + delete(rawMsg, key) case "senderCommunicationIdentifier": err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier) delete(rawMsg, key) @@ -718,14 +337,11 @@ func (a *ACSChatMessageDeletedInThreadEventData) UnmarshalJSON(data []byte) erro return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageEditedEventData. -func (a ACSChatMessageEditedEventData) MarshalJSON() ([]byte, error) { +// 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) - populateDateTimeRFC3339(objectMap, "editTime", a.EditTime) - populate(objectMap, "messageBody", a.MessageBody) populate(objectMap, "messageId", a.MessageID) - populate(objectMap, "metadata", a.Metadata) populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier) populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier) populate(objectMap, "senderDisplayName", a.SenderDisplayName) @@ -736,8 +352,8 @@ func (a ACSChatMessageEditedEventData) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageEditedEventData. -func (a *ACSChatMessageEditedEventData) UnmarshalJSON(data []byte) error { +// 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) @@ -748,18 +364,9 @@ func (a *ACSChatMessageEditedEventData) UnmarshalJSON(data []byte) error { case "composeTime": err = unpopulateDateTimeRFC3339(val, "ComposeTime", &a.ComposeTime) delete(rawMsg, key) - case "editTime": - err = unpopulateDateTimeRFC3339(val, "EditTime", &a.EditTime) - delete(rawMsg, key) - case "messageBody": - err = unpopulate(val, "MessageBody", &a.MessageBody) - delete(rawMsg, key) case "messageId": err = unpopulate(val, "MessageID", &a.MessageID) delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &a.Metadata) - delete(rawMsg, key) case "recipientCommunicationIdentifier": err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) delete(rawMsg, key) @@ -789,14 +396,11 @@ func (a *ACSChatMessageEditedEventData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageEditedInThreadEventData. -func (a ACSChatMessageEditedInThreadEventData) MarshalJSON() ([]byte, error) { +// 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) - populateDateTimeRFC3339(objectMap, "editTime", a.EditTime) - populate(objectMap, "messageBody", a.MessageBody) populate(objectMap, "messageId", a.MessageID) - populate(objectMap, "metadata", a.Metadata) populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier) populate(objectMap, "senderDisplayName", a.SenderDisplayName) populate(objectMap, "threadId", a.ThreadID) @@ -806,8 +410,8 @@ func (a ACSChatMessageEditedInThreadEventData) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageEditedInThreadEventData. -func (a *ACSChatMessageEditedInThreadEventData) UnmarshalJSON(data []byte) error { +// 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) @@ -818,18 +422,9 @@ func (a *ACSChatMessageEditedInThreadEventData) UnmarshalJSON(data []byte) error case "composeTime": err = unpopulateDateTimeRFC3339(val, "ComposeTime", &a.ComposeTime) delete(rawMsg, key) - case "editTime": - err = unpopulateDateTimeRFC3339(val, "EditTime", &a.EditTime) - delete(rawMsg, key) - case "messageBody": - err = unpopulate(val, "MessageBody", &a.MessageBody) - delete(rawMsg, key) case "messageId": err = unpopulate(val, "MessageID", &a.MessageID) delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &a.Metadata) - delete(rawMsg, key) case "senderCommunicationIdentifier": err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier) delete(rawMsg, key) @@ -1167,15 +762,129 @@ func (a *ACSChatParticipantRemovedFromThreadWithUserEventData) UnmarshalJSON(dat case "recipientCommunicationIdentifier": err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) delete(rawMsg, key) - case "removedByCommunicationIdentifier": - err = unpopulate(val, "RemovedByCommunicationIdentifier", &a.RemovedByCommunicationIdentifier) - delete(rawMsg, key) + case "removedByCommunicationIdentifier": + err = unpopulate(val, "RemovedByCommunicationIdentifier", &a.RemovedByCommunicationIdentifier) + delete(rawMsg, key) + case "threadId": + err = unpopulate(val, "ThreadID", &a.ThreadID) + delete(rawMsg, key) + case "time": + err = unpopulateDateTimeRFC3339(val, "Time", &a.Time) + 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 ACSChatThreadCreatedEventData. +func (a ACSChatThreadCreatedEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createTime", a.CreateTime) + populate(objectMap, "createdByCommunicationIdentifier", a.CreatedByCommunicationIdentifier) + populate(objectMap, "metadata", a.Metadata) + populate(objectMap, "participants", a.Participants) + populate(objectMap, "properties", a.Properties) + 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 ACSChatThreadCreatedEventData. +func (a *ACSChatThreadCreatedEventData) 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 "createdByCommunicationIdentifier": + err = unpopulate(val, "CreatedByCommunicationIdentifier", &a.CreatedByCommunicationIdentifier) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &a.Metadata) + delete(rawMsg, key) + case "participants": + err = unpopulate(val, "Participants", &a.Participants) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + 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 ACSChatThreadCreatedWithUserEventData. +func (a ACSChatThreadCreatedWithUserEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createTime", a.CreateTime) + populate(objectMap, "createdByCommunicationIdentifier", a.CreatedByCommunicationIdentifier) + populate(objectMap, "metadata", a.Metadata) + populate(objectMap, "participants", a.Participants) + populate(objectMap, "properties", a.Properties) + 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 ACSChatThreadCreatedWithUserEventData. +func (a *ACSChatThreadCreatedWithUserEventData) 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 "createdByCommunicationIdentifier": + err = unpopulate(val, "CreatedByCommunicationIdentifier", &a.CreatedByCommunicationIdentifier) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &a.Metadata) + delete(rawMsg, key) + case "participants": + err = unpopulate(val, "Participants", &a.Participants) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + 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 "time": - err = unpopulateDateTimeRFC3339(val, "Time", &a.Time) - delete(rawMsg, key) case "transactionId": err = unpopulate(val, "TransactionID", &a.TransactionID) delete(rawMsg, key) @@ -1190,22 +899,20 @@ func (a *ACSChatParticipantRemovedFromThreadWithUserEventData) UnmarshalJSON(dat return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSChatThreadCreatedEventData. -func (a ACSChatThreadCreatedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ACSChatThreadDeletedEventData. +func (a ACSChatThreadDeletedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populateDateTimeRFC3339(objectMap, "createTime", a.CreateTime) - populate(objectMap, "createdByCommunicationIdentifier", a.CreatedByCommunicationIdentifier) - populate(objectMap, "metadata", a.Metadata) - populate(objectMap, "participants", a.Participants) - populate(objectMap, "properties", a.Properties) + populateDateTimeRFC3339(objectMap, "deleteTime", a.DeleteTime) + populate(objectMap, "deletedByCommunicationIdentifier", a.DeletedByCommunicationIdentifier) 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 ACSChatThreadCreatedEventData. -func (a *ACSChatThreadCreatedEventData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatThreadDeletedEventData. +func (a *ACSChatThreadDeletedEventData) 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) @@ -1216,17 +923,11 @@ func (a *ACSChatThreadCreatedEventData) UnmarshalJSON(data []byte) error { case "createTime": err = unpopulateDateTimeRFC3339(val, "CreateTime", &a.CreateTime) delete(rawMsg, key) - case "createdByCommunicationIdentifier": - err = unpopulate(val, "CreatedByCommunicationIdentifier", &a.CreatedByCommunicationIdentifier) - delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &a.Metadata) - delete(rawMsg, key) - case "participants": - err = unpopulate(val, "Participants", &a.Participants) + case "deleteTime": + err = unpopulateDateTimeRFC3339(val, "DeleteTime", &a.DeleteTime) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) + case "deletedByCommunicationIdentifier": + err = unpopulate(val, "DeletedByCommunicationIdentifier", &a.DeletedByCommunicationIdentifier) delete(rawMsg, key) case "threadId": err = unpopulate(val, "ThreadID", &a.ThreadID) @@ -1245,14 +946,10 @@ func (a *ACSChatThreadCreatedEventData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSChatThreadCreatedWithUserEventData. -func (a ACSChatThreadCreatedWithUserEventData) MarshalJSON() ([]byte, error) { +// 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, "createdByCommunicationIdentifier", a.CreatedByCommunicationIdentifier) - populate(objectMap, "metadata", a.Metadata) - populate(objectMap, "participants", a.Participants) - populate(objectMap, "properties", a.Properties) populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier) populate(objectMap, "threadId", a.ThreadID) populate(objectMap, "transactionId", a.TransactionID) @@ -1260,8 +957,8 @@ func (a ACSChatThreadCreatedWithUserEventData) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatThreadCreatedWithUserEventData. -func (a *ACSChatThreadCreatedWithUserEventData) UnmarshalJSON(data []byte) error { +// 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) @@ -1272,18 +969,6 @@ func (a *ACSChatThreadCreatedWithUserEventData) UnmarshalJSON(data []byte) error case "createTime": err = unpopulateDateTimeRFC3339(val, "CreateTime", &a.CreateTime) delete(rawMsg, key) - case "createdByCommunicationIdentifier": - err = unpopulate(val, "CreatedByCommunicationIdentifier", &a.CreatedByCommunicationIdentifier) - delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &a.Metadata) - delete(rawMsg, key) - case "participants": - err = unpopulate(val, "Participants", &a.Participants) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) case "recipientCommunicationIdentifier": err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) delete(rawMsg, key) @@ -1304,20 +989,18 @@ func (a *ACSChatThreadCreatedWithUserEventData) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSChatThreadDeletedEventData. -func (a ACSChatThreadDeletedEventData) MarshalJSON() ([]byte, error) { +// 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) - populateDateTimeRFC3339(objectMap, "deleteTime", a.DeleteTime) - populate(objectMap, "deletedByCommunicationIdentifier", a.DeletedByCommunicationIdentifier) 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 ACSChatThreadDeletedEventData. -func (a *ACSChatThreadDeletedEventData) UnmarshalJSON(data []byte) error { +// 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) @@ -1328,12 +1011,6 @@ func (a *ACSChatThreadDeletedEventData) UnmarshalJSON(data []byte) error { case "createTime": err = unpopulateDateTimeRFC3339(val, "CreateTime", &a.CreateTime) delete(rawMsg, key) - case "deleteTime": - err = unpopulateDateTimeRFC3339(val, "DeleteTime", &a.DeleteTime) - delete(rawMsg, key) - case "deletedByCommunicationIdentifier": - err = unpopulate(val, "DeletedByCommunicationIdentifier", &a.DeletedByCommunicationIdentifier) - delete(rawMsg, key) case "threadId": err = unpopulate(val, "ThreadID", &a.ThreadID) delete(rawMsg, key) @@ -1551,69 +1228,6 @@ func (a *ACSChatThreadWithUserDeletedEventData) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSChatTypingIndicatorReceivedInThreadEventData. -func (a ACSChatTypingIndicatorReceivedInThreadEventData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "composeTime", a.ComposeTime) - populate(objectMap, "messageBody", a.MessageBody) - populate(objectMap, "messageId", a.MessageID) - populate(objectMap, "metadata", a.Metadata) - 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 ACSChatTypingIndicatorReceivedInThreadEventData. -func (a *ACSChatTypingIndicatorReceivedInThreadEventData) 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 "messageBody": - err = unpopulate(val, "MessageBody", &a.MessageBody) - delete(rawMsg, key) - case "messageId": - err = unpopulate(val, "MessageID", &a.MessageID) - delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &a.Metadata) - 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 ACSEmailDeliveryReportReceivedEventData. func (a ACSEmailDeliveryReportReceivedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1921,7 +1535,7 @@ func (a *ACSMessageDeliveryStatusUpdatedEventData) UnmarshalJSON(data []byte) er err = unpopulate(val, "ChannelKind", &a.ChannelKind) delete(rawMsg, key) case "error": - err = unmarshalInternalACSMessageChannelEventError(val, "Error", &a.Error) + err = unpopulate(val, "Error", &a.Error) delete(rawMsg, key) case "from": err = unpopulate(val, "From", &a.From) @@ -1946,6 +1560,45 @@ func (a *ACSMessageDeliveryStatusUpdatedEventData) UnmarshalJSON(data []byte) er return nil } +// MarshalJSON implements the json.Marshaller interface for type ACSMessageEventData. +func (a ACSMessageEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", a.Error) + populate(objectMap, "from", a.From) + populateDateTimeRFC3339(objectMap, "receivedTimeStamp", a.ReceivedTimestamp) + populate(objectMap, "to", a.To) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSMessageEventData. +func (a *ACSMessageEventData) 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 "error": + err = unpopulate(val, "Error", &a.Error) + delete(rawMsg, key) + case "from": + err = unpopulate(val, "From", &a.From) + delete(rawMsg, key) + case "receivedTimeStamp": + err = unpopulateDateTimeRFC3339(val, "ReceivedTimestamp", &a.ReceivedTimestamp) + 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 ACSMessageInteractiveButtonReplyContent. func (a ACSMessageInteractiveButtonReplyContent) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2162,7 +1815,7 @@ func (a *ACSMessageReceivedEventData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Context", &a.Context) delete(rawMsg, key) case "error": - err = unmarshalInternalACSMessageChannelEventError(val, "Error", &a.Error) + err = unpopulate(val, "Error", &a.Error) delete(rawMsg, key) case "from": err = unpopulate(val, "From", &a.From) @@ -2356,6 +2009,41 @@ 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) @@ -2444,7 +2132,7 @@ func (a *ACSRouterJobClassificationFailedEventData) UnmarshalJSON(data []byte) e err = unpopulate(val, "ClassificationPolicyID", &a.ClassificationPolicyID) delete(rawMsg, key) case "errors": - err = unmarshalInternalACSRouterCommunicationError(val, "Errors", &a.Errors) + err = unpopulate(val, "Errors", &a.Errors) delete(rawMsg, key) case "jobId": err = unpopulate(val, "JobID", &a.JobID) @@ -2690,6 +2378,53 @@ 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) @@ -3193,15 +2928,45 @@ func (a *ACSRouterWorkerDeletedEventData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSRouterWorkerDeregisteredEventData. -func (a ACSRouterWorkerDeregisteredEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ACSRouterWorkerDeregisteredEventData. +func (a ACSRouterWorkerDeregisteredEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "workerId", a.WorkerID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerDeregisteredEventData. +func (a *ACSRouterWorkerDeregisteredEventData) 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 "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 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 ACSRouterWorkerDeregisteredEventData. -func (a *ACSRouterWorkerDeregisteredEventData) UnmarshalJSON(data []byte) error { +// 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) @@ -3209,6 +2974,15 @@ func (a *ACSRouterWorkerDeregisteredEventData) UnmarshalJSON(data []byte) error 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) @@ -3742,6 +3516,41 @@ 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) @@ -4079,6 +3888,122 @@ func (a *APIManagementAPIUpdatedEventData) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type APIManagementCircuitBreakerClosedEventData. +func (a APIManagementCircuitBreakerClosedEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendName", a.BackendName) + populate(objectMap, "circuitBreaker", a.CircuitBreaker) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementCircuitBreakerClosedEventData. +func (a *APIManagementCircuitBreakerClosedEventData) 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 "backendName": + err = unpopulate(val, "BackendName", &a.BackendName) + delete(rawMsg, key) + case "circuitBreaker": + err = unpopulate(val, "CircuitBreaker", &a.CircuitBreaker) + 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 APIManagementCircuitBreakerOpenedEventData. +func (a APIManagementCircuitBreakerOpenedEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendName", a.BackendName) + populate(objectMap, "circuitBreaker", a.CircuitBreaker) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementCircuitBreakerOpenedEventData. +func (a *APIManagementCircuitBreakerOpenedEventData) 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 "backendName": + err = unpopulate(val, "BackendName", &a.BackendName) + delete(rawMsg, key) + case "circuitBreaker": + err = unpopulate(val, "CircuitBreaker", &a.CircuitBreaker) + 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 APIManagementCircuitBreakerProperties. +func (a APIManagementCircuitBreakerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "rules", a.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementCircuitBreakerProperties. +func (a *APIManagementCircuitBreakerProperties) 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 "rules": + err = unpopulate(val, "Rules", &a.Rules) + 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 APIManagementExpiredGatewayTokenProperties. +func (a APIManagementExpiredGatewayTokenProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expiredAtUtc", a.ExpiredAtUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementExpiredGatewayTokenProperties. +func (a *APIManagementExpiredGatewayTokenProperties) 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 "expiredAtUtc": + err = unpopulateDateTimeRFC3339(val, "ExpiredAtUTC", &a.ExpiredAtUTC) + 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 APIManagementGatewayAPIAddedEventData. func (a APIManagementGatewayAPIAddedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4349,6 +4274,99 @@ func (a *APIManagementGatewayHostnameConfigurationUpdatedEventData) UnmarshalJSO return nil } +// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayProperties. +func (a APIManagementGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gatewayId", a.GatewayID) + populate(objectMap, "instanceId", a.InstanceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayProperties. +func (a *APIManagementGatewayProperties) 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 "gatewayId": + err = unpopulate(val, "GatewayID", &a.GatewayID) + delete(rawMsg, key) + case "instanceId": + err = unpopulate(val, "InstanceID", &a.InstanceID) + 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 APIManagementGatewayTokenExpiredEventData. +func (a APIManagementGatewayTokenExpiredEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gatewayInfo", a.GatewayInfo) + populate(objectMap, "tokenInfo", a.TokenInfo) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayTokenExpiredEventData. +func (a *APIManagementGatewayTokenExpiredEventData) 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 "gatewayInfo": + err = unpopulate(val, "GatewayInfo", &a.GatewayInfo) + delete(rawMsg, key) + case "tokenInfo": + err = unpopulate(val, "TokenInfo", &a.TokenInfo) + 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 APIManagementGatewayTokenNearExpiryEventData. +func (a APIManagementGatewayTokenNearExpiryEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gatewayInfo", a.GatewayInfo) + populate(objectMap, "tokenInfo", a.TokenInfo) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayTokenNearExpiryEventData. +func (a *APIManagementGatewayTokenNearExpiryEventData) 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 "gatewayInfo": + err = unpopulate(val, "GatewayInfo", &a.GatewayInfo) + delete(rawMsg, key) + case "tokenInfo": + err = unpopulate(val, "TokenInfo", &a.TokenInfo) + 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 APIManagementGatewayUpdatedEventData. func (a APIManagementGatewayUpdatedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4376,6 +4394,33 @@ func (a *APIManagementGatewayUpdatedEventData) UnmarshalJSON(data []byte) error return nil } +// MarshalJSON implements the json.Marshaller interface for type APIManagementNearExpiryGatewayTokenProperties. +func (a APIManagementNearExpiryGatewayTokenProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expiredAtUtc", a.ExpiredAtUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementNearExpiryGatewayTokenProperties. +func (a *APIManagementNearExpiryGatewayTokenProperties) 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 "expiredAtUtc": + err = unpopulateDateTimeRFC3339(val, "ExpiredAtUTC", &a.ExpiredAtUTC) + 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 APIManagementProductCreatedEventData. func (a APIManagementProductCreatedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4619,8 +4664,47 @@ func (a *APIManagementUserUpdatedEventData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AVSClusterCreatedEventData. -func (a AVSClusterCreatedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AVSClusterCreatedEventData. +func (a AVSClusterCreatedEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addedHostNames", a.AddedHostNames) + populate(objectMap, "inMaintenanceHostNames", a.InMaintenanceHostNames) + populate(objectMap, "operationId", a.OperationID) + populate(objectMap, "removedHostNames", a.RemovedHostNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AVSClusterCreatedEventData. +func (a *AVSClusterCreatedEventData) 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 "addedHostNames": + err = unpopulate(val, "AddedHostNames", &a.AddedHostNames) + delete(rawMsg, key) + case "inMaintenanceHostNames": + err = unpopulate(val, "InMaintenanceHostNames", &a.InMaintenanceHostNames) + delete(rawMsg, key) + case "operationId": + err = unpopulate(val, "OperationID", &a.OperationID) + delete(rawMsg, key) + case "removedHostNames": + err = unpopulate(val, "RemovedHostNames", &a.RemovedHostNames) + 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 AVSClusterDeletedEventData. +func (a AVSClusterDeletedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "addedHostNames", a.AddedHostNames) populate(objectMap, "inMaintenanceHostNames", a.InMaintenanceHostNames) @@ -4629,8 +4713,8 @@ func (a AVSClusterCreatedEventData) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AVSClusterCreatedEventData. -func (a *AVSClusterCreatedEventData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AVSClusterDeletedEventData. +func (a *AVSClusterDeletedEventData) 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) @@ -4658,8 +4742,8 @@ func (a *AVSClusterCreatedEventData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AVSClusterDeletedEventData. -func (a AVSClusterDeletedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AVSClusterEventData. +func (a AVSClusterEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "addedHostNames", a.AddedHostNames) populate(objectMap, "inMaintenanceHostNames", a.InMaintenanceHostNames) @@ -4668,8 +4752,8 @@ func (a AVSClusterDeletedEventData) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AVSClusterDeletedEventData. -func (a *AVSClusterDeletedEventData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AVSClusterEventData. +func (a *AVSClusterEventData) 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) @@ -4818,6 +4902,33 @@ func (a *AVSClusterUpdatingEventData) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AVSPrivateCloudEventData. +func (a AVSPrivateCloudEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "operationId", a.OperationID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AVSPrivateCloudEventData. +func (a *AVSPrivateCloudEventData) 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 "operationId": + err = unpopulate(val, "OperationID", &a.OperationID) + 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 AVSPrivateCloudFailedEventData. func (a AVSPrivateCloudFailedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4938,6 +5049,41 @@ func (a *AVSScriptExecutionCancelledEventData) UnmarshalJSON(data []byte) error return nil } +// MarshalJSON implements the json.Marshaller interface for type AVSScriptExecutionEventData. +func (a AVSScriptExecutionEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cmdletId", a.CmdletID) + populate(objectMap, "operationId", a.OperationID) + populate(objectMap, "output", a.Output) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AVSScriptExecutionEventData. +func (a *AVSScriptExecutionEventData) 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 "cmdletId": + err = unpopulate(val, "CmdletID", &a.CmdletID) + delete(rawMsg, key) + case "operationId": + err = unpopulate(val, "OperationID", &a.OperationID) + delete(rawMsg, key) + case "output": + err = unpopulate(val, "Output", &a.Output) + 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 AVSScriptExecutionFailedEventData. func (a AVSScriptExecutionFailedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5164,6 +5310,41 @@ 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) @@ -5335,6 +5516,53 @@ func (c *CommunicationUserIdentifierModel) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ContainerRegistryArtifactEventData. +func (c ContainerRegistryArtifactEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", c.Action) + populate(objectMap, "connectedRegistry", c.ConnectedRegistry) + populate(objectMap, "id", c.ID) + populate(objectMap, "location", c.Location) + populate(objectMap, "target", c.Target) + populateDateTimeRFC3339(objectMap, "timestamp", c.Timestamp) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryArtifactEventData. +func (c *ContainerRegistryArtifactEventData) 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 "action": + err = unpopulate(val, "Action", &c.Action) + delete(rawMsg, key) + case "connectedRegistry": + err = unpopulate(val, "ConnectedRegistry", &c.ConnectedRegistry) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &c.Target) + delete(rawMsg, key) + case "timestamp": + err = unpopulateDateTimeRFC3339(val, "Timestamp", &c.Timestamp) + 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 ContainerRegistryArtifactEventTarget. func (c ContainerRegistryArtifactEventTarget) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5534,6 +5762,65 @@ func (c *ContainerRegistryEventConnectedRegistry) UnmarshalJSON(data []byte) err return nil } +// MarshalJSON implements the json.Marshaller interface for type ContainerRegistryEventData. +func (c ContainerRegistryEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", c.Action) + populate(objectMap, "actor", c.Actor) + populate(objectMap, "connectedRegistry", c.ConnectedRegistry) + populate(objectMap, "id", c.ID) + populate(objectMap, "location", c.Location) + populate(objectMap, "request", c.Request) + populate(objectMap, "source", c.Source) + populate(objectMap, "target", c.Target) + populateDateTimeRFC3339(objectMap, "timestamp", c.Timestamp) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryEventData. +func (c *ContainerRegistryEventData) 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 "action": + err = unpopulate(val, "Action", &c.Action) + delete(rawMsg, key) + case "actor": + err = unpopulate(val, "Actor", &c.Actor) + delete(rawMsg, key) + case "connectedRegistry": + err = unpopulate(val, "ConnectedRegistry", &c.ConnectedRegistry) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "request": + err = unpopulate(val, "Request", &c.Request) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &c.Source) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &c.Target) + delete(rawMsg, key) + case "timestamp": + err = unpopulateDateTimeRFC3339(val, "Timestamp", &c.Timestamp) + 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 ContainerRegistryEventRequest. func (c ContainerRegistryEventRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5831,18 +6118,81 @@ 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) - populate(objectMap, "latestPreviewKubernetesVersion", c.LatestPreviewKubernetesVersion) - populate(objectMap, "latestStableKubernetesVersion", c.LatestStableKubernetesVersion) - populate(objectMap, "latestSupportedKubernetesVersion", c.LatestSupportedKubernetesVersion) - populate(objectMap, "lowestMinorKubernetesVersion", c.LowestMinorKubernetesVersion) + populate(objectMap, "latestPreviewKubernetesVersion", c.LatestPreviewKubernetesVersion) + populate(objectMap, "latestStableKubernetesVersion", c.LatestStableKubernetesVersion) + populate(objectMap, "latestSupportedKubernetesVersion", c.LatestSupportedKubernetesVersion) + populate(objectMap, "lowestMinorKubernetesVersion", c.LowestMinorKubernetesVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerServiceNewKubernetesVersionAvailableEventData. +func (c *ContainerServiceNewKubernetesVersionAvailableEventData) 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 "latestPreviewKubernetesVersion": + err = unpopulate(val, "LatestPreviewKubernetesVersion", &c.LatestPreviewKubernetesVersion) + delete(rawMsg, key) + case "latestStableKubernetesVersion": + err = unpopulate(val, "LatestStableKubernetesVersion", &c.LatestStableKubernetesVersion) + delete(rawMsg, key) + case "latestSupportedKubernetesVersion": + err = unpopulate(val, "LatestSupportedKubernetesVersion", &c.LatestSupportedKubernetesVersion) + delete(rawMsg, key) + case "lowestMinorKubernetesVersion": + err = unpopulate(val, "LowestMinorKubernetesVersion", &c.LowestMinorKubernetesVersion) + 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 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 ContainerServiceNewKubernetesVersionAvailableEventData. -func (c *ContainerServiceNewKubernetesVersionAvailableEventData) UnmarshalJSON(data []byte) error { +// 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) @@ -5850,17 +6200,8 @@ func (c *ContainerServiceNewKubernetesVersionAvailableEventData) UnmarshalJSON(d for key, val := range rawMsg { var err error switch key { - case "latestPreviewKubernetesVersion": - err = unpopulate(val, "LatestPreviewKubernetesVersion", &c.LatestPreviewKubernetesVersion) - delete(rawMsg, key) - case "latestStableKubernetesVersion": - err = unpopulate(val, "LatestStableKubernetesVersion", &c.LatestStableKubernetesVersion) - delete(rawMsg, key) - case "latestSupportedKubernetesVersion": - err = unpopulate(val, "LatestSupportedKubernetesVersion", &c.LatestSupportedKubernetesVersion) - delete(rawMsg, key) - case "lowestMinorKubernetesVersion": - err = unpopulate(val, "LowestMinorKubernetesVersion", &c.LowestMinorKubernetesVersion) + case "nodePoolName": + err = unpopulate(val, "NodePoolName", &c.NodePoolName) delete(rawMsg, key) } if err != nil { @@ -6083,6 +6424,115 @@ func (d *DeviceConnectionStateEventInfo) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DeviceConnectionStateEventProperties. +func (d DeviceConnectionStateEventProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deviceConnectionStateEventInfo", d.DeviceConnectionStateEventInfo) + populate(objectMap, "deviceId", d.DeviceID) + populate(objectMap, "hubName", d.HubName) + populate(objectMap, "moduleId", d.ModuleID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeviceConnectionStateEventProperties. +func (d *DeviceConnectionStateEventProperties) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deviceConnectionStateEventInfo": + err = unpopulate(val, "DeviceConnectionStateEventInfo", &d.DeviceConnectionStateEventInfo) + delete(rawMsg, key) + case "deviceId": + err = unpopulate(val, "DeviceID", &d.DeviceID) + delete(rawMsg, key) + case "hubName": + err = unpopulate(val, "HubName", &d.HubName) + delete(rawMsg, key) + case "moduleId": + err = unpopulate(val, "ModuleID", &d.ModuleID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeviceLifeCycleEventProperties. +func (d DeviceLifeCycleEventProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deviceId", d.DeviceID) + populate(objectMap, "hubName", d.HubName) + populate(objectMap, "twin", d.Twin) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeviceLifeCycleEventProperties. +func (d *DeviceLifeCycleEventProperties) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deviceId": + err = unpopulate(val, "DeviceID", &d.DeviceID) + delete(rawMsg, key) + case "hubName": + err = unpopulate(val, "HubName", &d.HubName) + delete(rawMsg, key) + case "twin": + err = unpopulate(val, "Twin", &d.Twin) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeviceTelemetryEventProperties. +func (d DeviceTelemetryEventProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "body", d.Body) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemProperties", d.SystemProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeviceTelemetryEventProperties. +func (d *DeviceTelemetryEventProperties) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "body": + err = unpopulate(val, "Body", &d.Body) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemProperties": + err = unpopulate(val, "SystemProperties", &d.SystemProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type DeviceTwinInfo. func (d DeviceTwinInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6270,6 +6720,57 @@ func (d *DeviceTwinProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type EdgeSolutionVersionPublishedEventData. +func (e EdgeSolutionVersionPublishedEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiVersion", e.APIVersion) + populate(objectMap, "callbackUrl", e.CallbackURL) + populate(objectMap, "externalValidationId", e.ExternalValidationID) + populate(objectMap, "solutionTemplateId", e.SolutionTemplateID) + populate(objectMap, "solutionTemplateVersionId", e.SolutionTemplateVersionID) + populate(objectMap, "solutionVersionId", e.SolutionVersionID) + populate(objectMap, "targetId", e.TargetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EdgeSolutionVersionPublishedEventData. +func (e *EdgeSolutionVersionPublishedEventData) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiVersion": + err = unpopulate(val, "APIVersion", &e.APIVersion) + delete(rawMsg, key) + case "callbackUrl": + err = unpopulate(val, "CallbackURL", &e.CallbackURL) + delete(rawMsg, key) + case "externalValidationId": + err = unpopulate(val, "ExternalValidationID", &e.ExternalValidationID) + delete(rawMsg, key) + case "solutionTemplateId": + err = unpopulate(val, "SolutionTemplateID", &e.SolutionTemplateID) + delete(rawMsg, key) + case "solutionTemplateVersionId": + err = unpopulate(val, "SolutionTemplateVersionID", &e.SolutionTemplateVersionID) + delete(rawMsg, key) + case "solutionVersionId": + err = unpopulate(val, "SolutionVersionID", &e.SolutionVersionID) + delete(rawMsg, key) + case "targetId": + err = unpopulate(val, "TargetID", &e.TargetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type EventGridMQTTClientCreatedOrUpdatedEventData. func (e EventGridMQTTClientCreatedOrUpdatedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6356,6 +6857,41 @@ func (e *EventGridMQTTClientDeletedEventData) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type EventGridMQTTClientEventData. +func (e EventGridMQTTClientEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientAuthenticationName", e.ClientAuthenticationName) + populate(objectMap, "clientName", e.ClientName) + populate(objectMap, "namespaceName", e.NamespaceName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridMQTTClientEventData. +func (e *EventGridMQTTClientEventData) 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", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientAuthenticationName": + err = unpopulate(val, "ClientAuthenticationName", &e.ClientAuthenticationName) + delete(rawMsg, key) + case "clientName": + err = unpopulate(val, "ClientName", &e.ClientName) + delete(rawMsg, key) + case "namespaceName": + err = unpopulate(val, "NamespaceName", &e.NamespaceName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type EventGridMQTTClientSessionConnectedEventData. func (e EventGridMQTTClientSessionConnectedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6947,7 +7483,7 @@ func (i *IOTHubDeviceTelemetryEventData) UnmarshalJSON(data []byte) error { } // MarshalJSON implements the json.Marshaller interface for type InternalACSMessageChannelEventError. -func (i internalACSMessageChannelEventError) MarshalJSON() ([]byte, error) { +func (i InternalACSMessageChannelEventError) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "channelCode", i.ChannelCode) populate(objectMap, "channelMessage", i.ChannelMessage) @@ -6955,7 +7491,7 @@ func (i internalACSMessageChannelEventError) MarshalJSON() ([]byte, error) { } // UnmarshalJSON implements the json.Unmarshaller interface for type InternalACSMessageChannelEventError. -func (i *internalACSMessageChannelEventError) UnmarshalJSON(data []byte) error { +func (i *InternalACSMessageChannelEventError) 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", i, err) @@ -6978,10 +7514,10 @@ func (i *internalACSMessageChannelEventError) UnmarshalJSON(data []byte) error { } // MarshalJSON implements the json.Marshaller interface for type InternalACSRouterCommunicationError. -func (i internalACSRouterCommunicationError) MarshalJSON() ([]byte, error) { +func (i InternalACSRouterCommunicationError) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", i.Code) - populate(objectMap, "details", i.Details) + populate(objectMap, "errors", i.Errors) populate(objectMap, "innererror", i.Innererror) populate(objectMap, "message", i.Message) populate(objectMap, "target", i.Target) @@ -6989,7 +7525,7 @@ func (i internalACSRouterCommunicationError) MarshalJSON() ([]byte, error) { } // UnmarshalJSON implements the json.Unmarshaller interface for type InternalACSRouterCommunicationError. -func (i *internalACSRouterCommunicationError) UnmarshalJSON(data []byte) error { +func (i *InternalACSRouterCommunicationError) 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", i, err) @@ -7000,8 +7536,8 @@ func (i *internalACSRouterCommunicationError) UnmarshalJSON(data []byte) error { case "code": err = unpopulate(val, "Code", &i.Code) delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &i.Details) + case "errors": + err = unpopulate(val, "Errors", &i.Errors) delete(rawMsg, key) case "innererror": err = unpopulate(val, "Innererror", &i.Innererror) @@ -7804,6 +8340,45 @@ func (m *MapsGeofenceEnteredEventData) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type MapsGeofenceEventProperties. +func (m MapsGeofenceEventProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "expiredGeofenceGeometryId", m.ExpiredGeofenceGeometryID) + populate(objectMap, "geometries", m.Geometries) + populate(objectMap, "invalidPeriodGeofenceGeometryId", m.InvalidPeriodGeofenceGeometryID) + populate(objectMap, "isEventPublished", m.IsEventPublished) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MapsGeofenceEventProperties. +func (m *MapsGeofenceEventProperties) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expiredGeofenceGeometryId": + err = unpopulate(val, "ExpiredGeofenceGeometryID", &m.ExpiredGeofenceGeometryID) + delete(rawMsg, key) + case "geometries": + err = unpopulate(val, "Geometries", &m.Geometries) + delete(rawMsg, key) + case "invalidPeriodGeofenceGeometryId": + err = unpopulate(val, "InvalidPeriodGeofenceGeometryID", &m.InvalidPeriodGeofenceGeometryID) + delete(rawMsg, key) + case "isEventPublished": + err = unpopulate(val, "IsEventPublished", &m.IsEventPublished) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type MapsGeofenceExitedEventData. func (m MapsGeofenceExitedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -8958,6 +9533,37 @@ 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) @@ -9071,6 +9677,41 @@ 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) diff --git a/sdk/messaging/eventgrid/azsystemevents/time_rfc1123.go b/sdk/messaging/eventgrid/azsystemevents/time_rfc1123.go deleted file mode 100644 index c3039fc970bf..000000000000 --- a/sdk/messaging/eventgrid/azsystemevents/time_rfc1123.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT. - -package azsystemevents - -import ( - "encoding/json" - "fmt" - "reflect" - "strings" - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" -) - -const ( - dateTimeRFC1123JSON = `"` + time.RFC1123 + `"` -) - -type dateTimeRFC1123 time.Time - -func (t dateTimeRFC1123) MarshalJSON() ([]byte, error) { - b := []byte(time.Time(t).Format(dateTimeRFC1123JSON)) - return b, nil -} - -func (t dateTimeRFC1123) MarshalText() ([]byte, error) { - b := []byte(time.Time(t).Format(time.RFC1123)) - return b, nil -} - -func (t *dateTimeRFC1123) UnmarshalJSON(data []byte) error { - p, err := time.Parse(dateTimeRFC1123JSON, strings.ToUpper(string(data))) - *t = dateTimeRFC1123(p) - return err -} - -func (t *dateTimeRFC1123) UnmarshalText(data []byte) error { - if len(data) == 0 { - return nil - } - p, err := time.Parse(time.RFC1123, string(data)) - *t = dateTimeRFC1123(p) - return err -} - -func (t dateTimeRFC1123) String() string { - return time.Time(t).Format(time.RFC1123) -} - -func populateDateTimeRFC1123(m map[string]any, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*dateTimeRFC1123)(t) -} - -func unpopulateDateTimeRFC1123(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || string(data) == "null" { - return nil - } - var aux dateTimeRFC1123 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/sdk/messaging/eventgrid/azsystemevents/time_rfc3339.go b/sdk/messaging/eventgrid/azsystemevents/time_rfc3339.go index 11a0123184b4..8a459a317ff0 100644 --- a/sdk/messaging/eventgrid/azsystemevents/time_rfc3339.go +++ b/sdk/messaging/eventgrid/azsystemevents/time_rfc3339.go @@ -7,12 +7,11 @@ package azsystemevents import ( "encoding/json" "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "reflect" "regexp" "strings" "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. diff --git a/sdk/messaging/eventgrid/azsystemevents/tsp-location.yaml b/sdk/messaging/eventgrid/azsystemevents/tsp-location.yaml index bded21a43c24..b588de33af01 100644 --- a/sdk/messaging/eventgrid/azsystemevents/tsp-location.yaml +++ b/sdk/messaging/eventgrid/azsystemevents/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents -commit: a2676eccfc3db4abecc73519206d6ef3ff5826c9 +commit: c10a58e0a426d5a172ba03fe6be4e630c8df7e3c repo: Azure/azure-rest-api-specs +additionalDirectories: