diff --git a/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md b/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md index ac40b2915569..4a8885beb0a6 100644 --- a/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md +++ b/sdk/messaging/eventgrid/azsystemevents/CHANGELOG.md @@ -1,5 +1,69 @@ # Release History +## 1.0.0 (2025-05-12) +### 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 enum type `ACSCallEndedByKind` with values `ACSCallEndedByKindMicrosoftInternal`, `ACSCallEndedByKindParticipant` +- New enum type `ACSCallParticipantRoleKind` with values `ACSCallParticipantRoleKindAttendee`, `ACSCallParticipantRoleKindCollaborator`, `ACSCallParticipantRoleKindConsumer`, `ACSCallParticipantRoleKindOrganizer`, `ACSCallParticipantRoleKindPresenter` +- New struct `ACSCallEndReasonProperties` +- New struct `ACSCallEndedByProperties` +- New struct `ACSCallEndedEventData` +- New struct `ACSCallGroupProperties` +- New struct `ACSCallParticipantAddedEventData` +- New struct `ACSCallParticipantEventProperties` +- New struct `ACSCallParticipantProperties` +- New struct `ACSCallParticipantRemovedEventData` +- New struct `ACSCallRoomProperties` +- New struct `ACSCallStartedEventData` +- New struct `ACSCallingEventProperties` +- New struct `ACSChatAzureBotCommandReceivedInThreadEventData` +- New struct `ACSChatEventBaseProperties` +- New struct `ACSChatEventInThreadBaseProperties` +- New struct `ACSChatMessageEventBaseProperties` +- New struct `ACSChatMessageEventInThreadBaseProperties` +- New struct `ACSChatThreadEventBaseProperties` +- New struct `ACSChatThreadEventInThreadBaseProperties` +- New struct `ACSChatTypingIndicatorReceivedInThreadEventData` +- 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 `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..4531df1142cb 100644 --- a/sdk/messaging/eventgrid/azsystemevents/constants.go +++ b/sdk/messaging/eventgrid/azsystemevents/constants.go @@ -22,6 +22,33 @@ func PossibleACSCallEndedByKindValues() []ACSCallEndedByKind { } } +// ACSCallParticipantRoleKind - Call participant role kind. +type ACSCallParticipantRoleKind string + +const ( + // ACSCallParticipantRoleKindAttendee - Attendee + ACSCallParticipantRoleKindAttendee ACSCallParticipantRoleKind = "Attendee" + // ACSCallParticipantRoleKindCollaborator - Collaborator + ACSCallParticipantRoleKindCollaborator ACSCallParticipantRoleKind = "Collaborator" + // ACSCallParticipantRoleKindConsumer - Consumer + ACSCallParticipantRoleKindConsumer ACSCallParticipantRoleKind = "Consumer" + // ACSCallParticipantRoleKindOrganizer - Organizer + ACSCallParticipantRoleKindOrganizer ACSCallParticipantRoleKind = "Organizer" + // ACSCallParticipantRoleKindPresenter - Presenter + ACSCallParticipantRoleKindPresenter ACSCallParticipantRoleKind = "Presenter" +) + +// PossibleACSCallParticipantRoleKindValues returns the possible values for the ACSCallParticipantRoleKind const type. +func PossibleACSCallParticipantRoleKindValues() []ACSCallParticipantRoleKind { + return []ACSCallParticipantRoleKind{ + ACSCallParticipantRoleKindAttendee, + ACSCallParticipantRoleKindCollaborator, + ACSCallParticipantRoleKindConsumer, + ACSCallParticipantRoleKindOrganizer, + ACSCallParticipantRoleKindPresenter, + } +} + // 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..b59df0b92786 100644 --- a/sdk/messaging/eventgrid/azsystemevents/models.go +++ b/sdk/messaging/eventgrid/azsystemevents/models.go @@ -18,7 +18,7 @@ type ACSCallEndReasonProperties struct { SubCode *int32 } -// ACSCallEndedByProperties - Schema of calling event endedby properties +// ACSCallEndedByProperties - Schema of calling event ended by properties type ACSCallEndedByProperties struct { // REQUIRED; The communication identifier of the call ended by CommunicationIdentifier *CommunicationIdentifierModel @@ -148,7 +148,7 @@ type ACSCallParticipantProperties struct { CommunicationIdentifier *CommunicationIdentifierModel // The role of the participant - Role *string + Role *ACSCallParticipantRoleKind } // ACSCallParticipantRemovedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantRemoved @@ -276,6 +276,27 @@ type ACSChatAzureBotCommandReceivedInThreadEventData struct { TransactionID *string } +// ACSChatEventBaseProperties - Schema of common properties of all chat events +type ACSChatEventBaseProperties struct { + // REQUIRED; The communication identifier of the target user + RecipientCommunicationIdentifier *CommunicationIdentifierModel + + // REQUIRED; The chat thread id + ThreadID *string + + // The transaction id will be used as co-relation vector + TransactionID *string +} + +// ACSChatEventInThreadBaseProperties - Schema of common properties of all thread-level chat events +type ACSChatEventInThreadBaseProperties struct { + // REQUIRED; The chat thread id + ThreadID *string + + // The transaction id will be used as co-relation vector + TransactionID *string +} + // ACSChatMessageDeletedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageDeleted // event. type ACSChatMessageDeletedEventData struct { @@ -418,6 +439,63 @@ type ACSChatMessageEditedInThreadEventData struct { TransactionID *string } +// 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 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 display name of the sender + SenderDisplayName *string + + // The transaction id will be used as co-relation vector + TransactionID *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 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 display name of the sender + SenderDisplayName *string + + // The transaction id will be used as co-relation vector + TransactionID *string +} + // ACSChatMessageReceivedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageReceived // event. type ACSChatMessageReceivedEventData struct { @@ -598,15 +676,15 @@ 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 properties Properties map[string]any // REQUIRED; The chat thread id ThreadID *string + // READ-ONLY; The list of properties of participants who are part of the thread + Participants []ACSChatThreadParticipantProperties + // The thread metadata Metadata map[string]*string @@ -626,9 +704,6 @@ 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 - Participants []ACSChatThreadParticipantProperties - // REQUIRED; The thread properties Properties map[string]any @@ -638,14 +713,17 @@ type ACSChatThreadCreatedWithUserEventData struct { // REQUIRED; 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 + + // The thread metadata + Metadata map[string]*string } // ACSChatThreadDeletedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadDeleted @@ -670,6 +748,39 @@ type ACSChatThreadDeletedEventData struct { Version *int64 } +// ACSChatThreadEventBaseProperties - Schema of common properties of all chat thread events +type ACSChatThreadEventBaseProperties struct { + // REQUIRED; The original creation time of the thread + CreateTime *time.Time + + // REQUIRED; The communication identifier of the target user + RecipientCommunicationIdentifier *CommunicationIdentifierModel + + // REQUIRED; The chat thread id + ThreadID *string + + // The transaction id will be used as co-relation vector + TransactionID *string + + // The version of the thread + Version *int64 +} + +// ACSChatThreadEventInThreadBaseProperties - Schema of common properties of all chat thread events +type ACSChatThreadEventInThreadBaseProperties struct { + // REQUIRED; The original creation time of the thread + CreateTime *time.Time + + // REQUIRED; The chat thread id + ThreadID *string + + // The transaction id will be used as co-relation vector + TransactionID *string + + // The version of the thread + Version *int64 +} + // ACSChatThreadParticipantProperties - Schema of the chat thread participant type ACSChatThreadParticipantProperties struct { // REQUIRED; The communication identifier of the user @@ -933,12 +1044,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 +1153,7 @@ type ACSMessageReceivedEventData struct { Context *ACSMessageContext // The channel event error - Error *Error + Error *InternalACSMessageChannelEventError // Optional. The received message interactive content InteractiveContent *ACSMessageInteractiveContent @@ -1090,7 +1216,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,6 +1232,18 @@ type ACSRouterChannelConfiguration struct { MaxNumberOfJobs *int32 } +// ACSRouterEventData - Schema of common properties of all Router events +type ACSRouterEventData struct { + // REQUIRED; Router Event Job ID + JobID *string + + // Router Event Channel ID + ChannelID *string + + // Router Event Channel Reference + ChannelReference *string +} + // ACSRouterJobCancelledEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobCancelled // event type ACSRouterJobCancelledEventData struct { @@ -1137,9 +1275,6 @@ 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 @@ -1149,6 +1284,9 @@ type ACSRouterJobClassificationFailedEventData struct { // REQUIRED; Router Jobs events Tags Tags map[string]*string + // READ-ONLY; Router Job Classification Failed Errors + Errors []InternalACSRouterCommunicationError + // Router Event Channel ID ChannelID *string @@ -1165,9 +1303,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 @@ -1194,6 +1329,9 @@ type ACSRouterJobClassifiedEventData struct { // 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 @@ -1277,6 +1415,27 @@ type ACSRouterJobDeletedEventData struct { QueueID *string } +// ACSRouterJobEventData - Schema of common properties of all Router Job events +type ACSRouterJobEventData struct { + // 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 + + // Router Event Channel ID + ChannelID *string + + // Router Event Channel Reference + ChannelReference *string + + // Router Job events Queue Id + QueueID *string +} + // ACSRouterJobExceptionTriggeredEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobExceptionTriggered // event type ACSRouterJobExceptionTriggeredEventData struct { @@ -1308,9 +1467,6 @@ 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 @@ -1320,12 +1476,12 @@ type ACSRouterJobQueuedEventData struct { // 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 @@ -1334,6 +1490,9 @@ type ACSRouterJobQueuedEventData struct { // 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 @@ -1348,9 +1507,6 @@ type ACSRouterJobReceivedEventData struct { // 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 +1516,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 @@ -1379,12 +1538,6 @@ 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 @@ -1400,6 +1553,15 @@ type ACSRouterJobSchedulingFailedEventData struct { // REQUIRED; Router Jobs events Tags Tags map[string]*string + // Router Job events Queue Id + QueueID *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 @@ -1408,9 +1570,6 @@ type ACSRouterJobSchedulingFailedEventData struct { // Router Job Scheduling Failed Reason FailureReason *string - - // Router Job events Queue Id - QueueID *string } // ACSRouterJobUnassignedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobUnassigned @@ -1444,12 +1603,6 @@ 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 @@ -1468,25 +1621,25 @@ type ACSRouterJobWaitingForActivationEventData struct { // REQUIRED; Router Job Waiting For Activation Unavailable For Matching UnavailableForMatching *bool + // Router Job events Queue Id + QueueID *string + + // 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 Job events Queue Id - QueueID *string } // 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 @@ -1496,14 +1649,20 @@ type ACSRouterJobWorkerSelectorsExpiredEventData struct { // REQUIRED; Router Jobs events Tags Tags map[string]*string + // Router Job events Queue Id + QueueID *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 Job events Queue Id - QueueID *string } // ACSRouterQueueDetails - Router Queue Details @@ -1541,6 +1700,21 @@ type ACSRouterWorkerDeregisteredEventData struct { WorkerID *string } +// ACSRouterWorkerEventData - Schema of common properties of all Router Worker events +type ACSRouterWorkerEventData struct { + // REQUIRED; Router Event Job ID + JobID *string + + // Router Event Channel ID + ChannelID *string + + // Router Event Channel Reference + ChannelReference *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 { @@ -1693,15 +1867,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 +1878,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 +1910,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,6 +1924,12 @@ 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 @@ -1773,9 +1947,6 @@ type ACSSMSDeliveryAttemptProperties struct { // 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; Status of Delivery DeliveryStatus *string @@ -1796,6 +1967,21 @@ type ACSSMSDeliveryReportReceivedEventData struct { // Customer Content Tag *string + + // READ-ONLY; List of details of delivery attempts made + DeliveryAttempts []ACSSMSDeliveryAttemptProperties +} + +// ACSSMSEventBaseProperties - Schema of common properties of all SMS events +type ACSSMSEventBaseProperties struct { + // REQUIRED; The identity of SMS message sender + From *string + + // REQUIRED; The identity of the SMS message + MessageID *string + + // REQUIRED; The identity of SMS message receiver + To *string } // ACSSMSReceivedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSReceived event. @@ -1909,6 +2095,39 @@ 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]map[string]any +} + +// 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 +2208,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 +2246,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 +2330,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 +2345,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 +2393,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 +2408,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 +2457,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 +2485,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 +2501,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 +2514,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 +2563,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 { @@ -2334,6 +2635,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 +2737,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 +2901,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 +2925,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 +3001,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 +3120,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 +3187,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 +3471,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 +3480,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 + Details []InternalACSRouterCommunicationError + + // Router Communication Error Code + Code *string } // KeyVaultAccessPolicyChangedEventData - Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.VaultAccessPolicyChanged @@ -3411,36 +3859,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 +3937,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. @@ -3893,7 +4359,9 @@ type ResourceHTTPRequest struct { } // ResourceNotificationsContainerServiceEventResourcesScheduledEventData - Schema of the Data property of an event grid event -// for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event. +// for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event.Schema of the +// Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted +// preview event. type ResourceNotificationsContainerServiceEventResourcesScheduledEventData struct { // REQUIRED; api version of the resource properties bag APIVersion *string @@ -3952,6 +4420,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 +4476,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..0fa7a808aa32 100644 --- a/sdk/messaging/eventgrid/azsystemevents/models_serde.go +++ b/sdk/messaging/eventgrid/azsystemevents/models_serde.go @@ -7,9 +7,8 @@ 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. @@ -596,6 +595,72 @@ func (a *ACSChatAzureBotCommandReceivedInThreadEventData) UnmarshalJSON(data []b return nil } +// MarshalJSON implements the json.Marshaller interface for type ACSChatEventBaseProperties. +func (a ACSChatEventBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier) + populate(objectMap, "threadId", a.ThreadID) + populate(objectMap, "transactionId", a.TransactionID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatEventBaseProperties. +func (a *ACSChatEventBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recipientCommunicationIdentifier": + err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) + delete(rawMsg, key) + case "threadId": + err = unpopulate(val, "ThreadID", &a.ThreadID) + delete(rawMsg, key) + case "transactionId": + err = unpopulate(val, "TransactionID", &a.TransactionID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ACSChatEventInThreadBaseProperties. +func (a ACSChatEventInThreadBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "threadId", a.ThreadID) + populate(objectMap, "transactionId", a.TransactionID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatEventInThreadBaseProperties. +func (a *ACSChatEventInThreadBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "threadId": + err = unpopulate(val, "ThreadID", &a.ThreadID) + delete(rawMsg, key) + case "transactionId": + err = unpopulate(val, "TransactionID", &a.TransactionID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ACSChatMessageDeletedEventData. func (a ACSChatMessageDeletedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -856,6 +921,120 @@ func (a *ACSChatMessageEditedInThreadEventData) UnmarshalJSON(data []byte) error return nil } +// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageEventBaseProperties. +func (a ACSChatMessageEventBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "composeTime", a.ComposeTime) + populate(objectMap, "messageId", a.MessageID) + populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier) + populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier) + populate(objectMap, "senderDisplayName", a.SenderDisplayName) + populate(objectMap, "threadId", a.ThreadID) + populate(objectMap, "transactionId", a.TransactionID) + populate(objectMap, "type", a.Type) + populate(objectMap, "version", a.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageEventBaseProperties. +func (a *ACSChatMessageEventBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "composeTime": + err = unpopulateDateTimeRFC3339(val, "ComposeTime", &a.ComposeTime) + delete(rawMsg, key) + case "messageId": + err = unpopulate(val, "MessageID", &a.MessageID) + delete(rawMsg, key) + case "recipientCommunicationIdentifier": + err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) + delete(rawMsg, key) + case "senderCommunicationIdentifier": + err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier) + delete(rawMsg, key) + case "senderDisplayName": + err = unpopulate(val, "SenderDisplayName", &a.SenderDisplayName) + delete(rawMsg, key) + case "threadId": + err = unpopulate(val, "ThreadID", &a.ThreadID) + delete(rawMsg, key) + case "transactionId": + err = unpopulate(val, "TransactionID", &a.TransactionID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &a.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ACSChatMessageEventInThreadBaseProperties. +func (a ACSChatMessageEventInThreadBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "composeTime", a.ComposeTime) + populate(objectMap, "messageId", a.MessageID) + populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier) + populate(objectMap, "senderDisplayName", a.SenderDisplayName) + populate(objectMap, "threadId", a.ThreadID) + populate(objectMap, "transactionId", a.TransactionID) + populate(objectMap, "type", a.Type) + populate(objectMap, "version", a.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatMessageEventInThreadBaseProperties. +func (a *ACSChatMessageEventInThreadBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "composeTime": + err = unpopulateDateTimeRFC3339(val, "ComposeTime", &a.ComposeTime) + delete(rawMsg, key) + case "messageId": + err = unpopulate(val, "MessageID", &a.MessageID) + delete(rawMsg, key) + case "senderCommunicationIdentifier": + err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier) + delete(rawMsg, key) + case "senderDisplayName": + err = unpopulate(val, "SenderDisplayName", &a.SenderDisplayName) + delete(rawMsg, key) + case "threadId": + err = unpopulate(val, "ThreadID", &a.ThreadID) + delete(rawMsg, key) + case "transactionId": + err = unpopulate(val, "TransactionID", &a.TransactionID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &a.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ACSChatMessageReceivedEventData. func (a ACSChatMessageReceivedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1351,6 +1530,88 @@ func (a *ACSChatThreadDeletedEventData) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ACSChatThreadEventBaseProperties. +func (a ACSChatThreadEventBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createTime", a.CreateTime) + populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier) + populate(objectMap, "threadId", a.ThreadID) + populate(objectMap, "transactionId", a.TransactionID) + populate(objectMap, "version", a.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatThreadEventBaseProperties. +func (a *ACSChatThreadEventBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createTime": + err = unpopulateDateTimeRFC3339(val, "CreateTime", &a.CreateTime) + delete(rawMsg, key) + case "recipientCommunicationIdentifier": + err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier) + delete(rawMsg, key) + case "threadId": + err = unpopulate(val, "ThreadID", &a.ThreadID) + delete(rawMsg, key) + case "transactionId": + err = unpopulate(val, "TransactionID", &a.TransactionID) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &a.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ACSChatThreadEventInThreadBaseProperties. +func (a ACSChatThreadEventInThreadBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createTime", a.CreateTime) + populate(objectMap, "threadId", a.ThreadID) + populate(objectMap, "transactionId", a.TransactionID) + populate(objectMap, "version", a.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatThreadEventInThreadBaseProperties. +func (a *ACSChatThreadEventInThreadBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createTime": + err = unpopulateDateTimeRFC3339(val, "CreateTime", &a.CreateTime) + delete(rawMsg, key) + case "threadId": + err = unpopulate(val, "ThreadID", &a.ThreadID) + delete(rawMsg, key) + case "transactionId": + err = unpopulate(val, "TransactionID", &a.TransactionID) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &a.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ACSChatThreadParticipantProperties. func (a ACSChatThreadParticipantProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1921,7 +2182,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,16 +2207,18 @@ func (a *ACSMessageDeliveryStatusUpdatedEventData) UnmarshalJSON(data []byte) er return nil } -// MarshalJSON implements the json.Marshaller interface for type ACSMessageInteractiveButtonReplyContent. -func (a ACSMessageInteractiveButtonReplyContent) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ACSMessageEventData. +func (a ACSMessageEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", a.ButtonID) - populate(objectMap, "title", a.Title) + 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 ACSMessageInteractiveButtonReplyContent. -func (a *ACSMessageInteractiveButtonReplyContent) UnmarshalJSON(data []byte) error { +// 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) @@ -1963,11 +2226,48 @@ func (a *ACSMessageInteractiveButtonReplyContent) UnmarshalJSON(data []byte) err for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ButtonID", &a.ButtonID) + case "error": + err = unpopulate(val, "Error", &a.Error) delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &a.Title) + 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) + populate(objectMap, "id", a.ButtonID) + populate(objectMap, "title", a.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSMessageInteractiveButtonReplyContent. +func (a *ACSMessageInteractiveButtonReplyContent) 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, "ButtonID", &a.ButtonID) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &a.Title) delete(rawMsg, key) } if err != nil { @@ -2162,7 +2462,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 +2656,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 +2779,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 +3025,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) @@ -3220,6 +3602,45 @@ func (a *ACSRouterWorkerDeregisteredEventData) UnmarshalJSON(data []byte) error return nil } +// MarshalJSON implements the json.Marshaller interface for type ACSRouterWorkerEventData. +func (a ACSRouterWorkerEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "channelId", a.ChannelID) + populate(objectMap, "channelReference", a.ChannelReference) + populate(objectMap, "jobId", a.JobID) + populate(objectMap, "workerId", a.WorkerID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerEventData. +func (a *ACSRouterWorkerEventData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "channelId": + err = unpopulate(val, "ChannelID", &a.ChannelID) + delete(rawMsg, key) + case "channelReference": + err = unpopulate(val, "ChannelReference", &a.ChannelReference) + delete(rawMsg, key) + case "jobId": + err = unpopulate(val, "JobID", &a.JobID) + delete(rawMsg, key) + case "workerId": + err = unpopulate(val, "WorkerID", &a.WorkerID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ACSRouterWorkerOfferAcceptedEventData. func (a ACSRouterWorkerOfferAcceptedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3742,6 +4163,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,15 +4535,16 @@ func (a *APIManagementAPIUpdatedEventData) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayAPIAddedEventData. -func (a APIManagementGatewayAPIAddedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type APIManagementCircuitBreakerClosedEventData. +func (a APIManagementCircuitBreakerClosedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "resourceUri", a.ResourceURI) + populate(objectMap, "backendName", a.BackendName) + populate(objectMap, "circuitBreaker", a.CircuitBreaker) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayAPIAddedEventData. -func (a *APIManagementGatewayAPIAddedEventData) UnmarshalJSON(data []byte) error { +// 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) @@ -4095,8 +4552,11 @@ func (a *APIManagementGatewayAPIAddedEventData) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "resourceUri": - err = unpopulate(val, "ResourceURI", &a.ResourceURI) + 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 { @@ -4106,15 +4566,16 @@ func (a *APIManagementGatewayAPIAddedEventData) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayAPIRemovedEventData. -func (a APIManagementGatewayAPIRemovedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type APIManagementCircuitBreakerOpenedEventData. +func (a APIManagementCircuitBreakerOpenedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "resourceUri", a.ResourceURI) + populate(objectMap, "backendName", a.BackendName) + populate(objectMap, "circuitBreaker", a.CircuitBreaker) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayAPIRemovedEventData. -func (a *APIManagementGatewayAPIRemovedEventData) UnmarshalJSON(data []byte) error { +// 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) @@ -4122,8 +4583,11 @@ func (a *APIManagementGatewayAPIRemovedEventData) UnmarshalJSON(data []byte) err for key, val := range rawMsg { var err error switch key { - case "resourceUri": - err = unpopulate(val, "ResourceURI", &a.ResourceURI) + 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 { @@ -4133,15 +4597,15 @@ func (a *APIManagementGatewayAPIRemovedEventData) UnmarshalJSON(data []byte) err return nil } -// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayCertificateAuthorityCreatedEventData. -func (a APIManagementGatewayCertificateAuthorityCreatedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type APIManagementCircuitBreakerProperties. +func (a APIManagementCircuitBreakerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "resourceUri", a.ResourceURI) + populate(objectMap, "rules", a.Rules) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayCertificateAuthorityCreatedEventData. -func (a *APIManagementGatewayCertificateAuthorityCreatedEventData) UnmarshalJSON(data []byte) error { +// 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) @@ -4149,8 +4613,8 @@ func (a *APIManagementGatewayCertificateAuthorityCreatedEventData) UnmarshalJSON for key, val := range rawMsg { var err error switch key { - case "resourceUri": - err = unpopulate(val, "ResourceURI", &a.ResourceURI) + case "rules": + err = unpopulate(val, "Rules", &a.Rules) delete(rawMsg, key) } if err != nil { @@ -4160,15 +4624,15 @@ func (a *APIManagementGatewayCertificateAuthorityCreatedEventData) UnmarshalJSON return nil } -// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayCertificateAuthorityDeletedEventData. -func (a APIManagementGatewayCertificateAuthorityDeletedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type APIManagementExpiredGatewayTokenProperties. +func (a APIManagementExpiredGatewayTokenProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "resourceUri", a.ResourceURI) + populateDateTimeRFC3339(objectMap, "expiredAtUtc", a.ExpiredAtUTC) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayCertificateAuthorityDeletedEventData. -func (a *APIManagementGatewayCertificateAuthorityDeletedEventData) UnmarshalJSON(data []byte) error { +// 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) @@ -4176,8 +4640,8 @@ func (a *APIManagementGatewayCertificateAuthorityDeletedEventData) UnmarshalJSON for key, val := range rawMsg { var err error switch key { - case "resourceUri": - err = unpopulate(val, "ResourceURI", &a.ResourceURI) + case "expiredAtUtc": + err = unpopulateDateTimeRFC3339(val, "ExpiredAtUTC", &a.ExpiredAtUTC) delete(rawMsg, key) } if err != nil { @@ -4187,15 +4651,15 @@ func (a *APIManagementGatewayCertificateAuthorityDeletedEventData) UnmarshalJSON return nil } -// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayCertificateAuthorityUpdatedEventData. -func (a APIManagementGatewayCertificateAuthorityUpdatedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayAPIAddedEventData. +func (a APIManagementGatewayAPIAddedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "resourceUri", a.ResourceURI) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayCertificateAuthorityUpdatedEventData. -func (a *APIManagementGatewayCertificateAuthorityUpdatedEventData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayAPIAddedEventData. +func (a *APIManagementGatewayAPIAddedEventData) 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) @@ -4214,15 +4678,15 @@ func (a *APIManagementGatewayCertificateAuthorityUpdatedEventData) UnmarshalJSON return nil } -// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayCreatedEventData. -func (a APIManagementGatewayCreatedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayAPIRemovedEventData. +func (a APIManagementGatewayAPIRemovedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "resourceUri", a.ResourceURI) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayCreatedEventData. -func (a *APIManagementGatewayCreatedEventData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayAPIRemovedEventData. +func (a *APIManagementGatewayAPIRemovedEventData) 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) @@ -4241,15 +4705,15 @@ func (a *APIManagementGatewayCreatedEventData) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayDeletedEventData. -func (a APIManagementGatewayDeletedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayCertificateAuthorityCreatedEventData. +func (a APIManagementGatewayCertificateAuthorityCreatedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "resourceUri", a.ResourceURI) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayDeletedEventData. -func (a *APIManagementGatewayDeletedEventData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayCertificateAuthorityCreatedEventData. +func (a *APIManagementGatewayCertificateAuthorityCreatedEventData) 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) @@ -4268,15 +4732,15 @@ func (a *APIManagementGatewayDeletedEventData) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayHostnameConfigurationCreatedEventData. -func (a APIManagementGatewayHostnameConfigurationCreatedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayCertificateAuthorityDeletedEventData. +func (a APIManagementGatewayCertificateAuthorityDeletedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "resourceUri", a.ResourceURI) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayHostnameConfigurationCreatedEventData. -func (a *APIManagementGatewayHostnameConfigurationCreatedEventData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayCertificateAuthorityDeletedEventData. +func (a *APIManagementGatewayCertificateAuthorityDeletedEventData) 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) @@ -4295,15 +4759,15 @@ func (a *APIManagementGatewayHostnameConfigurationCreatedEventData) UnmarshalJSO return nil } -// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayHostnameConfigurationDeletedEventData. -func (a APIManagementGatewayHostnameConfigurationDeletedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayCertificateAuthorityUpdatedEventData. +func (a APIManagementGatewayCertificateAuthorityUpdatedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "resourceUri", a.ResourceURI) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayHostnameConfigurationDeletedEventData. -func (a *APIManagementGatewayHostnameConfigurationDeletedEventData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayCertificateAuthorityUpdatedEventData. +func (a *APIManagementGatewayCertificateAuthorityUpdatedEventData) 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) @@ -4322,16 +4786,43 @@ func (a *APIManagementGatewayHostnameConfigurationDeletedEventData) UnmarshalJSO return nil } -// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayHostnameConfigurationUpdatedEventData. -func (a APIManagementGatewayHostnameConfigurationUpdatedEventData) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayCreatedEventData. +func (a APIManagementGatewayCreatedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "resourceUri", a.ResourceURI) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayHostnameConfigurationUpdatedEventData. -func (a *APIManagementGatewayHostnameConfigurationUpdatedEventData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayCreatedEventData. +func (a *APIManagementGatewayCreatedEventData) 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 "resourceUri": + err = unpopulate(val, "ResourceURI", &a.ResourceURI) + 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 APIManagementGatewayDeletedEventData. +func (a APIManagementGatewayDeletedEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceUri", a.ResourceURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayDeletedEventData. +func (a *APIManagementGatewayDeletedEventData) 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) } @@ -4349,6 +4840,180 @@ func (a *APIManagementGatewayHostnameConfigurationUpdatedEventData) UnmarshalJSO return nil } +// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayHostnameConfigurationCreatedEventData. +func (a APIManagementGatewayHostnameConfigurationCreatedEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceUri", a.ResourceURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayHostnameConfigurationCreatedEventData. +func (a *APIManagementGatewayHostnameConfigurationCreatedEventData) 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 "resourceUri": + err = unpopulate(val, "ResourceURI", &a.ResourceURI) + 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 APIManagementGatewayHostnameConfigurationDeletedEventData. +func (a APIManagementGatewayHostnameConfigurationDeletedEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceUri", a.ResourceURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayHostnameConfigurationDeletedEventData. +func (a *APIManagementGatewayHostnameConfigurationDeletedEventData) 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 "resourceUri": + err = unpopulate(val, "ResourceURI", &a.ResourceURI) + 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 APIManagementGatewayHostnameConfigurationUpdatedEventData. +func (a APIManagementGatewayHostnameConfigurationUpdatedEventData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceUri", a.ResourceURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayHostnameConfigurationUpdatedEventData. +func (a *APIManagementGatewayHostnameConfigurationUpdatedEventData) 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 "resourceUri": + err = unpopulate(val, "ResourceURI", &a.ResourceURI) + 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 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 +5041,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) @@ -4697,6 +5389,45 @@ func (a *AVSClusterDeletedEventData) UnmarshalJSON(data []byte) error { return nil } +// 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) + populate(objectMap, "operationId", a.OperationID) + populate(objectMap, "removedHostNames", a.RemovedHostNames) + return json.Marshal(objectMap) +} + +// 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) + } + 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 AVSClusterFailedEventData. func (a AVSClusterFailedEventData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4818,6 +5549,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 +5696,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 +5957,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 +6163,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 +6409,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 +6765,81 @@ func (c *ContainerServiceClusterSupportEndingEventData) UnmarshalJSON(data []byt return nil } -// MarshalJSON implements the json.Marshaller interface for type ContainerServiceNewKubernetesVersionAvailableEventData. -func (c ContainerServiceNewKubernetesVersionAvailableEventData) MarshalJSON() ([]byte, error) { +// 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) + 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, "latestPreviewKubernetesVersion", c.LatestPreviewKubernetesVersion) - populate(objectMap, "latestStableKubernetesVersion", c.LatestStableKubernetesVersion) - populate(objectMap, "latestSupportedKubernetesVersion", c.LatestSupportedKubernetesVersion) - populate(objectMap, "lowestMinorKubernetesVersion", c.LowestMinorKubernetesVersion) + 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 +6847,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 +7071,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 +7367,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 +7504,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 +8130,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 +8138,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,7 +8161,7 @@ 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) @@ -6989,7 +8172,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) @@ -7804,6 +8987,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 +10180,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 +10324,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..184e534f0746 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: 2c6fb102e7f420fe04d5dd85f35f56e5691d3cdf repo: Azure/azure-rest-api-specs +additionalDirectories: