// 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"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/datetime"
	"reflect"
	"time"
)

// MarshalJSON implements the json.Marshaller interface for type ACSCallEndReasonProperties.
func (a ACSCallEndReasonProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "code", a.Code)
	populate(objectMap, "phrase", a.Phrase)
	populate(objectMap, "subCode", a.SubCode)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallEndReasonProperties.
func (a *ACSCallEndReasonProperties) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "code":
			err = unpopulate(val, "Code", &a.Code)
			delete(rawMsg, key)
		case "phrase":
			err = unpopulate(val, "Phrase", &a.Phrase)
			delete(rawMsg, key)
		case "subCode":
			err = unpopulate(val, "SubCode", &a.SubCode)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSCallEndedByProperties.
func (a ACSCallEndedByProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "communicationIdentifier", a.CommunicationIdentifier)
	populate(objectMap, "type", a.Kind)
	populate(objectMap, "name", a.Name)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallEndedByProperties.
func (a *ACSCallEndedByProperties) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "communicationIdentifier":
			err = unpopulate(val, "CommunicationIdentifier", &a.CommunicationIdentifier)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Kind", &a.Kind)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &a.Name)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSCallEndedEventData.
func (a ACSCallEndedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "callDurationInSeconds", a.CallDurationInSeconds)
	populate(objectMap, "correlationId", a.CorrelationID)
	populate(objectMap, "endedBy", a.EndedBy)
	populate(objectMap, "group", a.Group)
	populate(objectMap, "isRoomsCall", a.IsRoomsCall)
	populate(objectMap, "isTwoParty", a.IsTwoParty)
	populate(objectMap, "reason", a.Reason)
	populate(objectMap, "room", a.Room)
	populate(objectMap, "serverCallId", a.ServerCallID)
	populate(objectMap, "startedBy", a.StartedBy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallEndedEventData.
func (a *ACSCallEndedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "callDurationInSeconds":
			err = unpopulate(val, "CallDurationInSeconds", &a.CallDurationInSeconds)
			delete(rawMsg, key)
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &a.CorrelationID)
			delete(rawMsg, key)
		case "endedBy":
			err = unpopulate(val, "EndedBy", &a.EndedBy)
			delete(rawMsg, key)
		case "group":
			err = unpopulate(val, "Group", &a.Group)
			delete(rawMsg, key)
		case "isRoomsCall":
			err = unpopulate(val, "IsRoomsCall", &a.IsRoomsCall)
			delete(rawMsg, key)
		case "isTwoParty":
			err = unpopulate(val, "IsTwoParty", &a.IsTwoParty)
			delete(rawMsg, key)
		case "reason":
			err = unpopulate(val, "Reason", &a.Reason)
			delete(rawMsg, key)
		case "room":
			err = unpopulate(val, "Room", &a.Room)
			delete(rawMsg, key)
		case "serverCallId":
			err = unpopulate(val, "ServerCallID", &a.ServerCallID)
			delete(rawMsg, key)
		case "startedBy":
			err = unpopulate(val, "StartedBy", &a.StartedBy)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSCallGroupProperties.
func (a ACSCallGroupProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", a.ID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallGroupProperties.
func (a *ACSCallGroupProperties) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &a.ID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSCallParticipantAddedEventData.
func (a ACSCallParticipantAddedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "correlationId", a.CorrelationID)
	populate(objectMap, "displayName", a.DisplayName)
	populate(objectMap, "group", a.Group)
	populate(objectMap, "isRoomsCall", a.IsRoomsCall)
	populate(objectMap, "isTwoParty", a.IsTwoParty)
	populate(objectMap, "participantId", a.ParticipantID)
	populate(objectMap, "room", a.Room)
	populate(objectMap, "serverCallId", a.ServerCallID)
	populate(objectMap, "startedBy", a.StartedBy)
	populate(objectMap, "user", a.User)
	populate(objectMap, "userAgent", a.UserAgent)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallParticipantAddedEventData.
func (a *ACSCallParticipantAddedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &a.CorrelationID)
			delete(rawMsg, key)
		case "displayName":
			err = unpopulate(val, "DisplayName", &a.DisplayName)
			delete(rawMsg, key)
		case "group":
			err = unpopulate(val, "Group", &a.Group)
			delete(rawMsg, key)
		case "isRoomsCall":
			err = unpopulate(val, "IsRoomsCall", &a.IsRoomsCall)
			delete(rawMsg, key)
		case "isTwoParty":
			err = unpopulate(val, "IsTwoParty", &a.IsTwoParty)
			delete(rawMsg, key)
		case "participantId":
			err = unpopulate(val, "ParticipantID", &a.ParticipantID)
			delete(rawMsg, key)
		case "room":
			err = unpopulate(val, "Room", &a.Room)
			delete(rawMsg, key)
		case "serverCallId":
			err = unpopulate(val, "ServerCallID", &a.ServerCallID)
			delete(rawMsg, key)
		case "startedBy":
			err = unpopulate(val, "StartedBy", &a.StartedBy)
			delete(rawMsg, key)
		case "user":
			err = unpopulate(val, "User", &a.User)
			delete(rawMsg, key)
		case "userAgent":
			err = unpopulate(val, "UserAgent", &a.UserAgent)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSCallParticipantProperties.
func (a ACSCallParticipantProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "communicationIdentifier", a.CommunicationIdentifier)
	populate(objectMap, "role", a.Role)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallParticipantProperties.
func (a *ACSCallParticipantProperties) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "communicationIdentifier":
			err = unpopulate(val, "CommunicationIdentifier", &a.CommunicationIdentifier)
			delete(rawMsg, key)
		case "role":
			err = unpopulate(val, "Role", &a.Role)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSCallParticipantRemovedEventData.
func (a ACSCallParticipantRemovedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "correlationId", a.CorrelationID)
	populate(objectMap, "displayName", a.DisplayName)
	populate(objectMap, "group", a.Group)
	populate(objectMap, "isRoomsCall", a.IsRoomsCall)
	populate(objectMap, "isTwoParty", a.IsTwoParty)
	populate(objectMap, "participantId", a.ParticipantID)
	populate(objectMap, "room", a.Room)
	populate(objectMap, "serverCallId", a.ServerCallID)
	populate(objectMap, "startedBy", a.StartedBy)
	populate(objectMap, "user", a.User)
	populate(objectMap, "userAgent", a.UserAgent)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallParticipantRemovedEventData.
func (a *ACSCallParticipantRemovedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &a.CorrelationID)
			delete(rawMsg, key)
		case "displayName":
			err = unpopulate(val, "DisplayName", &a.DisplayName)
			delete(rawMsg, key)
		case "group":
			err = unpopulate(val, "Group", &a.Group)
			delete(rawMsg, key)
		case "isRoomsCall":
			err = unpopulate(val, "IsRoomsCall", &a.IsRoomsCall)
			delete(rawMsg, key)
		case "isTwoParty":
			err = unpopulate(val, "IsTwoParty", &a.IsTwoParty)
			delete(rawMsg, key)
		case "participantId":
			err = unpopulate(val, "ParticipantID", &a.ParticipantID)
			delete(rawMsg, key)
		case "room":
			err = unpopulate(val, "Room", &a.Room)
			delete(rawMsg, key)
		case "serverCallId":
			err = unpopulate(val, "ServerCallID", &a.ServerCallID)
			delete(rawMsg, key)
		case "startedBy":
			err = unpopulate(val, "StartedBy", &a.StartedBy)
			delete(rawMsg, key)
		case "user":
			err = unpopulate(val, "User", &a.User)
			delete(rawMsg, key)
		case "userAgent":
			err = unpopulate(val, "UserAgent", &a.UserAgent)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSCallRoomProperties.
func (a ACSCallRoomProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", a.ID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallRoomProperties.
func (a *ACSCallRoomProperties) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &a.ID)
			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 ACSCallStartedEventData.
func (a ACSCallStartedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "correlationId", a.CorrelationID)
	populate(objectMap, "group", a.Group)
	populate(objectMap, "isRoomsCall", a.IsRoomsCall)
	populate(objectMap, "isTwoParty", a.IsTwoParty)
	populate(objectMap, "room", a.Room)
	populate(objectMap, "serverCallId", a.ServerCallID)
	populate(objectMap, "startedBy", a.StartedBy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallStartedEventData.
func (a *ACSCallStartedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &a.CorrelationID)
			delete(rawMsg, key)
		case "group":
			err = unpopulate(val, "Group", &a.Group)
			delete(rawMsg, key)
		case "isRoomsCall":
			err = unpopulate(val, "IsRoomsCall", &a.IsRoomsCall)
			delete(rawMsg, key)
		case "isTwoParty":
			err = unpopulate(val, "IsTwoParty", &a.IsTwoParty)
			delete(rawMsg, key)
		case "room":
			err = unpopulate(val, "Room", &a.Room)
			delete(rawMsg, key)
		case "serverCallId":
			err = unpopulate(val, "ServerCallID", &a.ServerCallID)
			delete(rawMsg, key)
		case "startedBy":
			err = unpopulate(val, "StartedBy", &a.StartedBy)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSCallingEventProperties.
func (a ACSCallingEventProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "correlationId", a.CorrelationID)
	populate(objectMap, "group", a.Group)
	populate(objectMap, "isRoomsCall", a.IsRoomsCall)
	populate(objectMap, "isTwoParty", a.IsTwoParty)
	populate(objectMap, "room", a.Room)
	populate(objectMap, "serverCallId", a.ServerCallID)
	populate(objectMap, "startedBy", a.StartedBy)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSCallingEventProperties.
func (a *ACSCallingEventProperties) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &a.CorrelationID)
			delete(rawMsg, key)
		case "group":
			err = unpopulate(val, "Group", &a.Group)
			delete(rawMsg, key)
		case "isRoomsCall":
			err = unpopulate(val, "IsRoomsCall", &a.IsRoomsCall)
			delete(rawMsg, key)
		case "isTwoParty":
			err = unpopulate(val, "IsTwoParty", &a.IsTwoParty)
			delete(rawMsg, key)
		case "room":
			err = unpopulate(val, "Room", &a.Room)
			delete(rawMsg, key)
		case "serverCallId":
			err = unpopulate(val, "ServerCallID", &a.ServerCallID)
			delete(rawMsg, key)
		case "startedBy":
			err = unpopulate(val, "StartedBy", &a.StartedBy)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSChatAzureBotCommandReceivedInThreadEventData.
func (a ACSChatAzureBotCommandReceivedInThreadEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "composeTime", a.ComposeTime)
	populate(objectMap, "messageBody", a.MessageBody)
	populate(objectMap, "messageId", a.MessageID)
	populate(objectMap, "metadata", a.Metadata)
	populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier)
	populate(objectMap, "senderDisplayName", a.SenderDisplayName)
	populate(objectMap, "sequenceId", a.SequenceID)
	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 ACSChatAzureBotCommandReceivedInThreadEventData.
func (a *ACSChatAzureBotCommandReceivedInThreadEventData) 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 = unpopulateTime[datetime.RFC3339](val, "ComposeTime", &a.ComposeTime)
			delete(rawMsg, key)
		case "messageBody":
			err = unpopulate(val, "MessageBody", &a.MessageBody)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &a.Metadata)
			delete(rawMsg, key)
		case "senderCommunicationIdentifier":
			err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier)
			delete(rawMsg, key)
		case "senderDisplayName":
			err = unpopulate(val, "SenderDisplayName", &a.SenderDisplayName)
			delete(rawMsg, key)
		case "sequenceId":
			err = unpopulate(val, "SequenceID", &a.SequenceID)
			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 ACSChatMessageDeletedEventData.
func (a ACSChatMessageDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "composeTime", a.ComposeTime)
	populateTime[datetime.RFC3339](objectMap, "deleteTime", a.DeleteTime)
	populate(objectMap, "messageId", a.MessageID)
	populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier)
	populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier)
	populate(objectMap, "senderDisplayName", a.SenderDisplayName)
	populate(objectMap, "sequenceId", a.SequenceID)
	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 ACSChatMessageDeletedEventData.
func (a *ACSChatMessageDeletedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "composeTime":
			err = unpopulateTime[datetime.RFC3339](val, "ComposeTime", &a.ComposeTime)
			delete(rawMsg, key)
		case "deleteTime":
			err = unpopulateTime[datetime.RFC3339](val, "DeleteTime", &a.DeleteTime)
			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 "sequenceId":
			err = unpopulate(val, "SequenceID", &a.SequenceID)
			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 ACSChatMessageDeletedInThreadEventData.
func (a ACSChatMessageDeletedInThreadEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "composeTime", a.ComposeTime)
	populateTime[datetime.RFC3339](objectMap, "deleteTime", a.DeleteTime)
	populate(objectMap, "messageId", a.MessageID)
	populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier)
	populate(objectMap, "senderDisplayName", a.SenderDisplayName)
	populate(objectMap, "sequenceId", a.SequenceID)
	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 ACSChatMessageDeletedInThreadEventData.
func (a *ACSChatMessageDeletedInThreadEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "composeTime":
			err = unpopulateTime[datetime.RFC3339](val, "ComposeTime", &a.ComposeTime)
			delete(rawMsg, key)
		case "deleteTime":
			err = unpopulateTime[datetime.RFC3339](val, "DeleteTime", &a.DeleteTime)
			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 "sequenceId":
			err = unpopulate(val, "SequenceID", &a.SequenceID)
			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 ACSChatMessageEditedEventData.
func (a ACSChatMessageEditedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "composeTime", a.ComposeTime)
	populateTime[datetime.RFC3339](objectMap, "editTime", a.EditTime)
	populate(objectMap, "messageBody", a.MessageBody)
	populate(objectMap, "messageId", a.MessageID)
	populate(objectMap, "metadata", a.Metadata)
	populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier)
	populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier)
	populate(objectMap, "senderDisplayName", a.SenderDisplayName)
	populate(objectMap, "sequenceId", a.SequenceID)
	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 ACSChatMessageEditedEventData.
func (a *ACSChatMessageEditedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "composeTime":
			err = unpopulateTime[datetime.RFC3339](val, "ComposeTime", &a.ComposeTime)
			delete(rawMsg, key)
		case "editTime":
			err = unpopulateTime[datetime.RFC3339](val, "EditTime", &a.EditTime)
			delete(rawMsg, key)
		case "messageBody":
			err = unpopulate(val, "MessageBody", &a.MessageBody)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &a.Metadata)
			delete(rawMsg, key)
		case "recipientCommunicationIdentifier":
			err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier)
			delete(rawMsg, key)
		case "senderCommunicationIdentifier":
			err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier)
			delete(rawMsg, key)
		case "senderDisplayName":
			err = unpopulate(val, "SenderDisplayName", &a.SenderDisplayName)
			delete(rawMsg, key)
		case "sequenceId":
			err = unpopulate(val, "SequenceID", &a.SequenceID)
			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 ACSChatMessageEditedInThreadEventData.
func (a ACSChatMessageEditedInThreadEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "composeTime", a.ComposeTime)
	populateTime[datetime.RFC3339](objectMap, "editTime", a.EditTime)
	populate(objectMap, "messageBody", a.MessageBody)
	populate(objectMap, "messageId", a.MessageID)
	populate(objectMap, "metadata", a.Metadata)
	populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier)
	populate(objectMap, "senderDisplayName", a.SenderDisplayName)
	populate(objectMap, "sequenceId", a.SequenceID)
	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 ACSChatMessageEditedInThreadEventData.
func (a *ACSChatMessageEditedInThreadEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "composeTime":
			err = unpopulateTime[datetime.RFC3339](val, "ComposeTime", &a.ComposeTime)
			delete(rawMsg, key)
		case "editTime":
			err = unpopulateTime[datetime.RFC3339](val, "EditTime", &a.EditTime)
			delete(rawMsg, key)
		case "messageBody":
			err = unpopulate(val, "MessageBody", &a.MessageBody)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &a.Metadata)
			delete(rawMsg, key)
		case "senderCommunicationIdentifier":
			err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier)
			delete(rawMsg, key)
		case "senderDisplayName":
			err = unpopulate(val, "SenderDisplayName", &a.SenderDisplayName)
			delete(rawMsg, key)
		case "sequenceId":
			err = unpopulate(val, "SequenceID", &a.SequenceID)
			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)
	populateTime[datetime.RFC3339](objectMap, "composeTime", a.ComposeTime)
	populate(objectMap, "messageBody", a.MessageBody)
	populate(objectMap, "messageId", a.MessageID)
	populate(objectMap, "metadata", a.Metadata)
	populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier)
	populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier)
	populate(objectMap, "senderDisplayName", a.SenderDisplayName)
	populate(objectMap, "sequenceId", a.SequenceID)
	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 ACSChatMessageReceivedEventData.
func (a *ACSChatMessageReceivedEventData) 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 = unpopulateTime[datetime.RFC3339](val, "ComposeTime", &a.ComposeTime)
			delete(rawMsg, key)
		case "messageBody":
			err = unpopulate(val, "MessageBody", &a.MessageBody)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &a.Metadata)
			delete(rawMsg, key)
		case "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 "sequenceId":
			err = unpopulate(val, "SequenceID", &a.SequenceID)
			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 ACSChatMessageReceivedInThreadEventData.
func (a ACSChatMessageReceivedInThreadEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "composeTime", a.ComposeTime)
	populate(objectMap, "messageBody", a.MessageBody)
	populate(objectMap, "messageId", a.MessageID)
	populate(objectMap, "metadata", a.Metadata)
	populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier)
	populate(objectMap, "senderDisplayName", a.SenderDisplayName)
	populate(objectMap, "sequenceId", a.SequenceID)
	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 ACSChatMessageReceivedInThreadEventData.
func (a *ACSChatMessageReceivedInThreadEventData) 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 = unpopulateTime[datetime.RFC3339](val, "ComposeTime", &a.ComposeTime)
			delete(rawMsg, key)
		case "messageBody":
			err = unpopulate(val, "MessageBody", &a.MessageBody)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &a.Metadata)
			delete(rawMsg, key)
		case "senderCommunicationIdentifier":
			err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier)
			delete(rawMsg, key)
		case "senderDisplayName":
			err = unpopulate(val, "SenderDisplayName", &a.SenderDisplayName)
			delete(rawMsg, key)
		case "sequenceId":
			err = unpopulate(val, "SequenceID", &a.SequenceID)
			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 ACSChatParticipantAddedToThreadEventData.
func (a ACSChatParticipantAddedToThreadEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "addedByCommunicationIdentifier", a.AddedByCommunicationIdentifier)
	populate(objectMap, "participantAdded", a.ParticipantAdded)
	populate(objectMap, "threadId", a.ThreadID)
	populateTime[datetime.RFC3339](objectMap, "time", a.Time)
	populate(objectMap, "transactionId", a.TransactionID)
	populate(objectMap, "version", a.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatParticipantAddedToThreadEventData.
func (a *ACSChatParticipantAddedToThreadEventData) 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 "addedByCommunicationIdentifier":
			err = unpopulate(val, "AddedByCommunicationIdentifier", &a.AddedByCommunicationIdentifier)
			delete(rawMsg, key)
		case "participantAdded":
			err = unpopulate(val, "ParticipantAdded", &a.ParticipantAdded)
			delete(rawMsg, key)
		case "threadId":
			err = unpopulate(val, "ThreadID", &a.ThreadID)
			delete(rawMsg, key)
		case "time":
			err = unpopulateTime[datetime.RFC3339](val, "Time", &a.Time)
			delete(rawMsg, key)
		case "transactionId":
			err = unpopulate(val, "TransactionID", &a.TransactionID)
			delete(rawMsg, key)
		case "version":
			err = unpopulate(val, "Version", &a.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSChatParticipantAddedToThreadWithUserEventData.
func (a ACSChatParticipantAddedToThreadWithUserEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "addedByCommunicationIdentifier", a.AddedByCommunicationIdentifier)
	populateTime[datetime.RFC3339](objectMap, "createTime", a.CreateTime)
	populate(objectMap, "participantAdded", a.ParticipantAdded)
	populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier)
	populate(objectMap, "threadId", a.ThreadID)
	populateTime[datetime.RFC3339](objectMap, "time", a.Time)
	populate(objectMap, "transactionId", a.TransactionID)
	populate(objectMap, "version", a.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatParticipantAddedToThreadWithUserEventData.
func (a *ACSChatParticipantAddedToThreadWithUserEventData) 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 "addedByCommunicationIdentifier":
			err = unpopulate(val, "AddedByCommunicationIdentifier", &a.AddedByCommunicationIdentifier)
			delete(rawMsg, key)
		case "createTime":
			err = unpopulateTime[datetime.RFC3339](val, "CreateTime", &a.CreateTime)
			delete(rawMsg, key)
		case "participantAdded":
			err = unpopulate(val, "ParticipantAdded", &a.ParticipantAdded)
			delete(rawMsg, key)
		case "recipientCommunicationIdentifier":
			err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier)
			delete(rawMsg, key)
		case "threadId":
			err = unpopulate(val, "ThreadID", &a.ThreadID)
			delete(rawMsg, key)
		case "time":
			err = unpopulateTime[datetime.RFC3339](val, "Time", &a.Time)
			delete(rawMsg, key)
		case "transactionId":
			err = unpopulate(val, "TransactionID", &a.TransactionID)
			delete(rawMsg, key)
		case "version":
			err = unpopulate(val, "Version", &a.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSChatParticipantRemovedFromThreadEventData.
func (a ACSChatParticipantRemovedFromThreadEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "participantRemoved", a.ParticipantRemoved)
	populate(objectMap, "removedByCommunicationIdentifier", a.RemovedByCommunicationIdentifier)
	populate(objectMap, "threadId", a.ThreadID)
	populateTime[datetime.RFC3339](objectMap, "time", a.Time)
	populate(objectMap, "transactionId", a.TransactionID)
	populate(objectMap, "version", a.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatParticipantRemovedFromThreadEventData.
func (a *ACSChatParticipantRemovedFromThreadEventData) 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 "participantRemoved":
			err = unpopulate(val, "ParticipantRemoved", &a.ParticipantRemoved)
			delete(rawMsg, key)
		case "removedByCommunicationIdentifier":
			err = unpopulate(val, "RemovedByCommunicationIdentifier", &a.RemovedByCommunicationIdentifier)
			delete(rawMsg, key)
		case "threadId":
			err = unpopulate(val, "ThreadID", &a.ThreadID)
			delete(rawMsg, key)
		case "time":
			err = unpopulateTime[datetime.RFC3339](val, "Time", &a.Time)
			delete(rawMsg, key)
		case "transactionId":
			err = unpopulate(val, "TransactionID", &a.TransactionID)
			delete(rawMsg, key)
		case "version":
			err = unpopulate(val, "Version", &a.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSChatParticipantRemovedFromThreadWithUserEventData.
func (a ACSChatParticipantRemovedFromThreadWithUserEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "createTime", a.CreateTime)
	populate(objectMap, "participantRemoved", a.ParticipantRemoved)
	populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier)
	populate(objectMap, "removedByCommunicationIdentifier", a.RemovedByCommunicationIdentifier)
	populate(objectMap, "threadId", a.ThreadID)
	populateTime[datetime.RFC3339](objectMap, "time", a.Time)
	populate(objectMap, "transactionId", a.TransactionID)
	populate(objectMap, "version", a.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatParticipantRemovedFromThreadWithUserEventData.
func (a *ACSChatParticipantRemovedFromThreadWithUserEventData) 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 = unpopulateTime[datetime.RFC3339](val, "CreateTime", &a.CreateTime)
			delete(rawMsg, key)
		case "participantRemoved":
			err = unpopulate(val, "ParticipantRemoved", &a.ParticipantRemoved)
			delete(rawMsg, key)
		case "recipientCommunicationIdentifier":
			err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier)
			delete(rawMsg, key)
		case "removedByCommunicationIdentifier":
			err = unpopulate(val, "RemovedByCommunicationIdentifier", &a.RemovedByCommunicationIdentifier)
			delete(rawMsg, key)
		case "threadId":
			err = unpopulate(val, "ThreadID", &a.ThreadID)
			delete(rawMsg, key)
		case "time":
			err = unpopulateTime[datetime.RFC3339](val, "Time", &a.Time)
			delete(rawMsg, key)
		case "transactionId":
			err = unpopulate(val, "TransactionID", &a.TransactionID)
			delete(rawMsg, key)
		case "version":
			err = unpopulate(val, "Version", &a.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSChatThreadCreatedEventData.
func (a ACSChatThreadCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "createTime", a.CreateTime)
	populate(objectMap, "createdByCommunicationIdentifier", a.CreatedByCommunicationIdentifier)
	populate(objectMap, "metadata", a.Metadata)
	populate(objectMap, "participants", a.Participants)
	populate(objectMap, "properties", a.Properties)
	populate(objectMap, "retentionPolicy", a.RetentionPolicy)
	populate(objectMap, "threadId", a.ThreadID)
	populate(objectMap, "transactionId", a.TransactionID)
	populate(objectMap, "version", a.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatThreadCreatedEventData.
func (a *ACSChatThreadCreatedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "createTime":
			err = unpopulateTime[datetime.RFC3339](val, "CreateTime", &a.CreateTime)
			delete(rawMsg, key)
		case "createdByCommunicationIdentifier":
			err = unpopulate(val, "CreatedByCommunicationIdentifier", &a.CreatedByCommunicationIdentifier)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &a.Metadata)
			delete(rawMsg, key)
		case "participants":
			err = unpopulate(val, "Participants", &a.Participants)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &a.Properties)
			delete(rawMsg, key)
		case "retentionPolicy":
			err = unpopulate(val, "RetentionPolicy", &a.RetentionPolicy)
			delete(rawMsg, key)
		case "threadId":
			err = unpopulate(val, "ThreadID", &a.ThreadID)
			delete(rawMsg, key)
		case "transactionId":
			err = unpopulate(val, "TransactionID", &a.TransactionID)
			delete(rawMsg, key)
		case "version":
			err = unpopulate(val, "Version", &a.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSChatThreadCreatedWithUserEventData.
func (a ACSChatThreadCreatedWithUserEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "createTime", a.CreateTime)
	populate(objectMap, "createdByCommunicationIdentifier", a.CreatedByCommunicationIdentifier)
	populate(objectMap, "metadata", a.Metadata)
	populate(objectMap, "participants", a.Participants)
	populate(objectMap, "properties", a.Properties)
	populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier)
	populate(objectMap, "retentionPolicy", a.RetentionPolicy)
	populate(objectMap, "threadId", a.ThreadID)
	populate(objectMap, "transactionId", a.TransactionID)
	populate(objectMap, "version", a.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatThreadCreatedWithUserEventData.
func (a *ACSChatThreadCreatedWithUserEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "createTime":
			err = unpopulateTime[datetime.RFC3339](val, "CreateTime", &a.CreateTime)
			delete(rawMsg, key)
		case "createdByCommunicationIdentifier":
			err = unpopulate(val, "CreatedByCommunicationIdentifier", &a.CreatedByCommunicationIdentifier)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &a.Metadata)
			delete(rawMsg, key)
		case "participants":
			err = unpopulate(val, "Participants", &a.Participants)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &a.Properties)
			delete(rawMsg, key)
		case "recipientCommunicationIdentifier":
			err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier)
			delete(rawMsg, key)
		case "retentionPolicy":
			err = unpopulate(val, "RetentionPolicy", &a.RetentionPolicy)
			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 ACSChatThreadDeletedEventData.
func (a ACSChatThreadDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "createTime", a.CreateTime)
	populateTime[datetime.RFC3339](objectMap, "deleteTime", a.DeleteTime)
	populate(objectMap, "deletedByCommunicationIdentifier", a.DeletedByCommunicationIdentifier)
	populate(objectMap, "reason", a.Reason)
	populate(objectMap, "threadId", a.ThreadID)
	populate(objectMap, "transactionId", a.TransactionID)
	populate(objectMap, "version", a.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatThreadDeletedEventData.
func (a *ACSChatThreadDeletedEventData) UnmarshalJSON(data []byte) error {
	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 = unpopulateTime[datetime.RFC3339](val, "CreateTime", &a.CreateTime)
			delete(rawMsg, key)
		case "deleteTime":
			err = unpopulateTime[datetime.RFC3339](val, "DeleteTime", &a.DeleteTime)
			delete(rawMsg, key)
		case "deletedByCommunicationIdentifier":
			err = unpopulate(val, "DeletedByCommunicationIdentifier", &a.DeletedByCommunicationIdentifier)
			delete(rawMsg, key)
		case "reason":
			err = unpopulate(val, "Reason", &a.Reason)
			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)
	populate(objectMap, "displayName", a.DisplayName)
	populate(objectMap, "metadata", a.Metadata)
	populate(objectMap, "participantCommunicationIdentifier", a.ParticipantCommunicationIdentifier)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatThreadParticipantProperties.
func (a *ACSChatThreadParticipantProperties) 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 "displayName":
			err = unpopulate(val, "DisplayName", &a.DisplayName)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &a.Metadata)
			delete(rawMsg, key)
		case "participantCommunicationIdentifier":
			err = unpopulate(val, "ParticipantCommunicationIdentifier", &a.ParticipantCommunicationIdentifier)
			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 ACSChatThreadPropertiesUpdatedEventData.
func (a ACSChatThreadPropertiesUpdatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "createTime", a.CreateTime)
	populateTime[datetime.RFC3339](objectMap, "editTime", a.EditTime)
	populate(objectMap, "editedByCommunicationIdentifier", a.EditedByCommunicationIdentifier)
	populate(objectMap, "metadata", a.Metadata)
	populate(objectMap, "properties", a.Properties)
	populate(objectMap, "retentionPolicy", a.RetentionPolicy)
	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 ACSChatThreadPropertiesUpdatedEventData.
func (a *ACSChatThreadPropertiesUpdatedEventData) 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 = unpopulateTime[datetime.RFC3339](val, "CreateTime", &a.CreateTime)
			delete(rawMsg, key)
		case "editTime":
			err = unpopulateTime[datetime.RFC3339](val, "EditTime", &a.EditTime)
			delete(rawMsg, key)
		case "editedByCommunicationIdentifier":
			err = unpopulate(val, "EditedByCommunicationIdentifier", &a.EditedByCommunicationIdentifier)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &a.Metadata)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &a.Properties)
			delete(rawMsg, key)
		case "retentionPolicy":
			err = unpopulate(val, "RetentionPolicy", &a.RetentionPolicy)
			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 ACSChatThreadPropertiesUpdatedPerUserEventData.
func (a ACSChatThreadPropertiesUpdatedPerUserEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "createTime", a.CreateTime)
	populateTime[datetime.RFC3339](objectMap, "editTime", a.EditTime)
	populate(objectMap, "editedByCommunicationIdentifier", a.EditedByCommunicationIdentifier)
	populate(objectMap, "metadata", a.Metadata)
	populate(objectMap, "properties", a.Properties)
	populate(objectMap, "recipientCommunicationIdentifier", a.RecipientCommunicationIdentifier)
	populate(objectMap, "retentionPolicy", a.RetentionPolicy)
	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 ACSChatThreadPropertiesUpdatedPerUserEventData.
func (a *ACSChatThreadPropertiesUpdatedPerUserEventData) 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 = unpopulateTime[datetime.RFC3339](val, "CreateTime", &a.CreateTime)
			delete(rawMsg, key)
		case "editTime":
			err = unpopulateTime[datetime.RFC3339](val, "EditTime", &a.EditTime)
			delete(rawMsg, key)
		case "editedByCommunicationIdentifier":
			err = unpopulate(val, "EditedByCommunicationIdentifier", &a.EditedByCommunicationIdentifier)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &a.Metadata)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &a.Properties)
			delete(rawMsg, key)
		case "recipientCommunicationIdentifier":
			err = unpopulate(val, "RecipientCommunicationIdentifier", &a.RecipientCommunicationIdentifier)
			delete(rawMsg, key)
		case "retentionPolicy":
			err = unpopulate(val, "RetentionPolicy", &a.RetentionPolicy)
			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 ACSChatThreadWithUserDeletedEventData.
func (a ACSChatThreadWithUserDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "createTime", a.CreateTime)
	populateTime[datetime.RFC3339](objectMap, "deleteTime", a.DeleteTime)
	populate(objectMap, "deletedByCommunicationIdentifier", a.DeletedByCommunicationIdentifier)
	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 ACSChatThreadWithUserDeletedEventData.
func (a *ACSChatThreadWithUserDeletedEventData) 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 = unpopulateTime[datetime.RFC3339](val, "CreateTime", &a.CreateTime)
			delete(rawMsg, key)
		case "deleteTime":
			err = unpopulateTime[datetime.RFC3339](val, "DeleteTime", &a.DeleteTime)
			delete(rawMsg, key)
		case "deletedByCommunicationIdentifier":
			err = unpopulate(val, "DeletedByCommunicationIdentifier", &a.DeletedByCommunicationIdentifier)
			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 ACSChatTypingIndicatorReceivedInThreadEventData.
func (a ACSChatTypingIndicatorReceivedInThreadEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "composeTime", a.ComposeTime)
	populate(objectMap, "messageBody", a.MessageBody)
	populate(objectMap, "messageId", a.MessageID)
	populate(objectMap, "metadata", a.Metadata)
	populate(objectMap, "senderCommunicationIdentifier", a.SenderCommunicationIdentifier)
	populate(objectMap, "senderDisplayName", a.SenderDisplayName)
	populate(objectMap, "sequenceId", a.SequenceID)
	populate(objectMap, "threadId", a.ThreadID)
	populate(objectMap, "transactionId", a.TransactionID)
	populate(objectMap, "type", a.Type)
	populate(objectMap, "version", a.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSChatTypingIndicatorReceivedInThreadEventData.
func (a *ACSChatTypingIndicatorReceivedInThreadEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "composeTime":
			err = unpopulateTime[datetime.RFC3339](val, "ComposeTime", &a.ComposeTime)
			delete(rawMsg, key)
		case "messageBody":
			err = unpopulate(val, "MessageBody", &a.MessageBody)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "metadata":
			err = unpopulate(val, "Metadata", &a.Metadata)
			delete(rawMsg, key)
		case "senderCommunicationIdentifier":
			err = unpopulate(val, "SenderCommunicationIdentifier", &a.SenderCommunicationIdentifier)
			delete(rawMsg, key)
		case "senderDisplayName":
			err = unpopulate(val, "SenderDisplayName", &a.SenderDisplayName)
			delete(rawMsg, key)
		case "sequenceId":
			err = unpopulate(val, "SequenceID", &a.SequenceID)
			delete(rawMsg, key)
		case "threadId":
			err = unpopulate(val, "ThreadID", &a.ThreadID)
			delete(rawMsg, key)
		case "transactionId":
			err = unpopulate(val, "TransactionID", &a.TransactionID)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &a.Type)
			delete(rawMsg, key)
		case "version":
			err = unpopulate(val, "Version", &a.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSEmailDeliveryReportReceivedEventData.
func (a ACSEmailDeliveryReportReceivedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "deliveryAttemptTimestamp", a.DeliveryAttemptTimestamp)
	populate(objectMap, "deliveryStatusDetails", a.DeliveryStatusDetails)
	populate(objectMap, "internetMessageId", a.InternetMessageID)
	populate(objectMap, "messageId", a.MessageID)
	populate(objectMap, "recipient", a.Recipient)
	populate(objectMap, "sender", a.Sender)
	populate(objectMap, "status", a.Status)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSEmailDeliveryReportReceivedEventData.
func (a *ACSEmailDeliveryReportReceivedEventData) 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 "deliveryAttemptTimestamp":
			err = unpopulateTime[datetime.RFC3339](val, "DeliveryAttemptTimestamp", &a.DeliveryAttemptTimestamp)
			delete(rawMsg, key)
		case "deliveryStatusDetails":
			err = unpopulate(val, "DeliveryStatusDetails", &a.DeliveryStatusDetails)
			delete(rawMsg, key)
		case "internetMessageId":
			err = unpopulate(val, "InternetMessageID", &a.InternetMessageID)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "recipient":
			err = unpopulate(val, "Recipient", &a.Recipient)
			delete(rawMsg, key)
		case "sender":
			err = unpopulate(val, "Sender", &a.Sender)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &a.Status)
			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 ACSEmailDeliveryReportStatusDetails.
func (a ACSEmailDeliveryReportStatusDetails) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "recipientMailServerHostName", a.RecipientMailServerHostName)
	populate(objectMap, "statusMessage", a.StatusMessage)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSEmailDeliveryReportStatusDetails.
func (a *ACSEmailDeliveryReportStatusDetails) 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 "recipientMailServerHostName":
			err = unpopulate(val, "RecipientMailServerHostName", &a.RecipientMailServerHostName)
			delete(rawMsg, key)
		case "statusMessage":
			err = unpopulate(val, "StatusMessage", &a.StatusMessage)
			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 ACSEmailEngagementTrackingReportReceivedEventData.
func (a ACSEmailEngagementTrackingReportReceivedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "engagementType", a.Engagement)
	populate(objectMap, "engagementContext", a.EngagementContext)
	populate(objectMap, "messageId", a.MessageID)
	populate(objectMap, "recipient", a.Recipient)
	populate(objectMap, "sender", a.Sender)
	populateTime[datetime.RFC3339](objectMap, "userActionTimestamp", a.UserActionTimestamp)
	populate(objectMap, "userAgent", a.UserAgent)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSEmailEngagementTrackingReportReceivedEventData.
func (a *ACSEmailEngagementTrackingReportReceivedEventData) 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 "engagementType":
			err = unpopulate(val, "Engagement", &a.Engagement)
			delete(rawMsg, key)
		case "engagementContext":
			err = unpopulate(val, "EngagementContext", &a.EngagementContext)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "recipient":
			err = unpopulate(val, "Recipient", &a.Recipient)
			delete(rawMsg, key)
		case "sender":
			err = unpopulate(val, "Sender", &a.Sender)
			delete(rawMsg, key)
		case "userActionTimestamp":
			err = unpopulateTime[datetime.RFC3339](val, "UserActionTimestamp", &a.UserActionTimestamp)
			delete(rawMsg, key)
		case "userAgent":
			err = unpopulate(val, "UserAgent", &a.UserAgent)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSIncomingCallCustomContext.
func (a ACSIncomingCallCustomContext) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "sipHeaders", a.SipHeaders)
	populate(objectMap, "voipHeaders", a.VoipHeaders)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSIncomingCallCustomContext.
func (a *ACSIncomingCallCustomContext) 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 "sipHeaders":
			err = unpopulate(val, "SipHeaders", &a.SipHeaders)
			delete(rawMsg, key)
		case "voipHeaders":
			err = unpopulate(val, "VoipHeaders", &a.VoipHeaders)
			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 ACSIncomingCallEventData.
func (a ACSIncomingCallEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "callerDisplayName", a.CallerDisplayName)
	populate(objectMap, "correlationId", a.CorrelationID)
	populate(objectMap, "customContext", a.CustomContext)
	populate(objectMap, "from", a.FromCommunicationIdentifier)
	populate(objectMap, "incomingCallContext", a.IncomingCallContext)
	populate(objectMap, "onBehalfOf", a.OnBehalfOf)
	populate(objectMap, "onBehalfOfCallee", a.OnBehalfOfCallee)
	populate(objectMap, "serverCallId", a.ServerCallID)
	populate(objectMap, "to", a.ToCommunicationIdentifier)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSIncomingCallEventData.
func (a *ACSIncomingCallEventData) 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 "callerDisplayName":
			err = unpopulate(val, "CallerDisplayName", &a.CallerDisplayName)
			delete(rawMsg, key)
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &a.CorrelationID)
			delete(rawMsg, key)
		case "customContext":
			err = unpopulate(val, "CustomContext", &a.CustomContext)
			delete(rawMsg, key)
		case "from":
			err = unpopulate(val, "FromCommunicationIdentifier", &a.FromCommunicationIdentifier)
			delete(rawMsg, key)
		case "incomingCallContext":
			err = unpopulate(val, "IncomingCallContext", &a.IncomingCallContext)
			delete(rawMsg, key)
		case "onBehalfOf":
			err = unpopulate(val, "OnBehalfOf", &a.OnBehalfOf)
			delete(rawMsg, key)
		case "onBehalfOfCallee":
			err = unpopulate(val, "OnBehalfOfCallee", &a.OnBehalfOfCallee)
			delete(rawMsg, key)
		case "serverCallId":
			err = unpopulate(val, "ServerCallID", &a.ServerCallID)
			delete(rawMsg, key)
		case "to":
			err = unpopulate(val, "ToCommunicationIdentifier", &a.ToCommunicationIdentifier)
			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 ACSMessageButtonContent.
func (a ACSMessageButtonContent) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "payload", a.Payload)
	populate(objectMap, "text", a.Text)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSMessageButtonContent.
func (a *ACSMessageButtonContent) 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 "payload":
			err = unpopulate(val, "Payload", &a.Payload)
			delete(rawMsg, key)
		case "text":
			err = unpopulate(val, "Text", &a.Text)
			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 ACSMessageContext.
func (a ACSMessageContext) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "from", a.From)
	populate(objectMap, "id", a.MessageID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSMessageContext.
func (a *ACSMessageContext) 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 "id":
			err = unpopulate(val, "MessageID", &a.MessageID)
			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 ACSMessageDeliveryStatusUpdatedEventData.
func (a ACSMessageDeliveryStatusUpdatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "channelType", a.ChannelKind)
	populate(objectMap, "error", a.Error)
	populate(objectMap, "from", a.From)
	populate(objectMap, "messageId", a.MessageID)
	populateTime[datetime.RFC3339](objectMap, "receivedTimeStamp", a.ReceivedTimestamp)
	populate(objectMap, "status", a.Status)
	populate(objectMap, "to", a.To)
	populate(objectMap, "toBSUID", a.ToBsuid)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSMessageDeliveryStatusUpdatedEventData.
func (a *ACSMessageDeliveryStatusUpdatedEventData) 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 "channelType":
			err = unpopulate(val, "ChannelKind", &a.ChannelKind)
			delete(rawMsg, key)
		case "error":
			err = unmarshalInternalACSMessageChannelEventError(val, "Error", &a.Error)
			delete(rawMsg, key)
		case "from":
			err = unpopulate(val, "From", &a.From)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "receivedTimeStamp":
			err = unpopulateTime[datetime.RFC3339](val, "ReceivedTimestamp", &a.ReceivedTimestamp)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &a.Status)
			delete(rawMsg, key)
		case "to":
			err = unpopulate(val, "To", &a.To)
			delete(rawMsg, key)
		case "toBSUID":
			err = unpopulate(val, "ToBsuid", &a.ToBsuid)
			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 {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSMessageInteractiveContent.
func (a ACSMessageInteractiveContent) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "buttonReply", a.ButtonReply)
	populate(objectMap, "listReply", a.ListReply)
	populate(objectMap, "type", a.ReplyKind)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSMessageInteractiveContent.
func (a *ACSMessageInteractiveContent) 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 "buttonReply":
			err = unpopulate(val, "ButtonReply", &a.ButtonReply)
			delete(rawMsg, key)
		case "listReply":
			err = unpopulate(val, "ListReply", &a.ListReply)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "ReplyKind", &a.ReplyKind)
			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 ACSMessageInteractiveListReplyContent.
func (a ACSMessageInteractiveListReplyContent) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", a.Description)
	populate(objectMap, "id", a.ListItemID)
	populate(objectMap, "title", a.Title)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSMessageInteractiveListReplyContent.
func (a *ACSMessageInteractiveListReplyContent) 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 "description":
			err = unpopulate(val, "Description", &a.Description)
			delete(rawMsg, key)
		case "id":
			err = unpopulate(val, "ListItemID", &a.ListItemID)
			delete(rawMsg, key)
		case "title":
			err = unpopulate(val, "Title", &a.Title)
			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 ACSMessageMediaContent.
func (a ACSMessageMediaContent) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "animated", a.Animated)
	populate(objectMap, "caption", a.Caption)
	populate(objectMap, "fileName", a.FileName)
	populate(objectMap, "id", a.MediaID)
	populate(objectMap, "mimeType", a.MimeType)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSMessageMediaContent.
func (a *ACSMessageMediaContent) 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 "animated":
			err = unpopulate(val, "Animated", &a.Animated)
			delete(rawMsg, key)
		case "caption":
			err = unpopulate(val, "Caption", &a.Caption)
			delete(rawMsg, key)
		case "fileName":
			err = unpopulate(val, "FileName", &a.FileName)
			delete(rawMsg, key)
		case "id":
			err = unpopulate(val, "MediaID", &a.MediaID)
			delete(rawMsg, key)
		case "mimeType":
			err = unpopulate(val, "MimeType", &a.MimeType)
			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 ACSMessageReactionContent.
func (a ACSMessageReactionContent) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "emoji", a.Emoji)
	populate(objectMap, "messageId", a.MessageID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSMessageReactionContent.
func (a *ACSMessageReactionContent) 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 "emoji":
			err = unpopulate(val, "Emoji", &a.Emoji)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			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 ACSMessageReceivedEventData.
func (a ACSMessageReceivedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "button", a.Button)
	populate(objectMap, "channelType", a.ChannelKind)
	populate(objectMap, "content", a.Content)
	populate(objectMap, "context", a.Context)
	populate(objectMap, "error", a.Error)
	populate(objectMap, "from", a.From)
	populate(objectMap, "fromBSUID", a.FromBsuid)
	populate(objectMap, "interactive", a.InteractiveContent)
	populate(objectMap, "media", a.MediaContent)
	populate(objectMap, "messageId", a.MessageID)
	populate(objectMap, "messageType", a.MessageType)
	populate(objectMap, "reaction", a.Reaction)
	populateTime[datetime.RFC3339](objectMap, "receivedTimeStamp", a.ReceivedTimestamp)
	populate(objectMap, "to", a.To)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSMessageReceivedEventData.
func (a *ACSMessageReceivedEventData) 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 "button":
			err = unpopulate(val, "Button", &a.Button)
			delete(rawMsg, key)
		case "channelType":
			err = unpopulate(val, "ChannelKind", &a.ChannelKind)
			delete(rawMsg, key)
		case "content":
			err = unpopulate(val, "Content", &a.Content)
			delete(rawMsg, key)
		case "context":
			err = unpopulate(val, "Context", &a.Context)
			delete(rawMsg, key)
		case "error":
			err = unmarshalInternalACSMessageChannelEventError(val, "Error", &a.Error)
			delete(rawMsg, key)
		case "from":
			err = unpopulate(val, "From", &a.From)
			delete(rawMsg, key)
		case "fromBSUID":
			err = unpopulate(val, "FromBsuid", &a.FromBsuid)
			delete(rawMsg, key)
		case "interactive":
			err = unpopulate(val, "InteractiveContent", &a.InteractiveContent)
			delete(rawMsg, key)
		case "media":
			err = unpopulate(val, "MediaContent", &a.MediaContent)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "messageType":
			err = unpopulate(val, "MessageType", &a.MessageType)
			delete(rawMsg, key)
		case "reaction":
			err = unpopulate(val, "Reaction", &a.Reaction)
			delete(rawMsg, key)
		case "receivedTimeStamp":
			err = unpopulateTime[datetime.RFC3339](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 ACSRecordingChunkInfoProperties.
func (a ACSRecordingChunkInfoProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "contentLocation", a.ContentLocation)
	populate(objectMap, "deleteLocation", a.DeleteLocation)
	populate(objectMap, "documentId", a.DocumentID)
	populate(objectMap, "endReason", a.EndReason)
	populate(objectMap, "index", a.Index)
	populate(objectMap, "metadataLocation", a.MetadataLocation)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRecordingChunkInfoProperties.
func (a *ACSRecordingChunkInfoProperties) 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 "contentLocation":
			err = unpopulate(val, "ContentLocation", &a.ContentLocation)
			delete(rawMsg, key)
		case "deleteLocation":
			err = unpopulate(val, "DeleteLocation", &a.DeleteLocation)
			delete(rawMsg, key)
		case "documentId":
			err = unpopulate(val, "DocumentID", &a.DocumentID)
			delete(rawMsg, key)
		case "endReason":
			err = unpopulate(val, "EndReason", &a.EndReason)
			delete(rawMsg, key)
		case "index":
			err = unpopulate(val, "Index", &a.Index)
			delete(rawMsg, key)
		case "metadataLocation":
			err = unpopulate(val, "MetadataLocation", &a.MetadataLocation)
			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 ACSRecordingFileStatusUpdatedEventData.
func (a ACSRecordingFileStatusUpdatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "recordingChannelType", a.RecordingChannelType)
	populate(objectMap, "recordingContentType", a.RecordingContentType)
	populate(objectMap, "recordingDurationMs", a.RecordingDurationMS)
	populate(objectMap, "recordingFormatType", a.RecordingFormatType)
	populateTime[datetime.RFC3339](objectMap, "recordingStartTime", a.RecordingStartTime)
	populate(objectMap, "recordingStorageInfo", a.RecordingStorageInfo)
	populate(objectMap, "sessionEndReason", a.SessionEndReason)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRecordingFileStatusUpdatedEventData.
func (a *ACSRecordingFileStatusUpdatedEventData) 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 "recordingChannelType":
			err = unpopulate(val, "RecordingChannelType", &a.RecordingChannelType)
			delete(rawMsg, key)
		case "recordingContentType":
			err = unpopulate(val, "RecordingContentType", &a.RecordingContentType)
			delete(rawMsg, key)
		case "recordingDurationMs":
			err = unpopulate(val, "RecordingDurationMS", &a.RecordingDurationMS)
			delete(rawMsg, key)
		case "recordingFormatType":
			err = unpopulate(val, "RecordingFormatType", &a.RecordingFormatType)
			delete(rawMsg, key)
		case "recordingStartTime":
			err = unpopulateTime[datetime.RFC3339](val, "RecordingStartTime", &a.RecordingStartTime)
			delete(rawMsg, key)
		case "recordingStorageInfo":
			err = unpopulate(val, "RecordingStorageInfo", &a.RecordingStorageInfo)
			delete(rawMsg, key)
		case "sessionEndReason":
			err = unpopulate(val, "SessionEndReason", &a.SessionEndReason)
			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 ACSRecordingStorageInfoProperties.
func (a ACSRecordingStorageInfoProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "recordingChunks", a.RecordingChunks)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRecordingStorageInfoProperties.
func (a *ACSRecordingStorageInfoProperties) 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 "recordingChunks":
			err = unpopulate(val, "RecordingChunks", &a.RecordingChunks)
			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 ACSRouterChannelConfiguration.
func (a ACSRouterChannelConfiguration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "capacityCostPerJob", a.CapacityCostPerJob)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "maxNumberOfJobs", a.MaxNumberOfJobs)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterChannelConfiguration.
func (a *ACSRouterChannelConfiguration) 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 "capacityCostPerJob":
			err = unpopulate(val, "CapacityCostPerJob", &a.CapacityCostPerJob)
			delete(rawMsg, key)
		case "channelId":
			err = unpopulate(val, "ChannelID", &a.ChannelID)
			delete(rawMsg, key)
		case "maxNumberOfJobs":
			err = unpopulate(val, "MaxNumberOfJobs", &a.MaxNumberOfJobs)
			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)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populate(objectMap, "dispositionCode", a.DispositionCode)
	populate(objectMap, "jobId", a.JobID)
	populate(objectMap, "labels", a.Labels)
	populate(objectMap, "note", a.Note)
	populate(objectMap, "queueId", a.QueueID)
	populate(objectMap, "tags", a.Tags)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterJobCancelledEventData.
func (a *ACSRouterJobCancelledEventData) 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 "dispositionCode":
			err = unpopulate(val, "DispositionCode", &a.DispositionCode)
			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 "note":
			err = unpopulate(val, "Note", &a.Note)
			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 ACSRouterJobClassificationFailedEventData.
func (a ACSRouterJobClassificationFailedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populate(objectMap, "classificationPolicyId", a.ClassificationPolicyID)
	populate(objectMap, "errors", a.Errors)
	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 ACSRouterJobClassificationFailedEventData.
func (a *ACSRouterJobClassificationFailedEventData) 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 "classificationPolicyId":
			err = unpopulate(val, "ClassificationPolicyID", &a.ClassificationPolicyID)
			delete(rawMsg, key)
		case "errors":
			err = unmarshalInternalACSRouterCommunicationError(val, "Errors", &a.Errors)
			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 ACSRouterJobClassifiedEventData.
func (a ACSRouterJobClassifiedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "attachedWorkerSelectors", a.AttachedWorkerSelectors)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populate(objectMap, "classificationPolicyId", a.ClassificationPolicyID)
	populate(objectMap, "jobId", a.JobID)
	populate(objectMap, "labels", a.Labels)
	populate(objectMap, "priority", a.Priority)
	populate(objectMap, "queueDetails", a.QueueDetails)
	populate(objectMap, "queueId", a.QueueID)
	populate(objectMap, "tags", a.Tags)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterJobClassifiedEventData.
func (a *ACSRouterJobClassifiedEventData) 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 "attachedWorkerSelectors":
			err = unpopulate(val, "AttachedWorkerSelectors", &a.AttachedWorkerSelectors)
			delete(rawMsg, key)
		case "channelId":
			err = unpopulate(val, "ChannelID", &a.ChannelID)
			delete(rawMsg, key)
		case "channelReference":
			err = unpopulate(val, "ChannelReference", &a.ChannelReference)
			delete(rawMsg, key)
		case "classificationPolicyId":
			err = unpopulate(val, "ClassificationPolicyID", &a.ClassificationPolicyID)
			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 "priority":
			err = unpopulate(val, "Priority", &a.Priority)
			delete(rawMsg, key)
		case "queueDetails":
			err = unpopulate(val, "QueueDetails", &a.QueueDetails)
			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 ACSRouterJobClosedEventData.
func (a ACSRouterJobClosedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "assignmentId", a.AssignmentID)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populate(objectMap, "dispositionCode", a.DispositionCode)
	populate(objectMap, "jobId", a.JobID)
	populate(objectMap, "labels", a.Labels)
	populate(objectMap, "queueId", a.QueueID)
	populate(objectMap, "tags", a.Tags)
	populate(objectMap, "workerId", a.WorkerID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterJobClosedEventData.
func (a *ACSRouterJobClosedEventData) 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 "assignmentId":
			err = unpopulate(val, "AssignmentID", &a.AssignmentID)
			delete(rawMsg, key)
		case "channelId":
			err = unpopulate(val, "ChannelID", &a.ChannelID)
			delete(rawMsg, key)
		case "channelReference":
			err = unpopulate(val, "ChannelReference", &a.ChannelReference)
			delete(rawMsg, key)
		case "dispositionCode":
			err = unpopulate(val, "DispositionCode", &a.DispositionCode)
			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)
		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 ACSRouterJobCompletedEventData.
func (a ACSRouterJobCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "assignmentId", a.AssignmentID)
	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)
	populate(objectMap, "workerId", a.WorkerID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterJobCompletedEventData.
func (a *ACSRouterJobCompletedEventData) 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 "assignmentId":
			err = unpopulate(val, "AssignmentID", &a.AssignmentID)
			delete(rawMsg, 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)
		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 ACSRouterJobDeletedEventData.
func (a ACSRouterJobDeletedEventData) 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 ACSRouterJobDeletedEventData.
func (a *ACSRouterJobDeletedEventData) 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)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populate(objectMap, "exceptionRuleId", a.ExceptionRuleID)
	populate(objectMap, "jobId", a.JobID)
	populate(objectMap, "labels", a.Labels)
	populate(objectMap, "queueId", a.QueueID)
	populate(objectMap, "ruleKey", a.RuleKey)
	populate(objectMap, "tags", a.Tags)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterJobExceptionTriggeredEventData.
func (a *ACSRouterJobExceptionTriggeredEventData) 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 "exceptionRuleId":
			err = unpopulate(val, "ExceptionRuleID", &a.ExceptionRuleID)
			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 "ruleKey":
			err = unpopulate(val, "RuleKey", &a.RuleKey)
			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 ACSRouterJobQueuedEventData.
func (a ACSRouterJobQueuedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "attachedWorkerSelectors", a.AttachedWorkerSelectors)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populate(objectMap, "jobId", a.JobID)
	populate(objectMap, "labels", a.Labels)
	populate(objectMap, "priority", a.Priority)
	populate(objectMap, "queueId", a.QueueID)
	populate(objectMap, "requestedWorkerSelectors", a.RequestedWorkerSelectors)
	populate(objectMap, "tags", a.Tags)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterJobQueuedEventData.
func (a *ACSRouterJobQueuedEventData) 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 "attachedWorkerSelectors":
			err = unpopulate(val, "AttachedWorkerSelectors", &a.AttachedWorkerSelectors)
			delete(rawMsg, 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 "priority":
			err = unpopulate(val, "Priority", &a.Priority)
			delete(rawMsg, key)
		case "queueId":
			err = unpopulate(val, "QueueID", &a.QueueID)
			delete(rawMsg, key)
		case "requestedWorkerSelectors":
			err = unpopulate(val, "RequestedWorkerSelectors", &a.RequestedWorkerSelectors)
			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 ACSRouterJobReceivedEventData.
func (a ACSRouterJobReceivedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populate(objectMap, "classificationPolicyId", a.ClassificationPolicyID)
	populate(objectMap, "jobId", a.JobID)
	populate(objectMap, "jobStatus", a.JobStatus)
	populate(objectMap, "labels", a.Labels)
	populate(objectMap, "priority", a.Priority)
	populate(objectMap, "queueId", a.QueueID)
	populate(objectMap, "requestedWorkerSelectors", a.RequestedWorkerSelectors)
	populateTime[datetime.RFC3339](objectMap, "scheduledOn", a.ScheduledOn)
	populate(objectMap, "tags", a.Tags)
	populate(objectMap, "unavailableForMatching", a.UnavailableForMatching)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterJobReceivedEventData.
func (a *ACSRouterJobReceivedEventData) 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 "classificationPolicyId":
			err = unpopulate(val, "ClassificationPolicyID", &a.ClassificationPolicyID)
			delete(rawMsg, key)
		case "jobId":
			err = unpopulate(val, "JobID", &a.JobID)
			delete(rawMsg, key)
		case "jobStatus":
			err = unpopulate(val, "JobStatus", &a.JobStatus)
			delete(rawMsg, key)
		case "labels":
			err = unpopulate(val, "Labels", &a.Labels)
			delete(rawMsg, key)
		case "priority":
			err = unpopulate(val, "Priority", &a.Priority)
			delete(rawMsg, key)
		case "queueId":
			err = unpopulate(val, "QueueID", &a.QueueID)
			delete(rawMsg, key)
		case "requestedWorkerSelectors":
			err = unpopulate(val, "RequestedWorkerSelectors", &a.RequestedWorkerSelectors)
			delete(rawMsg, key)
		case "scheduledOn":
			err = unpopulateTime[datetime.RFC3339](val, "ScheduledOn", &a.ScheduledOn)
			delete(rawMsg, key)
		case "tags":
			err = unpopulate(val, "Tags", &a.Tags)
			delete(rawMsg, key)
		case "unavailableForMatching":
			err = unpopulate(val, "UnavailableForMatching", &a.UnavailableForMatching)
			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 ACSRouterJobSchedulingFailedEventData.
func (a ACSRouterJobSchedulingFailedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populate(objectMap, "expiredAttachedWorkerSelectors", a.ExpiredAttachedWorkerSelectors)
	populate(objectMap, "expiredRequestedWorkerSelectors", a.ExpiredRequestedWorkerSelectors)
	populate(objectMap, "failureReason", a.FailureReason)
	populate(objectMap, "jobId", a.JobID)
	populate(objectMap, "labels", a.Labels)
	populate(objectMap, "priority", a.Priority)
	populate(objectMap, "queueId", a.QueueID)
	populateTime[datetime.RFC3339](objectMap, "scheduledOn", a.ScheduledOn)
	populate(objectMap, "tags", a.Tags)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterJobSchedulingFailedEventData.
func (a *ACSRouterJobSchedulingFailedEventData) 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 "expiredAttachedWorkerSelectors":
			err = unpopulate(val, "ExpiredAttachedWorkerSelectors", &a.ExpiredAttachedWorkerSelectors)
			delete(rawMsg, key)
		case "expiredRequestedWorkerSelectors":
			err = unpopulate(val, "ExpiredRequestedWorkerSelectors", &a.ExpiredRequestedWorkerSelectors)
			delete(rawMsg, key)
		case "failureReason":
			err = unpopulate(val, "FailureReason", &a.FailureReason)
			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 "priority":
			err = unpopulate(val, "Priority", &a.Priority)
			delete(rawMsg, key)
		case "queueId":
			err = unpopulate(val, "QueueID", &a.QueueID)
			delete(rawMsg, key)
		case "scheduledOn":
			err = unpopulateTime[datetime.RFC3339](val, "ScheduledOn", &a.ScheduledOn)
			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 ACSRouterJobUnassignedEventData.
func (a ACSRouterJobUnassignedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "assignmentId", a.AssignmentID)
	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)
	populate(objectMap, "workerId", a.WorkerID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterJobUnassignedEventData.
func (a *ACSRouterJobUnassignedEventData) 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 "assignmentId":
			err = unpopulate(val, "AssignmentID", &a.AssignmentID)
			delete(rawMsg, 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)
		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 ACSRouterJobWaitingForActivationEventData.
func (a ACSRouterJobWaitingForActivationEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populate(objectMap, "expiredAttachedWorkerSelectors", a.ExpiredAttachedWorkerSelectors)
	populate(objectMap, "expiredRequestedWorkerSelectors", a.ExpiredRequestedWorkerSelectors)
	populate(objectMap, "jobId", a.JobID)
	populate(objectMap, "labels", a.Labels)
	populate(objectMap, "priority", a.Priority)
	populate(objectMap, "queueId", a.QueueID)
	populateTime[datetime.RFC3339](objectMap, "scheduledOn", a.ScheduledOn)
	populate(objectMap, "tags", a.Tags)
	populate(objectMap, "unavailableForMatching", a.UnavailableForMatching)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterJobWaitingForActivationEventData.
func (a *ACSRouterJobWaitingForActivationEventData) 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 "expiredAttachedWorkerSelectors":
			err = unpopulate(val, "ExpiredAttachedWorkerSelectors", &a.ExpiredAttachedWorkerSelectors)
			delete(rawMsg, key)
		case "expiredRequestedWorkerSelectors":
			err = unpopulate(val, "ExpiredRequestedWorkerSelectors", &a.ExpiredRequestedWorkerSelectors)
			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 "priority":
			err = unpopulate(val, "Priority", &a.Priority)
			delete(rawMsg, key)
		case "queueId":
			err = unpopulate(val, "QueueID", &a.QueueID)
			delete(rawMsg, key)
		case "scheduledOn":
			err = unpopulateTime[datetime.RFC3339](val, "ScheduledOn", &a.ScheduledOn)
			delete(rawMsg, key)
		case "tags":
			err = unpopulate(val, "Tags", &a.Tags)
			delete(rawMsg, key)
		case "unavailableForMatching":
			err = unpopulate(val, "UnavailableForMatching", &a.UnavailableForMatching)
			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 ACSRouterJobWorkerSelectorsExpiredEventData.
func (a ACSRouterJobWorkerSelectorsExpiredEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populate(objectMap, "expiredAttachedWorkerSelectors", a.ExpiredAttachedWorkerSelectors)
	populate(objectMap, "expiredRequestedWorkerSelectors", a.ExpiredRequestedWorkerSelectors)
	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 ACSRouterJobWorkerSelectorsExpiredEventData.
func (a *ACSRouterJobWorkerSelectorsExpiredEventData) 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 "expiredAttachedWorkerSelectors":
			err = unpopulate(val, "ExpiredAttachedWorkerSelectors", &a.ExpiredAttachedWorkerSelectors)
			delete(rawMsg, key)
		case "expiredRequestedWorkerSelectors":
			err = unpopulate(val, "ExpiredRequestedWorkerSelectors", &a.ExpiredRequestedWorkerSelectors)
			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 ACSRouterQueueDetails.
func (a ACSRouterQueueDetails) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", a.ID)
	populate(objectMap, "labels", a.Labels)
	populate(objectMap, "name", a.Name)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterQueueDetails.
func (a *ACSRouterQueueDetails) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &a.ID)
			delete(rawMsg, key)
		case "labels":
			err = unpopulate(val, "Labels", &a.Labels)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &a.Name)
			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 ACSRouterWorkerDeletedEventData.
func (a ACSRouterWorkerDeletedEventData) 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 ACSRouterWorkerDeletedEventData.
func (a *ACSRouterWorkerDeletedEventData) 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 ACSRouterWorkerDeregisteredEventData.
func (a ACSRouterWorkerDeregisteredEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "workerId", a.WorkerID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerDeregisteredEventData.
func (a *ACSRouterWorkerDeregisteredEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "workerId":
			err = unpopulate(val, "WorkerID", &a.WorkerID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ACSRouterWorkerOfferAcceptedEventData.
func (a ACSRouterWorkerOfferAcceptedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "assignmentId", a.AssignmentID)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populate(objectMap, "jobId", a.JobID)
	populate(objectMap, "jobLabels", a.JobLabels)
	populate(objectMap, "jobPriority", a.JobPriority)
	populate(objectMap, "jobTags", a.JobTags)
	populate(objectMap, "offerId", a.OfferID)
	populate(objectMap, "queueId", a.QueueID)
	populate(objectMap, "workerId", a.WorkerID)
	populate(objectMap, "workerLabels", a.WorkerLabels)
	populate(objectMap, "workerTags", a.WorkerTags)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerOfferAcceptedEventData.
func (a *ACSRouterWorkerOfferAcceptedEventData) 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 "assignmentId":
			err = unpopulate(val, "AssignmentID", &a.AssignmentID)
			delete(rawMsg, 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 "jobLabels":
			err = unpopulate(val, "JobLabels", &a.JobLabels)
			delete(rawMsg, key)
		case "jobPriority":
			err = unpopulate(val, "JobPriority", &a.JobPriority)
			delete(rawMsg, key)
		case "jobTags":
			err = unpopulate(val, "JobTags", &a.JobTags)
			delete(rawMsg, key)
		case "offerId":
			err = unpopulate(val, "OfferID", &a.OfferID)
			delete(rawMsg, key)
		case "queueId":
			err = unpopulate(val, "QueueID", &a.QueueID)
			delete(rawMsg, key)
		case "workerId":
			err = unpopulate(val, "WorkerID", &a.WorkerID)
			delete(rawMsg, key)
		case "workerLabels":
			err = unpopulate(val, "WorkerLabels", &a.WorkerLabels)
			delete(rawMsg, key)
		case "workerTags":
			err = unpopulate(val, "WorkerTags", &a.WorkerTags)
			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 ACSRouterWorkerOfferDeclinedEventData.
func (a ACSRouterWorkerOfferDeclinedEventData) 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, "offerId", a.OfferID)
	populate(objectMap, "queueId", a.QueueID)
	populate(objectMap, "workerId", a.WorkerID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerOfferDeclinedEventData.
func (a *ACSRouterWorkerOfferDeclinedEventData) 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 "offerId":
			err = unpopulate(val, "OfferID", &a.OfferID)
			delete(rawMsg, key)
		case "queueId":
			err = unpopulate(val, "QueueID", &a.QueueID)
			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 ACSRouterWorkerOfferExpiredEventData.
func (a ACSRouterWorkerOfferExpiredEventData) 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, "offerId", a.OfferID)
	populate(objectMap, "queueId", a.QueueID)
	populate(objectMap, "workerId", a.WorkerID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerOfferExpiredEventData.
func (a *ACSRouterWorkerOfferExpiredEventData) 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 "offerId":
			err = unpopulate(val, "OfferID", &a.OfferID)
			delete(rawMsg, key)
		case "queueId":
			err = unpopulate(val, "QueueID", &a.QueueID)
			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 ACSRouterWorkerOfferIssuedEventData.
func (a ACSRouterWorkerOfferIssuedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "channelId", a.ChannelID)
	populate(objectMap, "channelReference", a.ChannelReference)
	populateTime[datetime.RFC3339](objectMap, "expiresOn", a.ExpiresOn)
	populate(objectMap, "jobId", a.JobID)
	populate(objectMap, "jobLabels", a.JobLabels)
	populate(objectMap, "jobPriority", a.JobPriority)
	populate(objectMap, "jobTags", a.JobTags)
	populate(objectMap, "offerId", a.OfferID)
	populateTime[datetime.RFC3339](objectMap, "offeredOn", a.OfferedOn)
	populate(objectMap, "queueId", a.QueueID)
	populate(objectMap, "workerId", a.WorkerID)
	populate(objectMap, "workerLabels", a.WorkerLabels)
	populate(objectMap, "workerTags", a.WorkerTags)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerOfferIssuedEventData.
func (a *ACSRouterWorkerOfferIssuedEventData) 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 "expiresOn":
			err = unpopulateTime[datetime.RFC3339](val, "ExpiresOn", &a.ExpiresOn)
			delete(rawMsg, key)
		case "jobId":
			err = unpopulate(val, "JobID", &a.JobID)
			delete(rawMsg, key)
		case "jobLabels":
			err = unpopulate(val, "JobLabels", &a.JobLabels)
			delete(rawMsg, key)
		case "jobPriority":
			err = unpopulate(val, "JobPriority", &a.JobPriority)
			delete(rawMsg, key)
		case "jobTags":
			err = unpopulate(val, "JobTags", &a.JobTags)
			delete(rawMsg, key)
		case "offerId":
			err = unpopulate(val, "OfferID", &a.OfferID)
			delete(rawMsg, key)
		case "offeredOn":
			err = unpopulateTime[datetime.RFC3339](val, "OfferedOn", &a.OfferedOn)
			delete(rawMsg, key)
		case "queueId":
			err = unpopulate(val, "QueueID", &a.QueueID)
			delete(rawMsg, key)
		case "workerId":
			err = unpopulate(val, "WorkerID", &a.WorkerID)
			delete(rawMsg, key)
		case "workerLabels":
			err = unpopulate(val, "WorkerLabels", &a.WorkerLabels)
			delete(rawMsg, key)
		case "workerTags":
			err = unpopulate(val, "WorkerTags", &a.WorkerTags)
			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 ACSRouterWorkerOfferRevokedEventData.
func (a ACSRouterWorkerOfferRevokedEventData) 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, "offerId", a.OfferID)
	populate(objectMap, "queueId", a.QueueID)
	populate(objectMap, "workerId", a.WorkerID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerOfferRevokedEventData.
func (a *ACSRouterWorkerOfferRevokedEventData) 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 "offerId":
			err = unpopulate(val, "OfferID", &a.OfferID)
			delete(rawMsg, key)
		case "queueId":
			err = unpopulate(val, "QueueID", &a.QueueID)
			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 ACSRouterWorkerRegisteredEventData.
func (a ACSRouterWorkerRegisteredEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "channelConfigurations", a.ChannelConfigurations)
	populate(objectMap, "labels", a.Labels)
	populate(objectMap, "queueAssignments", a.QueueAssignments)
	populate(objectMap, "tags", a.Tags)
	populate(objectMap, "totalCapacity", a.TotalCapacity)
	populate(objectMap, "workerId", a.WorkerID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerRegisteredEventData.
func (a *ACSRouterWorkerRegisteredEventData) 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 "channelConfigurations":
			err = unpopulate(val, "ChannelConfigurations", &a.ChannelConfigurations)
			delete(rawMsg, key)
		case "labels":
			err = unpopulate(val, "Labels", &a.Labels)
			delete(rawMsg, key)
		case "queueAssignments":
			err = unpopulate(val, "QueueAssignments", &a.QueueAssignments)
			delete(rawMsg, key)
		case "tags":
			err = unpopulate(val, "Tags", &a.Tags)
			delete(rawMsg, key)
		case "totalCapacity":
			err = unpopulate(val, "TotalCapacity", &a.TotalCapacity)
			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 ACSRouterWorkerSelector.
func (a ACSRouterWorkerSelector) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "expirationTime", a.ExpirationTime)
	populate(objectMap, "key", a.Key)
	populateAny(objectMap, "value", a.LabelValue)
	populate(objectMap, "labelOperator", a.Operator)
	populate(objectMap, "state", a.SelectorState)
	populate(objectMap, "ttlSeconds", a.TimeToLive)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerSelector.
func (a *ACSRouterWorkerSelector) 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 "expirationTime":
			err = unpopulateTime[datetime.RFC3339](val, "ExpirationTime", &a.ExpirationTime)
			delete(rawMsg, key)
		case "key":
			err = unpopulate(val, "Key", &a.Key)
			delete(rawMsg, key)
		case "value":
			err = unpopulate(val, "LabelValue", &a.LabelValue)
			delete(rawMsg, key)
		case "labelOperator":
			err = unpopulate(val, "Operator", &a.Operator)
			delete(rawMsg, key)
		case "state":
			err = unpopulate(val, "SelectorState", &a.SelectorState)
			delete(rawMsg, key)
		case "ttlSeconds":
			err = unpopulate(val, "TimeToLive", &a.TimeToLive)
			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 ACSRouterWorkerUpdatedEventData.
func (a ACSRouterWorkerUpdatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "channelConfigurations", a.ChannelConfigurations)
	populate(objectMap, "labels", a.Labels)
	populate(objectMap, "queueAssignments", a.QueueAssignments)
	populate(objectMap, "tags", a.Tags)
	populate(objectMap, "totalCapacity", a.TotalCapacity)
	populate(objectMap, "updatedWorkerProperties", a.UpdatedWorkerProperties)
	populate(objectMap, "workerId", a.WorkerID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSRouterWorkerUpdatedEventData.
func (a *ACSRouterWorkerUpdatedEventData) 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 "channelConfigurations":
			err = unpopulate(val, "ChannelConfigurations", &a.ChannelConfigurations)
			delete(rawMsg, key)
		case "labels":
			err = unpopulate(val, "Labels", &a.Labels)
			delete(rawMsg, key)
		case "queueAssignments":
			err = unpopulate(val, "QueueAssignments", &a.QueueAssignments)
			delete(rawMsg, key)
		case "tags":
			err = unpopulate(val, "Tags", &a.Tags)
			delete(rawMsg, key)
		case "totalCapacity":
			err = unpopulate(val, "TotalCapacity", &a.TotalCapacity)
			delete(rawMsg, key)
		case "updatedWorkerProperties":
			err = unpopulate(val, "UpdatedWorkerProperties", &a.UpdatedWorkerProperties)
			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 ACSSMSDeliveryAttemptProperties.
func (a ACSSMSDeliveryAttemptProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "segmentsFailed", a.SegmentsFailed)
	populate(objectMap, "segmentsSucceeded", a.SegmentsSucceeded)
	populateTime[datetime.RFC3339](objectMap, "timestamp", a.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSSMSDeliveryAttemptProperties.
func (a *ACSSMSDeliveryAttemptProperties) 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 "segmentsFailed":
			err = unpopulate(val, "SegmentsFailed", &a.SegmentsFailed)
			delete(rawMsg, key)
		case "segmentsSucceeded":
			err = unpopulate(val, "SegmentsSucceeded", &a.SegmentsSucceeded)
			delete(rawMsg, key)
		case "timestamp":
			err = unpopulateTime[datetime.RFC3339](val, "Timestamp", &a.Timestamp)
			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 ACSSMSDeliveryReportReceivedEventData.
func (a ACSSMSDeliveryReportReceivedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "deliveryAttempts", a.DeliveryAttempts)
	populate(objectMap, "deliveryStatus", a.DeliveryStatus)
	populate(objectMap, "deliveryStatusDetails", a.DeliveryStatusDetails)
	populate(objectMap, "from", a.From)
	populate(objectMap, "messageId", a.MessageID)
	populateTime[datetime.RFC3339](objectMap, "receivedTimestamp", a.ReceivedTimestamp)
	populate(objectMap, "tag", a.Tag)
	populate(objectMap, "to", a.To)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSSMSDeliveryReportReceivedEventData.
func (a *ACSSMSDeliveryReportReceivedEventData) 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 "deliveryAttempts":
			err = unpopulate(val, "DeliveryAttempts", &a.DeliveryAttempts)
			delete(rawMsg, key)
		case "deliveryStatus":
			err = unpopulate(val, "DeliveryStatus", &a.DeliveryStatus)
			delete(rawMsg, key)
		case "deliveryStatusDetails":
			err = unpopulate(val, "DeliveryStatusDetails", &a.DeliveryStatusDetails)
			delete(rawMsg, key)
		case "from":
			err = unpopulate(val, "From", &a.From)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "receivedTimestamp":
			err = unpopulateTime[datetime.RFC3339](val, "ReceivedTimestamp", &a.ReceivedTimestamp)
			delete(rawMsg, key)
		case "tag":
			err = unpopulate(val, "Tag", &a.Tag)
			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)
	populate(objectMap, "from", a.From)
	populate(objectMap, "message", a.Message)
	populate(objectMap, "messageId", a.MessageID)
	populateTime[datetime.RFC3339](objectMap, "receivedTimestamp", a.ReceivedTimestamp)
	populate(objectMap, "segmentCount", a.SegmentCount)
	populate(objectMap, "to", a.To)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSSMSReceivedEventData.
func (a *ACSSMSReceivedEventData) 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 "message":
			err = unpopulate(val, "Message", &a.Message)
			delete(rawMsg, key)
		case "messageId":
			err = unpopulate(val, "MessageID", &a.MessageID)
			delete(rawMsg, key)
		case "receivedTimestamp":
			err = unpopulateTime[datetime.RFC3339](val, "ReceivedTimestamp", &a.ReceivedTimestamp)
			delete(rawMsg, key)
		case "segmentCount":
			err = unpopulate(val, "SegmentCount", &a.SegmentCount)
			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 ACSUserDisconnectedEventData.
func (a ACSUserDisconnectedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "userCommunicationIdentifier", a.UserCommunicationIdentifier)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ACSUserDisconnectedEventData.
func (a *ACSUserDisconnectedEventData) 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 "userCommunicationIdentifier":
			err = unpopulate(val, "UserCommunicationIdentifier", &a.UserCommunicationIdentifier)
			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 APICenterAPIDefinitionAddedEventData.
func (a APICenterAPIDefinitionAddedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", a.Description)
	populate(objectMap, "specification", a.Specification)
	populate(objectMap, "title", a.Title)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type APICenterAPIDefinitionAddedEventData.
func (a *APICenterAPIDefinitionAddedEventData) 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 "description":
			err = unpopulate(val, "Description", &a.Description)
			delete(rawMsg, key)
		case "specification":
			err = unpopulate(val, "Specification", &a.Specification)
			delete(rawMsg, key)
		case "title":
			err = unpopulate(val, "Title", &a.Title)
			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 APICenterAPIDefinitionUpdatedEventData.
func (a APICenterAPIDefinitionUpdatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "description", a.Description)
	populate(objectMap, "specification", a.Specification)
	populate(objectMap, "title", a.Title)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type APICenterAPIDefinitionUpdatedEventData.
func (a *APICenterAPIDefinitionUpdatedEventData) 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 "description":
			err = unpopulate(val, "Description", &a.Description)
			delete(rawMsg, key)
		case "specification":
			err = unpopulate(val, "Specification", &a.Specification)
			delete(rawMsg, key)
		case "title":
			err = unpopulate(val, "Title", &a.Title)
			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 APICenterAPISpecification.
func (a APICenterAPISpecification) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "name", a.Name)
	populate(objectMap, "version", a.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type APICenterAPISpecification.
func (a *APICenterAPISpecification) 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 "name":
			err = unpopulate(val, "Name", &a.Name)
			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 APIEntityReference.
func (a APIEntityReference) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", a.ID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type APIEntityReference.
func (a *APIEntityReference) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &a.ID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type APIManagementAPICreatedEventData.
func (a APIManagementAPICreatedEventData) 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 APIManagementAPICreatedEventData.
func (a *APIManagementAPICreatedEventData) 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 APIManagementAPIDeletedEventData.
func (a APIManagementAPIDeletedEventData) 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 APIManagementAPIDeletedEventData.
func (a *APIManagementAPIDeletedEventData) 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 APIManagementAPIReleaseCreatedEventData.
func (a APIManagementAPIReleaseCreatedEventData) 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 APIManagementAPIReleaseCreatedEventData.
func (a *APIManagementAPIReleaseCreatedEventData) 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 APIManagementAPIReleaseDeletedEventData.
func (a APIManagementAPIReleaseDeletedEventData) 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 APIManagementAPIReleaseDeletedEventData.
func (a *APIManagementAPIReleaseDeletedEventData) 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 APIManagementAPIReleaseUpdatedEventData.
func (a APIManagementAPIReleaseUpdatedEventData) 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 APIManagementAPIReleaseUpdatedEventData.
func (a *APIManagementAPIReleaseUpdatedEventData) 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 APIManagementAPIUpdatedEventData.
func (a APIManagementAPIUpdatedEventData) 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 APIManagementAPIUpdatedEventData.
func (a *APIManagementAPIUpdatedEventData) 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 APIManagementCircuitBreakerClosedEventData.
func (a APIManagementCircuitBreakerClosedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "backendName", a.BackendName)
	populate(objectMap, "circuitBreaker", a.CircuitBreaker)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementCircuitBreakerClosedEventData.
func (a *APIManagementCircuitBreakerClosedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "backendName":
			err = unpopulate(val, "BackendName", &a.BackendName)
			delete(rawMsg, key)
		case "circuitBreaker":
			err = unpopulate(val, "CircuitBreaker", &a.CircuitBreaker)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type APIManagementCircuitBreakerOpenedEventData.
func (a APIManagementCircuitBreakerOpenedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "backendName", a.BackendName)
	populate(objectMap, "circuitBreaker", a.CircuitBreaker)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementCircuitBreakerOpenedEventData.
func (a *APIManagementCircuitBreakerOpenedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "backendName":
			err = unpopulate(val, "BackendName", &a.BackendName)
			delete(rawMsg, key)
		case "circuitBreaker":
			err = unpopulate(val, "CircuitBreaker", &a.CircuitBreaker)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type APIManagementCircuitBreakerProperties.
func (a APIManagementCircuitBreakerProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "rules", a.Rules)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementCircuitBreakerProperties.
func (a *APIManagementCircuitBreakerProperties) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "rules":
			err = unpopulate(val, "Rules", &a.Rules)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type APIManagementExpiredGatewayTokenProperties.
func (a APIManagementExpiredGatewayTokenProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "expiredAtUtc", a.ExpiresOn)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementExpiredGatewayTokenProperties.
func (a *APIManagementExpiredGatewayTokenProperties) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "expiredAtUtc":
			err = unpopulateTime[datetime.RFC3339](val, "ExpiresOn", &a.ExpiresOn)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type APIManagementGatewayAPIAddedEventData.
func (a APIManagementGatewayAPIAddedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resourceUri", a.ResourceURI)
	return json.Marshal(objectMap)
}

// 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)
	}
	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 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 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)
	}
	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 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 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)
	}
	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 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 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)
	}
	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 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 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)
	}
	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 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 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)
	}
	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 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.Gateway)
	populate(objectMap, "tokenInfo", a.Token)
	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, "Gateway", &a.Gateway)
			delete(rawMsg, key)
		case "tokenInfo":
			err = unpopulate(val, "Token", &a.Token)
			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.Gateway)
	populate(objectMap, "tokenInfo", a.Token)
	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, "Gateway", &a.Gateway)
			delete(rawMsg, key)
		case "tokenInfo":
			err = unpopulate(val, "Token", &a.Token)
			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)
	populate(objectMap, "resourceUri", a.ResourceURI)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementGatewayUpdatedEventData.
func (a *APIManagementGatewayUpdatedEventData) 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 APIManagementNearExpiryGatewayTokenProperties.
func (a APIManagementNearExpiryGatewayTokenProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "expiredAtUtc", a.ExpiresOn)
	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 = unpopulateTime[datetime.RFC3339](val, "ExpiresOn", &a.ExpiresOn)
			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)
	populate(objectMap, "resourceUri", a.ResourceURI)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementProductCreatedEventData.
func (a *APIManagementProductCreatedEventData) 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 APIManagementProductDeletedEventData.
func (a APIManagementProductDeletedEventData) 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 APIManagementProductDeletedEventData.
func (a *APIManagementProductDeletedEventData) 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 APIManagementProductUpdatedEventData.
func (a APIManagementProductUpdatedEventData) 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 APIManagementProductUpdatedEventData.
func (a *APIManagementProductUpdatedEventData) 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 APIManagementSubscriptionCreatedEventData.
func (a APIManagementSubscriptionCreatedEventData) 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 APIManagementSubscriptionCreatedEventData.
func (a *APIManagementSubscriptionCreatedEventData) 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 APIManagementSubscriptionDeletedEventData.
func (a APIManagementSubscriptionDeletedEventData) 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 APIManagementSubscriptionDeletedEventData.
func (a *APIManagementSubscriptionDeletedEventData) 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 APIManagementSubscriptionUpdatedEventData.
func (a APIManagementSubscriptionUpdatedEventData) 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 APIManagementSubscriptionUpdatedEventData.
func (a *APIManagementSubscriptionUpdatedEventData) 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 APIManagementUserCreatedEventData.
func (a APIManagementUserCreatedEventData) 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 APIManagementUserCreatedEventData.
func (a *APIManagementUserCreatedEventData) 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 APIManagementUserDeletedEventData.
func (a APIManagementUserDeletedEventData) 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 APIManagementUserDeletedEventData.
func (a *APIManagementUserDeletedEventData) 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 APIManagementUserUpdatedEventData.
func (a APIManagementUserUpdatedEventData) 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 APIManagementUserUpdatedEventData.
func (a *APIManagementUserUpdatedEventData) 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 AVSClusterCreatedEventData.
func (a AVSClusterCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "addedHostNames", a.AddedHostNames)
	populate(objectMap, "inMaintenanceHostNames", a.InMaintenanceHostNames)
	populate(objectMap, "operationId", a.OperationID)
	populate(objectMap, "removedHostNames", a.RemovedHostNames)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AVSClusterCreatedEventData.
func (a *AVSClusterCreatedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "addedHostNames":
			err = unpopulate(val, "AddedHostNames", &a.AddedHostNames)
			delete(rawMsg, key)
		case "inMaintenanceHostNames":
			err = unpopulate(val, "InMaintenanceHostNames", &a.InMaintenanceHostNames)
			delete(rawMsg, key)
		case "operationId":
			err = unpopulate(val, "OperationID", &a.OperationID)
			delete(rawMsg, key)
		case "removedHostNames":
			err = unpopulate(val, "RemovedHostNames", &a.RemovedHostNames)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type AVSClusterDeletedEventData.
func (a AVSClusterDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "addedHostNames", a.AddedHostNames)
	populate(objectMap, "inMaintenanceHostNames", a.InMaintenanceHostNames)
	populate(objectMap, "operationId", a.OperationID)
	populate(objectMap, "removedHostNames", a.RemovedHostNames)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AVSClusterDeletedEventData.
func (a *AVSClusterDeletedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", a, err)
	}
	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)
	populate(objectMap, "addedHostNames", a.AddedHostNames)
	populate(objectMap, "failureMessage", a.FailureMessage)
	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 AVSClusterFailedEventData.
func (a *AVSClusterFailedEventData) 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 "failureMessage":
			err = unpopulate(val, "FailureMessage", &a.FailureMessage)
			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 AVSClusterUpdatedEventData.
func (a AVSClusterUpdatedEventData) 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 AVSClusterUpdatedEventData.
func (a *AVSClusterUpdatedEventData) 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 AVSClusterUpdatingEventData.
func (a AVSClusterUpdatingEventData) 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 AVSClusterUpdatingEventData.
func (a *AVSClusterUpdatingEventData) 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 AVSPrivateCloudFailedEventData.
func (a AVSPrivateCloudFailedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "failureMessage", a.FailureMessage)
	populate(objectMap, "operationId", a.OperationID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AVSPrivateCloudFailedEventData.
func (a *AVSPrivateCloudFailedEventData) 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 "failureMessage":
			err = unpopulate(val, "FailureMessage", &a.FailureMessage)
			delete(rawMsg, 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 AVSPrivateCloudUpdatedEventData.
func (a AVSPrivateCloudUpdatedEventData) 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 AVSPrivateCloudUpdatedEventData.
func (a *AVSPrivateCloudUpdatedEventData) 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 AVSPrivateCloudUpdatingEventData.
func (a AVSPrivateCloudUpdatingEventData) 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 AVSPrivateCloudUpdatingEventData.
func (a *AVSPrivateCloudUpdatingEventData) 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 AVSScriptExecutionCancelledEventData.
func (a AVSScriptExecutionCancelledEventData) 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 AVSScriptExecutionCancelledEventData.
func (a *AVSScriptExecutionCancelledEventData) 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)
	populate(objectMap, "cmdletId", a.CmdletID)
	populate(objectMap, "failureMessage", a.FailureMessage)
	populate(objectMap, "operationId", a.OperationID)
	populate(objectMap, "output", a.Output)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AVSScriptExecutionFailedEventData.
func (a *AVSScriptExecutionFailedEventData) 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 "failureMessage":
			err = unpopulate(val, "FailureMessage", &a.FailureMessage)
			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 AVSScriptExecutionFinishedEventData.
func (a AVSScriptExecutionFinishedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "cmdletId", a.CmdletID)
	populate(objectMap, "namedOutputs", a.NamedOutputs)
	populate(objectMap, "operationId", a.OperationID)
	populate(objectMap, "output", a.Output)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AVSScriptExecutionFinishedEventData.
func (a *AVSScriptExecutionFinishedEventData) 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 "namedOutputs":
			err = unpopulate(val, "NamedOutputs", &a.NamedOutputs)
			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 AVSScriptExecutionStartedEventData.
func (a AVSScriptExecutionStartedEventData) 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 AVSScriptExecutionStartedEventData.
func (a *AVSScriptExecutionStartedEventData) 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 AcsChatRetentionPolicy.
func (a AcsChatRetentionPolicy) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "deleteThreadAfterDays", a.DeleteThreadAfterDays)
	populate(objectMap, "kind", a.Kind)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AcsChatRetentionPolicy.
func (a *AcsChatRetentionPolicy) 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 "deleteThreadAfterDays":
			err = unpopulate(val, "DeleteThreadAfterDays", &a.DeleteThreadAfterDays)
			delete(rawMsg, key)
		case "kind":
			err = unpopulate(val, "Kind", &a.Kind)
			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 AppConfigurationKeyValueDeletedEventData.
func (a AppConfigurationKeyValueDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "etag", a.Etag)
	populate(objectMap, "key", a.Key)
	populate(objectMap, "label", a.Label)
	populate(objectMap, "syncToken", a.SyncToken)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AppConfigurationKeyValueDeletedEventData.
func (a *AppConfigurationKeyValueDeletedEventData) 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 "key":
			err = unpopulate(val, "Key", &a.Key)
			delete(rawMsg, key)
		case "label":
			err = unpopulate(val, "Label", &a.Label)
			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 AppConfigurationKeyValueModifiedEventData.
func (a AppConfigurationKeyValueModifiedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "etag", a.Etag)
	populate(objectMap, "key", a.Key)
	populate(objectMap, "label", a.Label)
	populate(objectMap, "syncToken", a.SyncToken)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AppConfigurationKeyValueModifiedEventData.
func (a *AppConfigurationKeyValueModifiedEventData) 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 "key":
			err = unpopulate(val, "Key", &a.Key)
			delete(rawMsg, key)
		case "label":
			err = unpopulate(val, "Label", &a.Label)
			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 AppConfigurationSnapshotCreatedEventData.
func (a AppConfigurationSnapshotCreatedEventData) 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 AppConfigurationSnapshotCreatedEventData.
func (a *AppConfigurationSnapshotCreatedEventData) 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)
	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 AppConfigurationSnapshotModifiedEventData.
func (a *AppConfigurationSnapshotModifiedEventData) 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 AppEventTypeDetail.
func (a AppEventTypeDetail) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "action", a.Action)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AppEventTypeDetail.
func (a *AppEventTypeDetail) 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 "action":
			err = unpopulate(val, "Action", &a.Action)
			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 AppServicePlanEventTypeDetail.
func (a AppServicePlanEventTypeDetail) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "action", a.Action)
	populate(objectMap, "stampKind", a.StampKind)
	populate(objectMap, "status", a.Status)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type AppServicePlanEventTypeDetail.
func (a *AppServicePlanEventTypeDetail) 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 "action":
			err = unpopulate(val, "Action", &a.Action)
			delete(rawMsg, key)
		case "stampKind":
			err = unpopulate(val, "StampKind", &a.StampKind)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &a.Status)
			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 CommunicationIdentifierModel.
func (c CommunicationIdentifierModel) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "communicationUser", c.CommunicationUser)
	populate(objectMap, "kind", c.Kind)
	populate(objectMap, "microsoftTeamsApp", c.MicrosoftTeamsApp)
	populate(objectMap, "microsoftTeamsUser", c.MicrosoftTeamsUser)
	populate(objectMap, "phoneNumber", c.PhoneNumber)
	populate(objectMap, "rawId", c.RawID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CommunicationIdentifierModel.
func (c *CommunicationIdentifierModel) 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 "communicationUser":
			err = unpopulate(val, "CommunicationUser", &c.CommunicationUser)
			delete(rawMsg, key)
		case "kind":
			err = unpopulate(val, "Kind", &c.Kind)
			delete(rawMsg, key)
		case "microsoftTeamsApp":
			err = unpopulate(val, "MicrosoftTeamsApp", &c.MicrosoftTeamsApp)
			delete(rawMsg, key)
		case "microsoftTeamsUser":
			err = unpopulate(val, "MicrosoftTeamsUser", &c.MicrosoftTeamsUser)
			delete(rawMsg, key)
		case "phoneNumber":
			err = unpopulate(val, "PhoneNumber", &c.PhoneNumber)
			delete(rawMsg, key)
		case "rawId":
			err = unpopulate(val, "RawID", &c.RawID)
			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 CommunicationUserIdentifierModel.
func (c CommunicationUserIdentifierModel) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", c.ID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type CommunicationUserIdentifierModel.
func (c *CommunicationUserIdentifierModel) 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 "id":
			err = unpopulate(val, "ID", &c.ID)
			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)
	populate(objectMap, "digest", c.Digest)
	populate(objectMap, "mediaType", c.MediaType)
	populate(objectMap, "name", c.Name)
	populate(objectMap, "repository", c.Repository)
	populate(objectMap, "size", c.Size)
	populate(objectMap, "tag", c.Tag)
	populate(objectMap, "version", c.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryArtifactEventTarget.
func (c *ContainerRegistryArtifactEventTarget) 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 "digest":
			err = unpopulate(val, "Digest", &c.Digest)
			delete(rawMsg, key)
		case "mediaType":
			err = unpopulate(val, "MediaType", &c.MediaType)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &c.Name)
			delete(rawMsg, key)
		case "repository":
			err = unpopulate(val, "Repository", &c.Repository)
			delete(rawMsg, key)
		case "size":
			err = unpopulate(val, "Size", &c.Size)
			delete(rawMsg, key)
		case "tag":
			err = unpopulate(val, "Tag", &c.Tag)
			delete(rawMsg, key)
		case "version":
			err = unpopulate(val, "Version", &c.Version)
			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 ContainerRegistryChartDeletedEventData.
func (c ContainerRegistryChartDeletedEventData) 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)
	populateTime[datetime.RFC3339](objectMap, "timestamp", c.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryChartDeletedEventData.
func (c *ContainerRegistryChartDeletedEventData) 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 = unpopulateTime[datetime.RFC3339](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 ContainerRegistryChartPushedEventData.
func (c ContainerRegistryChartPushedEventData) 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)
	populateTime[datetime.RFC3339](objectMap, "timestamp", c.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryChartPushedEventData.
func (c *ContainerRegistryChartPushedEventData) 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 = unpopulateTime[datetime.RFC3339](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 ContainerRegistryEventActor.
func (c ContainerRegistryEventActor) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "name", c.Name)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryEventActor.
func (c *ContainerRegistryEventActor) 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 "name":
			err = unpopulate(val, "Name", &c.Name)
			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 ContainerRegistryEventConnectedRegistry.
func (c ContainerRegistryEventConnectedRegistry) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "name", c.Name)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryEventConnectedRegistry.
func (c *ContainerRegistryEventConnectedRegistry) 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 "name":
			err = unpopulate(val, "Name", &c.Name)
			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)
	populate(objectMap, "addr", c.Addr)
	populate(objectMap, "host", c.Host)
	populate(objectMap, "id", c.ID)
	populate(objectMap, "method", c.Method)
	populate(objectMap, "useragent", c.Useragent)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryEventRequest.
func (c *ContainerRegistryEventRequest) 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 "addr":
			err = unpopulate(val, "Addr", &c.Addr)
			delete(rawMsg, key)
		case "host":
			err = unpopulate(val, "Host", &c.Host)
			delete(rawMsg, key)
		case "id":
			err = unpopulate(val, "ID", &c.ID)
			delete(rawMsg, key)
		case "method":
			err = unpopulate(val, "Method", &c.Method)
			delete(rawMsg, key)
		case "useragent":
			err = unpopulate(val, "Useragent", &c.Useragent)
			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 ContainerRegistryEventSource.
func (c ContainerRegistryEventSource) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "addr", c.Addr)
	populate(objectMap, "instanceID", c.InstanceID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryEventSource.
func (c *ContainerRegistryEventSource) 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 "addr":
			err = unpopulate(val, "Addr", &c.Addr)
			delete(rawMsg, key)
		case "instanceID":
			err = unpopulate(val, "InstanceID", &c.InstanceID)
			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 ContainerRegistryEventTarget.
func (c ContainerRegistryEventTarget) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "digest", c.Digest)
	populate(objectMap, "length", c.Length)
	populate(objectMap, "mediaType", c.MediaType)
	populate(objectMap, "repository", c.Repository)
	populate(objectMap, "size", c.Size)
	populate(objectMap, "tag", c.Tag)
	populate(objectMap, "url", c.URL)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryEventTarget.
func (c *ContainerRegistryEventTarget) 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 "digest":
			err = unpopulate(val, "Digest", &c.Digest)
			delete(rawMsg, key)
		case "length":
			err = unpopulate(val, "Length", &c.Length)
			delete(rawMsg, key)
		case "mediaType":
			err = unpopulate(val, "MediaType", &c.MediaType)
			delete(rawMsg, key)
		case "repository":
			err = unpopulate(val, "Repository", &c.Repository)
			delete(rawMsg, key)
		case "size":
			err = unpopulate(val, "Size", &c.Size)
			delete(rawMsg, key)
		case "tag":
			err = unpopulate(val, "Tag", &c.Tag)
			delete(rawMsg, key)
		case "url":
			err = unpopulate(val, "URL", &c.URL)
			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 ContainerRegistryImageDeletedEventData.
func (c ContainerRegistryImageDeletedEventData) 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)
	populateTime[datetime.RFC3339](objectMap, "timestamp", c.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryImageDeletedEventData.
func (c *ContainerRegistryImageDeletedEventData) 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 = unpopulateTime[datetime.RFC3339](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 ContainerRegistryImagePushedEventData.
func (c ContainerRegistryImagePushedEventData) 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)
	populateTime[datetime.RFC3339](objectMap, "timestamp", c.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryImagePushedEventData.
func (c *ContainerRegistryImagePushedEventData) 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 = unpopulateTime[datetime.RFC3339](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 ContainerServiceClusterSupportEndedEventData.
func (c ContainerServiceClusterSupportEndedEventData) 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 ContainerServiceClusterSupportEndedEventData.
func (c *ContainerServiceClusterSupportEndedEventData) 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 ContainerServiceClusterSupportEndingEventData.
func (c ContainerServiceClusterSupportEndingEventData) 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 ContainerServiceClusterSupportEndingEventData.
func (c *ContainerServiceClusterSupportEndingEventData) 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 ContainerServiceNodePoolRollingFailedEventData.
func (c ContainerServiceNodePoolRollingFailedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nodePoolName", c.NodePoolName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerServiceNodePoolRollingFailedEventData.
func (c *ContainerServiceNodePoolRollingFailedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", c, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "nodePoolName":
			err = unpopulate(val, "NodePoolName", &c.NodePoolName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", c, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ContainerServiceNodePoolRollingStartedEventData.
func (c ContainerServiceNodePoolRollingStartedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nodePoolName", c.NodePoolName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerServiceNodePoolRollingStartedEventData.
func (c *ContainerServiceNodePoolRollingStartedEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", c, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "nodePoolName":
			err = unpopulate(val, "NodePoolName", &c.NodePoolName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", c, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ContainerServiceNodePoolRollingSucceededEventData.
func (c ContainerServiceNodePoolRollingSucceededEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "nodePoolName", c.NodePoolName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerServiceNodePoolRollingSucceededEventData.
func (c *ContainerServiceNodePoolRollingSucceededEventData) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", c, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "nodePoolName":
			err = unpopulate(val, "NodePoolName", &c.NodePoolName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", c, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type DataBoxCopyCompletedEventData.
func (d DataBoxCopyCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serialNumber", d.SerialNumber)
	populate(objectMap, "stageName", d.StageName)
	populateTime[datetime.RFC3339](objectMap, "stageTime", d.StageTime)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DataBoxCopyCompletedEventData.
func (d *DataBoxCopyCompletedEventData) 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 "serialNumber":
			err = unpopulate(val, "SerialNumber", &d.SerialNumber)
			delete(rawMsg, key)
		case "stageName":
			err = unpopulate(val, "StageName", &d.StageName)
			delete(rawMsg, key)
		case "stageTime":
			err = unpopulateTime[datetime.RFC3339](val, "StageTime", &d.StageTime)
			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 DataBoxCopyStartedEventData.
func (d DataBoxCopyStartedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serialNumber", d.SerialNumber)
	populate(objectMap, "stageName", d.StageName)
	populateTime[datetime.RFC3339](objectMap, "stageTime", d.StageTime)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DataBoxCopyStartedEventData.
func (d *DataBoxCopyStartedEventData) 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 "serialNumber":
			err = unpopulate(val, "SerialNumber", &d.SerialNumber)
			delete(rawMsg, key)
		case "stageName":
			err = unpopulate(val, "StageName", &d.StageName)
			delete(rawMsg, key)
		case "stageTime":
			err = unpopulateTime[datetime.RFC3339](val, "StageTime", &d.StageTime)
			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 DataBoxOrderCompletedEventData.
func (d DataBoxOrderCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "serialNumber", d.SerialNumber)
	populate(objectMap, "stageName", d.StageName)
	populateTime[datetime.RFC3339](objectMap, "stageTime", d.StageTime)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DataBoxOrderCompletedEventData.
func (d *DataBoxOrderCompletedEventData) 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 "serialNumber":
			err = unpopulate(val, "SerialNumber", &d.SerialNumber)
			delete(rawMsg, key)
		case "stageName":
			err = unpopulate(val, "StageName", &d.StageName)
			delete(rawMsg, key)
		case "stageTime":
			err = unpopulateTime[datetime.RFC3339](val, "StageTime", &d.StageTime)
			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 DeviceConnectionStateEventInfo.
func (d DeviceConnectionStateEventInfo) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "sequenceNumber", d.SequenceNumber)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DeviceConnectionStateEventInfo.
func (d *DeviceConnectionStateEventInfo) 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 "sequenceNumber":
			err = unpopulate(val, "SequenceNumber", &d.SequenceNumber)
			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)
	populate(objectMap, "authenticationType", d.AuthenticationType)
	populate(objectMap, "cloudToDeviceMessageCount", d.CloudToDeviceMessageCount)
	populate(objectMap, "connectionState", d.ConnectionState)
	populate(objectMap, "deviceId", d.DeviceID)
	populate(objectMap, "etag", d.Etag)
	populate(objectMap, "lastActivityTime", d.LastActivityTime)
	populate(objectMap, "properties", d.Properties)
	populate(objectMap, "status", d.Status)
	populate(objectMap, "statusUpdateTime", d.StatusUpdateTime)
	populate(objectMap, "version", d.Version)
	populate(objectMap, "x509Thumbprint", d.X509Thumbprint)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DeviceTwinInfo.
func (d *DeviceTwinInfo) 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 "authenticationType":
			err = unpopulate(val, "AuthenticationType", &d.AuthenticationType)
			delete(rawMsg, key)
		case "cloudToDeviceMessageCount":
			err = unpopulate(val, "CloudToDeviceMessageCount", &d.CloudToDeviceMessageCount)
			delete(rawMsg, key)
		case "connectionState":
			err = unpopulate(val, "ConnectionState", &d.ConnectionState)
			delete(rawMsg, key)
		case "deviceId":
			err = unpopulate(val, "DeviceID", &d.DeviceID)
			delete(rawMsg, key)
		case "etag":
			err = unpopulate(val, "Etag", &d.Etag)
			delete(rawMsg, key)
		case "lastActivityTime":
			err = unpopulate(val, "LastActivityTime", &d.LastActivityTime)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &d.Properties)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &d.Status)
			delete(rawMsg, key)
		case "statusUpdateTime":
			err = unpopulate(val, "StatusUpdateTime", &d.StatusUpdateTime)
			delete(rawMsg, key)
		case "version":
			err = unpopulate(val, "Version", &d.Version)
			delete(rawMsg, key)
		case "x509Thumbprint":
			err = unpopulate(val, "X509Thumbprint", &d.X509Thumbprint)
			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 DeviceTwinInfoProperties.
func (d DeviceTwinInfoProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "desired", d.Desired)
	populate(objectMap, "reported", d.Reported)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DeviceTwinInfoProperties.
func (d *DeviceTwinInfoProperties) 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 "desired":
			err = unpopulate(val, "Desired", &d.Desired)
			delete(rawMsg, key)
		case "reported":
			err = unpopulate(val, "Reported", &d.Reported)
			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 DeviceTwinInfoX509Thumbprint.
func (d DeviceTwinInfoX509Thumbprint) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "primaryThumbprint", d.PrimaryThumbprint)
	populate(objectMap, "secondaryThumbprint", d.SecondaryThumbprint)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DeviceTwinInfoX509Thumbprint.
func (d *DeviceTwinInfoX509Thumbprint) 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 "primaryThumbprint":
			err = unpopulate(val, "PrimaryThumbprint", &d.PrimaryThumbprint)
			delete(rawMsg, key)
		case "secondaryThumbprint":
			err = unpopulate(val, "SecondaryThumbprint", &d.SecondaryThumbprint)
			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 DeviceTwinMetadata.
func (d DeviceTwinMetadata) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "lastUpdated", d.LastUpdated)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DeviceTwinMetadata.
func (d *DeviceTwinMetadata) 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 "lastUpdated":
			err = unpopulate(val, "LastUpdated", &d.LastUpdated)
			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 DeviceTwinProperties.
func (d DeviceTwinProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "metadata", d.Metadata)
	populate(objectMap, "version", d.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type DeviceTwinProperties.
func (d *DeviceTwinProperties) 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 "metadata":
			err = unpopulate(val, "Metadata", &d.Metadata)
			delete(rawMsg, key)
		case "version":
			err = unpopulate(val, "Version", &d.Version)
			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 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)
	populate(objectMap, "attributes", e.Attributes)
	populate(objectMap, "clientAuthenticationName", e.ClientAuthenticationName)
	populate(objectMap, "clientName", e.ClientName)
	populateTime[datetime.RFC3339](objectMap, "createdOn", e.CreatedOn)
	populate(objectMap, "namespaceName", e.NamespaceName)
	populate(objectMap, "state", e.State)
	populateTime[datetime.RFC3339](objectMap, "updatedOn", e.UpdatedOn)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridMQTTClientCreatedOrUpdatedEventData.
func (e *EventGridMQTTClientCreatedOrUpdatedEventData) 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 "attributes":
			err = unpopulate(val, "Attributes", &e.Attributes)
			delete(rawMsg, key)
		case "clientAuthenticationName":
			err = unpopulate(val, "ClientAuthenticationName", &e.ClientAuthenticationName)
			delete(rawMsg, key)
		case "clientName":
			err = unpopulate(val, "ClientName", &e.ClientName)
			delete(rawMsg, key)
		case "createdOn":
			err = unpopulateTime[datetime.RFC3339](val, "CreatedOn", &e.CreatedOn)
			delete(rawMsg, key)
		case "namespaceName":
			err = unpopulate(val, "NamespaceName", &e.NamespaceName)
			delete(rawMsg, key)
		case "state":
			err = unpopulate(val, "State", &e.State)
			delete(rawMsg, key)
		case "updatedOn":
			err = unpopulateTime[datetime.RFC3339](val, "UpdatedOn", &e.UpdatedOn)
			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 EventGridMQTTClientDeletedEventData.
func (e EventGridMQTTClientDeletedEventData) 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 EventGridMQTTClientDeletedEventData.
func (e *EventGridMQTTClientDeletedEventData) 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)
	populate(objectMap, "clientAuthenticationName", e.ClientAuthenticationName)
	populate(objectMap, "clientName", e.ClientName)
	populate(objectMap, "clientSessionName", e.ClientSessionName)
	populate(objectMap, "namespaceName", e.NamespaceName)
	populate(objectMap, "sequenceNumber", e.SequenceNumber)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridMQTTClientSessionConnectedEventData.
func (e *EventGridMQTTClientSessionConnectedEventData) 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 "clientSessionName":
			err = unpopulate(val, "ClientSessionName", &e.ClientSessionName)
			delete(rawMsg, key)
		case "namespaceName":
			err = unpopulate(val, "NamespaceName", &e.NamespaceName)
			delete(rawMsg, key)
		case "sequenceNumber":
			err = unpopulate(val, "SequenceNumber", &e.SequenceNumber)
			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 EventGridMQTTClientSessionDisconnectedEventData.
func (e EventGridMQTTClientSessionDisconnectedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "clientAuthenticationName", e.ClientAuthenticationName)
	populate(objectMap, "clientName", e.ClientName)
	populate(objectMap, "clientSessionName", e.ClientSessionName)
	populate(objectMap, "disconnectionReason", e.DisconnectionReason)
	populate(objectMap, "namespaceName", e.NamespaceName)
	populate(objectMap, "sequenceNumber", e.SequenceNumber)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridMQTTClientSessionDisconnectedEventData.
func (e *EventGridMQTTClientSessionDisconnectedEventData) 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 "clientSessionName":
			err = unpopulate(val, "ClientSessionName", &e.ClientSessionName)
			delete(rawMsg, key)
		case "disconnectionReason":
			err = unpopulate(val, "DisconnectionReason", &e.DisconnectionReason)
			delete(rawMsg, key)
		case "namespaceName":
			err = unpopulate(val, "NamespaceName", &e.NamespaceName)
			delete(rawMsg, key)
		case "sequenceNumber":
			err = unpopulate(val, "SequenceNumber", &e.SequenceNumber)
			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 EventHubCaptureFileCreatedEventData.
func (e EventHubCaptureFileCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "eventCount", e.EventCount)
	populate(objectMap, "fileType", e.FileType)
	populate(objectMap, "fileUrl", e.FileURL)
	populateTime[datetime.RFC3339](objectMap, "firstEnqueueTime", e.FirstEnqueueTime)
	populate(objectMap, "firstSequenceNumber", e.FirstSequenceNumber)
	populateTime[datetime.RFC3339](objectMap, "lastEnqueueTime", e.LastEnqueueTime)
	populate(objectMap, "lastSequenceNumber", e.LastSequenceNumber)
	populate(objectMap, "partitionId", e.PartitionID)
	populate(objectMap, "sizeInBytes", e.SizeInBytes)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type EventHubCaptureFileCreatedEventData.
func (e *EventHubCaptureFileCreatedEventData) 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 "eventCount":
			err = unpopulate(val, "EventCount", &e.EventCount)
			delete(rawMsg, key)
		case "fileType":
			err = unpopulate(val, "FileType", &e.FileType)
			delete(rawMsg, key)
		case "fileUrl":
			err = unpopulate(val, "FileURL", &e.FileURL)
			delete(rawMsg, key)
		case "firstEnqueueTime":
			err = unpopulateTime[datetime.RFC3339](val, "FirstEnqueueTime", &e.FirstEnqueueTime)
			delete(rawMsg, key)
		case "firstSequenceNumber":
			err = unpopulate(val, "FirstSequenceNumber", &e.FirstSequenceNumber)
			delete(rawMsg, key)
		case "lastEnqueueTime":
			err = unpopulateTime[datetime.RFC3339](val, "LastEnqueueTime", &e.LastEnqueueTime)
			delete(rawMsg, key)
		case "lastSequenceNumber":
			err = unpopulate(val, "LastSequenceNumber", &e.LastSequenceNumber)
			delete(rawMsg, key)
		case "partitionId":
			err = unpopulate(val, "PartitionID", &e.PartitionID)
			delete(rawMsg, key)
		case "sizeInBytes":
			err = unpopulate(val, "SizeInBytes", &e.SizeInBytes)
			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 HealthcareDicomImageCreatedEventData.
func (h HealthcareDicomImageCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "imageSeriesInstanceUid", h.ImageSeriesInstanceUID)
	populate(objectMap, "imageSopInstanceUid", h.ImageSopInstanceUID)
	populate(objectMap, "imageStudyInstanceUid", h.ImageStudyInstanceUID)
	populate(objectMap, "partitionName", h.PartitionName)
	populate(objectMap, "sequenceNumber", h.SequenceNumber)
	populate(objectMap, "serviceHostName", h.ServiceHostName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type HealthcareDicomImageCreatedEventData.
func (h *HealthcareDicomImageCreatedEventData) 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", h, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "imageSeriesInstanceUid":
			err = unpopulate(val, "ImageSeriesInstanceUID", &h.ImageSeriesInstanceUID)
			delete(rawMsg, key)
		case "imageSopInstanceUid":
			err = unpopulate(val, "ImageSopInstanceUID", &h.ImageSopInstanceUID)
			delete(rawMsg, key)
		case "imageStudyInstanceUid":
			err = unpopulate(val, "ImageStudyInstanceUID", &h.ImageStudyInstanceUID)
			delete(rawMsg, key)
		case "partitionName":
			err = unpopulate(val, "PartitionName", &h.PartitionName)
			delete(rawMsg, key)
		case "sequenceNumber":
			err = unpopulate(val, "SequenceNumber", &h.SequenceNumber)
			delete(rawMsg, key)
		case "serviceHostName":
			err = unpopulate(val, "ServiceHostName", &h.ServiceHostName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", h, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type HealthcareDicomImageDeletedEventData.
func (h HealthcareDicomImageDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "imageSeriesInstanceUid", h.ImageSeriesInstanceUID)
	populate(objectMap, "imageSopInstanceUid", h.ImageSopInstanceUID)
	populate(objectMap, "imageStudyInstanceUid", h.ImageStudyInstanceUID)
	populate(objectMap, "partitionName", h.PartitionName)
	populate(objectMap, "sequenceNumber", h.SequenceNumber)
	populate(objectMap, "serviceHostName", h.ServiceHostName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type HealthcareDicomImageDeletedEventData.
func (h *HealthcareDicomImageDeletedEventData) 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", h, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "imageSeriesInstanceUid":
			err = unpopulate(val, "ImageSeriesInstanceUID", &h.ImageSeriesInstanceUID)
			delete(rawMsg, key)
		case "imageSopInstanceUid":
			err = unpopulate(val, "ImageSopInstanceUID", &h.ImageSopInstanceUID)
			delete(rawMsg, key)
		case "imageStudyInstanceUid":
			err = unpopulate(val, "ImageStudyInstanceUID", &h.ImageStudyInstanceUID)
			delete(rawMsg, key)
		case "partitionName":
			err = unpopulate(val, "PartitionName", &h.PartitionName)
			delete(rawMsg, key)
		case "sequenceNumber":
			err = unpopulate(val, "SequenceNumber", &h.SequenceNumber)
			delete(rawMsg, key)
		case "serviceHostName":
			err = unpopulate(val, "ServiceHostName", &h.ServiceHostName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", h, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type HealthcareDicomImageUpdatedEventData.
func (h HealthcareDicomImageUpdatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "imageSeriesInstanceUid", h.ImageSeriesInstanceUID)
	populate(objectMap, "imageSopInstanceUid", h.ImageSopInstanceUID)
	populate(objectMap, "imageStudyInstanceUid", h.ImageStudyInstanceUID)
	populate(objectMap, "partitionName", h.PartitionName)
	populate(objectMap, "sequenceNumber", h.SequenceNumber)
	populate(objectMap, "serviceHostName", h.ServiceHostName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type HealthcareDicomImageUpdatedEventData.
func (h *HealthcareDicomImageUpdatedEventData) 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", h, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "imageSeriesInstanceUid":
			err = unpopulate(val, "ImageSeriesInstanceUID", &h.ImageSeriesInstanceUID)
			delete(rawMsg, key)
		case "imageSopInstanceUid":
			err = unpopulate(val, "ImageSopInstanceUID", &h.ImageSopInstanceUID)
			delete(rawMsg, key)
		case "imageStudyInstanceUid":
			err = unpopulate(val, "ImageStudyInstanceUID", &h.ImageStudyInstanceUID)
			delete(rawMsg, key)
		case "partitionName":
			err = unpopulate(val, "PartitionName", &h.PartitionName)
			delete(rawMsg, key)
		case "sequenceNumber":
			err = unpopulate(val, "SequenceNumber", &h.SequenceNumber)
			delete(rawMsg, key)
		case "serviceHostName":
			err = unpopulate(val, "ServiceHostName", &h.ServiceHostName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", h, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type HealthcareFHIRResourceCreatedEventData.
func (h HealthcareFHIRResourceCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resourceFhirId", h.FHIRResourceID)
	populate(objectMap, "resourceType", h.FHIRResourceType)
	populate(objectMap, "resourceVersionId", h.FHIRResourceVersionID)
	populate(objectMap, "resourceFhirAccount", h.FHIRServiceHostName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type HealthcareFHIRResourceCreatedEventData.
func (h *HealthcareFHIRResourceCreatedEventData) 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", h, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "resourceFhirId":
			err = unpopulate(val, "FHIRResourceID", &h.FHIRResourceID)
			delete(rawMsg, key)
		case "resourceType":
			err = unpopulate(val, "FHIRResourceType", &h.FHIRResourceType)
			delete(rawMsg, key)
		case "resourceVersionId":
			err = unpopulate(val, "FHIRResourceVersionID", &h.FHIRResourceVersionID)
			delete(rawMsg, key)
		case "resourceFhirAccount":
			err = unpopulate(val, "FHIRServiceHostName", &h.FHIRServiceHostName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", h, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type HealthcareFHIRResourceDeletedEventData.
func (h HealthcareFHIRResourceDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resourceFhirId", h.FHIRResourceID)
	populate(objectMap, "resourceType", h.FHIRResourceType)
	populate(objectMap, "resourceVersionId", h.FHIRResourceVersionID)
	populate(objectMap, "resourceFhirAccount", h.FHIRServiceHostName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type HealthcareFHIRResourceDeletedEventData.
func (h *HealthcareFHIRResourceDeletedEventData) 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", h, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "resourceFhirId":
			err = unpopulate(val, "FHIRResourceID", &h.FHIRResourceID)
			delete(rawMsg, key)
		case "resourceType":
			err = unpopulate(val, "FHIRResourceType", &h.FHIRResourceType)
			delete(rawMsg, key)
		case "resourceVersionId":
			err = unpopulate(val, "FHIRResourceVersionID", &h.FHIRResourceVersionID)
			delete(rawMsg, key)
		case "resourceFhirAccount":
			err = unpopulate(val, "FHIRServiceHostName", &h.FHIRServiceHostName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", h, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type HealthcareFHIRResourceUpdatedEventData.
func (h HealthcareFHIRResourceUpdatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "resourceFhirId", h.FHIRResourceID)
	populate(objectMap, "resourceType", h.FHIRResourceType)
	populate(objectMap, "resourceVersionId", h.FHIRResourceVersionID)
	populate(objectMap, "resourceFhirAccount", h.FHIRServiceHostName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type HealthcareFHIRResourceUpdatedEventData.
func (h *HealthcareFHIRResourceUpdatedEventData) 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", h, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "resourceFhirId":
			err = unpopulate(val, "FHIRResourceID", &h.FHIRResourceID)
			delete(rawMsg, key)
		case "resourceType":
			err = unpopulate(val, "FHIRResourceType", &h.FHIRResourceType)
			delete(rawMsg, key)
		case "resourceVersionId":
			err = unpopulate(val, "FHIRResourceVersionID", &h.FHIRResourceVersionID)
			delete(rawMsg, key)
		case "resourceFhirAccount":
			err = unpopulate(val, "FHIRServiceHostName", &h.FHIRServiceHostName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", h, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type IOTHubDeviceConnectedEventData.
func (i IOTHubDeviceConnectedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "deviceConnectionStateEventInfo", i.DeviceConnectionStateEventInfo)
	populate(objectMap, "deviceId", i.DeviceID)
	populate(objectMap, "hubName", i.HubName)
	populate(objectMap, "moduleId", i.ModuleID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type IOTHubDeviceConnectedEventData.
func (i *IOTHubDeviceConnectedEventData) 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)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "deviceConnectionStateEventInfo":
			err = unpopulate(val, "DeviceConnectionStateEventInfo", &i.DeviceConnectionStateEventInfo)
			delete(rawMsg, key)
		case "deviceId":
			err = unpopulate(val, "DeviceID", &i.DeviceID)
			delete(rawMsg, key)
		case "hubName":
			err = unpopulate(val, "HubName", &i.HubName)
			delete(rawMsg, key)
		case "moduleId":
			err = unpopulate(val, "ModuleID", &i.ModuleID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", i, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type IOTHubDeviceCreatedEventData.
func (i IOTHubDeviceCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "deviceId", i.DeviceID)
	populate(objectMap, "hubName", i.HubName)
	populate(objectMap, "twin", i.Twin)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type IOTHubDeviceCreatedEventData.
func (i *IOTHubDeviceCreatedEventData) 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)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "deviceId":
			err = unpopulate(val, "DeviceID", &i.DeviceID)
			delete(rawMsg, key)
		case "hubName":
			err = unpopulate(val, "HubName", &i.HubName)
			delete(rawMsg, key)
		case "twin":
			err = unpopulate(val, "Twin", &i.Twin)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", i, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type IOTHubDeviceDeletedEventData.
func (i IOTHubDeviceDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "deviceId", i.DeviceID)
	populate(objectMap, "hubName", i.HubName)
	populate(objectMap, "twin", i.Twin)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type IOTHubDeviceDeletedEventData.
func (i *IOTHubDeviceDeletedEventData) 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)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "deviceId":
			err = unpopulate(val, "DeviceID", &i.DeviceID)
			delete(rawMsg, key)
		case "hubName":
			err = unpopulate(val, "HubName", &i.HubName)
			delete(rawMsg, key)
		case "twin":
			err = unpopulate(val, "Twin", &i.Twin)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", i, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type IOTHubDeviceDisconnectedEventData.
func (i IOTHubDeviceDisconnectedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "deviceConnectionStateEventInfo", i.DeviceConnectionStateEventInfo)
	populate(objectMap, "deviceId", i.DeviceID)
	populate(objectMap, "hubName", i.HubName)
	populate(objectMap, "moduleId", i.ModuleID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type IOTHubDeviceDisconnectedEventData.
func (i *IOTHubDeviceDisconnectedEventData) 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)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "deviceConnectionStateEventInfo":
			err = unpopulate(val, "DeviceConnectionStateEventInfo", &i.DeviceConnectionStateEventInfo)
			delete(rawMsg, key)
		case "deviceId":
			err = unpopulate(val, "DeviceID", &i.DeviceID)
			delete(rawMsg, key)
		case "hubName":
			err = unpopulate(val, "HubName", &i.HubName)
			delete(rawMsg, key)
		case "moduleId":
			err = unpopulate(val, "ModuleID", &i.ModuleID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", i, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type IOTHubDeviceTelemetryEventData.
func (i IOTHubDeviceTelemetryEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "body", i.Body)
	populate(objectMap, "properties", i.Properties)
	populate(objectMap, "systemProperties", i.SystemProperties)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type IOTHubDeviceTelemetryEventData.
func (i *IOTHubDeviceTelemetryEventData) 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)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "body":
			err = unpopulate(val, "Body", &i.Body)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &i.Properties)
			delete(rawMsg, key)
		case "systemProperties":
			err = unpopulate(val, "SystemProperties", &i.SystemProperties)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", i, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type internalACSMessageChannelEventError.
func (i internalACSMessageChannelEventError) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "channelCode", i.ChannelCode)
	populate(objectMap, "channelMessage", i.ChannelMessage)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type internalACSMessageChannelEventError.
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)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "channelCode":
			err = unpopulate(val, "ChannelCode", &i.ChannelCode)
			delete(rawMsg, key)
		case "channelMessage":
			err = unpopulate(val, "ChannelMessage", &i.ChannelMessage)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", i, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type internalACSRouterCommunicationError.
func (i internalACSRouterCommunicationError) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "code", i.Code)
	populate(objectMap, "details", i.Details)
	populate(objectMap, "innererror", i.Innererror)
	populate(objectMap, "message", i.Message)
	populate(objectMap, "target", i.Target)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type internalACSRouterCommunicationError.
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)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "code":
			err = unpopulate(val, "Code", &i.Code)
			delete(rawMsg, key)
		case "details":
			err = unpopulate(val, "Details", &i.Details)
			delete(rawMsg, key)
		case "innererror":
			err = unpopulate(val, "Innererror", &i.Innererror)
			delete(rawMsg, key)
		case "message":
			err = unpopulate(val, "Message", &i.Message)
			delete(rawMsg, key)
		case "target":
			err = unpopulate(val, "Target", &i.Target)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", i, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type KeyVaultAccessPolicyChangedEventData.
func (k KeyVaultAccessPolicyChangedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "EXP", k.EXP)
	populate(objectMap, "Id", k.ID)
	populate(objectMap, "NBF", k.NBF)
	populate(objectMap, "ObjectName", k.ObjectName)
	populate(objectMap, "ObjectType", k.ObjectType)
	populate(objectMap, "VaultName", k.VaultName)
	populate(objectMap, "Version", k.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultAccessPolicyChangedEventData.
func (k *KeyVaultAccessPolicyChangedEventData) 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", k, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "EXP":
			err = unpopulate(val, "EXP", &k.EXP)
			delete(rawMsg, key)
		case "Id":
			err = unpopulate(val, "ID", &k.ID)
			delete(rawMsg, key)
		case "NBF":
			err = unpopulate(val, "NBF", &k.NBF)
			delete(rawMsg, key)
		case "ObjectName":
			err = unpopulate(val, "ObjectName", &k.ObjectName)
			delete(rawMsg, key)
		case "ObjectType":
			err = unpopulate(val, "ObjectType", &k.ObjectType)
			delete(rawMsg, key)
		case "VaultName":
			err = unpopulate(val, "VaultName", &k.VaultName)
			delete(rawMsg, key)
		case "Version":
			err = unpopulate(val, "Version", &k.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", k, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateExpiredEventData.
func (k KeyVaultCertificateExpiredEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "EXP", k.EXP)
	populate(objectMap, "Id", k.ID)
	populate(objectMap, "NBF", k.NBF)
	populate(objectMap, "ObjectName", k.ObjectName)
	populate(objectMap, "ObjectType", k.ObjectType)
	populate(objectMap, "VaultName", k.VaultName)
	populate(objectMap, "Version", k.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultCertificateExpiredEventData.
func (k *KeyVaultCertificateExpiredEventData) 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", k, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "EXP":
			err = unpopulate(val, "EXP", &k.EXP)
			delete(rawMsg, key)
		case "Id":
			err = unpopulate(val, "ID", &k.ID)
			delete(rawMsg, key)
		case "NBF":
			err = unpopulate(val, "NBF", &k.NBF)
			delete(rawMsg, key)
		case "ObjectName":
			err = unpopulate(val, "ObjectName", &k.ObjectName)
			delete(rawMsg, key)
		case "ObjectType":
			err = unpopulate(val, "ObjectType", &k.ObjectType)
			delete(rawMsg, key)
		case "VaultName":
			err = unpopulate(val, "VaultName", &k.VaultName)
			delete(rawMsg, key)
		case "Version":
			err = unpopulate(val, "Version", &k.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", k, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateNearExpiryEventData.
func (k KeyVaultCertificateNearExpiryEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "EXP", k.EXP)
	populate(objectMap, "Id", k.ID)
	populate(objectMap, "NBF", k.NBF)
	populate(objectMap, "ObjectName", k.ObjectName)
	populate(objectMap, "ObjectType", k.ObjectType)
	populate(objectMap, "VaultName", k.VaultName)
	populate(objectMap, "Version", k.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultCertificateNearExpiryEventData.
func (k *KeyVaultCertificateNearExpiryEventData) 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", k, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "EXP":
			err = unpopulate(val, "EXP", &k.EXP)
			delete(rawMsg, key)
		case "Id":
			err = unpopulate(val, "ID", &k.ID)
			delete(rawMsg, key)
		case "NBF":
			err = unpopulate(val, "NBF", &k.NBF)
			delete(rawMsg, key)
		case "ObjectName":
			err = unpopulate(val, "ObjectName", &k.ObjectName)
			delete(rawMsg, key)
		case "ObjectType":
			err = unpopulate(val, "ObjectType", &k.ObjectType)
			delete(rawMsg, key)
		case "VaultName":
			err = unpopulate(val, "VaultName", &k.VaultName)
			delete(rawMsg, key)
		case "Version":
			err = unpopulate(val, "Version", &k.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", k, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateNewVersionCreatedEventData.
func (k KeyVaultCertificateNewVersionCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "EXP", k.EXP)
	populate(objectMap, "Id", k.ID)
	populate(objectMap, "NBF", k.NBF)
	populate(objectMap, "ObjectName", k.ObjectName)
	populate(objectMap, "ObjectType", k.ObjectType)
	populate(objectMap, "VaultName", k.VaultName)
	populate(objectMap, "Version", k.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultCertificateNewVersionCreatedEventData.
func (k *KeyVaultCertificateNewVersionCreatedEventData) 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", k, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "EXP":
			err = unpopulate(val, "EXP", &k.EXP)
			delete(rawMsg, key)
		case "Id":
			err = unpopulate(val, "ID", &k.ID)
			delete(rawMsg, key)
		case "NBF":
			err = unpopulate(val, "NBF", &k.NBF)
			delete(rawMsg, key)
		case "ObjectName":
			err = unpopulate(val, "ObjectName", &k.ObjectName)
			delete(rawMsg, key)
		case "ObjectType":
			err = unpopulate(val, "ObjectType", &k.ObjectType)
			delete(rawMsg, key)
		case "VaultName":
			err = unpopulate(val, "VaultName", &k.VaultName)
			delete(rawMsg, key)
		case "Version":
			err = unpopulate(val, "Version", &k.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", k, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type KeyVaultKeyExpiredEventData.
func (k KeyVaultKeyExpiredEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "EXP", k.EXP)
	populate(objectMap, "Id", k.ID)
	populate(objectMap, "NBF", k.NBF)
	populate(objectMap, "ObjectName", k.ObjectName)
	populate(objectMap, "ObjectType", k.ObjectType)
	populate(objectMap, "VaultName", k.VaultName)
	populate(objectMap, "Version", k.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultKeyExpiredEventData.
func (k *KeyVaultKeyExpiredEventData) 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", k, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "EXP":
			err = unpopulate(val, "EXP", &k.EXP)
			delete(rawMsg, key)
		case "Id":
			err = unpopulate(val, "ID", &k.ID)
			delete(rawMsg, key)
		case "NBF":
			err = unpopulate(val, "NBF", &k.NBF)
			delete(rawMsg, key)
		case "ObjectName":
			err = unpopulate(val, "ObjectName", &k.ObjectName)
			delete(rawMsg, key)
		case "ObjectType":
			err = unpopulate(val, "ObjectType", &k.ObjectType)
			delete(rawMsg, key)
		case "VaultName":
			err = unpopulate(val, "VaultName", &k.VaultName)
			delete(rawMsg, key)
		case "Version":
			err = unpopulate(val, "Version", &k.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", k, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type KeyVaultKeyNearExpiryEventData.
func (k KeyVaultKeyNearExpiryEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "EXP", k.EXP)
	populate(objectMap, "Id", k.ID)
	populate(objectMap, "NBF", k.NBF)
	populate(objectMap, "ObjectName", k.ObjectName)
	populate(objectMap, "ObjectType", k.ObjectType)
	populate(objectMap, "VaultName", k.VaultName)
	populate(objectMap, "Version", k.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultKeyNearExpiryEventData.
func (k *KeyVaultKeyNearExpiryEventData) 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", k, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "EXP":
			err = unpopulate(val, "EXP", &k.EXP)
			delete(rawMsg, key)
		case "Id":
			err = unpopulate(val, "ID", &k.ID)
			delete(rawMsg, key)
		case "NBF":
			err = unpopulate(val, "NBF", &k.NBF)
			delete(rawMsg, key)
		case "ObjectName":
			err = unpopulate(val, "ObjectName", &k.ObjectName)
			delete(rawMsg, key)
		case "ObjectType":
			err = unpopulate(val, "ObjectType", &k.ObjectType)
			delete(rawMsg, key)
		case "VaultName":
			err = unpopulate(val, "VaultName", &k.VaultName)
			delete(rawMsg, key)
		case "Version":
			err = unpopulate(val, "Version", &k.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", k, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type KeyVaultKeyNewVersionCreatedEventData.
func (k KeyVaultKeyNewVersionCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "EXP", k.EXP)
	populate(objectMap, "Id", k.ID)
	populate(objectMap, "NBF", k.NBF)
	populate(objectMap, "ObjectName", k.ObjectName)
	populate(objectMap, "ObjectType", k.ObjectType)
	populate(objectMap, "VaultName", k.VaultName)
	populate(objectMap, "Version", k.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultKeyNewVersionCreatedEventData.
func (k *KeyVaultKeyNewVersionCreatedEventData) 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", k, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "EXP":
			err = unpopulate(val, "EXP", &k.EXP)
			delete(rawMsg, key)
		case "Id":
			err = unpopulate(val, "ID", &k.ID)
			delete(rawMsg, key)
		case "NBF":
			err = unpopulate(val, "NBF", &k.NBF)
			delete(rawMsg, key)
		case "ObjectName":
			err = unpopulate(val, "ObjectName", &k.ObjectName)
			delete(rawMsg, key)
		case "ObjectType":
			err = unpopulate(val, "ObjectType", &k.ObjectType)
			delete(rawMsg, key)
		case "VaultName":
			err = unpopulate(val, "VaultName", &k.VaultName)
			delete(rawMsg, key)
		case "Version":
			err = unpopulate(val, "Version", &k.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", k, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type KeyVaultSecretExpiredEventData.
func (k KeyVaultSecretExpiredEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "EXP", k.EXP)
	populate(objectMap, "Id", k.ID)
	populate(objectMap, "NBF", k.NBF)
	populate(objectMap, "ObjectName", k.ObjectName)
	populate(objectMap, "ObjectType", k.ObjectType)
	populate(objectMap, "VaultName", k.VaultName)
	populate(objectMap, "Version", k.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultSecretExpiredEventData.
func (k *KeyVaultSecretExpiredEventData) 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", k, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "EXP":
			err = unpopulate(val, "EXP", &k.EXP)
			delete(rawMsg, key)
		case "Id":
			err = unpopulate(val, "ID", &k.ID)
			delete(rawMsg, key)
		case "NBF":
			err = unpopulate(val, "NBF", &k.NBF)
			delete(rawMsg, key)
		case "ObjectName":
			err = unpopulate(val, "ObjectName", &k.ObjectName)
			delete(rawMsg, key)
		case "ObjectType":
			err = unpopulate(val, "ObjectType", &k.ObjectType)
			delete(rawMsg, key)
		case "VaultName":
			err = unpopulate(val, "VaultName", &k.VaultName)
			delete(rawMsg, key)
		case "Version":
			err = unpopulate(val, "Version", &k.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", k, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type KeyVaultSecretNearExpiryEventData.
func (k KeyVaultSecretNearExpiryEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "EXP", k.EXP)
	populate(objectMap, "Id", k.ID)
	populate(objectMap, "NBF", k.NBF)
	populate(objectMap, "ObjectName", k.ObjectName)
	populate(objectMap, "ObjectType", k.ObjectType)
	populate(objectMap, "VaultName", k.VaultName)
	populate(objectMap, "Version", k.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultSecretNearExpiryEventData.
func (k *KeyVaultSecretNearExpiryEventData) 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", k, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "EXP":
			err = unpopulate(val, "EXP", &k.EXP)
			delete(rawMsg, key)
		case "Id":
			err = unpopulate(val, "ID", &k.ID)
			delete(rawMsg, key)
		case "NBF":
			err = unpopulate(val, "NBF", &k.NBF)
			delete(rawMsg, key)
		case "ObjectName":
			err = unpopulate(val, "ObjectName", &k.ObjectName)
			delete(rawMsg, key)
		case "ObjectType":
			err = unpopulate(val, "ObjectType", &k.ObjectType)
			delete(rawMsg, key)
		case "VaultName":
			err = unpopulate(val, "VaultName", &k.VaultName)
			delete(rawMsg, key)
		case "Version":
			err = unpopulate(val, "Version", &k.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", k, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type KeyVaultSecretNewVersionCreatedEventData.
func (k KeyVaultSecretNewVersionCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "EXP", k.EXP)
	populate(objectMap, "Id", k.ID)
	populate(objectMap, "NBF", k.NBF)
	populate(objectMap, "ObjectName", k.ObjectName)
	populate(objectMap, "ObjectType", k.ObjectType)
	populate(objectMap, "VaultName", k.VaultName)
	populate(objectMap, "Version", k.Version)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultSecretNewVersionCreatedEventData.
func (k *KeyVaultSecretNewVersionCreatedEventData) 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", k, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "EXP":
			err = unpopulate(val, "EXP", &k.EXP)
			delete(rawMsg, key)
		case "Id":
			err = unpopulate(val, "ID", &k.ID)
			delete(rawMsg, key)
		case "NBF":
			err = unpopulate(val, "NBF", &k.NBF)
			delete(rawMsg, key)
		case "ObjectName":
			err = unpopulate(val, "ObjectName", &k.ObjectName)
			delete(rawMsg, key)
		case "ObjectType":
			err = unpopulate(val, "ObjectType", &k.ObjectType)
			delete(rawMsg, key)
		case "VaultName":
			err = unpopulate(val, "VaultName", &k.VaultName)
			delete(rawMsg, key)
		case "Version":
			err = unpopulate(val, "Version", &k.Version)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", k, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type LifecycleHookEventsEventData.
func (l LifecycleHookEventsEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", l.ID)
	populate(objectMap, "name", l.Name)
	populate(objectMap, "operationalInfo", l.OperationalInfo)
	populate(objectMap, "properties", l.Properties)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type LifecycleHookEventsEventData.
func (l *LifecycleHookEventsEventData) 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", l, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "id":
			err = unpopulate(val, "ID", &l.ID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &l.Name)
			delete(rawMsg, key)
		case "operationalInfo":
			err = unpopulate(val, "OperationalInfo", &l.OperationalInfo)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &l.Properties)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", l, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type MachineLearningServicesDatasetDriftDetectedEventData.
func (m MachineLearningServicesDatasetDriftDetectedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "baseDatasetId", m.BaseDatasetID)
	populate(objectMap, "dataDriftId", m.DataDriftID)
	populate(objectMap, "dataDriftName", m.DataDriftName)
	populate(objectMap, "driftCoefficient", m.DriftCoefficient)
	populateTime[datetime.RFC3339](objectMap, "endTime", m.EndTime)
	populate(objectMap, "runId", m.RunID)
	populateTime[datetime.RFC3339](objectMap, "startTime", m.StartTime)
	populate(objectMap, "targetDatasetId", m.TargetDatasetID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type MachineLearningServicesDatasetDriftDetectedEventData.
func (m *MachineLearningServicesDatasetDriftDetectedEventData) 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 "baseDatasetId":
			err = unpopulate(val, "BaseDatasetID", &m.BaseDatasetID)
			delete(rawMsg, key)
		case "dataDriftId":
			err = unpopulate(val, "DataDriftID", &m.DataDriftID)
			delete(rawMsg, key)
		case "dataDriftName":
			err = unpopulate(val, "DataDriftName", &m.DataDriftName)
			delete(rawMsg, key)
		case "driftCoefficient":
			err = unpopulate(val, "DriftCoefficient", &m.DriftCoefficient)
			delete(rawMsg, key)
		case "endTime":
			err = unpopulateTime[datetime.RFC3339](val, "EndTime", &m.EndTime)
			delete(rawMsg, key)
		case "runId":
			err = unpopulate(val, "RunID", &m.RunID)
			delete(rawMsg, key)
		case "startTime":
			err = unpopulateTime[datetime.RFC3339](val, "StartTime", &m.StartTime)
			delete(rawMsg, key)
		case "targetDatasetId":
			err = unpopulate(val, "TargetDatasetID", &m.TargetDatasetID)
			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 MachineLearningServicesModelDeployedEventData.
func (m MachineLearningServicesModelDeployedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "modelIds", m.ModelIDs)
	populate(objectMap, "serviceComputeType", m.ServiceComputeType)
	populate(objectMap, "serviceName", m.ServiceName)
	populate(objectMap, "serviceProperties", m.ServiceProperties)
	populate(objectMap, "serviceTags", m.ServiceTags)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type MachineLearningServicesModelDeployedEventData.
func (m *MachineLearningServicesModelDeployedEventData) 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 "modelIds":
			err = unpopulate(val, "ModelIDs", &m.ModelIDs)
			delete(rawMsg, key)
		case "serviceComputeType":
			err = unpopulate(val, "ServiceComputeType", &m.ServiceComputeType)
			delete(rawMsg, key)
		case "serviceName":
			err = unpopulate(val, "ServiceName", &m.ServiceName)
			delete(rawMsg, key)
		case "serviceProperties":
			err = unpopulate(val, "ServiceProperties", &m.ServiceProperties)
			delete(rawMsg, key)
		case "serviceTags":
			err = unpopulate(val, "ServiceTags", &m.ServiceTags)
			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 MachineLearningServicesModelRegisteredEventData.
func (m MachineLearningServicesModelRegisteredEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "modelName", m.ModelName)
	populate(objectMap, "modelProperties", m.ModelProperties)
	populate(objectMap, "modelTags", m.ModelTags)
	populate(objectMap, "modelVersion", m.ModelVersion)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type MachineLearningServicesModelRegisteredEventData.
func (m *MachineLearningServicesModelRegisteredEventData) 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 "modelName":
			err = unpopulate(val, "ModelName", &m.ModelName)
			delete(rawMsg, key)
		case "modelProperties":
			err = unpopulate(val, "ModelProperties", &m.ModelProperties)
			delete(rawMsg, key)
		case "modelTags":
			err = unpopulate(val, "ModelTags", &m.ModelTags)
			delete(rawMsg, key)
		case "modelVersion":
			err = unpopulate(val, "ModelVersion", &m.ModelVersion)
			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 MachineLearningServicesRunCompletedEventData.
func (m MachineLearningServicesRunCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "experimentId", m.ExperimentID)
	populate(objectMap, "experimentName", m.ExperimentName)
	populate(objectMap, "runId", m.RunID)
	populate(objectMap, "runProperties", m.RunProperties)
	populate(objectMap, "runTags", m.RunTags)
	populate(objectMap, "runType", m.RunType)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type MachineLearningServicesRunCompletedEventData.
func (m *MachineLearningServicesRunCompletedEventData) 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 "experimentId":
			err = unpopulate(val, "ExperimentID", &m.ExperimentID)
			delete(rawMsg, key)
		case "experimentName":
			err = unpopulate(val, "ExperimentName", &m.ExperimentName)
			delete(rawMsg, key)
		case "runId":
			err = unpopulate(val, "RunID", &m.RunID)
			delete(rawMsg, key)
		case "runProperties":
			err = unpopulate(val, "RunProperties", &m.RunProperties)
			delete(rawMsg, key)
		case "runTags":
			err = unpopulate(val, "RunTags", &m.RunTags)
			delete(rawMsg, key)
		case "runType":
			err = unpopulate(val, "RunType", &m.RunType)
			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 MachineLearningServicesRunStatusChangedEventData.
func (m MachineLearningServicesRunStatusChangedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "experimentId", m.ExperimentID)
	populate(objectMap, "experimentName", m.ExperimentName)
	populate(objectMap, "runId", m.RunID)
	populate(objectMap, "runProperties", m.RunProperties)
	populate(objectMap, "runStatus", m.RunStatus)
	populate(objectMap, "runTags", m.RunTags)
	populate(objectMap, "runType", m.RunType)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type MachineLearningServicesRunStatusChangedEventData.
func (m *MachineLearningServicesRunStatusChangedEventData) 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 "experimentId":
			err = unpopulate(val, "ExperimentID", &m.ExperimentID)
			delete(rawMsg, key)
		case "experimentName":
			err = unpopulate(val, "ExperimentName", &m.ExperimentName)
			delete(rawMsg, key)
		case "runId":
			err = unpopulate(val, "RunID", &m.RunID)
			delete(rawMsg, key)
		case "runProperties":
			err = unpopulate(val, "RunProperties", &m.RunProperties)
			delete(rawMsg, key)
		case "runStatus":
			err = unpopulate(val, "RunStatus", &m.RunStatus)
			delete(rawMsg, key)
		case "runTags":
			err = unpopulate(val, "RunTags", &m.RunTags)
			delete(rawMsg, key)
		case "runType":
			err = unpopulate(val, "RunType", &m.RunType)
			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 MapsGeofenceEnteredEventData.
func (m MapsGeofenceEnteredEventData) 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 MapsGeofenceEnteredEventData.
func (m *MapsGeofenceEnteredEventData) 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)
	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 MapsGeofenceExitedEventData.
func (m *MapsGeofenceExitedEventData) 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 MapsGeofenceGeometry.
func (m MapsGeofenceGeometry) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "deviceId", m.DeviceID)
	populate(objectMap, "distance", m.Distance)
	populate(objectMap, "geometryId", m.GeometryID)
	populate(objectMap, "nearestLat", m.NearestLat)
	populate(objectMap, "nearestLon", m.NearestLon)
	populate(objectMap, "udId", m.UdID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type MapsGeofenceGeometry.
func (m *MapsGeofenceGeometry) 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 "deviceId":
			err = unpopulate(val, "DeviceID", &m.DeviceID)
			delete(rawMsg, key)
		case "distance":
			err = unpopulate(val, "Distance", &m.Distance)
			delete(rawMsg, key)
		case "geometryId":
			err = unpopulate(val, "GeometryID", &m.GeometryID)
			delete(rawMsg, key)
		case "nearestLat":
			err = unpopulate(val, "NearestLat", &m.NearestLat)
			delete(rawMsg, key)
		case "nearestLon":
			err = unpopulate(val, "NearestLon", &m.NearestLon)
			delete(rawMsg, key)
		case "udId":
			err = unpopulate(val, "UdID", &m.UdID)
			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 MapsGeofenceResultEventData.
func (m MapsGeofenceResultEventData) 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 MapsGeofenceResultEventData.
func (m *MapsGeofenceResultEventData) 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 MicrosoftTeamsAppIdentifierModel.
func (m MicrosoftTeamsAppIdentifierModel) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "appId", m.AppID)
	populate(objectMap, "cloud", m.Cloud)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type MicrosoftTeamsAppIdentifierModel.
func (m *MicrosoftTeamsAppIdentifierModel) 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 "appId":
			err = unpopulate(val, "AppID", &m.AppID)
			delete(rawMsg, key)
		case "cloud":
			err = unpopulate(val, "Cloud", &m.Cloud)
			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 MicrosoftTeamsUserIdentifierModel.
func (m MicrosoftTeamsUserIdentifierModel) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "cloud", m.Cloud)
	populate(objectMap, "isAnonymous", m.IsAnonymous)
	populate(objectMap, "userId", m.UserID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type MicrosoftTeamsUserIdentifierModel.
func (m *MicrosoftTeamsUserIdentifierModel) 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 "cloud":
			err = unpopulate(val, "Cloud", &m.Cloud)
			delete(rawMsg, key)
		case "isAnonymous":
			err = unpopulate(val, "IsAnonymous", &m.IsAnonymous)
			delete(rawMsg, key)
		case "userId":
			err = unpopulate(val, "UserID", &m.UserID)
			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 OperationalInfo.
func (o OperationalInfo) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "activityId", o.ActivityID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type OperationalInfo.
func (o *OperationalInfo) 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", o, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "activityId":
			err = unpopulate(val, "ActivityID", &o.ActivityID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", o, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type PhoneNumberIdentifierModel.
func (p PhoneNumberIdentifierModel) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "value", p.Value)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type PhoneNumberIdentifierModel.
func (p *PhoneNumberIdentifierModel) 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", p, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "value":
			err = unpopulate(val, "Value", &p.Value)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", p, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type PolicyInsightsPolicyStateChangedEventData.
func (p PolicyInsightsPolicyStateChangedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "complianceReasonCode", p.ComplianceReasonCode)
	populate(objectMap, "complianceState", p.ComplianceState)
	populate(objectMap, "policyAssignmentId", p.PolicyAssignmentID)
	populate(objectMap, "policyDefinitionId", p.PolicyDefinitionID)
	populate(objectMap, "policyDefinitionReferenceId", p.PolicyDefinitionReferenceID)
	populate(objectMap, "subscriptionId", p.SubscriptionID)
	populateTime[datetime.RFC3339](objectMap, "timestamp", p.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyInsightsPolicyStateChangedEventData.
func (p *PolicyInsightsPolicyStateChangedEventData) 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", p, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "complianceReasonCode":
			err = unpopulate(val, "ComplianceReasonCode", &p.ComplianceReasonCode)
			delete(rawMsg, key)
		case "complianceState":
			err = unpopulate(val, "ComplianceState", &p.ComplianceState)
			delete(rawMsg, key)
		case "policyAssignmentId":
			err = unpopulate(val, "PolicyAssignmentID", &p.PolicyAssignmentID)
			delete(rawMsg, key)
		case "policyDefinitionId":
			err = unpopulate(val, "PolicyDefinitionID", &p.PolicyDefinitionID)
			delete(rawMsg, key)
		case "policyDefinitionReferenceId":
			err = unpopulate(val, "PolicyDefinitionReferenceID", &p.PolicyDefinitionReferenceID)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &p.SubscriptionID)
			delete(rawMsg, key)
		case "timestamp":
			err = unpopulateTime[datetime.RFC3339](val, "Timestamp", &p.Timestamp)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", p, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type PolicyInsightsPolicyStateCreatedEventData.
func (p PolicyInsightsPolicyStateCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "complianceReasonCode", p.ComplianceReasonCode)
	populate(objectMap, "complianceState", p.ComplianceState)
	populate(objectMap, "policyAssignmentId", p.PolicyAssignmentID)
	populate(objectMap, "policyDefinitionId", p.PolicyDefinitionID)
	populate(objectMap, "policyDefinitionReferenceId", p.PolicyDefinitionReferenceID)
	populate(objectMap, "subscriptionId", p.SubscriptionID)
	populateTime[datetime.RFC3339](objectMap, "timestamp", p.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyInsightsPolicyStateCreatedEventData.
func (p *PolicyInsightsPolicyStateCreatedEventData) 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", p, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "complianceReasonCode":
			err = unpopulate(val, "ComplianceReasonCode", &p.ComplianceReasonCode)
			delete(rawMsg, key)
		case "complianceState":
			err = unpopulate(val, "ComplianceState", &p.ComplianceState)
			delete(rawMsg, key)
		case "policyAssignmentId":
			err = unpopulate(val, "PolicyAssignmentID", &p.PolicyAssignmentID)
			delete(rawMsg, key)
		case "policyDefinitionId":
			err = unpopulate(val, "PolicyDefinitionID", &p.PolicyDefinitionID)
			delete(rawMsg, key)
		case "policyDefinitionReferenceId":
			err = unpopulate(val, "PolicyDefinitionReferenceID", &p.PolicyDefinitionReferenceID)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &p.SubscriptionID)
			delete(rawMsg, key)
		case "timestamp":
			err = unpopulateTime[datetime.RFC3339](val, "Timestamp", &p.Timestamp)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", p, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type PolicyInsightsPolicyStateDeletedEventData.
func (p PolicyInsightsPolicyStateDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "complianceReasonCode", p.ComplianceReasonCode)
	populate(objectMap, "complianceState", p.ComplianceState)
	populate(objectMap, "policyAssignmentId", p.PolicyAssignmentID)
	populate(objectMap, "policyDefinitionId", p.PolicyDefinitionID)
	populate(objectMap, "policyDefinitionReferenceId", p.PolicyDefinitionReferenceID)
	populate(objectMap, "subscriptionId", p.SubscriptionID)
	populateTime[datetime.RFC3339](objectMap, "timestamp", p.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyInsightsPolicyStateDeletedEventData.
func (p *PolicyInsightsPolicyStateDeletedEventData) 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", p, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "complianceReasonCode":
			err = unpopulate(val, "ComplianceReasonCode", &p.ComplianceReasonCode)
			delete(rawMsg, key)
		case "complianceState":
			err = unpopulate(val, "ComplianceState", &p.ComplianceState)
			delete(rawMsg, key)
		case "policyAssignmentId":
			err = unpopulate(val, "PolicyAssignmentID", &p.PolicyAssignmentID)
			delete(rawMsg, key)
		case "policyDefinitionId":
			err = unpopulate(val, "PolicyDefinitionID", &p.PolicyDefinitionID)
			delete(rawMsg, key)
		case "policyDefinitionReferenceId":
			err = unpopulate(val, "PolicyDefinitionReferenceID", &p.PolicyDefinitionReferenceID)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &p.SubscriptionID)
			delete(rawMsg, key)
		case "timestamp":
			err = unpopulateTime[datetime.RFC3339](val, "Timestamp", &p.Timestamp)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", p, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type RedisExportRDBCompletedEventData.
func (r RedisExportRDBCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "name", r.Name)
	populate(objectMap, "status", r.Status)
	populateTime[datetime.RFC3339](objectMap, "timestamp", r.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type RedisExportRDBCompletedEventData.
func (r *RedisExportRDBCompletedEventData) 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 "name":
			err = unpopulate(val, "Name", &r.Name)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "timestamp":
			err = unpopulateTime[datetime.RFC3339](val, "Timestamp", &r.Timestamp)
			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 RedisImportRDBCompletedEventData.
func (r RedisImportRDBCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "name", r.Name)
	populate(objectMap, "status", r.Status)
	populateTime[datetime.RFC3339](objectMap, "timestamp", r.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type RedisImportRDBCompletedEventData.
func (r *RedisImportRDBCompletedEventData) 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 "name":
			err = unpopulate(val, "Name", &r.Name)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "timestamp":
			err = unpopulateTime[datetime.RFC3339](val, "Timestamp", &r.Timestamp)
			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 RedisPatchingCompletedEventData.
func (r RedisPatchingCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "name", r.Name)
	populate(objectMap, "status", r.Status)
	populateTime[datetime.RFC3339](objectMap, "timestamp", r.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type RedisPatchingCompletedEventData.
func (r *RedisPatchingCompletedEventData) 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 "name":
			err = unpopulate(val, "Name", &r.Name)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "timestamp":
			err = unpopulateTime[datetime.RFC3339](val, "Timestamp", &r.Timestamp)
			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 RedisScalingCompletedEventData.
func (r RedisScalingCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "name", r.Name)
	populate(objectMap, "status", r.Status)
	populateTime[datetime.RFC3339](objectMap, "timestamp", r.Timestamp)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type RedisScalingCompletedEventData.
func (r *RedisScalingCompletedEventData) 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 "name":
			err = unpopulate(val, "Name", &r.Name)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "timestamp":
			err = unpopulateTime[datetime.RFC3339](val, "Timestamp", &r.Timestamp)
			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 ResourceActionCancelEventData.
func (r ResourceActionCancelEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorization", r.Authorization)
	populate(objectMap, "claims", r.Claims)
	populate(objectMap, "correlationId", r.CorrelationID)
	populate(objectMap, "httpRequest", r.HTTPRequest)
	populate(objectMap, "operationName", r.OperationName)
	populate(objectMap, "resourceGroup", r.ResourceGroup)
	populate(objectMap, "resourceProvider", r.ResourceProvider)
	populate(objectMap, "resourceUri", r.ResourceURI)
	populate(objectMap, "status", r.Status)
	populate(objectMap, "subscriptionId", r.SubscriptionID)
	populate(objectMap, "tenantId", r.TenantID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceActionCancelEventData.
func (r *ResourceActionCancelEventData) 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 "authorization":
			err = unpopulate(val, "Authorization", &r.Authorization)
			delete(rawMsg, key)
		case "claims":
			err = unpopulate(val, "Claims", &r.Claims)
			delete(rawMsg, key)
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &r.CorrelationID)
			delete(rawMsg, key)
		case "httpRequest":
			err = unpopulate(val, "HTTPRequest", &r.HTTPRequest)
			delete(rawMsg, key)
		case "operationName":
			err = unpopulate(val, "OperationName", &r.OperationName)
			delete(rawMsg, key)
		case "resourceGroup":
			err = unpopulate(val, "ResourceGroup", &r.ResourceGroup)
			delete(rawMsg, key)
		case "resourceProvider":
			err = unpopulate(val, "ResourceProvider", &r.ResourceProvider)
			delete(rawMsg, key)
		case "resourceUri":
			err = unpopulate(val, "ResourceURI", &r.ResourceURI)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &r.SubscriptionID)
			delete(rawMsg, key)
		case "tenantId":
			err = unpopulate(val, "TenantID", &r.TenantID)
			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 ResourceActionFailureEventData.
func (r ResourceActionFailureEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorization", r.Authorization)
	populate(objectMap, "claims", r.Claims)
	populate(objectMap, "correlationId", r.CorrelationID)
	populate(objectMap, "httpRequest", r.HTTPRequest)
	populate(objectMap, "operationName", r.OperationName)
	populate(objectMap, "resourceGroup", r.ResourceGroup)
	populate(objectMap, "resourceProvider", r.ResourceProvider)
	populate(objectMap, "resourceUri", r.ResourceURI)
	populate(objectMap, "status", r.Status)
	populate(objectMap, "subscriptionId", r.SubscriptionID)
	populate(objectMap, "tenantId", r.TenantID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceActionFailureEventData.
func (r *ResourceActionFailureEventData) 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 "authorization":
			err = unpopulate(val, "Authorization", &r.Authorization)
			delete(rawMsg, key)
		case "claims":
			err = unpopulate(val, "Claims", &r.Claims)
			delete(rawMsg, key)
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &r.CorrelationID)
			delete(rawMsg, key)
		case "httpRequest":
			err = unpopulate(val, "HTTPRequest", &r.HTTPRequest)
			delete(rawMsg, key)
		case "operationName":
			err = unpopulate(val, "OperationName", &r.OperationName)
			delete(rawMsg, key)
		case "resourceGroup":
			err = unpopulate(val, "ResourceGroup", &r.ResourceGroup)
			delete(rawMsg, key)
		case "resourceProvider":
			err = unpopulate(val, "ResourceProvider", &r.ResourceProvider)
			delete(rawMsg, key)
		case "resourceUri":
			err = unpopulate(val, "ResourceURI", &r.ResourceURI)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &r.SubscriptionID)
			delete(rawMsg, key)
		case "tenantId":
			err = unpopulate(val, "TenantID", &r.TenantID)
			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 ResourceActionSuccessEventData.
func (r ResourceActionSuccessEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorization", r.Authorization)
	populate(objectMap, "claims", r.Claims)
	populate(objectMap, "correlationId", r.CorrelationID)
	populate(objectMap, "httpRequest", r.HTTPRequest)
	populate(objectMap, "operationName", r.OperationName)
	populate(objectMap, "resourceGroup", r.ResourceGroup)
	populate(objectMap, "resourceProvider", r.ResourceProvider)
	populate(objectMap, "resourceUri", r.ResourceURI)
	populate(objectMap, "status", r.Status)
	populate(objectMap, "subscriptionId", r.SubscriptionID)
	populate(objectMap, "tenantId", r.TenantID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceActionSuccessEventData.
func (r *ResourceActionSuccessEventData) 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 "authorization":
			err = unpopulate(val, "Authorization", &r.Authorization)
			delete(rawMsg, key)
		case "claims":
			err = unpopulate(val, "Claims", &r.Claims)
			delete(rawMsg, key)
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &r.CorrelationID)
			delete(rawMsg, key)
		case "httpRequest":
			err = unpopulate(val, "HTTPRequest", &r.HTTPRequest)
			delete(rawMsg, key)
		case "operationName":
			err = unpopulate(val, "OperationName", &r.OperationName)
			delete(rawMsg, key)
		case "resourceGroup":
			err = unpopulate(val, "ResourceGroup", &r.ResourceGroup)
			delete(rawMsg, key)
		case "resourceProvider":
			err = unpopulate(val, "ResourceProvider", &r.ResourceProvider)
			delete(rawMsg, key)
		case "resourceUri":
			err = unpopulate(val, "ResourceURI", &r.ResourceURI)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &r.SubscriptionID)
			delete(rawMsg, key)
		case "tenantId":
			err = unpopulate(val, "TenantID", &r.TenantID)
			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 ResourceAuthorization.
func (r ResourceAuthorization) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "action", r.Action)
	populate(objectMap, "evidence", r.Evidence)
	populate(objectMap, "scope", r.Scope)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAuthorization.
func (r *ResourceAuthorization) 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 "action":
			err = unpopulate(val, "Action", &r.Action)
			delete(rawMsg, key)
		case "evidence":
			err = unpopulate(val, "Evidence", &r.Evidence)
			delete(rawMsg, key)
		case "scope":
			err = unpopulate(val, "Scope", &r.Scope)
			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 ResourceDeleteCancelEventData.
func (r ResourceDeleteCancelEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorization", r.Authorization)
	populate(objectMap, "claims", r.Claims)
	populate(objectMap, "correlationId", r.CorrelationID)
	populate(objectMap, "httpRequest", r.HTTPRequest)
	populate(objectMap, "operationName", r.OperationName)
	populate(objectMap, "resourceGroup", r.ResourceGroup)
	populate(objectMap, "resourceProvider", r.ResourceProvider)
	populate(objectMap, "resourceUri", r.ResourceURI)
	populate(objectMap, "status", r.Status)
	populate(objectMap, "subscriptionId", r.SubscriptionID)
	populate(objectMap, "tenantId", r.TenantID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceDeleteCancelEventData.
func (r *ResourceDeleteCancelEventData) 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 "authorization":
			err = unpopulate(val, "Authorization", &r.Authorization)
			delete(rawMsg, key)
		case "claims":
			err = unpopulate(val, "Claims", &r.Claims)
			delete(rawMsg, key)
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &r.CorrelationID)
			delete(rawMsg, key)
		case "httpRequest":
			err = unpopulate(val, "HTTPRequest", &r.HTTPRequest)
			delete(rawMsg, key)
		case "operationName":
			err = unpopulate(val, "OperationName", &r.OperationName)
			delete(rawMsg, key)
		case "resourceGroup":
			err = unpopulate(val, "ResourceGroup", &r.ResourceGroup)
			delete(rawMsg, key)
		case "resourceProvider":
			err = unpopulate(val, "ResourceProvider", &r.ResourceProvider)
			delete(rawMsg, key)
		case "resourceUri":
			err = unpopulate(val, "ResourceURI", &r.ResourceURI)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &r.SubscriptionID)
			delete(rawMsg, key)
		case "tenantId":
			err = unpopulate(val, "TenantID", &r.TenantID)
			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 ResourceDeleteFailureEventData.
func (r ResourceDeleteFailureEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorization", r.Authorization)
	populate(objectMap, "claims", r.Claims)
	populate(objectMap, "correlationId", r.CorrelationID)
	populate(objectMap, "httpRequest", r.HTTPRequest)
	populate(objectMap, "operationName", r.OperationName)
	populate(objectMap, "resourceGroup", r.ResourceGroup)
	populate(objectMap, "resourceProvider", r.ResourceProvider)
	populate(objectMap, "resourceUri", r.ResourceURI)
	populate(objectMap, "status", r.Status)
	populate(objectMap, "subscriptionId", r.SubscriptionID)
	populate(objectMap, "tenantId", r.TenantID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceDeleteFailureEventData.
func (r *ResourceDeleteFailureEventData) 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 "authorization":
			err = unpopulate(val, "Authorization", &r.Authorization)
			delete(rawMsg, key)
		case "claims":
			err = unpopulate(val, "Claims", &r.Claims)
			delete(rawMsg, key)
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &r.CorrelationID)
			delete(rawMsg, key)
		case "httpRequest":
			err = unpopulate(val, "HTTPRequest", &r.HTTPRequest)
			delete(rawMsg, key)
		case "operationName":
			err = unpopulate(val, "OperationName", &r.OperationName)
			delete(rawMsg, key)
		case "resourceGroup":
			err = unpopulate(val, "ResourceGroup", &r.ResourceGroup)
			delete(rawMsg, key)
		case "resourceProvider":
			err = unpopulate(val, "ResourceProvider", &r.ResourceProvider)
			delete(rawMsg, key)
		case "resourceUri":
			err = unpopulate(val, "ResourceURI", &r.ResourceURI)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &r.SubscriptionID)
			delete(rawMsg, key)
		case "tenantId":
			err = unpopulate(val, "TenantID", &r.TenantID)
			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 ResourceDeleteSuccessEventData.
func (r ResourceDeleteSuccessEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorization", r.Authorization)
	populate(objectMap, "claims", r.Claims)
	populate(objectMap, "correlationId", r.CorrelationID)
	populate(objectMap, "httpRequest", r.HTTPRequest)
	populate(objectMap, "operationName", r.OperationName)
	populate(objectMap, "resourceGroup", r.ResourceGroup)
	populate(objectMap, "resourceProvider", r.ResourceProvider)
	populate(objectMap, "resourceUri", r.ResourceURI)
	populate(objectMap, "status", r.Status)
	populate(objectMap, "subscriptionId", r.SubscriptionID)
	populate(objectMap, "tenantId", r.TenantID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceDeleteSuccessEventData.
func (r *ResourceDeleteSuccessEventData) 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 "authorization":
			err = unpopulate(val, "Authorization", &r.Authorization)
			delete(rawMsg, key)
		case "claims":
			err = unpopulate(val, "Claims", &r.Claims)
			delete(rawMsg, key)
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &r.CorrelationID)
			delete(rawMsg, key)
		case "httpRequest":
			err = unpopulate(val, "HTTPRequest", &r.HTTPRequest)
			delete(rawMsg, key)
		case "operationName":
			err = unpopulate(val, "OperationName", &r.OperationName)
			delete(rawMsg, key)
		case "resourceGroup":
			err = unpopulate(val, "ResourceGroup", &r.ResourceGroup)
			delete(rawMsg, key)
		case "resourceProvider":
			err = unpopulate(val, "ResourceProvider", &r.ResourceProvider)
			delete(rawMsg, key)
		case "resourceUri":
			err = unpopulate(val, "ResourceURI", &r.ResourceURI)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &r.SubscriptionID)
			delete(rawMsg, key)
		case "tenantId":
			err = unpopulate(val, "TenantID", &r.TenantID)
			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 ResourceHTTPRequest.
func (r ResourceHTTPRequest) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "clientIpAddress", r.ClientIPAddress)
	populate(objectMap, "clientRequestId", r.ClientRequestID)
	populate(objectMap, "method", r.Method)
	populate(objectMap, "url", r.URL)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceHTTPRequest.
func (r *ResourceHTTPRequest) 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 "clientIpAddress":
			err = unpopulate(val, "ClientIPAddress", &r.ClientIPAddress)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &r.ClientRequestID)
			delete(rawMsg, key)
		case "method":
			err = unpopulate(val, "Method", &r.Method)
			delete(rawMsg, key)
		case "url":
			err = unpopulate(val, "URL", &r.URL)
			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 ResourceNotificationsContainerServiceEventResourcesScheduledEventData.
func (r ResourceNotificationsContainerServiceEventResourcesScheduledEventData) 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 ResourceNotificationsContainerServiceEventResourcesScheduledEventData.
func (r *ResourceNotificationsContainerServiceEventResourcesScheduledEventData) 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 ResourceNotificationsHealthResourcesAnnotatedEventData.
func (r ResourceNotificationsHealthResourcesAnnotatedEventData) 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 ResourceNotificationsHealthResourcesAnnotatedEventData.
func (r *ResourceNotificationsHealthResourcesAnnotatedEventData) 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 ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.
func (r ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData) 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 ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.
func (r *ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData) 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 ResourceNotificationsOperationalDetails.
func (r ResourceNotificationsOperationalDetails) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "resourceEventTime", r.ResourceEventTime)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNotificationsOperationalDetails.
func (r *ResourceNotificationsOperationalDetails) 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 "resourceEventTime":
			err = unpopulateTime[datetime.RFC3339](val, "ResourceEventTime", &r.ResourceEventTime)
			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 ResourceNotificationsResourceDeletedDetails.
func (r ResourceNotificationsResourceDeletedDetails) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", r.ID)
	populate(objectMap, "name", r.Name)
	populate(objectMap, "type", r.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNotificationsResourceDeletedDetails.
func (r *ResourceNotificationsResourceDeletedDetails) 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 "id":
			err = unpopulate(val, "ID", &r.ID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &r.Name)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &r.Type)
			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)
	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 ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.
func (r *ResourceNotificationsResourceManagementCreatedOrUpdatedEventData) 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 ResourceNotificationsResourceManagementDeletedEventData.
func (r ResourceNotificationsResourceManagementDeletedEventData) 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 ResourceNotificationsResourceManagementDeletedEventData.
func (r *ResourceNotificationsResourceManagementDeletedEventData) 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 ResourceNotificationsResourceUpdatedDetails.
func (r ResourceNotificationsResourceUpdatedDetails) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "id", r.ID)
	populate(objectMap, "location", r.Location)
	populate(objectMap, "name", r.Name)
	populate(objectMap, "properties", r.Properties)
	populate(objectMap, "tags", r.Tags)
	populate(objectMap, "type", r.Type)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNotificationsResourceUpdatedDetails.
func (r *ResourceNotificationsResourceUpdatedDetails) 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 "id":
			err = unpopulate(val, "ID", &r.ID)
			delete(rawMsg, key)
		case "location":
			err = unpopulate(val, "Location", &r.Location)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &r.Name)
			delete(rawMsg, key)
		case "properties":
			err = unpopulate(val, "Properties", &r.Properties)
			delete(rawMsg, key)
		case "tags":
			err = unpopulate(val, "Tags", &r.Tags)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &r.Type)
			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)
	populate(objectMap, "authorization", r.Authorization)
	populate(objectMap, "claims", r.Claims)
	populate(objectMap, "correlationId", r.CorrelationID)
	populate(objectMap, "httpRequest", r.HTTPRequest)
	populate(objectMap, "operationName", r.OperationName)
	populate(objectMap, "resourceGroup", r.ResourceGroup)
	populate(objectMap, "resourceProvider", r.ResourceProvider)
	populate(objectMap, "resourceUri", r.ResourceURI)
	populate(objectMap, "status", r.Status)
	populate(objectMap, "subscriptionId", r.SubscriptionID)
	populate(objectMap, "tenantId", r.TenantID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceWriteCancelEventData.
func (r *ResourceWriteCancelEventData) 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 "authorization":
			err = unpopulate(val, "Authorization", &r.Authorization)
			delete(rawMsg, key)
		case "claims":
			err = unpopulate(val, "Claims", &r.Claims)
			delete(rawMsg, key)
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &r.CorrelationID)
			delete(rawMsg, key)
		case "httpRequest":
			err = unpopulate(val, "HTTPRequest", &r.HTTPRequest)
			delete(rawMsg, key)
		case "operationName":
			err = unpopulate(val, "OperationName", &r.OperationName)
			delete(rawMsg, key)
		case "resourceGroup":
			err = unpopulate(val, "ResourceGroup", &r.ResourceGroup)
			delete(rawMsg, key)
		case "resourceProvider":
			err = unpopulate(val, "ResourceProvider", &r.ResourceProvider)
			delete(rawMsg, key)
		case "resourceUri":
			err = unpopulate(val, "ResourceURI", &r.ResourceURI)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &r.SubscriptionID)
			delete(rawMsg, key)
		case "tenantId":
			err = unpopulate(val, "TenantID", &r.TenantID)
			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 ResourceWriteFailureEventData.
func (r ResourceWriteFailureEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorization", r.Authorization)
	populate(objectMap, "claims", r.Claims)
	populate(objectMap, "correlationId", r.CorrelationID)
	populate(objectMap, "httpRequest", r.HTTPRequest)
	populate(objectMap, "operationName", r.OperationName)
	populate(objectMap, "resourceGroup", r.ResourceGroup)
	populate(objectMap, "resourceProvider", r.ResourceProvider)
	populate(objectMap, "resourceUri", r.ResourceURI)
	populate(objectMap, "status", r.Status)
	populate(objectMap, "subscriptionId", r.SubscriptionID)
	populate(objectMap, "tenantId", r.TenantID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceWriteFailureEventData.
func (r *ResourceWriteFailureEventData) 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 "authorization":
			err = unpopulate(val, "Authorization", &r.Authorization)
			delete(rawMsg, key)
		case "claims":
			err = unpopulate(val, "Claims", &r.Claims)
			delete(rawMsg, key)
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &r.CorrelationID)
			delete(rawMsg, key)
		case "httpRequest":
			err = unpopulate(val, "HTTPRequest", &r.HTTPRequest)
			delete(rawMsg, key)
		case "operationName":
			err = unpopulate(val, "OperationName", &r.OperationName)
			delete(rawMsg, key)
		case "resourceGroup":
			err = unpopulate(val, "ResourceGroup", &r.ResourceGroup)
			delete(rawMsg, key)
		case "resourceProvider":
			err = unpopulate(val, "ResourceProvider", &r.ResourceProvider)
			delete(rawMsg, key)
		case "resourceUri":
			err = unpopulate(val, "ResourceURI", &r.ResourceURI)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &r.SubscriptionID)
			delete(rawMsg, key)
		case "tenantId":
			err = unpopulate(val, "TenantID", &r.TenantID)
			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 ResourceWriteSuccessEventData.
func (r ResourceWriteSuccessEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "authorization", r.Authorization)
	populate(objectMap, "claims", r.Claims)
	populate(objectMap, "correlationId", r.CorrelationID)
	populate(objectMap, "httpRequest", r.HTTPRequest)
	populate(objectMap, "operationName", r.OperationName)
	populate(objectMap, "resourceGroup", r.ResourceGroup)
	populate(objectMap, "resourceProvider", r.ResourceProvider)
	populate(objectMap, "resourceUri", r.ResourceURI)
	populate(objectMap, "status", r.Status)
	populate(objectMap, "subscriptionId", r.SubscriptionID)
	populate(objectMap, "tenantId", r.TenantID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceWriteSuccessEventData.
func (r *ResourceWriteSuccessEventData) 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 "authorization":
			err = unpopulate(val, "Authorization", &r.Authorization)
			delete(rawMsg, key)
		case "claims":
			err = unpopulate(val, "Claims", &r.Claims)
			delete(rawMsg, key)
		case "correlationId":
			err = unpopulate(val, "CorrelationID", &r.CorrelationID)
			delete(rawMsg, key)
		case "httpRequest":
			err = unpopulate(val, "HTTPRequest", &r.HTTPRequest)
			delete(rawMsg, key)
		case "operationName":
			err = unpopulate(val, "OperationName", &r.OperationName)
			delete(rawMsg, key)
		case "resourceGroup":
			err = unpopulate(val, "ResourceGroup", &r.ResourceGroup)
			delete(rawMsg, key)
		case "resourceProvider":
			err = unpopulate(val, "ResourceProvider", &r.ResourceProvider)
			delete(rawMsg, key)
		case "resourceUri":
			err = unpopulate(val, "ResourceURI", &r.ResourceURI)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &r.Status)
			delete(rawMsg, key)
		case "subscriptionId":
			err = unpopulate(val, "SubscriptionID", &r.SubscriptionID)
			delete(rawMsg, key)
		case "tenantId":
			err = unpopulate(val, "TenantID", &r.TenantID)
			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 ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.
func (s ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "entityType", s.EntityType)
	populate(objectMap, "namespaceName", s.NamespaceName)
	populate(objectMap, "queueName", s.QueueName)
	populate(objectMap, "requestUri", s.RequestURI)
	populate(objectMap, "subscriptionName", s.SubscriptionName)
	populate(objectMap, "topicName", s.TopicName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.
func (s *ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "entityType":
			err = unpopulate(val, "EntityType", &s.EntityType)
			delete(rawMsg, key)
		case "namespaceName":
			err = unpopulate(val, "NamespaceName", &s.NamespaceName)
			delete(rawMsg, key)
		case "queueName":
			err = unpopulate(val, "QueueName", &s.QueueName)
			delete(rawMsg, key)
		case "requestUri":
			err = unpopulate(val, "RequestURI", &s.RequestURI)
			delete(rawMsg, key)
		case "subscriptionName":
			err = unpopulate(val, "SubscriptionName", &s.SubscriptionName)
			delete(rawMsg, key)
		case "topicName":
			err = unpopulate(val, "TopicName", &s.TopicName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ServiceBusActiveMessagesAvailableWithNoListenersEventData.
func (s ServiceBusActiveMessagesAvailableWithNoListenersEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "entityType", s.EntityType)
	populate(objectMap, "namespaceName", s.NamespaceName)
	populate(objectMap, "queueName", s.QueueName)
	populate(objectMap, "requestUri", s.RequestURI)
	populate(objectMap, "subscriptionName", s.SubscriptionName)
	populate(objectMap, "topicName", s.TopicName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBusActiveMessagesAvailableWithNoListenersEventData.
func (s *ServiceBusActiveMessagesAvailableWithNoListenersEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "entityType":
			err = unpopulate(val, "EntityType", &s.EntityType)
			delete(rawMsg, key)
		case "namespaceName":
			err = unpopulate(val, "NamespaceName", &s.NamespaceName)
			delete(rawMsg, key)
		case "queueName":
			err = unpopulate(val, "QueueName", &s.QueueName)
			delete(rawMsg, key)
		case "requestUri":
			err = unpopulate(val, "RequestURI", &s.RequestURI)
			delete(rawMsg, key)
		case "subscriptionName":
			err = unpopulate(val, "SubscriptionName", &s.SubscriptionName)
			delete(rawMsg, key)
		case "topicName":
			err = unpopulate(val, "TopicName", &s.TopicName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.
func (s ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "entityType", s.EntityType)
	populate(objectMap, "namespaceName", s.NamespaceName)
	populate(objectMap, "queueName", s.QueueName)
	populate(objectMap, "requestUri", s.RequestURI)
	populate(objectMap, "subscriptionName", s.SubscriptionName)
	populate(objectMap, "topicName", s.TopicName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.
func (s *ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "entityType":
			err = unpopulate(val, "EntityType", &s.EntityType)
			delete(rawMsg, key)
		case "namespaceName":
			err = unpopulate(val, "NamespaceName", &s.NamespaceName)
			delete(rawMsg, key)
		case "queueName":
			err = unpopulate(val, "QueueName", &s.QueueName)
			delete(rawMsg, key)
		case "requestUri":
			err = unpopulate(val, "RequestURI", &s.RequestURI)
			delete(rawMsg, key)
		case "subscriptionName":
			err = unpopulate(val, "SubscriptionName", &s.SubscriptionName)
			delete(rawMsg, key)
		case "topicName":
			err = unpopulate(val, "TopicName", &s.TopicName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.
func (s ServiceBusDeadletterMessagesAvailableWithNoListenersEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "entityType", s.EntityType)
	populate(objectMap, "namespaceName", s.NamespaceName)
	populate(objectMap, "queueName", s.QueueName)
	populate(objectMap, "requestUri", s.RequestURI)
	populate(objectMap, "subscriptionName", s.SubscriptionName)
	populate(objectMap, "topicName", s.TopicName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.
func (s *ServiceBusDeadletterMessagesAvailableWithNoListenersEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "entityType":
			err = unpopulate(val, "EntityType", &s.EntityType)
			delete(rawMsg, key)
		case "namespaceName":
			err = unpopulate(val, "NamespaceName", &s.NamespaceName)
			delete(rawMsg, key)
		case "queueName":
			err = unpopulate(val, "QueueName", &s.QueueName)
			delete(rawMsg, key)
		case "requestUri":
			err = unpopulate(val, "RequestURI", &s.RequestURI)
			delete(rawMsg, key)
		case "subscriptionName":
			err = unpopulate(val, "SubscriptionName", &s.SubscriptionName)
			delete(rawMsg, key)
		case "topicName":
			err = unpopulate(val, "TopicName", &s.TopicName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type SignalRServiceClientConnectionConnectedEventData.
func (s SignalRServiceClientConnectionConnectedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "connectionId", s.ConnectionID)
	populate(objectMap, "hubName", s.HubName)
	populateTime[datetime.RFC3339](objectMap, "timestamp", s.Timestamp)
	populate(objectMap, "userId", s.UserID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SignalRServiceClientConnectionConnectedEventData.
func (s *SignalRServiceClientConnectionConnectedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "connectionId":
			err = unpopulate(val, "ConnectionID", &s.ConnectionID)
			delete(rawMsg, key)
		case "hubName":
			err = unpopulate(val, "HubName", &s.HubName)
			delete(rawMsg, key)
		case "timestamp":
			err = unpopulateTime[datetime.RFC3339](val, "Timestamp", &s.Timestamp)
			delete(rawMsg, key)
		case "userId":
			err = unpopulate(val, "UserID", &s.UserID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type SignalRServiceClientConnectionDisconnectedEventData.
func (s SignalRServiceClientConnectionDisconnectedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "connectionId", s.ConnectionID)
	populate(objectMap, "errorMessage", s.ErrorMessage)
	populate(objectMap, "hubName", s.HubName)
	populateTime[datetime.RFC3339](objectMap, "timestamp", s.Timestamp)
	populate(objectMap, "userId", s.UserID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SignalRServiceClientConnectionDisconnectedEventData.
func (s *SignalRServiceClientConnectionDisconnectedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "connectionId":
			err = unpopulate(val, "ConnectionID", &s.ConnectionID)
			delete(rawMsg, key)
		case "errorMessage":
			err = unpopulate(val, "ErrorMessage", &s.ErrorMessage)
			delete(rawMsg, key)
		case "hubName":
			err = unpopulate(val, "HubName", &s.HubName)
			delete(rawMsg, key)
		case "timestamp":
			err = unpopulateTime[datetime.RFC3339](val, "Timestamp", &s.Timestamp)
			delete(rawMsg, key)
		case "userId":
			err = unpopulate(val, "UserID", &s.UserID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageAsyncOperationInitiatedEventData.
func (s StorageAsyncOperationInitiatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "api", s.API)
	populate(objectMap, "blobType", s.BlobType)
	populate(objectMap, "clientRequestId", s.ClientRequestID)
	populate(objectMap, "contentLength", s.ContentLength)
	populate(objectMap, "contentType", s.ContentType)
	populate(objectMap, "identity", s.Identity)
	populate(objectMap, "requestId", s.RequestID)
	populate(objectMap, "sequencer", s.Sequencer)
	populate(objectMap, "storageDiagnostics", s.StorageDiagnostics)
	populate(objectMap, "url", s.URL)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAsyncOperationInitiatedEventData.
func (s *StorageAsyncOperationInitiatedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "api":
			err = unpopulate(val, "API", &s.API)
			delete(rawMsg, key)
		case "blobType":
			err = unpopulate(val, "BlobType", &s.BlobType)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &s.ClientRequestID)
			delete(rawMsg, key)
		case "contentLength":
			err = unpopulate(val, "ContentLength", &s.ContentLength)
			delete(rawMsg, key)
		case "contentType":
			err = unpopulate(val, "ContentType", &s.ContentType)
			delete(rawMsg, key)
		case "identity":
			err = unpopulate(val, "Identity", &s.Identity)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &s.RequestID)
			delete(rawMsg, key)
		case "sequencer":
			err = unpopulate(val, "Sequencer", &s.Sequencer)
			delete(rawMsg, key)
		case "storageDiagnostics":
			err = unpopulate(val, "StorageDiagnostics", &s.StorageDiagnostics)
			delete(rawMsg, key)
		case "url":
			err = unpopulate(val, "URL", &s.URL)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageBlobCreatedEventData.
func (s StorageBlobCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "api", s.API)
	populate(objectMap, "accessTier", s.AccessTier)
	populate(objectMap, "blobType", s.BlobType)
	populate(objectMap, "clientRequestId", s.ClientRequestID)
	populate(objectMap, "contentLength", s.ContentLength)
	populate(objectMap, "contentOffset", s.ContentOffset)
	populate(objectMap, "contentType", s.ContentType)
	populate(objectMap, "eTag", s.ETag)
	populate(objectMap, "identity", s.Identity)
	populate(objectMap, "requestId", s.RequestID)
	populate(objectMap, "sequencer", s.Sequencer)
	populate(objectMap, "storageDiagnostics", s.StorageDiagnostics)
	populate(objectMap, "url", s.URL)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageBlobCreatedEventData.
func (s *StorageBlobCreatedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "api":
			err = unpopulate(val, "API", &s.API)
			delete(rawMsg, key)
		case "accessTier":
			err = unpopulate(val, "AccessTier", &s.AccessTier)
			delete(rawMsg, key)
		case "blobType":
			err = unpopulate(val, "BlobType", &s.BlobType)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &s.ClientRequestID)
			delete(rawMsg, key)
		case "contentLength":
			err = unpopulate(val, "ContentLength", &s.ContentLength)
			delete(rawMsg, key)
		case "contentOffset":
			err = unpopulate(val, "ContentOffset", &s.ContentOffset)
			delete(rawMsg, key)
		case "contentType":
			err = unpopulate(val, "ContentType", &s.ContentType)
			delete(rawMsg, key)
		case "eTag":
			err = unpopulate(val, "ETag", &s.ETag)
			delete(rawMsg, key)
		case "identity":
			err = unpopulate(val, "Identity", &s.Identity)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &s.RequestID)
			delete(rawMsg, key)
		case "sequencer":
			err = unpopulate(val, "Sequencer", &s.Sequencer)
			delete(rawMsg, key)
		case "storageDiagnostics":
			err = unpopulate(val, "StorageDiagnostics", &s.StorageDiagnostics)
			delete(rawMsg, key)
		case "url":
			err = unpopulate(val, "URL", &s.URL)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageBlobDeletedEventData.
func (s StorageBlobDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "api", s.API)
	populate(objectMap, "blobType", s.BlobType)
	populate(objectMap, "clientRequestId", s.ClientRequestID)
	populate(objectMap, "contentType", s.ContentType)
	populate(objectMap, "identity", s.Identity)
	populate(objectMap, "requestId", s.RequestID)
	populate(objectMap, "sequencer", s.Sequencer)
	populate(objectMap, "storageDiagnostics", s.StorageDiagnostics)
	populate(objectMap, "url", s.URL)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageBlobDeletedEventData.
func (s *StorageBlobDeletedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "api":
			err = unpopulate(val, "API", &s.API)
			delete(rawMsg, key)
		case "blobType":
			err = unpopulate(val, "BlobType", &s.BlobType)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &s.ClientRequestID)
			delete(rawMsg, key)
		case "contentType":
			err = unpopulate(val, "ContentType", &s.ContentType)
			delete(rawMsg, key)
		case "identity":
			err = unpopulate(val, "Identity", &s.Identity)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &s.RequestID)
			delete(rawMsg, key)
		case "sequencer":
			err = unpopulate(val, "Sequencer", &s.Sequencer)
			delete(rawMsg, key)
		case "storageDiagnostics":
			err = unpopulate(val, "StorageDiagnostics", &s.StorageDiagnostics)
			delete(rawMsg, key)
		case "url":
			err = unpopulate(val, "URL", &s.URL)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageBlobInventoryPolicyCompletedEventData.
func (s StorageBlobInventoryPolicyCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "accountName", s.AccountName)
	populate(objectMap, "manifestBlobUrl", s.ManifestBlobURL)
	populate(objectMap, "policyRunId", s.PolicyRunID)
	populate(objectMap, "policyRunStatus", s.PolicyRunStatus)
	populate(objectMap, "policyRunStatusMessage", s.PolicyRunStatusMessage)
	populate(objectMap, "ruleName", s.RuleName)
	populateTime[datetime.RFC3339](objectMap, "scheduleDateTime", s.ScheduleDateTime)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageBlobInventoryPolicyCompletedEventData.
func (s *StorageBlobInventoryPolicyCompletedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "accountName":
			err = unpopulate(val, "AccountName", &s.AccountName)
			delete(rawMsg, key)
		case "manifestBlobUrl":
			err = unpopulate(val, "ManifestBlobURL", &s.ManifestBlobURL)
			delete(rawMsg, key)
		case "policyRunId":
			err = unpopulate(val, "PolicyRunID", &s.PolicyRunID)
			delete(rawMsg, key)
		case "policyRunStatus":
			err = unpopulate(val, "PolicyRunStatus", &s.PolicyRunStatus)
			delete(rawMsg, key)
		case "policyRunStatusMessage":
			err = unpopulate(val, "PolicyRunStatusMessage", &s.PolicyRunStatusMessage)
			delete(rawMsg, key)
		case "ruleName":
			err = unpopulate(val, "RuleName", &s.RuleName)
			delete(rawMsg, key)
		case "scheduleDateTime":
			err = unpopulateTime[datetime.RFC3339](val, "ScheduleDateTime", &s.ScheduleDateTime)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageBlobRenamedEventData.
func (s StorageBlobRenamedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "api", s.API)
	populate(objectMap, "clientRequestId", s.ClientRequestID)
	populate(objectMap, "destinationUrl", s.DestinationURL)
	populate(objectMap, "identity", s.Identity)
	populate(objectMap, "requestId", s.RequestID)
	populate(objectMap, "sequencer", s.Sequencer)
	populate(objectMap, "sourceUrl", s.SourceURL)
	populate(objectMap, "storageDiagnostics", s.StorageDiagnostics)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageBlobRenamedEventData.
func (s *StorageBlobRenamedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "api":
			err = unpopulate(val, "API", &s.API)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &s.ClientRequestID)
			delete(rawMsg, key)
		case "destinationUrl":
			err = unpopulate(val, "DestinationURL", &s.DestinationURL)
			delete(rawMsg, key)
		case "identity":
			err = unpopulate(val, "Identity", &s.Identity)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &s.RequestID)
			delete(rawMsg, key)
		case "sequencer":
			err = unpopulate(val, "Sequencer", &s.Sequencer)
			delete(rawMsg, key)
		case "sourceUrl":
			err = unpopulate(val, "SourceURL", &s.SourceURL)
			delete(rawMsg, key)
		case "storageDiagnostics":
			err = unpopulate(val, "StorageDiagnostics", &s.StorageDiagnostics)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageBlobTierChangedEventData.
func (s StorageBlobTierChangedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "api", s.API)
	populate(objectMap, "accessTier", s.AccessTier)
	populate(objectMap, "blobType", s.BlobType)
	populate(objectMap, "clientRequestId", s.ClientRequestID)
	populate(objectMap, "contentLength", s.ContentLength)
	populate(objectMap, "contentType", s.ContentType)
	populate(objectMap, "identity", s.Identity)
	populate(objectMap, "previousTier", s.PreviousTier)
	populate(objectMap, "requestId", s.RequestID)
	populate(objectMap, "sequencer", s.Sequencer)
	populate(objectMap, "storageDiagnostics", s.StorageDiagnostics)
	populate(objectMap, "url", s.URL)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageBlobTierChangedEventData.
func (s *StorageBlobTierChangedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "api":
			err = unpopulate(val, "API", &s.API)
			delete(rawMsg, key)
		case "accessTier":
			err = unpopulate(val, "AccessTier", &s.AccessTier)
			delete(rawMsg, key)
		case "blobType":
			err = unpopulate(val, "BlobType", &s.BlobType)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &s.ClientRequestID)
			delete(rawMsg, key)
		case "contentLength":
			err = unpopulate(val, "ContentLength", &s.ContentLength)
			delete(rawMsg, key)
		case "contentType":
			err = unpopulate(val, "ContentType", &s.ContentType)
			delete(rawMsg, key)
		case "identity":
			err = unpopulate(val, "Identity", &s.Identity)
			delete(rawMsg, key)
		case "previousTier":
			err = unpopulate(val, "PreviousTier", &s.PreviousTier)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &s.RequestID)
			delete(rawMsg, key)
		case "sequencer":
			err = unpopulate(val, "Sequencer", &s.Sequencer)
			delete(rawMsg, key)
		case "storageDiagnostics":
			err = unpopulate(val, "StorageDiagnostics", &s.StorageDiagnostics)
			delete(rawMsg, key)
		case "url":
			err = unpopulate(val, "URL", &s.URL)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageDirectoryCreatedEventData.
func (s StorageDirectoryCreatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "api", s.API)
	populate(objectMap, "clientRequestId", s.ClientRequestID)
	populate(objectMap, "eTag", s.ETag)
	populate(objectMap, "identity", s.Identity)
	populate(objectMap, "requestId", s.RequestID)
	populate(objectMap, "sequencer", s.Sequencer)
	populate(objectMap, "storageDiagnostics", s.StorageDiagnostics)
	populate(objectMap, "url", s.URL)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageDirectoryCreatedEventData.
func (s *StorageDirectoryCreatedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "api":
			err = unpopulate(val, "API", &s.API)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &s.ClientRequestID)
			delete(rawMsg, key)
		case "eTag":
			err = unpopulate(val, "ETag", &s.ETag)
			delete(rawMsg, key)
		case "identity":
			err = unpopulate(val, "Identity", &s.Identity)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &s.RequestID)
			delete(rawMsg, key)
		case "sequencer":
			err = unpopulate(val, "Sequencer", &s.Sequencer)
			delete(rawMsg, key)
		case "storageDiagnostics":
			err = unpopulate(val, "StorageDiagnostics", &s.StorageDiagnostics)
			delete(rawMsg, key)
		case "url":
			err = unpopulate(val, "URL", &s.URL)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageDirectoryDeletedEventData.
func (s StorageDirectoryDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "api", s.API)
	populate(objectMap, "clientRequestId", s.ClientRequestID)
	populate(objectMap, "identity", s.Identity)
	populate(objectMap, "recursive", s.Recursive)
	populate(objectMap, "requestId", s.RequestID)
	populate(objectMap, "sequencer", s.Sequencer)
	populate(objectMap, "storageDiagnostics", s.StorageDiagnostics)
	populate(objectMap, "url", s.URL)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageDirectoryDeletedEventData.
func (s *StorageDirectoryDeletedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "api":
			err = unpopulate(val, "API", &s.API)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &s.ClientRequestID)
			delete(rawMsg, key)
		case "identity":
			err = unpopulate(val, "Identity", &s.Identity)
			delete(rawMsg, key)
		case "recursive":
			err = unpopulate(val, "Recursive", &s.Recursive)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &s.RequestID)
			delete(rawMsg, key)
		case "sequencer":
			err = unpopulate(val, "Sequencer", &s.Sequencer)
			delete(rawMsg, key)
		case "storageDiagnostics":
			err = unpopulate(val, "StorageDiagnostics", &s.StorageDiagnostics)
			delete(rawMsg, key)
		case "url":
			err = unpopulate(val, "URL", &s.URL)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageDirectoryRenamedEventData.
func (s StorageDirectoryRenamedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "api", s.API)
	populate(objectMap, "clientRequestId", s.ClientRequestID)
	populate(objectMap, "destinationUrl", s.DestinationURL)
	populate(objectMap, "identity", s.Identity)
	populate(objectMap, "requestId", s.RequestID)
	populate(objectMap, "sequencer", s.Sequencer)
	populate(objectMap, "sourceUrl", s.SourceURL)
	populate(objectMap, "storageDiagnostics", s.StorageDiagnostics)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageDirectoryRenamedEventData.
func (s *StorageDirectoryRenamedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "api":
			err = unpopulate(val, "API", &s.API)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &s.ClientRequestID)
			delete(rawMsg, key)
		case "destinationUrl":
			err = unpopulate(val, "DestinationURL", &s.DestinationURL)
			delete(rawMsg, key)
		case "identity":
			err = unpopulate(val, "Identity", &s.Identity)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &s.RequestID)
			delete(rawMsg, key)
		case "sequencer":
			err = unpopulate(val, "Sequencer", &s.Sequencer)
			delete(rawMsg, key)
		case "sourceUrl":
			err = unpopulate(val, "SourceURL", &s.SourceURL)
			delete(rawMsg, key)
		case "storageDiagnostics":
			err = unpopulate(val, "StorageDiagnostics", &s.StorageDiagnostics)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageLifecyclePolicyActionSummaryDetail.
func (s StorageLifecyclePolicyActionSummaryDetail) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "errorList", s.ErrorList)
	populate(objectMap, "successCount", s.SuccessCount)
	populate(objectMap, "totalObjectsCount", s.TotalObjectsCount)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageLifecyclePolicyActionSummaryDetail.
func (s *StorageLifecyclePolicyActionSummaryDetail) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "errorList":
			err = unpopulate(val, "ErrorList", &s.ErrorList)
			delete(rawMsg, key)
		case "successCount":
			err = unpopulate(val, "SuccessCount", &s.SuccessCount)
			delete(rawMsg, key)
		case "totalObjectsCount":
			err = unpopulate(val, "TotalObjectsCount", &s.TotalObjectsCount)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageLifecyclePolicyCompletedEventData.
func (s StorageLifecyclePolicyCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "deleteSummary", s.DeleteSummary)
	populate(objectMap, "policyRunSummary", s.PolicyRunSummary)
	populate(objectMap, "scheduleTime", s.ScheduleTime)
	populate(objectMap, "tierToArchiveSummary", s.TierToArchiveSummary)
	populate(objectMap, "tierToColdSummary", s.TierToColdSummary)
	populate(objectMap, "tierToCoolSummary", s.TierToCoolSummary)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageLifecyclePolicyCompletedEventData.
func (s *StorageLifecyclePolicyCompletedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "deleteSummary":
			err = unpopulate(val, "DeleteSummary", &s.DeleteSummary)
			delete(rawMsg, key)
		case "policyRunSummary":
			err = unpopulate(val, "PolicyRunSummary", &s.PolicyRunSummary)
			delete(rawMsg, key)
		case "scheduleTime":
			err = unpopulate(val, "ScheduleTime", &s.ScheduleTime)
			delete(rawMsg, key)
		case "tierToArchiveSummary":
			err = unpopulate(val, "TierToArchiveSummary", &s.TierToArchiveSummary)
			delete(rawMsg, key)
		case "tierToColdSummary":
			err = unpopulate(val, "TierToColdSummary", &s.TierToColdSummary)
			delete(rawMsg, key)
		case "tierToCoolSummary":
			err = unpopulate(val, "TierToCoolSummary", &s.TierToCoolSummary)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageLifecyclePolicyRunSummary.
func (s StorageLifecyclePolicyRunSummary) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "completionStatus", s.CompletionStatus)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageLifecyclePolicyRunSummary.
func (s *StorageLifecyclePolicyRunSummary) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "completionStatus":
			err = unpopulate(val, "CompletionStatus", &s.CompletionStatus)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageTaskAssignmentCompletedEventData.
func (s StorageTaskAssignmentCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "completedDateTime", s.CompletedOn)
	populate(objectMap, "status", s.Status)
	populate(objectMap, "summaryReportBlobUrl", s.SummaryReportBlobURI)
	populate(objectMap, "taskExecutionId", s.TaskExecutionID)
	populate(objectMap, "taskName", s.TaskName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageTaskAssignmentCompletedEventData.
func (s *StorageTaskAssignmentCompletedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "completedDateTime":
			err = unpopulateTime[datetime.RFC3339](val, "CompletedOn", &s.CompletedOn)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &s.Status)
			delete(rawMsg, key)
		case "summaryReportBlobUrl":
			err = unpopulate(val, "SummaryReportBlobURI", &s.SummaryReportBlobURI)
			delete(rawMsg, key)
		case "taskExecutionId":
			err = unpopulate(val, "TaskExecutionID", &s.TaskExecutionID)
			delete(rawMsg, key)
		case "taskName":
			err = unpopulate(val, "TaskName", &s.TaskName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageTaskAssignmentQueuedEventData.
func (s StorageTaskAssignmentQueuedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "queuedDateTime", s.QueuedOn)
	populate(objectMap, "taskExecutionId", s.TaskExecutionID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageTaskAssignmentQueuedEventData.
func (s *StorageTaskAssignmentQueuedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "queuedDateTime":
			err = unpopulateTime[datetime.RFC3339](val, "QueuedOn", &s.QueuedOn)
			delete(rawMsg, key)
		case "taskExecutionId":
			err = unpopulate(val, "TaskExecutionID", &s.TaskExecutionID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageTaskCompletedEventData.
func (s StorageTaskCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "completedDateTime", s.CompletedDateTime)
	populate(objectMap, "status", s.Status)
	populate(objectMap, "summaryReportBlobUrl", s.SummaryReportBlobURL)
	populate(objectMap, "taskExecutionId", s.TaskExecutionID)
	populate(objectMap, "taskName", s.TaskName)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageTaskCompletedEventData.
func (s *StorageTaskCompletedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "completedDateTime":
			err = unpopulateTime[datetime.RFC3339](val, "CompletedDateTime", &s.CompletedDateTime)
			delete(rawMsg, key)
		case "status":
			err = unpopulate(val, "Status", &s.Status)
			delete(rawMsg, key)
		case "summaryReportBlobUrl":
			err = unpopulate(val, "SummaryReportBlobURL", &s.SummaryReportBlobURL)
			delete(rawMsg, key)
		case "taskExecutionId":
			err = unpopulate(val, "TaskExecutionID", &s.TaskExecutionID)
			delete(rawMsg, key)
		case "taskName":
			err = unpopulate(val, "TaskName", &s.TaskName)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type StorageTaskQueuedEventData.
func (s StorageTaskQueuedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populateTime[datetime.RFC3339](objectMap, "queuedDateTime", s.QueuedDateTime)
	populate(objectMap, "taskExecutionId", s.TaskExecutionID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type StorageTaskQueuedEventData.
func (s *StorageTaskQueuedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "queuedDateTime":
			err = unpopulateTime[datetime.RFC3339](val, "QueuedDateTime", &s.QueuedDateTime)
			delete(rawMsg, key)
		case "taskExecutionId":
			err = unpopulate(val, "TaskExecutionID", &s.TaskExecutionID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type SubscriptionDeletedEventData.
func (s SubscriptionDeletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "eventSubscriptionId", s.EventSubscriptionID)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionDeletedEventData.
func (s *SubscriptionDeletedEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "eventSubscriptionId":
			err = unpopulate(val, "EventSubscriptionID", &s.EventSubscriptionID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type SubscriptionValidationEventData.
func (s SubscriptionValidationEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "validationCode", s.ValidationCode)
	populate(objectMap, "validationUrl", s.ValidationURL)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionValidationEventData.
func (s *SubscriptionValidationEventData) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "validationCode":
			err = unpopulate(val, "ValidationCode", &s.ValidationCode)
			delete(rawMsg, key)
		case "validationUrl":
			err = unpopulate(val, "ValidationURL", &s.ValidationURL)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type SubscriptionValidationResponse.
func (s SubscriptionValidationResponse) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "validationResponse", s.ValidationResponse)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionValidationResponse.
func (s *SubscriptionValidationResponse) 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", s, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "validationResponse":
			err = unpopulate(val, "ValidationResponse", &s.ValidationResponse)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", s, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetLifecycleHookEventAdditionalContext.
func (v VirtualMachineScaleSetLifecycleHookEventAdditionalContext) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "priority", v.Priority)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetLifecycleHookEventAdditionalContext.
func (v *VirtualMachineScaleSetLifecycleHookEventAdditionalContext) 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", v, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "priority":
			err = unpopulate(val, "Priority", &v.Priority)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", v, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetLifecycleHookEventProperties.
func (v VirtualMachineScaleSetLifecycleHookEventProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "additionalContext", v.AdditionalContext)
	populate(objectMap, "defaultAction", v.DefaultAction)
	populate(objectMap, "maxWaitUntil", v.MaxWaitUntil)
	populate(objectMap, "state", v.State)
	populate(objectMap, "targetResources", v.TargetResources)
	populate(objectMap, "timeCreated", v.TimeCreated)
	populate(objectMap, "type", v.Type)
	populate(objectMap, "waitUntil", v.WaitUntil)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetLifecycleHookEventProperties.
func (v *VirtualMachineScaleSetLifecycleHookEventProperties) 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", v, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "additionalContext":
			err = unpopulate(val, "AdditionalContext", &v.AdditionalContext)
			delete(rawMsg, key)
		case "defaultAction":
			err = unpopulate(val, "DefaultAction", &v.DefaultAction)
			delete(rawMsg, key)
		case "maxWaitUntil":
			err = unpopulate(val, "MaxWaitUntil", &v.MaxWaitUntil)
			delete(rawMsg, key)
		case "state":
			err = unpopulate(val, "State", &v.State)
			delete(rawMsg, key)
		case "targetResources":
			err = unpopulate(val, "TargetResources", &v.TargetResources)
			delete(rawMsg, key)
		case "timeCreated":
			err = unpopulate(val, "TimeCreated", &v.TimeCreated)
			delete(rawMsg, key)
		case "type":
			err = unpopulate(val, "Type", &v.Type)
			delete(rawMsg, key)
		case "waitUntil":
			err = unpopulate(val, "WaitUntil", &v.WaitUntil)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", v, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetLifecycleHookEventTargetResource.
func (v VirtualMachineScaleSetLifecycleHookEventTargetResource) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "actionState", v.ActionState)
	populate(objectMap, "resource", v.Resource)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetLifecycleHookEventTargetResource.
func (v *VirtualMachineScaleSetLifecycleHookEventTargetResource) 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", v, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "actionState":
			err = unpopulate(val, "ActionState", &v.ActionState)
			delete(rawMsg, key)
		case "resource":
			err = unpopulate(val, "Resource", &v.Resource)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", v, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebAppServicePlanUpdatedEventData.
func (w WebAppServicePlanUpdatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appServicePlanEventTypeDetail", w.AppServicePlanEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "sku", w.SKU)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppServicePlanUpdatedEventData.
func (w *WebAppServicePlanUpdatedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appServicePlanEventTypeDetail":
			err = unpopulate(val, "AppServicePlanEventTypeDetail", &w.AppServicePlanEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "sku":
			err = unpopulate(val, "SKU", &w.SKU)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebAppServicePlanUpdatedEventDataSKU.
func (w WebAppServicePlanUpdatedEventDataSKU) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "Capacity", w.Capacity)
	populate(objectMap, "Family", w.Family)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "Size", w.Size)
	populate(objectMap, "Tier", w.Tier)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppServicePlanUpdatedEventDataSKU.
func (w *WebAppServicePlanUpdatedEventDataSKU) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "Capacity":
			err = unpopulate(val, "Capacity", &w.Capacity)
			delete(rawMsg, key)
		case "Family":
			err = unpopulate(val, "Family", &w.Family)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "Size":
			err = unpopulate(val, "Size", &w.Size)
			delete(rawMsg, key)
		case "Tier":
			err = unpopulate(val, "Tier", &w.Tier)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebAppUpdatedEventData.
func (w WebAppUpdatedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppUpdatedEventData.
func (w *WebAppUpdatedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebBackupOperationCompletedEventData.
func (w WebBackupOperationCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebBackupOperationCompletedEventData.
func (w *WebBackupOperationCompletedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebBackupOperationFailedEventData.
func (w WebBackupOperationFailedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebBackupOperationFailedEventData.
func (w *WebBackupOperationFailedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebBackupOperationStartedEventData.
func (w WebBackupOperationStartedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebBackupOperationStartedEventData.
func (w *WebBackupOperationStartedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebRestoreOperationCompletedEventData.
func (w WebRestoreOperationCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebRestoreOperationCompletedEventData.
func (w *WebRestoreOperationCompletedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebRestoreOperationFailedEventData.
func (w WebRestoreOperationFailedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebRestoreOperationFailedEventData.
func (w *WebRestoreOperationFailedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebRestoreOperationStartedEventData.
func (w WebRestoreOperationStartedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebRestoreOperationStartedEventData.
func (w *WebRestoreOperationStartedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebSlotSwapCompletedEventData.
func (w WebSlotSwapCompletedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebSlotSwapCompletedEventData.
func (w *WebSlotSwapCompletedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebSlotSwapFailedEventData.
func (w WebSlotSwapFailedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebSlotSwapFailedEventData.
func (w *WebSlotSwapFailedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebSlotSwapStartedEventData.
func (w WebSlotSwapStartedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebSlotSwapStartedEventData.
func (w *WebSlotSwapStartedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebSlotSwapWithPreviewCancelledEventData.
func (w WebSlotSwapWithPreviewCancelledEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebSlotSwapWithPreviewCancelledEventData.
func (w *WebSlotSwapWithPreviewCancelledEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type WebSlotSwapWithPreviewStartedEventData.
func (w WebSlotSwapWithPreviewStartedEventData) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "address", w.Address)
	populate(objectMap, "appEventTypeDetail", w.AppEventTypeDetail)
	populate(objectMap, "clientRequestId", w.ClientRequestID)
	populate(objectMap, "correlationRequestId", w.CorrelationRequestID)
	populate(objectMap, "name", w.Name)
	populate(objectMap, "requestId", w.RequestID)
	populate(objectMap, "verb", w.Verb)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type WebSlotSwapWithPreviewStartedEventData.
func (w *WebSlotSwapWithPreviewStartedEventData) 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", w, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "address":
			err = unpopulate(val, "Address", &w.Address)
			delete(rawMsg, key)
		case "appEventTypeDetail":
			err = unpopulate(val, "AppEventTypeDetail", &w.AppEventTypeDetail)
			delete(rawMsg, key)
		case "clientRequestId":
			err = unpopulate(val, "ClientRequestID", &w.ClientRequestID)
			delete(rawMsg, key)
		case "correlationRequestId":
			err = unpopulate(val, "CorrelationRequestID", &w.CorrelationRequestID)
			delete(rawMsg, key)
		case "name":
			err = unpopulate(val, "Name", &w.Name)
			delete(rawMsg, key)
		case "requestId":
			err = unpopulate(val, "RequestID", &w.RequestID)
			delete(rawMsg, key)
		case "verb":
			err = unpopulate(val, "Verb", &w.Verb)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", w, err)
		}
	}
	return nil
}

func populate(m map[string]any, k string, v any) {
	if v == nil {
		return
	} else if azcore.IsNullValue(v) {
		m[k] = nil
	} else if !reflect.ValueOf(v).IsNil() {
		m[k] = v
	}
}

func populateTime[T dateTimeConstraints](m map[string]any, k string, t *time.Time) {
	if t == nil {
		return
	} else if azcore.IsNullValue(t) {
		m[k] = nil
	} else if !reflect.ValueOf(t).IsNil() {
		newTime := T(*t)
		m[k] = (*T)(&newTime)
	}
}

func populateAny(m map[string]any, k string, v any) {
	if v == nil {
		return
	} else if azcore.IsNullValue(v) {
		m[k] = nil
	} else {
		m[k] = v
	}
}

func unpopulate(data json.RawMessage, fn string, v any) error {
	if data == nil || string(data) == "null" {
		return nil
	}
	if err := json.Unmarshal(data, v); err != nil {
		return fmt.Errorf("struct field %s: %v", fn, err)
	}
	return nil
}

func unpopulateTime[T dateTimeConstraints](data json.RawMessage, fn string, t **time.Time) error {
	if data == nil || string(data) == "null" {
		return nil
	}
	var aux T
	if err := json.Unmarshal(data, &aux); err != nil {
		return fmt.Errorf("struct field %s: %v", fn, err)
	}
	newTime := time.Time(aux)
	*t = &newTime
	return nil
}

type dateTimeConstraints interface {
	datetime.PlainDate | datetime.PlainTime | datetime.RFC1123 | datetime.RFC3339 | datetime.Unix
}
