From a4dc2d64c52fabfdffd05bfc754cd6c9778909a4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 12 May 2025 22:42:39 +0000 Subject: [PATCH] CodeGen from PR 34619 in Azure/azure-rest-api-specs Merge 576a5ac36ea531dd45ed1c2e38fe557f7d2ed3ef into 94faa918eb38c3c530fbba3d6ba50ba0bf0a73b1 --- .../api/Azure.Messaging.EventGrid.net8.0.cs | 208 +++++++ ...zure.Messaging.EventGrid.netstandard2.0.cs | 208 +++++++ .../src/Generated/EventGridModelFactory.cs | 557 +++++++++++++++++- ...csCallEndReasonProperties.Serialization.cs | 60 ++ .../Models/AcsCallEndReasonProperties.cs | 36 ++ .../Generated/Models/AcsCallEndedByKind.cs | 51 ++ .../AcsCallEndedByProperties.Serialization.cs | 61 ++ .../Models/AcsCallEndedByProperties.cs | 38 ++ .../AcsCallEndedEventData.Serialization.cs | 149 +++++ .../Generated/Models/AcsCallEndedEventData.cs | 52 ++ .../AcsCallGroupProperties.Serialization.cs | 40 ++ .../Models/AcsCallGroupProperties.cs | 28 + ...ParticipantAddedEventData.Serialization.cs | 148 +++++ .../AcsCallParticipantAddedEventData.cs | 43 ++ ...sCallParticipantEventData.Serialization.cs | 148 +++++ .../Models/AcsCallParticipantEventData.cs | 56 ++ .../Models/AcsCallParticipantKind.cs | 60 ++ ...CallParticipantProperties.Serialization.cs | 55 ++ .../Models/AcsCallParticipantProperties.cs | 34 ++ ...rticipantRemovedEventData.Serialization.cs | 148 +++++ .../AcsCallParticipantRemovedEventData.cs | 43 ++ .../AcsCallRoomProperties.Serialization.cs | 40 ++ .../Generated/Models/AcsCallRoomProperties.cs | 28 + .../AcsCallStartedEventData.Serialization.cs | 116 ++++ .../Models/AcsCallStartedEventData.cs | 39 ++ ...AcsCallingEventProperties.Serialization.cs | 99 ++++ .../Models/AcsCallingEventProperties.cs | 65 ++ ...ReceivedInThreadEventData.Serialization.cs | 139 +++++ ...zureBotCommandReceivedInThreadEventData.cs | 63 ++ .../AcsChatEventInThreadBaseProperties.cs | 11 +- ...atMessageDeletedEventData.Serialization.cs | 4 - .../Models/AcsChatMessageDeletedEventData.cs | 9 +- ...eDeletedInThreadEventData.Serialization.cs | 4 - .../AcsChatMessageDeletedInThreadEventData.cs | 17 +- ...hatMessageEditedEventData.Serialization.cs | 4 - .../Models/AcsChatMessageEditedEventData.cs | 13 +- ...geEditedInThreadEventData.Serialization.cs | 4 - .../AcsChatMessageEditedInThreadEventData.cs | 21 +- ...essageEventBaseProperties.Serialization.cs | 4 - .../AcsChatMessageEventBaseProperties.cs | 13 +- ...entInThreadBaseProperties.Serialization.cs | 4 - ...sChatMessageEventInThreadBaseProperties.cs | 21 +- ...tMessageReceivedEventData.Serialization.cs | 4 - .../Models/AcsChatMessageReceivedEventData.cs | 10 +- ...ReceivedInThreadEventData.Serialization.cs | 4 - ...AcsChatMessageReceivedInThreadEventData.cs | 21 +- ...antAddedToThreadEventData.Serialization.cs | 8 - ...csChatParticipantAddedToThreadEventData.cs | 18 +- ...ToThreadWithUserEventData.Serialization.cs | 8 - ...rticipantAddedToThreadWithUserEventData.cs | 10 +- ...emovedFromThreadEventData.Serialization.cs | 8 - ...atParticipantRemovedFromThreadEventData.cs | 18 +- ...omThreadWithUserEventData.Serialization.cs | 8 - ...ipantRemovedFromThreadWithUserEventData.cs | 10 +- ...hatThreadCreatedEventData.Serialization.cs | 16 +- .../Models/AcsChatThreadCreatedEventData.cs | 24 +- ...dCreatedWithUserEventData.Serialization.cs | 16 +- .../AcsChatThreadCreatedWithUserEventData.cs | 16 +- ...hatThreadDeletedEventData.Serialization.cs | 4 - .../Models/AcsChatThreadDeletedEventData.cs | 15 +- ...csChatThreadEventInThreadBaseProperties.cs | 11 +- ...readParticipantProperties.Serialization.cs | 4 - .../AcsChatThreadParticipantProperties.cs | 8 +- ...ropertiesUpdatedEventData.Serialization.cs | 16 +- ...AcsChatThreadPropertiesUpdatedEventData.cs | 23 +- ...esUpdatedPerUserEventData.Serialization.cs | 10 +- ...ThreadPropertiesUpdatedPerUserEventData.cs | 11 +- ...dWithUserDeletedEventData.Serialization.cs | 4 - .../AcsChatThreadWithUserDeletedEventData.cs | 7 +- ...ReceivedInThreadEventData.Serialization.cs | 139 +++++ ...ypingIndicatorReceivedInThreadEventData.cs | 63 ++ ...ryReportReceivedEventData.Serialization.cs | 4 - ...AcsEmailDeliveryReportReceivedEventData.cs | 16 +- ...ileStatusUpdatedEventData.Serialization.cs | 4 - .../AcsRecordingFileStatusUpdatedEventData.cs | 7 +- ...uterJobCancelledEventData.Serialization.cs | 12 +- .../Models/AcsRouterJobCancelledEventData.cs | 8 +- ...sificationFailedEventData.Serialization.cs | 12 +- ...sRouterJobClassificationFailedEventData.cs | 9 +- ...terJobClassifiedEventData.Serialization.cs | 12 +- .../Models/AcsRouterJobClassifiedEventData.cs | 9 +- ...sRouterJobClosedEventData.Serialization.cs | 12 +- .../Models/AcsRouterJobClosedEventData.cs | 8 +- ...uterJobCompletedEventData.Serialization.cs | 12 +- .../Models/AcsRouterJobCompletedEventData.cs | 8 +- ...RouterJobDeletedEventData.Serialization.cs | 12 +- .../Models/AcsRouterJobDeletedEventData.cs | 8 +- .../AcsRouterJobEventData.Serialization.cs | 12 +- .../Generated/Models/AcsRouterJobEventData.cs | 13 +- ...ceptionTriggeredEventData.Serialization.cs | 12 +- ...AcsRouterJobExceptionTriggeredEventData.cs | 8 +- ...sRouterJobQueuedEventData.Serialization.cs | 12 +- .../Models/AcsRouterJobQueuedEventData.cs | 9 +- ...outerJobReceivedEventData.Serialization.cs | 12 +- .../Models/AcsRouterJobReceivedEventData.cs | 8 +- ...SchedulingFailedEventData.Serialization.cs | 12 +- .../AcsRouterJobSchedulingFailedEventData.cs | 8 +- ...terJobUnassignedEventData.Serialization.cs | 12 +- .../Models/AcsRouterJobUnassignedEventData.cs | 8 +- ...ingForActivationEventData.Serialization.cs | 12 +- ...sRouterJobWaitingForActivationEventData.cs | 8 +- ...SelectorsExpiredEventData.Serialization.cs | 12 +- ...outerJobWorkerSelectorsExpiredEventData.cs | 9 +- ...ryReportReceivedEventData.Serialization.cs | 6 +- .../AcsSmsDeliveryReportReceivedEventData.cs | 26 +- .../Models/AcsSmsEventBaseProperties.cs | 12 +- .../Models/AcsSmsReceivedEventData.cs | 18 +- ...uitBreakerClosedEventData.Serialization.cs | 67 +++ ...ManagementCircuitBreakerClosedEventData.cs | 32 + ...uitBreakerOpenedEventData.Serialization.cs | 67 +++ ...ManagementCircuitBreakerOpenedEventData.cs | 32 + ...tCircuitBreakerProperties.Serialization.cs | 57 ++ .../ApiManagementCircuitBreakerProperties.cs | 31 + ...redGatewayTokenProperties.Serialization.cs | 45 ++ ...ManagementExpiredGatewayTokenProperties.cs | 30 + ...nagementGatewayProperties.Serialization.cs | 46 ++ .../Models/ApiManagementGatewayProperties.cs | 32 + ...ewayTokenExpiredEventData.Serialization.cs | 71 +++ ...iManagementGatewayTokenExpiredEventData.cs | 32 + ...yTokenNearExpiryEventData.Serialization.cs | 71 +++ ...nagementGatewayTokenNearExpiryEventData.cs | 32 + ...TokenNearExpiryProperties.Serialization.cs | 45 ++ ...agementGatewayTokenNearExpiryProperties.cs | 30 + ...VersionPublishedEventData.Serialization.cs | 100 ++++ .../EdgeSolutionVersionPublishedEventData.cs | 58 ++ .../Azure.Messaging.EventGrid/src/autorest.md | 5 +- 126 files changed, 4376 insertions(+), 344 deletions(-) create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs index 411fa9fac51b..a46c49ec69fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs @@ -27,6 +27,18 @@ public static partial class EventGridExtensions } public static partial class EventGridModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? kind = default(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind?), string name = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData AcsCallEndedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties endedBy = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties reason = null, float? callDurationInSeconds = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = default(int?), int? subCode = default(int?), string phrase = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties AcsCallGroupProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties AcsCallingEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData AcsCallParticipantEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties AcsCallParticipantProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? role = default(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties AcsCallRoomProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData AcsCallStartedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties AcsChatEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } @@ -72,6 +84,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel deletedByCommunicationIdentifier = null, System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string messageId, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails, System.DateTimeOffset? deliveryAttemptTimestamp) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -156,6 +169,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -166,6 +183,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } @@ -238,6 +259,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -447,6 +469,11 @@ public EventGridSasBuilder(System.Uri endpoint, System.DateTimeOffset expiresOn) } public static partial class SystemEventNames { + public const string AcsCallEnded = "Microsoft.Communication.CallEnded"; + public const string AcsCallParticipantAdded = "Microsoft.Communication.CallParticipantAdded"; + public const string AcsCallParticipantRemoved = "Microsoft.Communication.CallParticipantRemoved"; + public const string AcsCallStarted = "Microsoft.Communication.CallStarted"; + public const string AcsChatAzureBotCommandReceivedInThread = "Microsoft.Communication.ChatAzureBotCommandReceivedInThread"; public const string AcsChatMessageDeleted = "Microsoft.Communication.ChatMessageDeleted"; public const string AcsChatMessageDeletedInThread = "Microsoft.Communication.ChatMessageDeletedInThread"; public const string AcsChatMessageEdited = "Microsoft.Communication.ChatMessageEdited"; @@ -463,6 +490,7 @@ public static partial class SystemEventNames public const string AcsChatThreadPropertiesUpdated = "Microsoft.Communication.ChatThreadPropertiesUpdated"; public const string AcsChatThreadPropertiesUpdatedPerUser = "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser"; public const string AcsChatThreadWithUserDeleted = "Microsoft.Communication.ChatThreadWithUserDeleted"; + public const string AcsChatTypingIndicatorReceivedInThread = "Microsoft.Communication.ChatTypingIndicatorReceivedInThread"; public const string AcsEmailDeliveryReportReceived = "Microsoft.Communication.EmailDeliveryReportReceived"; public const string AcsEmailEngagementTrackingReportReceived = "Microsoft.Communication.EmailEngagementTrackingReportReceived"; public const string AcsIncomingCall = "Microsoft.Communication.IncomingCall"; @@ -502,6 +530,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -512,6 +542,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -551,6 +583,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; @@ -670,6 +703,45 @@ public static partial class SystemEventNames } namespace Azure.Messaging.EventGrid.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallEndedByKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallEndedByKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallParticipantKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallParticipantKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public override string ToString() { throw null; } + } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsRouterJobStatus : System.IEquatable @@ -802,6 +874,80 @@ namespace Azure.Messaging.EventGrid.Models } namespace Azure.Messaging.EventGrid.SystemEvents { + public partial class AcsCallEndedByProperties + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? Kind { get { throw null; } } + public string Name { get { throw null; } } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallEndedEventData() { } + public float? CallDurationInSeconds { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + } + public partial class AcsCallEndReasonProperties + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + } + public partial class AcsCallGroupProperties + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallingEventProperties + { + internal AcsCallingEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties Group { get { throw null; } } + public bool? IsRoomsCall { get { throw null; } } + public bool? IsTwoParty { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties Room { get { throw null; } } + public string ServerCallId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties StartedBy { get { throw null; } } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantAddedEventData() { } + } + public partial class AcsCallParticipantEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallParticipantEventData() { } + public string DisplayName { get { throw null; } } + public string ParticipantId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties User { get { throw null; } } + public string UserAgent { get { throw null; } } + } + public partial class AcsCallParticipantProperties + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? Role { get { throw null; } } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantRemovedEventData() { } + } + public partial class AcsCallRoomProperties + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallStartedEventData() { } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } public partial class AcsChatEventBaseProperties { internal AcsChatEventBaseProperties() { } @@ -964,6 +1110,12 @@ internal AcsChatThreadWithUserDeletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel DeletedByCommunicationIdentifier { get { throw null; } } public System.DateTimeOffset? DeleteTime { get { throw null; } } } + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsCommunicationIdentifierKind : System.IEquatable { @@ -1684,6 +1836,28 @@ public partial class ApiManagementApiUpdatedEventData internal ApiManagementApiUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerProperties + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + } + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayApiAddedEventData { internal ApiManagementGatewayApiAddedEventData() { } @@ -1734,6 +1908,29 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData internal ApiManagementGatewayHostnameConfigurationUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementGatewayProperties + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + } + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal ApiManagementGatewayTokenNearExpiryProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayUpdatedEventData { internal ApiManagementGatewayUpdatedEventData() { } @@ -2220,6 +2417,17 @@ internal DeviceTwinProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata Metadata { get { throw null; } } public float? Version { get { throw null; } } } + public partial class EdgeSolutionVersionPublishedEventData + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData { internal EventGridMqttClientCreatedOrUpdatedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs index 411fa9fac51b..a46c49ec69fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs @@ -27,6 +27,18 @@ public static partial class EventGridExtensions } public static partial class EventGridModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? kind = default(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind?), string name = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData AcsCallEndedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties endedBy = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties reason = null, float? callDurationInSeconds = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = default(int?), int? subCode = default(int?), string phrase = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties AcsCallGroupProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties AcsCallingEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData AcsCallParticipantEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties AcsCallParticipantProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? role = default(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties AcsCallRoomProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData AcsCallStartedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties AcsChatEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } @@ -72,6 +84,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel deletedByCommunicationIdentifier = null, System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string messageId, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails, System.DateTimeOffset? deliveryAttemptTimestamp) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -156,6 +169,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -166,6 +183,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } @@ -238,6 +259,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -447,6 +469,11 @@ public EventGridSasBuilder(System.Uri endpoint, System.DateTimeOffset expiresOn) } public static partial class SystemEventNames { + public const string AcsCallEnded = "Microsoft.Communication.CallEnded"; + public const string AcsCallParticipantAdded = "Microsoft.Communication.CallParticipantAdded"; + public const string AcsCallParticipantRemoved = "Microsoft.Communication.CallParticipantRemoved"; + public const string AcsCallStarted = "Microsoft.Communication.CallStarted"; + public const string AcsChatAzureBotCommandReceivedInThread = "Microsoft.Communication.ChatAzureBotCommandReceivedInThread"; public const string AcsChatMessageDeleted = "Microsoft.Communication.ChatMessageDeleted"; public const string AcsChatMessageDeletedInThread = "Microsoft.Communication.ChatMessageDeletedInThread"; public const string AcsChatMessageEdited = "Microsoft.Communication.ChatMessageEdited"; @@ -463,6 +490,7 @@ public static partial class SystemEventNames public const string AcsChatThreadPropertiesUpdated = "Microsoft.Communication.ChatThreadPropertiesUpdated"; public const string AcsChatThreadPropertiesUpdatedPerUser = "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser"; public const string AcsChatThreadWithUserDeleted = "Microsoft.Communication.ChatThreadWithUserDeleted"; + public const string AcsChatTypingIndicatorReceivedInThread = "Microsoft.Communication.ChatTypingIndicatorReceivedInThread"; public const string AcsEmailDeliveryReportReceived = "Microsoft.Communication.EmailDeliveryReportReceived"; public const string AcsEmailEngagementTrackingReportReceived = "Microsoft.Communication.EmailEngagementTrackingReportReceived"; public const string AcsIncomingCall = "Microsoft.Communication.IncomingCall"; @@ -502,6 +530,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -512,6 +542,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -551,6 +583,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; @@ -670,6 +703,45 @@ public static partial class SystemEventNames } namespace Azure.Messaging.EventGrid.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallEndedByKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallEndedByKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallParticipantKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallParticipantKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public override string ToString() { throw null; } + } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsRouterJobStatus : System.IEquatable @@ -802,6 +874,80 @@ namespace Azure.Messaging.EventGrid.Models } namespace Azure.Messaging.EventGrid.SystemEvents { + public partial class AcsCallEndedByProperties + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? Kind { get { throw null; } } + public string Name { get { throw null; } } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallEndedEventData() { } + public float? CallDurationInSeconds { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + } + public partial class AcsCallEndReasonProperties + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + } + public partial class AcsCallGroupProperties + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallingEventProperties + { + internal AcsCallingEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties Group { get { throw null; } } + public bool? IsRoomsCall { get { throw null; } } + public bool? IsTwoParty { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties Room { get { throw null; } } + public string ServerCallId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties StartedBy { get { throw null; } } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantAddedEventData() { } + } + public partial class AcsCallParticipantEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallParticipantEventData() { } + public string DisplayName { get { throw null; } } + public string ParticipantId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties User { get { throw null; } } + public string UserAgent { get { throw null; } } + } + public partial class AcsCallParticipantProperties + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? Role { get { throw null; } } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantRemovedEventData() { } + } + public partial class AcsCallRoomProperties + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallStartedEventData() { } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } public partial class AcsChatEventBaseProperties { internal AcsChatEventBaseProperties() { } @@ -964,6 +1110,12 @@ internal AcsChatThreadWithUserDeletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel DeletedByCommunicationIdentifier { get { throw null; } } public System.DateTimeOffset? DeleteTime { get { throw null; } } } + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsCommunicationIdentifierKind : System.IEquatable { @@ -1684,6 +1836,28 @@ public partial class ApiManagementApiUpdatedEventData internal ApiManagementApiUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerProperties + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + } + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayApiAddedEventData { internal ApiManagementGatewayApiAddedEventData() { } @@ -1734,6 +1908,29 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData internal ApiManagementGatewayHostnameConfigurationUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementGatewayProperties + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + } + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal ApiManagementGatewayTokenNearExpiryProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayUpdatedEventData { internal ApiManagementGatewayUpdatedEventData() { } @@ -2220,6 +2417,17 @@ internal DeviceTwinProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata Metadata { get { throw null; } } public float? Version { get { throw null; } } } + public partial class EdgeSolutionVersionPublishedEventData + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData { internal EventGridMqttClientCreatedOrUpdatedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs index fdc005e4a49a..6757f865c152 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.Messaging.EventGrid.Models; using Azure.Messaging.EventGrid.SystemEvents; namespace Azure.Messaging.EventGrid @@ -2468,7 +2469,7 @@ public static AcsRouterJobQueuedEventData AcsRouterJobQueuedEventData(string job /// Router Job Received Scheduled Time in UTC. /// Unavailable For Matching for Router Job Received. /// A new instance for mocking. - public static AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, AcsRouterJobStatus? status = null, string classificationPolicyId = null, int? priority = null, IEnumerable requestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, bool unavailableForMatching = default) + public static AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, SystemEvents.AcsRouterJobStatus? status = null, string classificationPolicyId = null, int? priority = null, IEnumerable requestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, bool unavailableForMatching = default) { labels ??= new Dictionary(); tags ??= new Dictionary(); @@ -2833,6 +2834,207 @@ public static AcsRouterWorkerUpdatedEventData AcsRouterWorkerUpdatedEventData(st updatedWorkerProperties?.ToList()); } + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantAddedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantEventData AcsCallParticipantEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The role of participant user. + /// A new instance for mocking. + public static AcsCallParticipantProperties AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier = null, AcsCallParticipantKind? role = null) + { + return new AcsCallParticipantProperties(communicationIdentifier, role); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// A new instance for mocking. + public static AcsCallingEventProperties AcsCallingEventProperties(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null) + { + return new AcsCallingEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Initializes a new instance of . + /// Group Id. Format is Guid as string. + /// A new instance for mocking. + public static AcsCallGroupProperties AcsCallGroupProperties(string id = null) + { + return new AcsCallGroupProperties(id); + } + + /// Initializes a new instance of . + /// Room Id. Format is Guid as string. + /// A new instance for mocking. + public static AcsCallRoomProperties AcsCallRoomProperties(string id = null) + { + return new AcsCallRoomProperties(id); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantRemovedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// A new instance for mocking. + public static AcsCallStartedEventData AcsCallStartedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null) + { + return new AcsCallStartedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The communication identifier of the user who was disconnected. + /// The reason for ending the call. + /// Duration of the call in seconds. + /// A new instance for mocking. + public static AcsCallEndedEventData AcsCallEndedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallEndedByProperties endedBy = null, AcsCallEndReasonProperties reason = null, float? callDurationInSeconds = null) + { + return new AcsCallEndedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + endedBy, + reason, + callDurationInSeconds); + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of the call ended by. + /// The name of the call ended by. + /// A new instance for mocking. + public static AcsCallEndedByProperties AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier = null, AcsCallEndedByKind? kind = null, string name = null) + { + return new AcsCallEndedByProperties(communicationIdentifier, kind, name); + } + + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for ending the call. + /// A new instance for mocking. + public static AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = null, int? subCode = null, string phrase = null) + { + return new AcsCallEndReasonProperties(code, subCode, phrase); + } + /// Initializes a new instance of . /// The communication identifier of the target user. /// The transaction id will be used as co-relation vector. @@ -2899,7 +3101,7 @@ public static AcsChatEventBaseProperties AcsChatEventBaseProperties(Communicatio return new AcsChatEventBaseProperties(recipientCommunicationIdentifier, transactionId, threadId); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. /// The chat message id. @@ -2910,12 +3112,21 @@ public static AcsChatEventBaseProperties AcsChatEventBaseProperties(Communicatio /// The version of the message. /// The body of the chat message. /// The chat message metadata. - /// A new instance for mocking. - public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + /// or is null. + /// A new instance for mocking. + public static AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } metadata ??= new Dictionary(); - return new AcsChatMessageReceivedInThreadEventData( + return new AcsChatAzureBotCommandReceivedInThreadEventData( transactionId, threadId, messageId, @@ -2937,9 +3148,19 @@ public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInTh /// The original compose time of the message. /// The type of the message. /// The version of the message. + /// or is null. /// A new instance for mocking. public static AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThreadBaseProperties(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatMessageEventInThreadBaseProperties( transactionId, threadId, @@ -2954,12 +3175,98 @@ public static AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThr /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. + /// or is null. /// A new instance for mocking. public static AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatEventInThreadBaseProperties(transactionId, threadId); } + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + /// A new instance for mocking. + public static AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + metadata ??= new Dictionary(); + + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + /// A new instance for mocking. + public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + metadata ??= new Dictionary(); + + return new AcsChatMessageReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata); + } + /// Initializes a new instance of . /// The communication identifier of the target user. /// The transaction id will be used as co-relation vector. @@ -3005,9 +3312,18 @@ public static AcsChatMessageEditedEventData AcsChatMessageEditedEventData(Commun /// The body of the chat message. /// The chat message metadata. /// The time at which the message was edited. + /// or is null. /// A new instance for mocking. public static AcsChatMessageEditedInThreadEventData AcsChatMessageEditedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null, DateTimeOffset? editTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } metadata ??= new Dictionary(); return new AcsChatMessageEditedInThreadEventData( @@ -3061,9 +3377,19 @@ public static AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Comm /// The type of the message. /// The version of the message. /// The time at which the message was deleted. + /// or is null. /// A new instance for mocking. public static AcsChatMessageDeletedInThreadEventData AcsChatMessageDeletedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, DateTimeOffset? deleteTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatMessageDeletedInThreadEventData( transactionId, threadId, @@ -3138,9 +3464,18 @@ public static AcsChatThreadEventBaseProperties AcsChatThreadEventBaseProperties( /// The thread properties. /// The chat thread created metadata. /// The list of properties of participants who are part of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel createdByCommunicationIdentifier = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null, IEnumerable participants = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } properties ??= new Dictionary(); metadata ??= new Dictionary(); participants ??= new List(); @@ -3161,9 +3496,19 @@ public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string /// The chat thread id. /// The original creation time of the thread. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadEventInThreadBaseProperties AcsChatThreadEventInThreadBaseProperties(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatThreadEventInThreadBaseProperties(transactionId, threadId, createTime, version); } @@ -3195,9 +3540,19 @@ public static AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeleted /// The version of the thread. /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadDeletedEventData AcsChatThreadDeletedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel deletedByCommunicationIdentifier = null, DateTimeOffset? deleteTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatThreadDeletedEventData( transactionId, threadId, @@ -3244,9 +3599,18 @@ public static AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadProper /// The time at which the properties of the thread were updated. /// The updated thread properties. /// The thread metadata. + /// or is null. /// A new instance for mocking. public static AcsChatThreadPropertiesUpdatedEventData AcsChatThreadPropertiesUpdatedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel editedByCommunicationIdentifier = null, DateTimeOffset? editTime = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } properties ??= new Dictionary(); metadata ??= new Dictionary(); @@ -3314,9 +3678,19 @@ public static AcsChatParticipantRemovedFromThreadWithUserEventData AcsChatPartic /// The communication identifier of the user who added the user. /// The details of the user who was added. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedToThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset? time = null, CommunicationIdentifierModel addedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantAdded = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatParticipantAddedToThreadEventData( transactionId, threadId, @@ -3333,9 +3707,19 @@ public static AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedTo /// The communication identifier of the user who removed the user. /// The details of the user who was removed. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRemovedFromThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset? time = null, CommunicationIdentifierModel removedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantRemoved = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatParticipantRemovedFromThreadEventData( transactionId, threadId, @@ -3354,9 +3738,22 @@ public static AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRem /// List of details of delivery attempts made. /// The time at which the SMS delivery report was received. /// Customer Content. + /// , or is null. /// A new instance for mocking. public static AcsSmsDeliveryReportReceivedEventData AcsSmsDeliveryReportReceivedEventData(string messageId = null, string @from = null, string to = null, string deliveryStatus = null, string deliveryStatusDetails = null, IEnumerable deliveryAttempts = null, DateTimeOffset? receivedTimestamp = null, string tag = null) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } deliveryAttempts ??= new List(); return new AcsSmsDeliveryReportReceivedEventData( @@ -3384,9 +3781,23 @@ public static AcsSmsDeliveryAttemptProperties AcsSmsDeliveryAttemptProperties(Da /// The identity of the SMS message. /// The identity of SMS message sender. /// The identity of SMS message receiver. + /// , or is null. /// A new instance for mocking. public static AcsSmsEventBaseProperties AcsSmsEventBaseProperties(string messageId = null, string @from = null, string to = null) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } + return new AcsSmsEventBaseProperties(messageId, @from, to); } @@ -3397,9 +3808,23 @@ public static AcsSmsEventBaseProperties AcsSmsEventBaseProperties(string message /// The SMS content. /// The time at which the SMS was received. /// Number of segments in the message. + /// , or is null. /// A new instance for mocking. public static AcsSmsReceivedEventData AcsSmsReceivedEventData(string messageId = null, string @from = null, string to = null, string message = null, DateTimeOffset? receivedTimestamp = null, int segmentCount = default) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } + return new AcsSmsReceivedEventData( messageId, @from, @@ -3916,6 +4341,77 @@ public static ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRem return new ApiManagementGatewayApiRemovedEventData(resourceUri); } + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules = null) + { + rules ??= new Dictionary(); + + return new ApiManagementCircuitBreakerProperties(rules); + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gateway = null, ApiManagementGatewayTokenNearExpiryProperties token = null) + { + return new ApiManagementGatewayTokenNearExpiryEventData(gateway, token); + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + /// Unique instance ID of the deployed gateway. + /// A new instance for mocking. + public static ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) + { + return new ApiManagementGatewayProperties(gatewayId, instanceId); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(DateTimeOffset? expiresOn = null) + { + return new ApiManagementGatewayTokenNearExpiryProperties(expiresOn); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gateway = null, ApiManagementExpiredGatewayTokenProperties token = null) + { + return new ApiManagementGatewayTokenExpiredEventData(gateway, token); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// A new instance for mocking. + public static ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(DateTimeOffset? expiresOn = null) + { + return new ApiManagementExpiredGatewayTokenProperties(expiresOn); + } + /// Initializes a new instance of . /// Type of HL7 FHIR resource. /// Domain name of FHIR account for this resource. @@ -4319,5 +4815,56 @@ public static ApiCenterApiDefinitionUpdatedEventData ApiCenterApiDefinitionUpdat { return new ApiCenterApiDefinitionUpdatedEventData(title, description, specification); } + + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + /// A new instance for mocking. + public static EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, Uri callbackUrl = null) + { + if (externalValidationId == null) + { + throw new ArgumentNullException(nameof(externalValidationId)); + } + if (targetId == null) + { + throw new ArgumentNullException(nameof(targetId)); + } + if (solutionTemplateId == null) + { + throw new ArgumentNullException(nameof(solutionTemplateId)); + } + if (solutionTemplateVersionId == null) + { + throw new ArgumentNullException(nameof(solutionTemplateVersionId)); + } + if (solutionVersionId == null) + { + throw new ArgumentNullException(nameof(solutionVersionId)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + if (callbackUrl == null) + { + throw new ArgumentNullException(nameof(callbackUrl)); + } + + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl); + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs new file mode 100644 index 000000000000..2ba1317a9b30 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndReasonProperties + { + internal static AcsCallEndReasonProperties DeserializeAcsCallEndReasonProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? code = default; + int? subCode = default; + string phrase = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + code = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("subCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("phrase"u8)) + { + phrase = property.Value.GetString(); + continue; + } + } + return new AcsCallEndReasonProperties(code, subCode, phrase); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallEndReasonProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndReasonProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs new file mode 100644 index 000000000000..92cb79be81e5 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event reason properties. + public partial class AcsCallEndReasonProperties + { + /// Initializes a new instance of . + internal AcsCallEndReasonProperties() + { + } + + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for ending the call. + internal AcsCallEndReasonProperties(int? code, int? subCode, string phrase) + { + Code = code; + SubCode = subCode; + Phrase = phrase; + } + + /// Reason code for ending the call. + public int? Code { get; } + /// Reason subcode for ending the call. + public int? SubCode { get; } + /// Reason for ending the call. + public string Phrase { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.cs new file mode 100644 index 000000000000..77b21fe5bb44 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.Models +{ + /// The type of the call ended by. + public readonly partial struct AcsCallEndedByKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsCallEndedByKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ParticipantValue = "Participant"; + private const string MicrosoftInternalValue = "MicrosoftInternal"; + + /// Call end initiator is a participant. + public static AcsCallEndedByKind Participant { get; } = new AcsCallEndedByKind(ParticipantValue); + /// Call end initiator is the local participant. + public static AcsCallEndedByKind MicrosoftInternal { get; } = new AcsCallEndedByKind(MicrosoftInternalValue); + /// Determines if two values are the same. + public static bool operator ==(AcsCallEndedByKind left, AcsCallEndedByKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsCallEndedByKind left, AcsCallEndedByKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcsCallEndedByKind(string value) => new AcsCallEndedByKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsCallEndedByKind other && Equals(other); + /// + public bool Equals(AcsCallEndedByKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs new file mode 100644 index 000000000000..f516c5131d25 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndedByProperties + { + internal static AcsCallEndedByProperties DeserializeAcsCallEndedByProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + AcsCallEndedByKind? type = default; + string name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new AcsCallEndedByKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + } + return new AcsCallEndedByProperties(communicationIdentifier, type, name); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallEndedByProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedByProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs new file mode 100644 index 000000000000..b65aa211f40d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event endedby properties. + public partial class AcsCallEndedByProperties + { + /// Initializes a new instance of . + internal AcsCallEndedByProperties() + { + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of the call ended by. + /// The name of the call ended by. + internal AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallEndedByKind? kind, string name) + { + CommunicationIdentifier = communicationIdentifier; + Kind = kind; + Name = name; + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The type of the call ended by. + public AcsCallEndedByKind? Kind { get; } + /// The name of the call ended by. + public string Name { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs new file mode 100644 index 000000000000..b6d5e1c0fcbc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallEndedEventDataConverter))] + public partial class AcsCallEndedEventData + { + internal static AcsCallEndedEventData DeserializeAcsCallEndedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallEndedByProperties endedBy = default; + AcsCallEndReasonProperties reason = default; + float? callDurationInSeconds = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endedBy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endedBy = AcsCallEndedByProperties.DeserializeAcsCallEndedByProperties(property.Value); + continue; + } + if (property.NameEquals("reason"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reason = AcsCallEndReasonProperties.DeserializeAcsCallEndReasonProperties(property.Value); + continue; + } + if (property.NameEquals("callDurationInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + callDurationInSeconds = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallEndedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + endedBy, + reason, + callDurationInSeconds); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallEndedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedEventData(document.RootElement); + } + + internal partial class AcsCallEndedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallEndedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallEndedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallEndedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs new file mode 100644 index 000000000000..fd37be43c6dc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallEnded event. + public partial class AcsCallEndedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallEndedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The communication identifier of the user who was disconnected. + /// The reason for ending the call. + /// Duration of the call in seconds. + internal AcsCallEndedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallEndedByProperties endedBy, AcsCallEndReasonProperties reason, float? callDurationInSeconds) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + EndedBy = endedBy; + Reason = reason; + CallDurationInSeconds = callDurationInSeconds; + } + + /// The communication identifier of the user who was disconnected. + public AcsCallEndedByProperties EndedBy { get; } + /// The reason for ending the call. + public AcsCallEndReasonProperties Reason { get; } + /// Duration of the call in seconds. + public float? CallDurationInSeconds { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs new file mode 100644 index 000000000000..edf7179ecb8b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallGroupProperties + { + internal static AcsCallGroupProperties DeserializeAcsCallGroupProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new AcsCallGroupProperties(id); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallGroupProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallGroupProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs new file mode 100644 index 000000000000..9390502bb868 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event group properties. + public partial class AcsCallGroupProperties + { + /// Initializes a new instance of . + internal AcsCallGroupProperties() + { + } + + /// Initializes a new instance of . + /// Group Id. Format is Guid as string. + internal AcsCallGroupProperties(string id) + { + Id = id; + } + + /// Group Id. Format is Guid as string. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs new file mode 100644 index 000000000000..f3589e20c13e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantAddedEventDataConverter))] + public partial class AcsCallParticipantAddedEventData + { + internal static AcsCallParticipantAddedEventData DeserializeAcsCallParticipantAddedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantAddedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantAddedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement); + } + + internal partial class AcsCallParticipantAddedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantAddedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantAddedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs new file mode 100644 index 000000000000..9e6c019ea273 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantAdded event. + public partial class AcsCallParticipantAddedEventData : AcsCallParticipantEventData + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, user, displayName, participantId, userAgent) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs new file mode 100644 index 000000000000..71fb453c9ec5 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantEventDataConverter))] + public partial class AcsCallParticipantEventData + { + internal static AcsCallParticipantEventData DeserializeAcsCallParticipantEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantEventData(document.RootElement); + } + + internal partial class AcsCallParticipantEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs new file mode 100644 index 000000000000..94f2021011f1 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of participant events. + public partial class AcsCallParticipantEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + User = user; + DisplayName = displayName; + ParticipantId = participantId; + UserAgent = userAgent; + } + + /// The user of the call participant. + public AcsCallParticipantProperties User { get; } + /// The display name of the participant. + public string DisplayName { get; } + /// The Id of the participant. + public string ParticipantId { get; } + /// The user agent of the participant. + public string UserAgent { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs new file mode 100644 index 000000000000..f7bbd1f19871 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.Models +{ + /// The role of participant user. + public readonly partial struct AcsCallParticipantKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsCallParticipantKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AttendeeValue = "Attendee"; + private const string PresenterValue = "Presenter"; + private const string ConsumerValue = "Consumer"; + private const string CollaboratorValue = "Collaborator"; + private const string OrganizerValue = "Organizer"; + + /// Call participant role is an attendee. + public static AcsCallParticipantKind Attendee { get; } = new AcsCallParticipantKind(AttendeeValue); + /// Call participant role is presenter. + public static AcsCallParticipantKind Presenter { get; } = new AcsCallParticipantKind(PresenterValue); + /// Call participant role is consumer. + public static AcsCallParticipantKind Consumer { get; } = new AcsCallParticipantKind(ConsumerValue); + /// Call participant role is collaborator. + public static AcsCallParticipantKind Collaborator { get; } = new AcsCallParticipantKind(CollaboratorValue); + /// Call participant role is organizer. + public static AcsCallParticipantKind Organizer { get; } = new AcsCallParticipantKind(OrganizerValue); + /// Determines if two values are the same. + public static bool operator ==(AcsCallParticipantKind left, AcsCallParticipantKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsCallParticipantKind left, AcsCallParticipantKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcsCallParticipantKind(string value) => new AcsCallParticipantKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsCallParticipantKind other && Equals(other); + /// + public bool Equals(AcsCallParticipantKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs new file mode 100644 index 000000000000..820f763b8960 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantProperties + { + internal static AcsCallParticipantProperties DeserializeAcsCallParticipantProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + AcsCallParticipantKind? role = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new AcsCallParticipantKind(property.Value.GetString()); + continue; + } + } + return new AcsCallParticipantProperties(communicationIdentifier, role); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallParticipantProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs new file mode 100644 index 000000000000..f3e453cf7e5f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event participant user. + public partial class AcsCallParticipantProperties + { + /// Initializes a new instance of . + internal AcsCallParticipantProperties() + { + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The role of participant user. + internal AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallParticipantKind? role) + { + CommunicationIdentifier = communicationIdentifier; + Role = role; + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The role of participant user. + public AcsCallParticipantKind? Role { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs new file mode 100644 index 000000000000..9417ceef4740 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantRemovedEventDataConverter))] + public partial class AcsCallParticipantRemovedEventData + { + internal static AcsCallParticipantRemovedEventData DeserializeAcsCallParticipantRemovedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantRemovedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantRemovedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement); + } + + internal partial class AcsCallParticipantRemovedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantRemovedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantRemovedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs new file mode 100644 index 000000000000..043bcaa98a10 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantRemoved event. + public partial class AcsCallParticipantRemovedEventData : AcsCallParticipantEventData + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, user, displayName, participantId, userAgent) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs new file mode 100644 index 000000000000..df58cdb6b727 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallRoomProperties + { + internal static AcsCallRoomProperties DeserializeAcsCallRoomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new AcsCallRoomProperties(id); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallRoomProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallRoomProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs new file mode 100644 index 000000000000..e76b63b858c7 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event room properties. + public partial class AcsCallRoomProperties + { + /// Initializes a new instance of . + internal AcsCallRoomProperties() + { + } + + /// Initializes a new instance of . + /// Room Id. Format is Guid as string. + internal AcsCallRoomProperties(string id) + { + Id = id; + } + + /// Room Id. Format is Guid as string. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs new file mode 100644 index 000000000000..fa62de8c59ef --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallStartedEventDataConverter))] + public partial class AcsCallStartedEventData + { + internal static AcsCallStartedEventData DeserializeAcsCallStartedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallStartedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallStartedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallStartedEventData(document.RootElement); + } + + internal partial class AcsCallStartedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallStartedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallStartedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallStartedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs new file mode 100644 index 000000000000..face68720585 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallStarted event. + public partial class AcsCallStartedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallStartedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + internal AcsCallStartedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs new file mode 100644 index 000000000000..271461263e59 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallingEventProperties + { + internal static AcsCallingEventProperties DeserializeAcsCallingEventProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallingEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallingEventProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallingEventProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs new file mode 100644 index 000000000000..d542dc66e407 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of all calling events. + public partial class AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallingEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + + StartedBy = startedBy; + ServerCallId = serverCallId; + CorrelationId = correlationId; + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + internal AcsCallingEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall) + { + StartedBy = startedBy; + ServerCallId = serverCallId; + Group = group; + Room = room; + IsTwoParty = isTwoParty; + CorrelationId = correlationId; + IsRoomsCall = isRoomsCall; + } + + /// The call participant who initiated the call. + public AcsCallParticipantProperties StartedBy { get; } + /// The callId of the server. + public string ServerCallId { get; } + /// The group metadata. + public AcsCallGroupProperties Group { get; } + /// The group metadata. + public AcsCallRoomProperties Room { get; } + /// Is two-party in calling event. + public bool? IsTwoParty { get; } + /// The correlation ID of the calling event. + public string CorrelationId { get; } + /// Is the calling event a room call. + public bool? IsRoomsCall { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..bb093e2c32ef --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsChatAzureBotCommandReceivedInThreadEventDataConverter))] + public partial class AcsChatAzureBotCommandReceivedInThreadEventData + { + internal static AcsChatAzureBotCommandReceivedInThreadEventData DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string messageBody = default; + IReadOnlyDictionary metadata = default; + string messageId = default; + CommunicationIdentifierModel senderCommunicationIdentifier = default; + string senderDisplayName = default; + DateTimeOffset? composeTime = default; + string type = default; + long? version = default; + string transactionId = default; + string threadId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("messageBody"u8)) + { + messageBody = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("senderCommunicationIdentifier"u8)) + { + senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("senderDisplayName"u8)) + { + senderDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("composeTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + composeTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("transactionId"u8)) + { + transactionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + } + return new AcsChatAzureBotCommandReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsChatAzureBotCommandReceivedInThreadEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement); + } + + internal partial class AcsChatAzureBotCommandReceivedInThreadEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsChatAzureBotCommandReceivedInThreadEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsChatAzureBotCommandReceivedInThreadEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs new file mode 100644 index 000000000000..aacbe351c02d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatAzureBotCommandReceivedInThread event. + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties + { + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + internal AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + + MessageBody = messageBody; + Metadata = metadata; + } + + /// The body of the chat message. + public string MessageBody { get; } + /// The chat message metadata. + public IReadOnlyDictionary Metadata { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs index 35fad4af31d7..cb705c3b2f54 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs @@ -5,21 +5,22 @@ #nullable disable +using System; + namespace Azure.Messaging.EventGrid.SystemEvents { /// Schema of common properties of all thread-level chat events. public partial class AcsChatEventInThreadBaseProperties { - /// Initializes a new instance of . - internal AcsChatEventInThreadBaseProperties() - { - } - /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. + /// or is null. internal AcsChatEventInThreadBaseProperties(string transactionId, string threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + TransactionId = transactionId; ThreadId = threadId; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs index b0e34e2551c6..412ade0e5f36 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsChatMessageDeletedEventData DeserializeAcsChatMessageDeletedE } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs index f887d31afeb6..d84d1c847edf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs @@ -13,8 +13,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageDeletedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageDeletedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageDeletedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs index 76b39cda1b45..42a85f12161d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs @@ -47,10 +47,6 @@ internal static AcsChatMessageDeletedInThreadEventData DeserializeAcsChatMessage } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs index ac131a18cea4..5de5749e3943 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs @@ -13,8 +13,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageDeletedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageDeletedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageDeletedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); } /// Initializes a new instance of . @@ -27,8 +38,12 @@ internal AcsChatMessageDeletedInThreadEventData() /// The type of the message. /// The version of the message. /// The time at which the message was deleted. + /// or is null. internal AcsChatMessageDeletedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, DateTimeOffset? deleteTime) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + DeleteTime = deleteTime; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs index dd9e84a70fdf..e55b47bfd35b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs @@ -70,10 +70,6 @@ internal static AcsChatMessageEditedEventData DeserializeAcsChatMessageEditedEve } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs index 6c447d2cac7e..e642000a1219 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs @@ -14,8 +14,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEditedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEditedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , or is null. + internal AcsChatMessageEditedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs index 0eeae702b68c..9ecdd0fa22a4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs @@ -69,10 +69,6 @@ internal static AcsChatMessageEditedInThreadEventData DeserializeAcsChatMessageE } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs index 0d03146d1b26..8d24520a3858 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs @@ -14,8 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEditedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEditedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageEditedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } @@ -31,8 +46,12 @@ internal AcsChatMessageEditedInThreadEventData() /// The body of the chat message. /// The chat message metadata. /// The time at which the message was edited. + /// or is null. internal AcsChatMessageEditedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata, DateTimeOffset? editTime) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageBody = messageBody; Metadata = metadata; EditTime = editTime; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs index c82ee40114b2..9dcd1117edd8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsChatMessageEventBaseProperties DeserializeAcsChatMessageEvent } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs index 994534c4ad59..f7e62ac8af7b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs @@ -13,8 +13,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEventBaseProperties : AcsChatEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEventBaseProperties() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageEventBaseProperties(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + + MessageId = messageId; + SenderCommunicationIdentifier = senderCommunicationIdentifier; + Type = type; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs index 21fa82eb0afc..5c94e28726e9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs @@ -35,10 +35,6 @@ internal static AcsChatMessageEventInThreadBaseProperties DeserializeAcsChatMess } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs index 685b6c8f4924..e2902be335cb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs @@ -13,8 +13,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEventInThreadBaseProperties() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageEventInThreadBaseProperties(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + + MessageId = messageId; + SenderCommunicationIdentifier = senderCommunicationIdentifier; + Type = type; } /// Initializes a new instance of . @@ -26,8 +41,12 @@ internal AcsChatMessageEventInThreadBaseProperties() /// The original compose time of the message. /// The type of the message. /// The version of the message. + /// or is null. internal AcsChatMessageEventInThreadBaseProperties(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageId = messageId; SenderCommunicationIdentifier = senderCommunicationIdentifier; SenderDisplayName = senderDisplayName; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs index 4eccff957138..9bb7e07bd654 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs @@ -60,10 +60,6 @@ internal static AcsChatMessageReceivedEventData DeserializeAcsChatMessageReceive } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs index d61b4a63945c..f1f2e8822ffe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs @@ -14,8 +14,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageReceivedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageReceivedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageReceivedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs index 076d2837ccef..439b59b9a542 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs @@ -59,10 +59,6 @@ internal static AcsChatMessageReceivedInThreadEventData DeserializeAcsChatMessag } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs index b4c2319c92eb..96be9775647a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs @@ -14,8 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageReceivedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } @@ -30,8 +45,12 @@ internal AcsChatMessageReceivedInThreadEventData() /// The version of the message. /// The body of the chat message. /// The chat message metadata. + /// or is null. internal AcsChatMessageReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageBody = messageBody; Metadata = metadata; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs index 01e5e5c55e5f..25c47fabb450 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs @@ -39,19 +39,11 @@ internal static AcsChatParticipantAddedToThreadEventData DeserializeAcsChatParti } if (property.NameEquals("addedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } addedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantAdded"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantAdded = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs index c205886b7b7b..4760962609c8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs @@ -13,8 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantAddedToThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantAddedToThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who added the user. + /// The details of the user who was added. + /// , , or is null. + internal AcsChatParticipantAddedToThreadEventData(string transactionId, string threadId, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); + Argument.AssertNotNull(participantAdded, nameof(participantAdded)); + + AddedByCommunicationIdentifier = addedByCommunicationIdentifier; + ParticipantAdded = participantAdded; } /// Initializes a new instance of . @@ -24,8 +36,12 @@ internal AcsChatParticipantAddedToThreadEventData() /// The communication identifier of the user who added the user. /// The details of the user who was added. /// The version of the thread. + /// or is null. internal AcsChatParticipantAddedToThreadEventData(string transactionId, string threadId, DateTimeOffset? time, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Time = time; AddedByCommunicationIdentifier = addedByCommunicationIdentifier; ParticipantAdded = participantAdded; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs index 76d4c099c082..b9e14ef1a2fa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs @@ -41,19 +41,11 @@ internal static AcsChatParticipantAddedToThreadWithUserEventData DeserializeAcsC } if (property.NameEquals("addedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } addedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantAdded"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantAdded = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs index f51c22fd17ed..cbff24655e89 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs @@ -13,8 +13,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantAddedToThreadWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantAddedToThreadWithUserEventData() + /// The communication identifier of the user who added the user. + /// The details of the user who was added. + /// or is null. + internal AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) { + Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); + Argument.AssertNotNull(participantAdded, nameof(participantAdded)); + + AddedByCommunicationIdentifier = addedByCommunicationIdentifier; + ParticipantAdded = participantAdded; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs index b4058aaa1092..ffd8afa045fa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs @@ -39,19 +39,11 @@ internal static AcsChatParticipantRemovedFromThreadEventData DeserializeAcsChatP } if (property.NameEquals("removedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } removedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantRemoved"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantRemoved = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs index 5be604dc92c1..4b264f8a27f5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs @@ -13,8 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantRemovedFromThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantRemovedFromThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who removed the user. + /// The details of the user who was removed. + /// , , or is null. + internal AcsChatParticipantRemovedFromThreadEventData(string transactionId, string threadId, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); + Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); + + RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; + ParticipantRemoved = participantRemoved; } /// Initializes a new instance of . @@ -24,8 +36,12 @@ internal AcsChatParticipantRemovedFromThreadEventData() /// The communication identifier of the user who removed the user. /// The details of the user who was removed. /// The version of the thread. + /// or is null. internal AcsChatParticipantRemovedFromThreadEventData(string transactionId, string threadId, DateTimeOffset? time, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Time = time; RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; ParticipantRemoved = participantRemoved; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs index c0e5a321610d..ca7da5e6a694 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs @@ -41,19 +41,11 @@ internal static AcsChatParticipantRemovedFromThreadWithUserEventData Deserialize } if (property.NameEquals("removedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } removedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantRemoved"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantRemoved = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs index b8ef04e76ab6..6843aecfeee6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs @@ -13,8 +13,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantRemovedFromThreadWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantRemovedFromThreadWithUserEventData() + /// The communication identifier of the user who removed the user. + /// The details of the user who was removed. + /// or is null. + internal AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) { + Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); + Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); + + RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; + ParticipantRemoved = participantRemoved; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs index b83032f6e45b..7dec53ad9353 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs @@ -33,19 +33,11 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve { if (property.NameEquals("createdByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } createdByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -77,10 +69,6 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve } if (property.NameEquals("participants"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -124,9 +112,9 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve createTime, version, createdByCommunicationIdentifier, - properties ?? new ChangeTrackingDictionary(), + properties, metadata ?? new ChangeTrackingDictionary(), - participants ?? new ChangeTrackingList()); + participants); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs index 07b76bf14be2..be9e55085a84 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,11 +15,24 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadCreatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadCreatedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who created the thread. + /// The thread properties. + /// The list of properties of participants who are part of the thread. + /// , , , or is null. + internal AcsChatThreadCreatedEventData(string transactionId, string threadId, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IEnumerable participants) : base(transactionId, threadId) { - Properties = new ChangeTrackingDictionary(); + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(participants, nameof(participants)); + + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; + Properties = properties; Metadata = new ChangeTrackingDictionary(); - Participants = new ChangeTrackingList(); + Participants = participants.ToList(); } /// Initializes a new instance of . @@ -30,8 +44,12 @@ internal AcsChatThreadCreatedEventData() /// The thread properties. /// The chat thread created metadata. /// The list of properties of participants who are part of the thread. + /// or is null. internal AcsChatThreadCreatedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IReadOnlyList participants) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; Metadata = metadata; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs index e0add658f568..b87ff68281e1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs @@ -34,19 +34,11 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr { if (property.NameEquals("createdByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } createdByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -78,10 +70,6 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr } if (property.NameEquals("participants"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -135,9 +123,9 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr createTime, version, createdByCommunicationIdentifier, - properties ?? new ChangeTrackingDictionary(), + properties, metadata ?? new ChangeTrackingDictionary(), - participants ?? new ChangeTrackingList()); + participants); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs index 21223daaa998..211bc5b72eee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,11 +15,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadCreatedWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadCreatedWithUserEventData() + /// The communication identifier of the user who created the thread. + /// The thread properties. + /// The list of properties of participants who are part of the thread. + /// , or is null. + internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IEnumerable participants) { - Properties = new ChangeTrackingDictionary(); + Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(participants, nameof(participants)); + + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; + Properties = properties; Metadata = new ChangeTrackingDictionary(); - Participants = new ChangeTrackingList(); + Participants = participants.ToList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs index 5de0fd9805f3..810fb19a9d7f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs @@ -30,10 +30,6 @@ internal static AcsChatThreadDeletedEventData DeserializeAcsChatThreadDeletedEve { if (property.NameEquals("deletedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deletedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs index 3b9aa7a8b808..5969ce68e9b0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs @@ -13,8 +13,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadDeletedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadDeletedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who deleted the thread. + /// , or is null. + internal AcsChatThreadDeletedEventData(string transactionId, string threadId, CommunicationIdentifierModel deletedByCommunicationIdentifier) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); + + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; } /// Initializes a new instance of . @@ -24,8 +33,12 @@ internal AcsChatThreadDeletedEventData() /// The version of the thread. /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. + /// or is null. internal AcsChatThreadDeletedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel deletedByCommunicationIdentifier, DateTimeOffset? deleteTime) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; DeleteTime = deleteTime; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs index 0583ea812be7..25b312e43764 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadEventInThreadBaseProperties() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// or is null. + internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string threadId) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); } /// Initializes a new instance of . @@ -22,8 +27,12 @@ internal AcsChatThreadEventInThreadBaseProperties() /// The chat thread id. /// The original creation time of the thread. /// The version of the thread. + /// or is null. internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string threadId, DateTimeOffset? createTime, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + CreateTime = createTime; Version = version; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs index 65df3bd79497..76c268e870cc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs @@ -30,10 +30,6 @@ internal static AcsChatThreadParticipantProperties DeserializeAcsChatThreadParti } if (property.NameEquals("participantCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs index c9abfa1a2fd4..8cd68cac7200 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadParticipantProperties { /// Initializes a new instance of . - internal AcsChatThreadParticipantProperties() + /// The communication identifier of the user. + /// is null. + internal AcsChatThreadParticipantProperties(CommunicationIdentifierModel participantCommunicationIdentifier) { + Argument.AssertNotNull(participantCommunicationIdentifier, nameof(participantCommunicationIdentifier)); + + ParticipantCommunicationIdentifier = participantCommunicationIdentifier; Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs index 02475209a4cd..9513a660cb01 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs @@ -33,10 +33,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread { if (property.NameEquals("editedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } editedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } @@ -51,10 +47,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -72,10 +64,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread } if (property.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -120,8 +108,8 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread version, editedByCommunicationIdentifier, editTime, - properties ?? new ChangeTrackingDictionary(), - metadata ?? new ChangeTrackingDictionary()); + properties, + metadata); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs index 5648d282b33e..edfc5c374b12 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs @@ -14,10 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadPropertiesUpdatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadPropertiesUpdatedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who updated the thread properties. + /// The updated thread properties. + /// The thread metadata. + /// , , , or is null. + internal AcsChatThreadPropertiesUpdatedEventData(string transactionId, string threadId, CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(transactionId, threadId) { - Properties = new ChangeTrackingDictionary(); - Metadata = new ChangeTrackingDictionary(); + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(metadata, nameof(metadata)); + + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; + Properties = properties; + Metadata = metadata; } /// Initializes a new instance of . @@ -29,8 +42,12 @@ internal AcsChatThreadPropertiesUpdatedEventData() /// The time at which the properties of the thread were updated. /// The updated thread properties. /// The thread metadata. + /// or is null. internal AcsChatThreadPropertiesUpdatedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel editedByCommunicationIdentifier, DateTimeOffset? editTime, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; EditTime = editTime; Properties = properties; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs index 85625ffe3d8b..83631ade6eb7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs @@ -34,10 +34,6 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha { if (property.NameEquals("editedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } editedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } @@ -66,10 +62,6 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -132,7 +124,7 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha editedByCommunicationIdentifier, editTime, metadata ?? new ChangeTrackingDictionary(), - properties ?? new ChangeTrackingDictionary()); + properties); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs index 4a892232df59..a7e3d37bab61 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs @@ -14,10 +14,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadPropertiesUpdatedPerUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadPropertiesUpdatedPerUserEventData() + /// The communication identifier of the user who updated the thread properties. + /// The updated thread properties. + /// or is null. + internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties) { + Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; Metadata = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); + Properties = properties; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs index 45b84ede59ed..b161b90b0960 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs @@ -31,10 +31,6 @@ internal static AcsChatThreadWithUserDeletedEventData DeserializeAcsChatThreadWi { if (property.NameEquals("deletedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deletedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs index 98ce51fb594b..53befac6b0fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadWithUserDeletedEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadWithUserDeletedEventData() + /// The communication identifier of the user who deleted the thread. + /// is null. + internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel deletedByCommunicationIdentifier) { + Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); + + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..bea560b58f4e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsChatTypingIndicatorReceivedInThreadEventDataConverter))] + public partial class AcsChatTypingIndicatorReceivedInThreadEventData + { + internal static AcsChatTypingIndicatorReceivedInThreadEventData DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string messageBody = default; + IReadOnlyDictionary metadata = default; + string messageId = default; + CommunicationIdentifierModel senderCommunicationIdentifier = default; + string senderDisplayName = default; + DateTimeOffset? composeTime = default; + string type = default; + long? version = default; + string transactionId = default; + string threadId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("messageBody"u8)) + { + messageBody = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("senderCommunicationIdentifier"u8)) + { + senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("senderDisplayName"u8)) + { + senderDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("composeTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + composeTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("transactionId"u8)) + { + transactionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + } + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsChatTypingIndicatorReceivedInThreadEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement); + } + + internal partial class AcsChatTypingIndicatorReceivedInThreadEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsChatTypingIndicatorReceivedInThreadEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsChatTypingIndicatorReceivedInThreadEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs new file mode 100644 index 000000000000..a425e3938e91 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatTypingIndicatorReceivedInThread event. + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties + { + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + internal AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + + MessageBody = messageBody; + Metadata = metadata; + } + + /// The body of the chat message. + public string MessageBody { get; } + /// The chat message metadata. + public IReadOnlyDictionary Metadata { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs index 699d625ddc06..614519d65a8e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs @@ -60,10 +60,6 @@ internal static AcsEmailDeliveryReportReceivedEventData DeserializeAcsEmailDeliv } if (property.NameEquals("deliveryStatusDetails"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deliveryStatusDetails = AcsEmailDeliveryReportStatusDetails.DeserializeAcsEmailDeliveryReportStatusDetails(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs index 35a4b18f2f05..76ee86c48a15 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs @@ -13,8 +13,22 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsEmailDeliveryReportReceivedEventData { /// Initializes a new instance of . - internal AcsEmailDeliveryReportReceivedEventData() + /// The Sender Email Address. + /// The recipient Email Address. + /// The Internet Message Id of the email been sent. + /// Detailed information about the status if any. + /// , , or is null. + internal AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string internetMessageId, AcsEmailDeliveryReportStatusDetails deliveryStatusDetails) { + Argument.AssertNotNull(sender, nameof(sender)); + Argument.AssertNotNull(recipient, nameof(recipient)); + Argument.AssertNotNull(internetMessageId, nameof(internetMessageId)); + Argument.AssertNotNull(deliveryStatusDetails, nameof(deliveryStatusDetails)); + + Sender = sender; + Recipient = recipient; + InternetMessageId = internetMessageId; + DeliveryStatusDetails = deliveryStatusDetails; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs index a73e40942035..526a2be14367 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs @@ -31,10 +31,6 @@ internal static AcsRecordingFileStatusUpdatedEventData DeserializeAcsRecordingFi { if (property.NameEquals("recordingStorageInfo"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } recordingStorageInfo = AcsRecordingStorageInfoProperties.DeserializeAcsRecordingStorageInfoProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs index 99097128a203..9539b2cc74f8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRecordingFileStatusUpdatedEventData { /// Initializes a new instance of . - internal AcsRecordingFileStatusUpdatedEventData() + /// The details of recording storage information. + /// is null. + internal AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo) { + Argument.AssertNotNull(recordingStorageInfo, nameof(recordingStorageInfo)); + + RecordingStorageInfo = recordingStorageInfo; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs index f550f0cdb19d..3d50fc0ed7a8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, note, dispositionCode); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs index d1a3f1dbc0e6..0127944158f3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobCancelledEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobCancelledEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobCancelledEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs index da6e88a040d1..5495126ab9be 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs @@ -57,10 +57,6 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -71,10 +67,6 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -104,8 +96,8 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, classificationPolicyId, errors ?? new ChangeTrackingList()); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs index e5808f84949b..6a3d32115007 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClassificationFailedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClassificationFailedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ErrorsInternal = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs index e5f641386a5d..8f3a9227820d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs @@ -77,10 +77,6 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -91,10 +87,6 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -124,8 +116,8 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, queueDetails, classificationPolicyId, priority, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs index 68edb7286203..f1f5f1bc63ca 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClassifiedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClassifiedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + AttachedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs index 6ee0f8a829f1..c15de98e74a1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs @@ -54,10 +54,6 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -68,10 +64,6 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -101,8 +93,8 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId, dispositionCode); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs index 7c07a79c1fa6..abaf8cab7d6e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClosedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClosedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClosedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs index 039f0fc7d09e..200b985e7f32 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs index c8f62735ce18..9df18d40daf0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobCompletedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobCompletedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobCompletedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs index 8d513a015823..eba6896d3464 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -50,10 +46,6 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -83,8 +75,8 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary()); + labels, + tags); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs index 4958b5deb302..d276890907b1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobDeletedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobDeletedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobDeletedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs index 95ed38702f2e..bd699d9e86cc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -50,10 +46,6 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -83,8 +75,8 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary()); + labels, + tags); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs index 225f5c98e994..a8212cc2cf97 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,10 +14,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobEventData : AcsRouterEventData { /// Initializes a new instance of . - internal AcsRouterJobEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Labels = new ChangeTrackingDictionary(); - Tags = new ChangeTrackingDictionary(); + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + + Labels = labels; + Tags = tags; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs index 060ec74483a1..6afc0e609cbd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, ruleKey, exceptionRuleId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs index 0da91a332506..f8bc69ebbb53 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobExceptionTriggeredEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobExceptionTriggeredEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobExceptionTriggeredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs index e998b5b551a5..9bbc4f9ae55e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs @@ -76,10 +76,6 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -90,10 +86,6 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -123,8 +115,8 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, attachedWorkerSelectors ?? new ChangeTrackingList(), requestedWorkerSelectors ?? new ChangeTrackingList()); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs index 044eb47870f2..797c4cfd8d4e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobQueuedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobQueuedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + AttachedWorkerSelectors = new ChangeTrackingList(); RequestedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs index a4f23d4ec7dc..f8fa64a54129 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs @@ -93,10 +93,6 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -107,10 +103,6 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -140,8 +132,8 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, jobStatus, classificationPolicyId, priority, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs index 13c6c91c8c64..c712d537cfe2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs @@ -14,9 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobReceivedEventData : AcsRouterJobEventData { /// Initializes a new instance of . + /// Router Job events Labels. + /// Router Jobs events Tags. /// Unavailable For Matching for Router Job Received. - internal AcsRouterJobReceivedEventData(bool unavailableForMatching) + /// or is null. + internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + RequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs index c8b8e96f4057..7d7c5e07956f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs @@ -92,10 +92,6 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -106,10 +102,6 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -139,8 +131,8 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, expiredAttachedWorkerSelectors ?? new ChangeTrackingList(), expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs index 4d8112a29709..5f400a1c0355 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs @@ -14,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobSchedulingFailedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobSchedulingFailedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs index 43af7a79bfdd..bce0dba3c9e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs index bffd65c3cbda..bcfc3db88d4a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobUnassignedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobUnassignedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobUnassignedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs index ac76ef097876..2ca035d25d96 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs @@ -92,10 +92,6 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -106,10 +102,6 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -139,8 +131,8 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, expiredAttachedWorkerSelectors ?? new ChangeTrackingList(), expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs index 63560d33256a..436bde258fb1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs @@ -14,9 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobWaitingForActivationEventData : AcsRouterJobEventData { /// Initializes a new instance of . + /// Router Job events Labels. + /// Router Jobs events Tags. /// Router Job Waiting For Activation Unavailable For Matching. - internal AcsRouterJobWaitingForActivationEventData(bool unavailableForMatching) + /// or is null. + internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs index 6fcb3dd32ab7..e778ac9ae112 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs @@ -66,10 +66,6 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -80,10 +76,6 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -113,8 +105,8 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), expiredAttachedWorkerSelectors ?? new ChangeTrackingList()); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs index 386be9d0060b..3f0bc7c56977 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobWorkerSelectorsExpiredEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobWorkerSelectorsExpiredEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs index 21c072e6265f..19f4af830866 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs @@ -43,10 +43,6 @@ internal static AcsSmsDeliveryReportReceivedEventData DeserializeAcsSmsDeliveryR } if (property.NameEquals("deliveryAttempts"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -91,7 +87,7 @@ internal static AcsSmsDeliveryReportReceivedEventData DeserializeAcsSmsDeliveryR to, deliveryStatus, deliveryStatusDetails, - deliveryAttempts ?? new ChangeTrackingList(), + deliveryAttempts, receivedTimestamp, tag); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs index ed1420496297..9f1914c177d7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,9 +15,25 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsDeliveryReportReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . - internal AcsSmsDeliveryReportReceivedEventData() + /// The identity of the SMS message. + /// The identity of SMS message sender. + /// The identity of SMS message receiver. + /// Status of Delivery. + /// Details about Delivery Status. + /// List of details of delivery attempts made. + /// , , , , or is null. + internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, string deliveryStatus, string deliveryStatusDetails, IEnumerable deliveryAttempts) : base(messageId, @from, to) { - DeliveryAttempts = new ChangeTrackingList(); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(deliveryStatus, nameof(deliveryStatus)); + Argument.AssertNotNull(deliveryStatusDetails, nameof(deliveryStatusDetails)); + Argument.AssertNotNull(deliveryAttempts, nameof(deliveryAttempts)); + + DeliveryStatus = deliveryStatus; + DeliveryStatusDetails = deliveryStatusDetails; + DeliveryAttempts = deliveryAttempts.ToList(); } /// Initializes a new instance of . @@ -28,8 +45,13 @@ internal AcsSmsDeliveryReportReceivedEventData() /// List of details of delivery attempts made. /// The time at which the SMS delivery report was received. /// Customer Content. + /// , or is null. internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, string deliveryStatus, string deliveryStatusDetails, IReadOnlyList deliveryAttempts, DateTimeOffset? receivedTimestamp, string tag) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + DeliveryStatus = deliveryStatus; DeliveryStatusDetails = deliveryStatusDetails; DeliveryAttempts = deliveryAttempts; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs index 8608591a1983..db2f1cd35bac 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs @@ -5,22 +5,24 @@ #nullable disable +using System; + namespace Azure.Messaging.EventGrid.SystemEvents { /// Schema of common properties of all SMS events. public partial class AcsSmsEventBaseProperties { - /// Initializes a new instance of . - internal AcsSmsEventBaseProperties() - { - } - /// Initializes a new instance of . /// The identity of the SMS message. /// The identity of SMS message sender. /// The identity of SMS message receiver. + /// , or is null. internal AcsSmsEventBaseProperties(string messageId, string @from, string to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + MessageId = messageId; From = @from; To = to; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs index 5cb9b0a642af..99c42b1b4626 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs @@ -13,9 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . + /// The identity of the SMS message. + /// The identity of SMS message sender. + /// The identity of SMS message receiver. + /// The SMS content. /// Number of segments in the message. - internal AcsSmsReceivedEventData(int segmentCount) + /// , , or is null. + internal AcsSmsReceivedEventData(string messageId, string @from, string to, string message, int segmentCount) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(message, nameof(message)); + + Message = message; SegmentCount = segmentCount; } @@ -26,8 +37,13 @@ internal AcsSmsReceivedEventData(int segmentCount) /// The SMS content. /// The time at which the SMS was received. /// Number of segments in the message. + /// , or is null. internal AcsSmsReceivedEventData(string messageId, string @from, string to, string message, DateTimeOffset? receivedTimestamp, int segmentCount) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Message = message; ReceivedTimestamp = receivedTimestamp; SegmentCount = segmentCount; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs new file mode 100644 index 000000000000..a58e224054df --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementCircuitBreakerClosedEventDataConverter))] + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal static ApiManagementCircuitBreakerClosedEventData DeserializeApiManagementCircuitBreakerClosedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value); + continue; + } + } + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerClosedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + + internal partial class ApiManagementCircuitBreakerClosedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementCircuitBreakerClosedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementCircuitBreakerClosedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs new file mode 100644 index 000000000000..897cfa437c87 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Closed event. + public partial class ApiManagementCircuitBreakerClosedEventData + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerClosedEventData() + { + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Name of the backend for which the circuit has closed. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs new file mode 100644 index 000000000000..c8f409d55e6f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementCircuitBreakerOpenedEventDataConverter))] + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal static ApiManagementCircuitBreakerOpenedEventData DeserializeApiManagementCircuitBreakerOpenedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value); + continue; + } + } + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerOpenedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + + internal partial class ApiManagementCircuitBreakerOpenedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementCircuitBreakerOpenedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementCircuitBreakerOpenedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs new file mode 100644 index 000000000000..a2e73568a90b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Opened event. + public partial class ApiManagementCircuitBreakerOpenedEventData + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerOpenedEventData() + { + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Name of the backend for which the circuit has opened. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs new file mode 100644 index 000000000000..78f35106bf1d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerProperties + { + internal static ApiManagementCircuitBreakerProperties DeserializeApiManagementCircuitBreakerProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary rules = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + rules = dictionary; + continue; + } + } + return new ApiManagementCircuitBreakerProperties(rules ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs new file mode 100644 index 000000000000..0aebae96e81b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to the circuit breaker configured on the backend. + public partial class ApiManagementCircuitBreakerProperties + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerProperties() + { + Rules = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules) + { + Rules = rules; + } + + /// Overview of all configured rules and respective details. + public IReadOnlyDictionary Rules { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..2845e4321078 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal static ApiManagementExpiredGatewayTokenProperties DeserializeApiManagementExpiredGatewayTokenProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expiredAtUtc = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementExpiredGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs new file mode 100644 index 000000000000..d6a2f1a4f92e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public partial class ApiManagementExpiredGatewayTokenProperties + { + /// Initializes a new instance of . + internal ApiManagementExpiredGatewayTokenProperties() + { + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset? expiresOn) + { + ExpiresOn = expiresOn; + } + + /// Timestamp when the gateway token has expired. + public DateTimeOffset? ExpiresOn { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs new file mode 100644 index 000000000000..514405425e94 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayProperties + { + internal static ApiManagementGatewayProperties DeserializeApiManagementGatewayProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string gatewayId = default; + string instanceId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayId"u8)) + { + gatewayId = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceId"u8)) + { + instanceId = property.Value.GetString(); + continue; + } + } + return new ApiManagementGatewayProperties(gatewayId, instanceId); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs new file mode 100644 index 000000000000..2dda56e1690e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a given self-hosted gateway deployment. + public partial class ApiManagementGatewayProperties + { + /// Initializes a new instance of . + internal ApiManagementGatewayProperties() + { + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + /// Unique instance ID of the deployed gateway. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId) + { + GatewayId = gatewayId; + InstanceId = instanceId; + } + + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + public string GatewayId { get; } + /// Unique instance ID of the deployed gateway. + public string InstanceId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs new file mode 100644 index 000000000000..0ed20221e377 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementGatewayTokenExpiredEventDataConverter))] + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal static ApiManagementGatewayTokenExpiredEventData DeserializeApiManagementGatewayTokenExpiredEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementExpiredGatewayTokenProperties tokenInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenInfo = ApiManagementExpiredGatewayTokenProperties.DeserializeApiManagementExpiredGatewayTokenProperties(property.Value); + continue; + } + } + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenExpiredEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + + internal partial class ApiManagementGatewayTokenExpiredEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementGatewayTokenExpiredEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementGatewayTokenExpiredEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs new file mode 100644 index 000000000000..99ce9f9f3bfc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenExpired event. + public partial class ApiManagementGatewayTokenExpiredEventData + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenExpiredEventData() + { + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gateway, ApiManagementExpiredGatewayTokenProperties token) + { + Gateway = gateway; + Token = token; + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties Gateway { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementExpiredGatewayTokenProperties Token { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs new file mode 100644 index 000000000000..842e50b94cde --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementGatewayTokenNearExpiryEventDataConverter))] + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal static ApiManagementGatewayTokenNearExpiryEventData DeserializeApiManagementGatewayTokenNearExpiryEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementGatewayTokenNearExpiryProperties tokenInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenInfo = ApiManagementGatewayTokenNearExpiryProperties.DeserializeApiManagementGatewayTokenNearExpiryProperties(property.Value); + continue; + } + } + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + + internal partial class ApiManagementGatewayTokenNearExpiryEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementGatewayTokenNearExpiryEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementGatewayTokenNearExpiryEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs new file mode 100644 index 000000000000..abc56161ade8 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenNearExpiry event. + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenNearExpiryEventData() + { + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gateway, ApiManagementGatewayTokenNearExpiryProperties token) + { + Gateway = gateway; + Token = token; + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties Gateway { get; } + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public ApiManagementGatewayTokenNearExpiryProperties Token { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs new file mode 100644 index 000000000000..5169abd95612 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal static ApiManagementGatewayTokenNearExpiryProperties DeserializeApiManagementGatewayTokenNearExpiryProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expiresAtUtc = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiresAtUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiresAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ApiManagementGatewayTokenNearExpiryProperties(expiresAtUtc); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs new file mode 100644 index 000000000000..7c6084b3a12d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenNearExpiryProperties() + { + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + internal ApiManagementGatewayTokenNearExpiryProperties(DateTimeOffset? expiresOn) + { + ExpiresOn = expiresOn; + } + + /// Timestamp when the gateway token will expire. + public DateTimeOffset? ExpiresOn { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs new file mode 100644 index 000000000000..c553e1b9cf6d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(EdgeSolutionVersionPublishedEventDataConverter))] + public partial class EdgeSolutionVersionPublishedEventData + { + internal static EdgeSolutionVersionPublishedEventData DeserializeEdgeSolutionVersionPublishedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string externalValidationId = default; + string targetId = default; + string solutionTemplateId = default; + string solutionTemplateVersionId = default; + string solutionVersionId = default; + string apiVersion = default; + Uri callbackUrl = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("externalValidationId"u8)) + { + externalValidationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetId"u8)) + { + targetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateId"u8)) + { + solutionTemplateId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateVersionId"u8)) + { + solutionTemplateVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("callbackUrl"u8)) + { + callbackUrl = new Uri(property.Value.GetString()); + continue; + } + } + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EdgeSolutionVersionPublishedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + + internal partial class EdgeSolutionVersionPublishedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, EdgeSolutionVersionPublishedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override EdgeSolutionVersionPublishedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs new file mode 100644 index 000000000000..12a8779da578 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Edge.SolutionVersionPublished event. + public partial class EdgeSolutionVersionPublishedEventData + { + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl) + { + Argument.AssertNotNull(externalValidationId, nameof(externalValidationId)); + Argument.AssertNotNull(targetId, nameof(targetId)); + Argument.AssertNotNull(solutionTemplateId, nameof(solutionTemplateId)); + Argument.AssertNotNull(solutionTemplateVersionId, nameof(solutionTemplateVersionId)); + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(callbackUrl, nameof(callbackUrl)); + + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + } + + /// A GUID to uniquely track External Solution Validation. + public string ExternalValidationId { get; } + /// ARM ID of the Target resource. + public string TargetId { get; } + /// ARM ID of the Solution Template resource. + public string SolutionTemplateId { get; } + /// ARM ID of the Solution Template Version resource. + public string SolutionTemplateVersionId { get; } + /// ARM ID of the Solution Version resource. + public string SolutionVersionId { get; } + /// API Version supported for the resources. + public string ApiVersion { get; } + /// Direct URL to callback for updating validation status. + public Uri CallbackUrl { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md index b12e339e22f2..b6eb004c3cce 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md @@ -4,7 +4,9 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml title: EventGridClient -require: https://github.com/Azure/azure-rest-api-specs/blob/8af03db33a90581edffb8a32fea562f36b7c61a8/specification/eventgrid/data-plane/readme.md +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/eventgrid/data-plane/readme.md + generation1-convenience-client: true model-factory-for-hlc: - MediaJobOutputAsset @@ -209,3 +211,4 @@ directive: $.MediaLiveEventIngestHeartbeatEventData["properties"]["ingestDriftValue"]["x-ms-client-name"] = "IngestDriftValueInternal"; $.MediaLiveEventIngestHeartbeatEventData["properties"]["lastFragmentArrivalTime"]["format"] = "date-time"; ``` +