From cdc4ea689c8d821f0ec074bc0456aac71a1f0b5e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 21 Apr 2025 15:50:28 +0000 Subject: [PATCH] CodeGen from PR 33835 in Azure/azure-rest-api-specs Merge 2737fdb8c444c5f7f131b5319c3a3ab88affdfd5 into d507e8437a3259e88e6f1222f401340a98a11293 --- ...Messaging.EventGrid.SystemEvents.net8.0.cs | 227 ++++++- ...g.EventGrid.SystemEvents.netstandard2.0.cs | 227 ++++++- ...csCallEndReasonProperties.Serialization.cs | 175 ++++++ ...tData.cs => AcsCallEndReasonProperties.cs} | 28 +- .../src/Generated/AcsCallEndedByKind.cs | 51 ++ .../AcsCallEndedByProperties.Serialization.cs | 158 +++++ .../src/Generated/AcsCallEndedByProperties.cs | 88 +++ .../AcsCallEndedEventData.Serialization.cs | 234 ++++++++ .../src/Generated/AcsCallEndedEventData.cs | 59 ++ ...> AcsCallGroupProperties.Serialization.cs} | 54 +- .../src/Generated/AcsCallGroupProperties.cs | 65 ++ ...ParticipantAddedEventData.Serialization.cs | 218 +++++++ .../AcsCallParticipantAddedEventData.cs | 50 ++ ...articipantEventProperties.Serialization.cs | 238 ++++++++ .../AcsCallParticipantEventProperties.cs | 63 ++ ...CallParticipantProperties.Serialization.cs | 160 +++++ .../Generated/AcsCallParticipantProperties.cs | 69 +++ ...rticipantRemovedEventData.Serialization.cs | 218 +++++++ .../AcsCallParticipantRemovedEventData.cs | 50 ++ .../AcsCallRoomProperties.Serialization.cs | 145 +++++ .../src/Generated/AcsCallRoomProperties.cs | 65 ++ .../AcsCallStartedEventData.Serialization.cs | 186 ++++++ .../src/Generated/AcsCallStartedEventData.cs | 46 ++ ...AcsCallingEventProperties.Serialization.cs | 226 +++++++ .../Generated/AcsCallingEventProperties.cs | 105 ++++ ...ReceivedInThreadEventData.Serialization.cs | 221 +++++++ ...zureBotCommandReceivedInThreadEventData.cs | 63 ++ ...csChatEventBaseProperties.Serialization.cs | 7 +- .../Generated/AcsChatEventBaseProperties.cs | 7 +- ...entInThreadBaseProperties.Serialization.cs | 7 +- .../AcsChatEventInThreadBaseProperties.cs | 12 +- .../AcsChatMessageDeletedEventData.cs | 10 +- .../AcsChatMessageDeletedInThreadEventData.cs | 10 +- ...hatMessageEditedEventData.Serialization.cs | 28 +- .../AcsChatMessageEditedEventData.cs | 17 +- ...geEditedInThreadEventData.Serialization.cs | 28 +- .../AcsChatMessageEditedInThreadEventData.cs | 17 +- ...essageEventBaseProperties.Serialization.cs | 14 +- .../AcsChatMessageEventBaseProperties.cs | 12 +- ...entInThreadBaseProperties.Serialization.cs | 14 +- ...sChatMessageEventInThreadBaseProperties.cs | 12 +- ...tMessageReceivedEventData.Serialization.cs | 28 +- .../AcsChatMessageReceivedEventData.cs | 17 +- ...ReceivedInThreadEventData.Serialization.cs | 28 +- ...AcsChatMessageReceivedInThreadEventData.cs | 17 +- ...csChatParticipantAddedToThreadEventData.cs | 6 +- ...rticipantAddedToThreadWithUserEventData.cs | 6 +- ...atParticipantRemovedFromThreadEventData.cs | 6 +- ...ipantRemovedFromThreadWithUserEventData.cs | 6 +- ...hatThreadCreatedEventData.Serialization.cs | 21 +- .../AcsChatThreadCreatedEventData.cs | 10 +- ...dCreatedWithUserEventData.Serialization.cs | 21 +- .../AcsChatThreadCreatedWithUserEventData.cs | 10 +- .../AcsChatThreadDeletedEventData.cs | 6 +- .../AcsChatThreadEventBaseProperties.cs | 6 +- ...csChatThreadEventInThreadBaseProperties.cs | 10 +- ...readParticipantProperties.Serialization.cs | 21 +- .../AcsChatThreadParticipantProperties.cs | 8 +- ...AcsChatThreadPropertiesUpdatedEventData.cs | 6 +- ...esUpdatedPerUserEventData.Serialization.cs | 21 +- ...ThreadPropertiesUpdatedPerUserEventData.cs | 10 +- .../AcsChatThreadWithUserDeletedEventData.cs | 6 +- ...ReceivedInThreadEventData.Serialization.cs | 221 +++++++ ...ypingIndicatorReceivedInThreadEventData.cs | 63 ++ ...ryReportReceivedEventData.Serialization.cs | 14 +- .../AcsSmsDeliveryReportReceivedEventData.cs | 16 +- ...AcsSmsEventBaseProperties.Serialization.cs | 21 +- .../Generated/AcsSmsEventBaseProperties.cs | 18 +- .../AcsSmsReceivedEventData.Serialization.cs | 7 +- .../src/Generated/AcsSmsReceivedEventData.cs | 13 +- ...nKeyValueDeletedEventData.Serialization.cs | 28 +- ...ppConfigurationKeyValueDeletedEventData.cs | 21 +- ...KeyValueModifiedEventData.Serialization.cs | 28 +- ...pConfigurationKeyValueModifiedEventData.cs | 20 +- ...ppConfigurationSnapshotCreatedEventData.cs | 14 +- ...gurationSnapshotEventData.Serialization.cs | 21 +- .../AppConfigurationSnapshotEventData.cs | 18 +- ...pConfigurationSnapshotModifiedEventData.cs | 14 +- ...municationIdentifierModel.Serialization.cs | 40 +- .../Generated/CommunicationIdentifierModel.cs | 16 +- ...inerServiceClusterSupportEndedEventData.cs | 10 +- ...nerServiceClusterSupportEndingEventData.cs | 10 +- ...ceClusterSupportEventData.Serialization.cs | 7 +- ...ContainerServiceClusterSupportEventData.cs | 12 +- ...VersionAvailableEventData.Serialization.cs | 21 +- ...eNewKubernetesVersionAvailableEventData.cs | 18 +- ...eNodePoolRollingEventData.Serialization.cs | 7 +- ...ontainerServiceNodePoolRollingEventData.cs | 12 +- ...erServiceNodePoolRollingFailedEventData.cs | 10 +- ...rServiceNodePoolRollingStartedEventData.cs | 10 +- ...erviceNodePoolRollingSucceededEventData.cs | 10 +- ...VersionPublishedEventData.Serialization.cs | 198 +++++++ .../EdgeSolutionVersionPublishedEventData.cs | 117 ++++ .../EventGridSystemEventsModelFactory.cs | 297 +++++++++- ...ptureFileCreatedEventData.Serialization.cs | 21 +- .../EventHubCaptureFileCreatedEventData.cs | 18 +- ...setDriftDetectedEventData.Serialization.cs | 59 +- ...ngServicesDatasetDriftDetectedEventData.cs | 24 +- ...cesModelDeployedEventData.Serialization.cs | 91 +-- ...eLearningServicesModelDeployedEventData.cs | 21 +- ...sModelRegisteredEventData.Serialization.cs | 82 +-- ...earningServicesModelRegisteredEventData.cs | 18 +- ...icesRunCompletedEventData.Serialization.cs | 98 +-- ...neLearningServicesRunCompletedEventData.cs | 24 +- ...RunStatusChangedEventData.Serialization.cs | 105 ++-- ...arningServicesRunStatusChangedEventData.cs | 27 +- .../tsp-location.yaml | 5 +- .../api/Azure.Messaging.EventGrid.net8.0.cs | 187 ++++++ ...zure.Messaging.EventGrid.netstandard2.0.cs | 187 ++++++ .../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 ++ ...CallParticipantProperties.Serialization.cs | 50 ++ .../Models/AcsCallParticipantProperties.cs | 32 + ...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 +- .../Models/AcsChatMessageDeletedEventData.cs | 7 +- ...eDeletedInThreadEventData.Serialization.cs | 4 - .../AcsChatMessageDeletedInThreadEventData.cs | 17 +- .../Models/AcsChatMessageEditedEventData.cs | 11 +- ...geEditedInThreadEventData.Serialization.cs | 4 - .../AcsChatMessageEditedInThreadEventData.cs | 21 +- .../AcsChatMessageEventBaseProperties.cs | 10 +- ...entInThreadBaseProperties.Serialization.cs | 4 - ...sChatMessageEventInThreadBaseProperties.cs | 21 +- .../Models/AcsChatMessageReceivedEventData.cs | 8 +- ...ReceivedInThreadEventData.Serialization.cs | 4 - ...AcsChatMessageReceivedInThreadEventData.cs | 21 +- ...antAddedToThreadEventData.Serialization.cs | 8 - ...csChatParticipantAddedToThreadEventData.cs | 18 +- ...emovedFromThreadEventData.Serialization.cs | 8 - ...atParticipantRemovedFromThreadEventData.cs | 18 +- ...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 +- ...AcsChatThreadPropertiesUpdatedEventData.cs | 12 +- ...esUpdatedPerUserEventData.Serialization.cs | 10 +- ...ThreadPropertiesUpdatedPerUserEventData.cs | 11 +- ...dWithUserDeletedEventData.Serialization.cs | 4 - .../AcsChatThreadWithUserDeletedEventData.cs | 7 +- ...ReceivedInThreadEventData.Serialization.cs | 139 +++++ ...ypingIndicatorReceivedInThreadEventData.cs | 63 ++ ...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 | 2 +- 191 files changed, 9302 insertions(+), 777 deletions(-) create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.Serialization.cs rename sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/{ApiManagementGatewayApiRemovedEventData.cs => AcsCallEndReasonProperties.cs} (60%) create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByKind.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.cs rename sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/{ApiManagementGatewayApiRemovedEventData.Serialization.cs => AcsCallGroupProperties.Serialization.cs} (58%) create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs 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/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.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs index 7f23a6930a0e..308d40b338d0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs @@ -7,6 +7,170 @@ public static partial class EventGridExtensions } namespace Azure.Messaging.EventGrid.SystemEvents { + [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.SystemEvents.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.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.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AcsCallEndedByProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndedEventData() { } + public double? CallDurationInSeconds { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallEndReasonProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallGroupProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallingEventProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + 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; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantAddedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantEventProperties : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantEventProperties() { } + 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; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public string Role { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantRemovedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallRoomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallStartedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AcsChatEventBaseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatEventBaseProperties() { } @@ -307,6 +471,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AcsEmailDeliveryReportReceivedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsEmailDeliveryReportReceivedEventData() { } @@ -1331,17 +1507,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ApiManagementGatewayApiRemovedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ApiManagementGatewayApiRemovedEventData() { } - public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class ApiManagementGatewayCertificateAuthorityCreatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayCertificateAuthorityCreatedEventData() { } @@ -2332,6 +2497,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EdgeSolutionVersionPublishedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + 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; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EventGridMqttClientCreatedOrUpdatedEventData() { } @@ -2441,6 +2623,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write } public static partial class EventGridSystemEventsModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind type = default(Azure.Messaging.EventGrid.SystemEvents.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, double? callDurationInSeconds = default(double?)) { 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.AcsCallParticipantEventProperties AcsCallParticipantEventProperties(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, string role = null) { 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; } @@ -2464,6 +2658,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedEventData AcsChatThreadPropertiesUpdatedEventData(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, System.Collections.Generic.IReadOnlyDictionary metadata = 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; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender = null, string recipient = null, string internetMessageId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status = default(Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus?), Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails = null, System.DateTimeOffset? deliveryAttemptTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails AcsEmailDeliveryReportStatusDetails(string statusMessage = null, string recipientMailServerHostName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailEngagementTrackingReportReceivedEventData AcsEmailEngagementTrackingReportReceivedEventData(string sender = null, string recipient = null, string messageId = null, System.DateTimeOffset? userActionTimestamp = default(System.DateTimeOffset?), string engagementContext = null, string userAgent = null, Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement? engagement = default(Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement?)) { throw null; } @@ -2527,7 +2722,6 @@ public static partial class EventGridSystemEventsModelFactory 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.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; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityDeletedEventData ApiManagementGatewayCertificateAuthorityDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityUpdatedEventData ApiManagementGatewayCertificateAuthorityUpdatedEventData(string resourceUri = null) { throw null; } @@ -2602,6 +2796,7 @@ public static partial class EventGridSystemEventsModelFactory 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; } @@ -4372,6 +4567,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } 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"; @@ -4388,6 +4588,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"; @@ -4428,7 +4629,6 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; - public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; public const string ApiManagementGatewayCertificateAuthorityDeleted = "Microsoft.ApiManagement.GatewayCertificateAuthorityDeleted"; public const string ApiManagementGatewayCertificateAuthorityUpdated = "Microsoft.ApiManagement.GatewayCertificateAuthorityUpdated"; @@ -4476,6 +4676,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"; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs index 7f23a6930a0e..308d40b338d0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs @@ -7,6 +7,170 @@ public static partial class EventGridExtensions } namespace Azure.Messaging.EventGrid.SystemEvents { + [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.SystemEvents.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.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.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AcsCallEndedByProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndedEventData() { } + public double? CallDurationInSeconds { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallEndReasonProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallGroupProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallingEventProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + 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; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantAddedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantEventProperties : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantEventProperties() { } + 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; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public string Role { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantRemovedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallRoomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallStartedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AcsChatEventBaseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatEventBaseProperties() { } @@ -307,6 +471,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AcsEmailDeliveryReportReceivedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsEmailDeliveryReportReceivedEventData() { } @@ -1331,17 +1507,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ApiManagementGatewayApiRemovedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ApiManagementGatewayApiRemovedEventData() { } - public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class ApiManagementGatewayCertificateAuthorityCreatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayCertificateAuthorityCreatedEventData() { } @@ -2332,6 +2497,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EdgeSolutionVersionPublishedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + 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; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EventGridMqttClientCreatedOrUpdatedEventData() { } @@ -2441,6 +2623,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write } public static partial class EventGridSystemEventsModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind type = default(Azure.Messaging.EventGrid.SystemEvents.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, double? callDurationInSeconds = default(double?)) { 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.AcsCallParticipantEventProperties AcsCallParticipantEventProperties(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, string role = null) { 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; } @@ -2464,6 +2658,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedEventData AcsChatThreadPropertiesUpdatedEventData(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, System.Collections.Generic.IReadOnlyDictionary metadata = 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; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender = null, string recipient = null, string internetMessageId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status = default(Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus?), Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails = null, System.DateTimeOffset? deliveryAttemptTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails AcsEmailDeliveryReportStatusDetails(string statusMessage = null, string recipientMailServerHostName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailEngagementTrackingReportReceivedEventData AcsEmailEngagementTrackingReportReceivedEventData(string sender = null, string recipient = null, string messageId = null, System.DateTimeOffset? userActionTimestamp = default(System.DateTimeOffset?), string engagementContext = null, string userAgent = null, Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement? engagement = default(Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement?)) { throw null; } @@ -2527,7 +2722,6 @@ public static partial class EventGridSystemEventsModelFactory 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.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; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityDeletedEventData ApiManagementGatewayCertificateAuthorityDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityUpdatedEventData ApiManagementGatewayCertificateAuthorityUpdatedEventData(string resourceUri = null) { throw null; } @@ -2602,6 +2796,7 @@ public static partial class EventGridSystemEventsModelFactory 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; } @@ -4372,6 +4567,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } 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"; @@ -4388,6 +4588,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"; @@ -4428,7 +4629,6 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; - public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; public const string ApiManagementGatewayCertificateAuthorityDeleted = "Microsoft.ApiManagement.GatewayCertificateAuthorityDeleted"; public const string ApiManagementGatewayCertificateAuthorityUpdated = "Microsoft.ApiManagement.GatewayCertificateAuthorityUpdated"; @@ -4476,6 +4676,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"; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.Serialization.cs new file mode 100644 index 000000000000..2ab8758f008d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndReasonProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallEndReasonProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteNumberValue(Code.Value); + } + if (Optional.IsDefined(SubCode)) + { + writer.WritePropertyName("subCode"u8); + writer.WriteNumberValue(SubCode.Value); + } + if (Optional.IsDefined(Phrase)) + { + writer.WritePropertyName("phrase"u8); + writer.WriteStringValue(Phrase); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AcsCallEndReasonProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallEndReasonProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallEndReasonProperties(document.RootElement, options); + } + + internal static AcsCallEndReasonProperties DeserializeAcsCallEndReasonProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? code = default; + int? subCode = default; + string phrase = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + 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; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallEndReasonProperties(code, subCode, phrase, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsCallEndReasonProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallEndReasonProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndReasonProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallEndReasonProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.cs similarity index 60% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.cs index 672face4a74c..b0c87d904258 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.cs @@ -10,8 +10,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents { - /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayAPIRemoved event. - public partial class ApiManagementGatewayApiRemovedEventData + /// Schema of calling event reason properties. + public partial class AcsCallEndReasonProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,21 +45,29 @@ public partial class ApiManagementGatewayApiRemovedEventData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal ApiManagementGatewayApiRemovedEventData() + /// Initializes a new instance of . + internal AcsCallEndReasonProperties() { } - /// Initializes a new instance of . - /// The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateways/<GatewayName>/apis/<ResourceName>`. + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for the ending the call. /// Keeps track of any properties unknown to the library. - internal ApiManagementGatewayApiRemovedEventData(string resourceUri, IDictionary serializedAdditionalRawData) + internal AcsCallEndReasonProperties(int? code, int? subCode, string phrase, IDictionary serializedAdditionalRawData) { - ResourceUri = resourceUri; + Code = code; + SubCode = subCode; + Phrase = phrase; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateways/<GatewayName>/apis/<ResourceName>`. - public string ResourceUri { get; } + /// Reason code for ending the call. + public int? Code { get; } + /// Reason subcode for ending the call. + public int? SubCode { get; } + /// Reason for the ending the call. + public string Phrase { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByKind.cs new file mode 100644 index 000000000000..9ddeb05d3059 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/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.SystemEvents +{ + /// Call ended participant kind. + 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"; + + /// Participant. + public static AcsCallEndedByKind Participant { get; } = new AcsCallEndedByKind(ParticipantValue); + /// MicrosoftInternal. + 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.SystemEvents/src/Generated/AcsCallEndedByProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.Serialization.cs new file mode 100644 index 000000000000..621cd3bac40c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndedByProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallEndedByProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("communicationIdentifier"u8); + writer.WriteObjectValue(CommunicationIdentifier, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AcsCallEndedByProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallEndedByProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallEndedByProperties(document.RootElement, options); + } + + internal static AcsCallEndedByProperties DeserializeAcsCallEndedByProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + AcsCallEndedByKind type = default; + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value, options); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new AcsCallEndedByKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallEndedByProperties(communicationIdentifier, type, name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsCallEndedByProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallEndedByProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedByProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallEndedByProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.cs new file mode 100644 index 000000000000..7998c3505048 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.cs @@ -0,0 +1,88 @@ +// 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 calling event endedby properties. + public partial class AcsCallEndedByProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of call ended by. + /// The name of the call ended by. + /// or is null. + internal AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallEndedByKind type, string name) + { + Argument.AssertNotNull(communicationIdentifier, nameof(communicationIdentifier)); + Argument.AssertNotNull(name, nameof(name)); + + CommunicationIdentifier = communicationIdentifier; + Type = type; + Name = name; + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of call ended by. + /// The name of the call ended by. + /// Keeps track of any properties unknown to the library. + internal AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallEndedByKind type, string name, IDictionary serializedAdditionalRawData) + { + CommunicationIdentifier = communicationIdentifier; + Type = type; + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AcsCallEndedByProperties() + { + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The type of call ended by. + public AcsCallEndedByKind Type { get; } + /// The name of the call ended by. + public string Name { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.Serialization.cs new file mode 100644 index 000000000000..7f54f45db504 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.Serialization.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndedEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallEndedEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(EndedBy)) + { + writer.WritePropertyName("endedBy"u8); + writer.WriteObjectValue(EndedBy, options); + } + if (Optional.IsDefined(Reason)) + { + writer.WritePropertyName("reason"u8); + writer.WriteObjectValue(Reason, options); + } + if (Optional.IsDefined(CallDurationInSeconds)) + { + writer.WritePropertyName("callDurationInSeconds"u8); + writer.WriteNumberValue(CallDurationInSeconds.Value); + } + } + + AcsCallEndedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallEndedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallEndedEventData(document.RootElement, options); + } + + internal static AcsCallEndedEventData DeserializeAcsCallEndedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallEndedByProperties endedBy = default; + AcsCallEndReasonProperties reason = default; + double? callDurationInSeconds = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endedBy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endedBy = AcsCallEndedByProperties.DeserializeAcsCallEndedByProperties(property.Value, options); + continue; + } + if (property.NameEquals("reason"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reason = AcsCallEndReasonProperties.DeserializeAcsCallEndReasonProperties(property.Value, options); + continue; + } + if (property.NameEquals("callDurationInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + callDurationInSeconds = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + 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, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + 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; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallEndedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData, + endedBy, + reason, + callDurationInSeconds); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsCallEndedEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsCallEndedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallEndedEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.cs new file mode 100644 index 000000000000..683fd03fc9d3 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.cs @@ -0,0 +1,59 @@ +// 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.CallEnded event. + public partial class AcsCallEndedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of 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 call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + /// 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, IDictionary serializedAdditionalRawData, AcsCallEndedByProperties endedBy, AcsCallEndReasonProperties reason, double? callDurationInSeconds) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, serializedAdditionalRawData) + { + EndedBy = endedBy; + Reason = reason; + CallDurationInSeconds = callDurationInSeconds; + } + + /// Initializes a new instance of for deserialization. + internal AcsCallEndedEventData() + { + } + + /// 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 double? CallDurationInSeconds { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.Serialization.cs similarity index 58% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.Serialization.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.Serialization.cs index d59431734e9b..c139a0e508a1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents { - public partial class ApiManagementGatewayApiRemovedEventData : IUtf8JsonSerializable, IJsonModel + public partial class AcsCallGroupProperties : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,16 +28,16 @@ void IJsonModel.Write(Utf8JsonWriter wr /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ApiManagementGatewayApiRemovedEventData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AcsCallGroupProperties)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ResourceUri)) + if (Optional.IsDefined(Id)) { - writer.WritePropertyName("resourceUri"u8); - writer.WriteStringValue(ResourceUri); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -56,19 +56,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ApiManagementGatewayApiRemovedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AcsCallGroupProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ApiManagementGatewayApiRemovedEventData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AcsCallGroupProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeApiManagementGatewayApiRemovedEventData(document.RootElement, options); + return DeserializeAcsCallGroupProperties(document.RootElement, options); } - internal static ApiManagementGatewayApiRemovedEventData DeserializeApiManagementGatewayApiRemovedEventData(JsonElement element, ModelReaderWriterOptions options = null) + internal static AcsCallGroupProperties DeserializeAcsCallGroupProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -76,14 +76,14 @@ internal static ApiManagementGatewayApiRemovedEventData DeserializeApiManagement { return null; } - string resourceUri = default; + string id = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("resourceUri"u8)) + if (property.NameEquals("id"u8)) { - resourceUri = property.Value.GetString(); + id = property.Value.GetString(); continue; } if (options.Format != "W") @@ -92,46 +92,46 @@ internal static ApiManagementGatewayApiRemovedEventData DeserializeApiManagement } } serializedAdditionalRawData = rawDataDictionary; - return new ApiManagementGatewayApiRemovedEventData(resourceUri, serializedAdditionalRawData); + return new AcsCallGroupProperties(id, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ApiManagementGatewayApiRemovedEventData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AcsCallGroupProperties)} does not support writing '{options.Format}' format."); } } - ApiManagementGatewayApiRemovedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AcsCallGroupProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeApiManagementGatewayApiRemovedEventData(document.RootElement, options); + return DeserializeAcsCallGroupProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ApiManagementGatewayApiRemovedEventData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AcsCallGroupProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static ApiManagementGatewayApiRemovedEventData FromResponse(Response response) + internal static AcsCallGroupProperties FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeApiManagementGatewayApiRemovedEventData(document.RootElement); + return DeserializeAcsCallGroupProperties(document.RootElement); } /// Convert into a . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.cs new file mode 100644 index 000000000000..801407f9494f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.cs @@ -0,0 +1,65 @@ +// 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 calling event group properties. + public partial class AcsCallGroupProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AcsCallGroupProperties() + { + } + + /// Initializes a new instance of . + /// Group Id. + /// Keeps track of any properties unknown to the library. + internal AcsCallGroupProperties(string id, IDictionary serializedAdditionalRawData) + { + Id = id; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Group Id. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.Serialization.cs new file mode 100644 index 000000000000..f324b2608e4d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantAddedEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallParticipantAddedEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AcsCallParticipantAddedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallParticipantAddedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement, options); + } + + internal static AcsCallParticipantAddedEventData DeserializeAcsCallParticipantAddedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + 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; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + 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, options); + 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, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + 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; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallParticipantAddedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData, + user, + displayName, + participantId, + userAgent); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsCallParticipantAddedEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsCallParticipantAddedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallParticipantAddedEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.cs new file mode 100644 index 000000000000..45ad9970d45b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.cs @@ -0,0 +1,50 @@ +// 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.CallParticipantAdded event. + public partial class AcsCallParticipantAddedEventData : AcsCallParticipantEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of 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 call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + /// 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, IDictionary serializedAdditionalRawData, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, serializedAdditionalRawData, user, displayName, participantId, userAgent) + { + } + + /// Initializes a new instance of for deserialization. + internal AcsCallParticipantAddedEventData() + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.Serialization.cs new file mode 100644 index 000000000000..8572ea7f988d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.Serialization.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantEventProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallParticipantEventProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(User)) + { + writer.WritePropertyName("user"u8); + writer.WriteObjectValue(User, options); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(ParticipantId)) + { + writer.WritePropertyName("participantId"u8); + writer.WriteStringValue(ParticipantId); + } + if (Optional.IsDefined(UserAgent)) + { + writer.WritePropertyName("userAgent"u8); + writer.WriteStringValue(UserAgent); + } + } + + AcsCallParticipantEventProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallParticipantEventProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantEventProperties(document.RootElement, options); + } + + internal static AcsCallParticipantEventProperties DeserializeAcsCallParticipantEventProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + 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; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + 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, options); + 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, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + 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; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallParticipantEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData, + user, + displayName, + participantId, + userAgent); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsCallParticipantEventProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallParticipantEventProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantEventProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallParticipantEventProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantEventProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantEventProperties(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.cs new file mode 100644 index 000000000000..2eae86d0e430 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.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 common properties of all participant events. + public partial class AcsCallParticipantEventProperties : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of calling event. + /// , or is null. + internal AcsCallParticipantEventProperties(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 call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + /// The user of the call participant. + /// The display name of the participant. + /// The id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, IDictionary serializedAdditionalRawData, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, serializedAdditionalRawData) + { + User = user; + DisplayName = displayName; + ParticipantId = participantId; + UserAgent = userAgent; + } + + /// Initializes a new instance of for deserialization. + internal AcsCallParticipantEventProperties() + { + } + + /// 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.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs new file mode 100644 index 000000000000..1843234449e2 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallParticipantProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CommunicationIdentifier)) + { + writer.WritePropertyName("communicationIdentifier"u8); + writer.WriteObjectValue(CommunicationIdentifier, options); + } + if (Optional.IsDefined(Role)) + { + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AcsCallParticipantProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallParticipantProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantProperties(document.RootElement, options); + } + + internal static AcsCallParticipantProperties DeserializeAcsCallParticipantProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + string role = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value, options); + continue; + } + if (property.NameEquals("role"u8)) + { + role = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallParticipantProperties(communicationIdentifier, role, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsCallParticipantProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallParticipantProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallParticipantProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.cs new file mode 100644 index 000000000000..6c9eb64e8724 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.cs @@ -0,0 +1,69 @@ +// 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 common properties of all participant event user. + public partial class AcsCallParticipantProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AcsCallParticipantProperties() + { + } + + /// Initializes a new instance of . + /// The communication identifier of the participant user. + /// The role of the participant. + /// Keeps track of any properties unknown to the library. + internal AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier, string role, IDictionary serializedAdditionalRawData) + { + CommunicationIdentifier = communicationIdentifier; + Role = role; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The communication identifier of the participant user. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The role of the participant. + public string Role { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.Serialization.cs new file mode 100644 index 000000000000..74085fb1fbbe --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantRemovedEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallParticipantRemovedEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AcsCallParticipantRemovedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallParticipantRemovedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement, options); + } + + internal static AcsCallParticipantRemovedEventData DeserializeAcsCallParticipantRemovedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + 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; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + 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, options); + 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, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + 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; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallParticipantRemovedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData, + user, + displayName, + participantId, + userAgent); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsCallParticipantRemovedEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsCallParticipantRemovedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallParticipantRemovedEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.cs new file mode 100644 index 000000000000..cf3bb51128fe --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.cs @@ -0,0 +1,50 @@ +// 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.CallParticipantRemoved event. + public partial class AcsCallParticipantRemovedEventData : AcsCallParticipantEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of 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 call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + /// 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, IDictionary serializedAdditionalRawData, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, serializedAdditionalRawData, user, displayName, participantId, userAgent) + { + } + + /// Initializes a new instance of for deserialization. + internal AcsCallParticipantRemovedEventData() + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.Serialization.cs new file mode 100644 index 000000000000..889bec0eb0ed --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallRoomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallRoomProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AcsCallRoomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallRoomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallRoomProperties(document.RootElement, options); + } + + internal static AcsCallRoomProperties DeserializeAcsCallRoomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallRoomProperties(id, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsCallRoomProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallRoomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallRoomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallRoomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.cs new file mode 100644 index 000000000000..85fc5ddad67b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.cs @@ -0,0 +1,65 @@ +// 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 calling event room properties. + public partial class AcsCallRoomProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AcsCallRoomProperties() + { + } + + /// Initializes a new instance of . + /// Room Id. + /// Keeps track of any properties unknown to the library. + internal AcsCallRoomProperties(string id, IDictionary serializedAdditionalRawData) + { + Id = id; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Room Id. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.Serialization.cs new file mode 100644 index 000000000000..eca071b19c58 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallStartedEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallStartedEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AcsCallStartedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallStartedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallStartedEventData(document.RootElement, options); + } + + internal static AcsCallStartedEventData DeserializeAcsCallStartedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + 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; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + 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, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + 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; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallStartedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsCallStartedEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsCallStartedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallStartedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallStartedEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.cs new file mode 100644 index 000000000000..084316dc68df --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.cs @@ -0,0 +1,46 @@ +// 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.CallStarted event. + public partial class AcsCallStartedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of 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 call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + internal AcsCallStartedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, IDictionary serializedAdditionalRawData) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal AcsCallStartedEventData() + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.Serialization.cs new file mode 100644 index 000000000000..b99e7856b299 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.Serialization.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallingEventProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallingEventProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("startedBy"u8); + writer.WriteObjectValue(StartedBy, options); + writer.WritePropertyName("serverCallId"u8); + writer.WriteStringValue(ServerCallId); + if (Optional.IsDefined(Group)) + { + writer.WritePropertyName("group"u8); + writer.WriteObjectValue(Group, options); + } + if (Optional.IsDefined(Room)) + { + writer.WritePropertyName("room"u8); + writer.WriteObjectValue(Room, options); + } + if (Optional.IsDefined(IsTwoParty)) + { + writer.WritePropertyName("isTwoParty"u8); + writer.WriteBooleanValue(IsTwoParty.Value); + } + writer.WritePropertyName("correlationId"u8); + writer.WriteStringValue(CorrelationId); + if (Optional.IsDefined(IsRoomsCall)) + { + writer.WritePropertyName("isRoomsCall"u8); + writer.WriteBooleanValue(IsRoomsCall.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AcsCallingEventProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsCallingEventProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallingEventProperties(document.RootElement, options); + } + + internal static AcsCallingEventProperties DeserializeAcsCallingEventProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + 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; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + 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, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + 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; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallingEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsCallingEventProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallingEventProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallingEventProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallingEventProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.cs new file mode 100644 index 000000000000..0c4873031004 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.cs @@ -0,0 +1,105 @@ +// 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 common properties of all calling events. + public partial class AcsCallingEventProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of 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 call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + internal AcsCallingEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, IDictionary serializedAdditionalRawData) + { + StartedBy = startedBy; + ServerCallId = serverCallId; + Group = group; + Room = room; + IsTwoParty = isTwoParty; + CorrelationId = correlationId; + IsRoomsCall = isRoomsCall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AcsCallingEventProperties() + { + } + + /// The call participant who initiated the call. + public AcsCallParticipantProperties StartedBy { get; } + /// The call id of the server. + public string ServerCallId { get; } + /// The group metadata. + public AcsCallGroupProperties Group { get; } + /// The room metadata. + public AcsCallRoomProperties Room { get; } + /// Is two-party in calling event. + public bool? IsTwoParty { get; } + /// The correlationId of 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.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..e51fc567b370 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsChatAzureBotCommandReceivedInThreadEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + } + + AcsChatAzureBotCommandReceivedInThreadEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsChatAzureBotCommandReceivedInThreadEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement, options); + } + + internal static AcsChatAzureBotCommandReceivedInThreadEventData DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + 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; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + 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, options); + 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; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsChatAzureBotCommandReceivedInThreadEventData( + transactionId, + threadId, + serializedAdditionalRawData, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsChatAzureBotCommandReceivedInThreadEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsChatAzureBotCommandReceivedInThreadEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsChatAzureBotCommandReceivedInThreadEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.cs new file mode 100644 index 000000000000..919251bdce5a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/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 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 threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(threadId, messageId, senderCommunicationIdentifier, type) + { + 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. + /// Keeps track of any properties unknown to the library. + /// 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. + internal AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + MessageBody = messageBody; + Metadata = metadata; + } + + /// Initializes a new instance of for deserialization. + internal AcsChatAzureBotCommandReceivedInThreadEventData() + { + } + + /// 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.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs index 727b76c5022c..97285b744c1e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs @@ -41,11 +41,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("transactionId"u8); writer.WriteStringValue(TransactionId); } - if (Optional.IsDefined(ThreadId)) - { - writer.WritePropertyName("threadId"u8); - writer.WriteStringValue(ThreadId); - } + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.cs index ab0c02f851ba..54f025db262c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.cs @@ -47,12 +47,15 @@ public partial class AcsChatEventBaseProperties /// Initializes a new instance of . /// The communication identifier of the target user. - /// is null. - internal AcsChatEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier) + /// The chat thread id. + /// or is null. + internal AcsChatEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); RecipientCommunicationIdentifier = recipientCommunicationIdentifier; + ThreadId = threadId; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs index 474b5307329e..81ddd1d70f14 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs @@ -39,11 +39,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("transactionId"u8); writer.WriteStringValue(TransactionId); } - if (Optional.IsDefined(ThreadId)) - { - writer.WritePropertyName("threadId"u8); - writer.WriteStringValue(ThreadId); - } + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.cs index a19356f6f111..7648670599d0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.cs @@ -46,8 +46,13 @@ public partial class AcsChatEventInThreadBaseProperties private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AcsChatEventInThreadBaseProperties() + /// The chat thread id. + /// is null. + internal AcsChatEventInThreadBaseProperties(string threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); + + ThreadId = threadId; } /// Initializes a new instance of . @@ -61,6 +66,11 @@ internal AcsChatEventInThreadBaseProperties(string transactionId, string threadI _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AcsChatEventInThreadBaseProperties() + { + } + /// The transaction id will be used as co-relation vector. public string TransactionId { get; } /// The chat thread id. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.cs index 5f6a22502794..ab6faf874410 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.cs @@ -15,12 +15,18 @@ public partial class AcsChatMessageDeletedEventData : AcsChatMessageEventBasePro { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// or is null. - internal AcsChatMessageDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier) + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(recipientCommunicationIdentifier, threadId, messageId, senderCommunicationIdentifier, type) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + 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 . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.cs index 36a7b77ba1a3..085d7b6de3b0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.cs @@ -14,11 +14,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageDeletedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// is null. - internal AcsChatMessageDeletedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier) : base(senderCommunicationIdentifier) + /// The type of the message. + /// , , or is null. + internal AcsChatMessageDeletedInThreadEventData(string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(threadId, messageId, senderCommunicationIdentifier, type) { + 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 . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs index bb6f10661e9a..1953b5d17754 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs @@ -35,19 +35,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageBody)) + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName("messageBody"u8); - writer.WriteStringValue(MessageBody); - } - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (Optional.IsDefined(EditTime)) { writer.WritePropertyName("editTime"u8); @@ -98,6 +98,10 @@ internal static AcsChatMessageEditedEventData DeserializeAcsChatMessageEditedEve } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -186,7 +190,7 @@ internal static AcsChatMessageEditedEventData DeserializeAcsChatMessageEditedEve type, version, messageBody, - metadata, + metadata ?? new ChangeTrackingDictionary(), editTime); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.cs index b124a0af4025..f8e58f011f23 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.cs @@ -15,16 +15,23 @@ public partial class AcsChatMessageEditedEventData : AcsChatMessageEventBaseProp { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// The chat message metadata. - /// , or is null. - internal AcsChatMessageEditedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier) + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageEditedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(recipientCommunicationIdentifier, threadId, messageId, senderCommunicationIdentifier, type) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); - Metadata = metadata; + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs index 69d1a00f6399..cd3d9fab634a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs @@ -35,19 +35,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageBody)) + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName("messageBody"u8); - writer.WriteStringValue(MessageBody); - } - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (Optional.IsDefined(EditTime)) { writer.WritePropertyName("editTime"u8); @@ -97,6 +97,10 @@ internal static AcsChatMessageEditedInThreadEventData DeserializeAcsChatMessageE } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -179,7 +183,7 @@ internal static AcsChatMessageEditedInThreadEventData DeserializeAcsChatMessageE type, version, messageBody, - metadata, + metadata ?? new ChangeTrackingDictionary(), editTime); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.cs index 70250f33da52..8d7ba4725066 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.cs @@ -14,15 +14,22 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEditedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// The chat message metadata. - /// or is null. - internal AcsChatMessageEditedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(senderCommunicationIdentifier) + /// The type of the message. + /// The body of the chat message. + /// , , , or is null. + internal AcsChatMessageEditedInThreadEventData(string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); - Metadata = metadata; + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs index 5e58721e997e..00d463691c99 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs @@ -35,11 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageId)) - { - writer.WritePropertyName("messageId"u8); - writer.WriteStringValue(MessageId); - } + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); writer.WritePropertyName("senderCommunicationIdentifier"u8); writer.WriteObjectValue(SenderCommunicationIdentifier, options); if (Optional.IsDefined(SenderDisplayName)) @@ -52,11 +49,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("composeTime"u8); writer.WriteStringValue(ComposeTime.Value, "O"); } - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); if (Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.cs index 0d2231a308ce..640ebaac0733 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.cs @@ -15,14 +15,22 @@ public partial class AcsChatMessageEventBaseProperties : AcsChatEventBasePropert { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// or is null. - internal AcsChatMessageEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier) : base(recipientCommunicationIdentifier) + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + 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 . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs index 01eca560f42d..f696239c6d69 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs @@ -35,11 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageId)) - { - writer.WritePropertyName("messageId"u8); - writer.WriteStringValue(MessageId); - } + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); writer.WritePropertyName("senderCommunicationIdentifier"u8); writer.WriteObjectValue(SenderCommunicationIdentifier, options); if (Optional.IsDefined(SenderDisplayName)) @@ -52,11 +49,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("composeTime"u8); writer.WriteStringValue(ComposeTime.Value, "O"); } - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); if (Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.cs index 3ae4acc44ddd..a15c487d6853 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.cs @@ -14,13 +14,21 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// is null. - internal AcsChatMessageEventInThreadBaseProperties(CommunicationIdentifierModel senderCommunicationIdentifier) + /// The type of the message. + /// , , or is null. + internal AcsChatMessageEventInThreadBaseProperties(string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(threadId) { + 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 . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs index 8fb75003a289..224b82b52c36 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs @@ -35,19 +35,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageBody)) + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName("messageBody"u8); - writer.WriteStringValue(MessageBody); - } - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); } AcsChatMessageReceivedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -92,6 +92,10 @@ internal static AcsChatMessageReceivedEventData DeserializeAcsChatMessageReceive } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -171,7 +175,7 @@ internal static AcsChatMessageReceivedEventData DeserializeAcsChatMessageReceive type, version, messageBody, - metadata); + metadata ?? new ChangeTrackingDictionary()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.cs index 1f9a4f91d206..481aac65bc83 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.cs @@ -15,16 +15,23 @@ public partial class AcsChatMessageReceivedEventData : AcsChatMessageEventBasePr { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// The chat message metadata. - /// , or is null. - internal AcsChatMessageReceivedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier) + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageReceivedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(recipientCommunicationIdentifier, threadId, messageId, senderCommunicationIdentifier, type) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); - Metadata = metadata; + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs index 31d5318df005..948f13b93ef9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs @@ -35,19 +35,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageBody)) + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName("messageBody"u8); - writer.WriteStringValue(MessageBody); - } - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); } AcsChatMessageReceivedInThreadEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -91,6 +91,10 @@ internal static AcsChatMessageReceivedInThreadEventData DeserializeAcsChatMessag } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -164,7 +168,7 @@ internal static AcsChatMessageReceivedInThreadEventData DeserializeAcsChatMessag type, version, messageBody, - metadata); + metadata ?? new ChangeTrackingDictionary()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.cs index c99363e44298..3e0405cc8453 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.cs @@ -14,15 +14,22 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// The chat message metadata. - /// or is null. - internal AcsChatMessageReceivedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(senderCommunicationIdentifier) + /// The type of the message. + /// The body of the chat message. + /// , , , or is null. + internal AcsChatMessageReceivedInThreadEventData(string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); - Metadata = metadata; + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.cs index 5ae69978e278..de246568de34 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.cs @@ -14,11 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantAddedToThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . + /// 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(CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) + /// , or is null. + internal AcsChatParticipantAddedToThreadEventData(string threadId, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); Argument.AssertNotNull(participantAdded, nameof(participantAdded)); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.cs index 407412eb394b..b0d721b171d2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.cs @@ -15,12 +15,14 @@ public partial class AcsChatParticipantAddedToThreadWithUserEventData : AcsChatT { /// Initializes a new instance of . /// The communication identifier of the target user. + /// 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 AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(recipientCommunicationIdentifier) + /// , , or is null. + internal AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); Argument.AssertNotNull(participantAdded, nameof(participantAdded)); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.cs index b3b2328112b9..d3a868a5ed45 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.cs @@ -14,11 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantRemovedFromThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . + /// 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(CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) + /// , or is null. + internal AcsChatParticipantRemovedFromThreadEventData(string threadId, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.cs index d99153a59c67..5704886c204e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.cs @@ -15,12 +15,14 @@ public partial class AcsChatParticipantRemovedFromThreadWithUserEventData : AcsC { /// Initializes a new instance of . /// The communication identifier of the target user. + /// 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 AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(recipientCommunicationIdentifier) + /// , , or is null. + internal AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs index 1d2f41eccb9d..6dc6ee10a7b3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs @@ -57,14 +57,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri #endif } writer.WriteEndObject(); - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); writer.WritePropertyName("participants"u8); writer.WriteStartArray(); foreach (var item in Participants) @@ -130,6 +133,10 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -190,7 +197,7 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve version, createdByCommunicationIdentifier, properties, - metadata, + metadata ?? new ChangeTrackingDictionary(), participants); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs index dd366f600f08..1ea79ba81daf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs @@ -15,21 +15,21 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadCreatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. /// The communication identifier of the user who created the thread. /// The thread properties. - /// The thread metadata. /// The list of properties of participants who are part of the thread. - /// , , or is null. - internal AcsChatThreadCreatedEventData(CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) + /// , , or is null. + internal AcsChatThreadCreatedEventData(string threadId, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IEnumerable participants) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); - Argument.AssertNotNull(metadata, nameof(metadata)); Argument.AssertNotNull(participants, nameof(participants)); CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; - Metadata = metadata; + Metadata = new ChangeTrackingDictionary(); Participants = participants.ToList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs index 16c92dd38cd7..8d34d80179a7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs @@ -57,14 +57,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri #endif } writer.WriteEndObject(); - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); writer.WritePropertyName("participants"u8); writer.WriteStartArray(); foreach (var item in Participants) @@ -131,6 +134,10 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -197,7 +204,7 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr version, createdByCommunicationIdentifier, properties, - metadata, + metadata ?? new ChangeTrackingDictionary(), participants); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs index 428a332bf9a3..e3c6a2fed869 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs @@ -16,22 +16,22 @@ public partial class AcsChatThreadCreatedWithUserEventData : AcsChatThreadEventB { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. /// The communication identifier of the user who created the thread. /// The thread properties. - /// The thread metadata. /// The list of properties of participants who are part of the thread. - /// , , , or is null. - internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) : base(recipientCommunicationIdentifier) + /// , , , or is null. + internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IEnumerable participants) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); - Argument.AssertNotNull(metadata, nameof(metadata)); Argument.AssertNotNull(participants, nameof(participants)); CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; - Metadata = metadata; + Metadata = new ChangeTrackingDictionary(); Participants = participants.ToList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.cs index 249893e1f9ee..f9e29fda778e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.cs @@ -14,10 +14,12 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadDeletedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. /// The communication identifier of the user who deleted the thread. - /// is null. - internal AcsChatThreadDeletedEventData(CommunicationIdentifierModel deletedByCommunicationIdentifier) + /// or is null. + internal AcsChatThreadDeletedEventData(string threadId, CommunicationIdentifierModel deletedByCommunicationIdentifier) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.cs index 1ead8005f0c1..5739999e6d8d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.cs @@ -15,10 +15,12 @@ public partial class AcsChatThreadEventBaseProperties : AcsChatEventBaseProperti { /// Initializes a new instance of . /// The communication identifier of the target user. - /// is null. - internal AcsChatThreadEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier) : base(recipientCommunicationIdentifier) + /// The chat thread id. + /// or is null. + internal AcsChatThreadEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.cs index 511e7ddeba0e..95741434979f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadEventInThreadBaseProperties() + /// The chat thread id. + /// is null. + internal AcsChatThreadEventInThreadBaseProperties(string threadId) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); } /// Initializes a new instance of . @@ -30,6 +33,11 @@ internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string t Version = version; } + /// Initializes a new instance of for deserialization. + internal AcsChatThreadEventInThreadBaseProperties() + { + } + /// The original creation time of the thread. public DateTimeOffset? CreateTime { get; } /// The version of the thread. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs index dbf7bc704a2f..9978530b2e61 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs @@ -41,14 +41,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("participantCommunicationIdentifier"u8); writer.WriteObjectValue(ParticipantCommunicationIdentifier, options); - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -105,6 +108,10 @@ internal static AcsChatThreadParticipantProperties DeserializeAcsChatThreadParti } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -119,7 +126,7 @@ internal static AcsChatThreadParticipantProperties DeserializeAcsChatThreadParti } } serializedAdditionalRawData = rawDataDictionary; - return new AcsChatThreadParticipantProperties(displayName, participantCommunicationIdentifier, metadata, serializedAdditionalRawData); + return new AcsChatThreadParticipantProperties(displayName, participantCommunicationIdentifier, metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.cs index 5fae54aff8c5..5022f028e4ed 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.cs @@ -47,15 +47,13 @@ public partial class AcsChatThreadParticipantProperties /// Initializes a new instance of . /// The communication identifier of the user. - /// The metadata of the user. - /// or is null. - internal AcsChatThreadParticipantProperties(CommunicationIdentifierModel participantCommunicationIdentifier, IReadOnlyDictionary metadata) + /// is null. + internal AcsChatThreadParticipantProperties(CommunicationIdentifierModel participantCommunicationIdentifier) { Argument.AssertNotNull(participantCommunicationIdentifier, nameof(participantCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); ParticipantCommunicationIdentifier = participantCommunicationIdentifier; - Metadata = metadata; + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.cs index 748afca8b6d6..148524306cfd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.cs @@ -14,12 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadPropertiesUpdatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . + /// 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(CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) + /// , , or is null. + internal AcsChatThreadPropertiesUpdatedEventData(string threadId, CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); Argument.AssertNotNull(metadata, nameof(metadata)); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs index 832a4e7d889d..c62f67ce9bf8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs @@ -42,14 +42,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("editTime"u8); writer.WriteStringValue(EditTime.Value, "O"); } - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); foreach (var item in Properties) @@ -121,6 +124,10 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -194,7 +201,7 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha version, editedByCommunicationIdentifier, editTime, - metadata, + metadata ?? new ChangeTrackingDictionary(), properties); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.cs index dc53eadefb4c..9658d8488cba 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.cs @@ -15,19 +15,19 @@ public partial class AcsChatThreadPropertiesUpdatedPerUserEventData : AcsChatThr { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. /// The communication identifier of the user who updated the thread properties. - /// The thread metadata. /// The updated thread properties. - /// , , or is null. - internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary metadata, IReadOnlyDictionary properties) : base(recipientCommunicationIdentifier) + /// , , or is null. + internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); Argument.AssertNotNull(properties, nameof(properties)); EditedByCommunicationIdentifier = editedByCommunicationIdentifier; - Metadata = metadata; + Metadata = new ChangeTrackingDictionary(); Properties = properties; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.cs index d0c52952554e..54c3055e2f19 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.cs @@ -15,11 +15,13 @@ public partial class AcsChatThreadWithUserDeletedEventData : AcsChatThreadEventB { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. /// The communication identifier of the user who deleted the thread. - /// or is null. - internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel deletedByCommunicationIdentifier) : base(recipientCommunicationIdentifier) + /// , or is null. + internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, CommunicationIdentifierModel deletedByCommunicationIdentifier) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..157a9fd44ce2 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsChatTypingIndicatorReceivedInThreadEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + } + + AcsChatTypingIndicatorReceivedInThreadEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AcsChatTypingIndicatorReceivedInThreadEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement, options); + } + + internal static AcsChatTypingIndicatorReceivedInThreadEventData DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + 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; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + 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, options); + 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; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + serializedAdditionalRawData, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AcsChatTypingIndicatorReceivedInThreadEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsChatTypingIndicatorReceivedInThreadEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsChatTypingIndicatorReceivedInThreadEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.cs new file mode 100644 index 000000000000..7fad227103aa --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/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 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 threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(threadId, messageId, senderCommunicationIdentifier, type) + { + 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. + /// Keeps track of any properties unknown to the library. + /// 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. + internal AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + MessageBody = messageBody; + Metadata = metadata; + } + + /// Initializes a new instance of for deserialization. + internal AcsChatTypingIndicatorReceivedInThreadEventData() + { + } + + /// 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.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs index 329e178fb9a3..35a817a57961 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs @@ -35,16 +35,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(DeliveryStatus)) - { - writer.WritePropertyName("deliveryStatus"u8); - writer.WriteStringValue(DeliveryStatus); - } - if (Optional.IsDefined(DeliveryStatusDetails)) - { - writer.WritePropertyName("deliveryStatusDetails"u8); - writer.WriteStringValue(DeliveryStatusDetails); - } + writer.WritePropertyName("deliveryStatus"u8); + writer.WriteStringValue(DeliveryStatus); + writer.WritePropertyName("deliveryStatusDetails"u8); + writer.WriteStringValue(DeliveryStatusDetails); writer.WritePropertyName("deliveryAttempts"u8); writer.WriteStartArray(); foreach (var item in DeliveryAttempts) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs index 3e3649e9affe..12acd496d9bc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs @@ -15,12 +15,24 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsDeliveryReportReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . + /// 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. - /// is null. - internal AcsSmsDeliveryReportReceivedEventData(IEnumerable deliveryAttempts) + /// , , , , or is null. + internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, string deliveryStatus, string deliveryStatusDetails, IEnumerable deliveryAttempts) : base(messageId, @from, to) { + 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(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs index d0f7652a365f..862390c67f62 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsSmsEventBaseProperties)} does not support writing '{format}' format."); } - if (Optional.IsDefined(MessageId)) - { - writer.WritePropertyName("messageId"u8); - writer.WriteStringValue(MessageId); - } - if (Optional.IsDefined(From)) - { - writer.WritePropertyName("from"u8); - writer.WriteStringValue(From); - } - if (Optional.IsDefined(To)) - { - writer.WritePropertyName("to"u8); - writer.WriteStringValue(To); - } + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); + writer.WritePropertyName("from"u8); + writer.WriteStringValue(From); + writer.WritePropertyName("to"u8); + writer.WriteStringValue(To); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.cs index 4374d09b5603..708a8d6e8af0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.cs @@ -46,8 +46,19 @@ public partial class AcsSmsEventBaseProperties private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AcsSmsEventBaseProperties() + /// 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; } /// Initializes a new instance of . @@ -63,6 +74,11 @@ internal AcsSmsEventBaseProperties(string messageId, string @from, string to, ID _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AcsSmsEventBaseProperties() + { + } + /// The identity of the SMS message. public string MessageId { get; } /// The identity of SMS message sender. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs index 09894bc22009..766e6a691511 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs @@ -35,11 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); if (Optional.IsDefined(ReceivedTimestamp)) { writer.WritePropertyName("receivedTimestamp"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.cs index 391986f238e0..04f01461c805 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.cs @@ -14,9 +14,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; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs index 3d95b902797b..8348d264b024 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs @@ -34,26 +34,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueDeletedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsDefined(Label)) - { - writer.WritePropertyName("label"u8); - writer.WriteStringValue(Label); - } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) - { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); - } + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs index b920a0b33dd2..7a4cf1ce7212 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs @@ -46,8 +46,22 @@ public partial class AppConfigurationKeyValueDeletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationKeyValueDeletedEventData() + /// The key used to identify the key-value that was deleted. + /// The label, if any, used to identify the key-value that was deleted. + /// The etag representing the key-value that was deleted. + /// The sync token representing the server state after the event. + /// , , or is null. + internal AppConfigurationKeyValueDeletedEventData(string key, string label, string etag, string syncToken) { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(label, nameof(label)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Key = key; + Label = label; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -65,6 +79,11 @@ internal AppConfigurationKeyValueDeletedEventData(string key, string label, stri _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationKeyValueDeletedEventData() + { + } + /// The key used to identify the key-value that was deleted. public string Key { get; } /// The label, if any, used to identify the key-value that was deleted. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs index e33caff65a77..86478e6dd36d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs @@ -34,26 +34,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueModifiedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsDefined(Label)) + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + if (Label != null) { writer.WritePropertyName("label"u8); writer.WriteStringValue(Label); } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) + else { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); + writer.WriteNull("label"); } + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -106,6 +101,11 @@ internal static AppConfigurationKeyValueModifiedEventData DeserializeAppConfigur } if (property.NameEquals("label"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + label = null; + continue; + } label = property.Value.GetString(); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs index e03cb8ded63b..1dcc27c11d46 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs @@ -46,8 +46,21 @@ public partial class AppConfigurationKeyValueModifiedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationKeyValueModifiedEventData() + /// The key used to identify the key-value that was modified. + /// The label, if any, used to identify the key-value that was modified. + /// The etag representing the new state of the key-value. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationKeyValueModifiedEventData(string key, string label, string etag, string syncToken) { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Key = key; + Label = label; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -65,6 +78,11 @@ internal AppConfigurationKeyValueModifiedEventData(string key, string label, str _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationKeyValueModifiedEventData() + { + } + /// The key used to identify the key-value that was modified. public string Key { get; } /// The label, if any, used to identify the key-value that was modified. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs index 319beef466ce..d5d7832fa69b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs @@ -14,8 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AppConfigurationSnapshotCreatedEventData : AppConfigurationSnapshotEventData { /// Initializes a new instance of . - internal AppConfigurationSnapshotCreatedEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotCreatedEventData(string name, string etag, string syncToken) : base(name, etag, syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); } /// Initializes a new instance of . @@ -26,5 +33,10 @@ internal AppConfigurationSnapshotCreatedEventData() internal AppConfigurationSnapshotCreatedEventData(string name, string etag, string syncToken, IDictionary serializedAdditionalRawData) : base(name, etag, syncToken, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotCreatedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs index 3d5566107a39..672a2002ad54 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationSnapshotEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) - { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); - } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs index a64d0e66a4fc..43c5283bd828 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs @@ -46,8 +46,19 @@ public partial class AppConfigurationSnapshotEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationSnapshotEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotEventData(string name, string etag, string syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Name = name; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -63,6 +74,11 @@ internal AppConfigurationSnapshotEventData(string name, string etag, string sync _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotEventData() + { + } + /// The name of the snapshot. public string Name { get; } /// The etag representing the new state of the snapshot. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs index cd89dfdb11d1..b2164f525aa9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs @@ -14,8 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AppConfigurationSnapshotModifiedEventData : AppConfigurationSnapshotEventData { /// Initializes a new instance of . - internal AppConfigurationSnapshotModifiedEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotModifiedEventData(string name, string etag, string syncToken) : base(name, etag, syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); } /// Initializes a new instance of . @@ -26,5 +33,10 @@ internal AppConfigurationSnapshotModifiedEventData() internal AppConfigurationSnapshotModifiedEventData(string name, string etag, string syncToken, IDictionary serializedAdditionalRawData) : base(name, etag, syncToken, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotModifiedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs index d7d28b13a1bf..78a4830501e5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs @@ -39,19 +39,25 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.Value.ToString()); } - if (Optional.IsDefined(RawId)) - { - writer.WritePropertyName("rawId"u8); - writer.WriteStringValue(RawId); - } + writer.WritePropertyName("rawId"u8); + writer.WriteStringValue(RawId); writer.WritePropertyName("communicationUser"u8); writer.WriteObjectValue(CommunicationUser, options); - writer.WritePropertyName("phoneNumber"u8); - writer.WriteObjectValue(PhoneNumber, options); - writer.WritePropertyName("microsoftTeamsUser"u8); - writer.WriteObjectValue(MicrosoftTeamsUser, options); - writer.WritePropertyName("microsoftTeamsApp"u8); - writer.WriteObjectValue(MicrosoftTeamsApp, options); + if (Optional.IsDefined(PhoneNumber)) + { + writer.WritePropertyName("phoneNumber"u8); + writer.WriteObjectValue(PhoneNumber, options); + } + if (Optional.IsDefined(MicrosoftTeamsUser)) + { + writer.WritePropertyName("microsoftTeamsUser"u8); + writer.WriteObjectValue(MicrosoftTeamsUser, options); + } + if (Optional.IsDefined(MicrosoftTeamsApp)) + { + writer.WritePropertyName("microsoftTeamsApp"u8); + writer.WriteObjectValue(MicrosoftTeamsApp, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -120,16 +126,28 @@ internal static CommunicationIdentifierModel DeserializeCommunicationIdentifierM } if (property.NameEquals("phoneNumber"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } phoneNumber = PhoneNumberIdentifierModel.DeserializePhoneNumberIdentifierModel(property.Value, options); continue; } if (property.NameEquals("microsoftTeamsUser"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } microsoftTeamsUser = MicrosoftTeamsUserIdentifierModel.DeserializeMicrosoftTeamsUserIdentifierModel(property.Value, options); continue; } if (property.NameEquals("microsoftTeamsApp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } microsoftTeamsApp = MicrosoftTeamsAppIdentifierModel.DeserializeMicrosoftTeamsAppIdentifierModel(property.Value, options); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.cs index 00e7ea22dcd5..9035b9de1646 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.cs @@ -46,22 +46,16 @@ public partial class CommunicationIdentifierModel private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . + /// Raw Id of the identifier. Optional in requests, required in responses. /// The communication user. - /// The phone number. - /// The Microsoft Teams user. - /// The Microsoft Teams application. - /// , , or is null. - internal CommunicationIdentifierModel(CommunicationUserIdentifierModel communicationUser, PhoneNumberIdentifierModel phoneNumber, MicrosoftTeamsUserIdentifierModel microsoftTeamsUser, MicrosoftTeamsAppIdentifierModel microsoftTeamsApp) + /// or is null. + internal CommunicationIdentifierModel(string rawId, CommunicationUserIdentifierModel communicationUser) { + Argument.AssertNotNull(rawId, nameof(rawId)); Argument.AssertNotNull(communicationUser, nameof(communicationUser)); - Argument.AssertNotNull(phoneNumber, nameof(phoneNumber)); - Argument.AssertNotNull(microsoftTeamsUser, nameof(microsoftTeamsUser)); - Argument.AssertNotNull(microsoftTeamsApp, nameof(microsoftTeamsApp)); + RawId = rawId; CommunicationUser = communicationUser; - PhoneNumber = phoneNumber; - MicrosoftTeamsUser = microsoftTeamsUser; - MicrosoftTeamsApp = microsoftTeamsApp; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs index 66ed2b8c4b62..ef80f3e0864a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceClusterSupportEndedEventData : ContainerServiceClusterSupportEventData { /// Initializes a new instance of . - internal ContainerServiceClusterSupportEndedEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEndedEventData(string kubernetesVersion) : base(kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceClusterSupportEndedEventData() internal ContainerServiceClusterSupportEndedEventData(string kubernetesVersion, IDictionary serializedAdditionalRawData) : base(kubernetesVersion, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEndedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs index 0a3fa362492c..ea696b7348fe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceClusterSupportEndingEventData : ContainerServiceClusterSupportEventData { /// Initializes a new instance of . - internal ContainerServiceClusterSupportEndingEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEndingEventData(string kubernetesVersion) : base(kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceClusterSupportEndingEventData() internal ContainerServiceClusterSupportEndingEventData(string kubernetesVersion, IDictionary serializedAdditionalRawData) : base(kubernetesVersion, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEndingEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs index e69c3cab6fd7..2bda65aa23a3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceClusterSupportEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(KubernetesVersion)) - { - writer.WritePropertyName("kubernetesVersion"u8); - writer.WriteStringValue(KubernetesVersion); - } + writer.WritePropertyName("kubernetesVersion"u8); + writer.WriteStringValue(KubernetesVersion); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs index 3ad05c8cb79b..d6720cabcd35 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs @@ -46,8 +46,13 @@ public partial class ContainerServiceClusterSupportEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceClusterSupportEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEventData(string kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); + + KubernetesVersion = kubernetesVersion; } /// Initializes a new instance of . @@ -59,6 +64,11 @@ internal ContainerServiceClusterSupportEventData(string kubernetesVersion, IDict _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEventData() + { + } + /// The Kubernetes version of the ManagedCluster resource. public string KubernetesVersion { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs index 0e51cceccbfc..3f166a5de8e3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNewKubernetesVersionAvailableEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(LatestSupportedKubernetesVersion)) - { - writer.WritePropertyName("latestSupportedKubernetesVersion"u8); - writer.WriteStringValue(LatestSupportedKubernetesVersion); - } - if (Optional.IsDefined(LatestStableKubernetesVersion)) - { - writer.WritePropertyName("latestStableKubernetesVersion"u8); - writer.WriteStringValue(LatestStableKubernetesVersion); - } - if (Optional.IsDefined(LowestMinorKubernetesVersion)) - { - writer.WritePropertyName("lowestMinorKubernetesVersion"u8); - writer.WriteStringValue(LowestMinorKubernetesVersion); - } + writer.WritePropertyName("latestSupportedKubernetesVersion"u8); + writer.WriteStringValue(LatestSupportedKubernetesVersion); + writer.WritePropertyName("latestStableKubernetesVersion"u8); + writer.WriteStringValue(LatestStableKubernetesVersion); + writer.WritePropertyName("lowestMinorKubernetesVersion"u8); + writer.WriteStringValue(LowestMinorKubernetesVersion); if (Optional.IsDefined(LatestPreviewKubernetesVersion)) { writer.WritePropertyName("latestPreviewKubernetesVersion"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs index a220ba99996e..c27879af09ee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs @@ -46,8 +46,19 @@ public partial class ContainerServiceNewKubernetesVersionAvailableEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceNewKubernetesVersionAvailableEventData() + /// The highest PATCH Kubernetes version for the highest MINOR version supported by ManagedCluster resource. + /// The highest PATCH Kubernetes version for the MINOR version considered stable for the ManagedCluster resource. + /// The highest PATCH Kubernetes version for the lowest applicable MINOR version available for the ManagedCluster resource. + /// , or is null. + internal ContainerServiceNewKubernetesVersionAvailableEventData(string latestSupportedKubernetesVersion, string latestStableKubernetesVersion, string lowestMinorKubernetesVersion) { + Argument.AssertNotNull(latestSupportedKubernetesVersion, nameof(latestSupportedKubernetesVersion)); + Argument.AssertNotNull(latestStableKubernetesVersion, nameof(latestStableKubernetesVersion)); + Argument.AssertNotNull(lowestMinorKubernetesVersion, nameof(lowestMinorKubernetesVersion)); + + LatestSupportedKubernetesVersion = latestSupportedKubernetesVersion; + LatestStableKubernetesVersion = latestStableKubernetesVersion; + LowestMinorKubernetesVersion = lowestMinorKubernetesVersion; } /// Initializes a new instance of . @@ -65,6 +76,11 @@ internal ContainerServiceNewKubernetesVersionAvailableEventData(string latestSup _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceNewKubernetesVersionAvailableEventData() + { + } + /// The highest PATCH Kubernetes version for the highest MINOR version supported by ManagedCluster resource. public string LatestSupportedKubernetesVersion { get; } /// The highest PATCH Kubernetes version for the MINOR version considered stable for the ManagedCluster resource. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs index b8c25b055989..cae02d7a7392 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNodePoolRollingEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(NodePoolName)) - { - writer.WritePropertyName("nodePoolName"u8); - writer.WriteStringValue(NodePoolName); - } + writer.WritePropertyName("nodePoolName"u8); + writer.WriteStringValue(NodePoolName); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs index 3b5580803572..65ffdb4776f8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs @@ -46,8 +46,13 @@ public partial class ContainerServiceNodePoolRollingEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingEventData(string nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); + + NodePoolName = nodePoolName; } /// Initializes a new instance of . @@ -59,6 +64,11 @@ internal ContainerServiceNodePoolRollingEventData(string nodePoolName, IDictiona _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingEventData() + { + } + /// The name of the node pool in the ManagedCluster resource. public string NodePoolName { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs index 0bf9331c72ca..e2889e098f99 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingFailedEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingFailedEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingFailedEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingFailedEventData() internal ContainerServiceNodePoolRollingFailedEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingFailedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs index 88958ee63eef..89edc1138e28 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingStartedEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingStartedEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingStartedEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingStartedEventData() internal ContainerServiceNodePoolRollingStartedEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingStartedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs index 18c9e4ada789..6209fe995bdb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingSucceededEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingSucceededEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingSucceededEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingSucceededEventData() internal ContainerServiceNodePoolRollingSucceededEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingSucceededEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs new file mode 100644 index 000000000000..eedd981062bf --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class EdgeSolutionVersionPublishedEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("externalValidationId"u8); + writer.WriteStringValue(ExternalValidationId); + writer.WritePropertyName("targetId"u8); + writer.WriteStringValue(TargetId); + writer.WritePropertyName("solutionTemplateId"u8); + writer.WriteStringValue(SolutionTemplateId); + writer.WritePropertyName("solutionTemplateVersionId"u8); + writer.WriteStringValue(SolutionTemplateVersionId); + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + writer.WritePropertyName("callbackUrl"u8); + writer.WriteStringValue(CallbackUrl.AbsoluteUri); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EdgeSolutionVersionPublishedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement, options); + } + + internal static EdgeSolutionVersionPublishedEventData DeserializeEdgeSolutionVersionPublishedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + 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; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + 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; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionVersionPublishedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// 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); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs new file mode 100644 index 000000000000..219c36f6fa89 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs @@ -0,0 +1,117 @@ +// 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.Edge.SolutionVersionPublished event. + public partial class EdgeSolutionVersionPublishedEventData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// 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; + } + + /// 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. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl, IDictionary serializedAdditionalRawData) + { + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionVersionPublishedEventData() + { + } + + /// 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.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs index c32e1356b70a..c8b3f30df806 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs @@ -243,14 +243,6 @@ public static ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAdded return new ApiManagementGatewayApiAddedEventData(resourceUri, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateways/<GatewayName>/apis/<ResourceName>`. - /// A new instance for mocking. - public static ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) - { - return new ApiManagementGatewayApiRemovedEventData(resourceUri, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The key used to identify the key-value that was modified. /// The label, if any, used to identify the key-value that was modified. @@ -595,6 +587,213 @@ public static AcsUserDisconnectedEventData AcsUserDisconnectedEventData(Communic return new AcsUserDisconnectedEventData(userCommunicationIdentifier, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of 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, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The communication identifier of the participant user. + /// The role of the participant. + /// A new instance for mocking. + public static AcsCallParticipantProperties AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier = null, string role = null) + { + return new AcsCallParticipantProperties(communicationIdentifier, role, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Group Id. + /// A new instance for mocking. + public static AcsCallGroupProperties AcsCallGroupProperties(string id = null) + { + return new AcsCallGroupProperties(id, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Room Id. + /// A new instance for mocking. + public static AcsCallRoomProperties AcsCallRoomProperties(string id = null) + { + return new AcsCallRoomProperties(id, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of 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, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of 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, double? callDurationInSeconds = null) + { + return new AcsCallEndedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData: null, + endedBy, + reason, + callDurationInSeconds); + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of call ended by. + /// The name of the call ended by. + /// A new instance for mocking. + public static AcsCallEndedByProperties AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier = null, AcsCallEndedByKind type = default, string name = null) + { + return new AcsCallEndedByProperties(communicationIdentifier, type, name, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for the 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, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of 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 AcsCallParticipantEventProperties AcsCallParticipantEventProperties(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 AcsCallParticipantEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData: null, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of 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, + serializedAdditionalRawData: null, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of 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, + serializedAdditionalRawData: null, + user, + displayName, + participantId, + userAgent); + } + /// Initializes a new instance of . /// The communication identifier of the target user. /// The transaction id will be used as co-relation vector. @@ -696,6 +895,66 @@ public static AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThr version); } + /// 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. + /// 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) + { + metadata ??= new Dictionary(); + + return new AcsChatAzureBotCommandReceivedInThreadEventData( + transactionId, + threadId, + serializedAdditionalRawData: null, + 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. + /// 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) + { + metadata ??= new Dictionary(); + + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + serializedAdditionalRawData: null, + 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. @@ -2474,6 +2733,28 @@ public static DataBoxOrderCompletedEventData DataBoxOrderCompletedEventData(stri return new DataBoxOrderCompletedEventData(serialNumber, stageName, stageTime, serializedAdditionalRawData: null); } + /// 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. + /// 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) + { + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The path to the capture file. /// The file type of the capture file. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs index 19dde868710b..e7187c3cd8f2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EventHubCaptureFileCreatedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Fileurl)) - { - writer.WritePropertyName("fileUrl"u8); - writer.WriteStringValue(Fileurl); - } - if (Optional.IsDefined(FileType)) - { - writer.WritePropertyName("fileType"u8); - writer.WriteStringValue(FileType); - } - if (Optional.IsDefined(PartitionId)) - { - writer.WritePropertyName("partitionId"u8); - writer.WriteStringValue(PartitionId); - } + writer.WritePropertyName("fileUrl"u8); + writer.WriteStringValue(Fileurl); + writer.WritePropertyName("fileType"u8); + writer.WriteStringValue(FileType); + writer.WritePropertyName("partitionId"u8); + writer.WriteStringValue(PartitionId); if (Optional.IsDefined(SizeInBytes)) { writer.WritePropertyName("sizeInBytes"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs index ff8f7f2a0e35..5f9b01e7d9f9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs @@ -46,8 +46,19 @@ public partial class EventHubCaptureFileCreatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal EventHubCaptureFileCreatedEventData() + /// The path to the capture file. + /// The file type of the capture file. + /// The shard ID. + /// , or is null. + internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, string partitionId) { + Argument.AssertNotNull(fileurl, nameof(fileurl)); + Argument.AssertNotNull(fileType, nameof(fileType)); + Argument.AssertNotNull(partitionId, nameof(partitionId)); + + Fileurl = fileurl; + FileType = fileType; + PartitionId = partitionId; } /// Initializes a new instance of . @@ -75,6 +86,11 @@ internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, st _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal EventHubCaptureFileCreatedEventData() + { + } + /// The path to the capture file. public string Fileurl { get; } /// The file type of the capture file. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs index ddbbe5a5defc..4ed4a9962eaf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs @@ -34,31 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesDatasetDriftDetectedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(DataDriftId)) - { - writer.WritePropertyName("dataDriftId"u8); - writer.WriteStringValue(DataDriftId); - } - if (Optional.IsDefined(DataDriftName)) - { - writer.WritePropertyName("dataDriftName"u8); - writer.WriteStringValue(DataDriftName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(BaseDatasetId)) - { - writer.WritePropertyName("baseDatasetId"u8); - writer.WriteStringValue(BaseDatasetId); - } - if (Optional.IsDefined(TargetDatasetId)) - { - writer.WritePropertyName("targetDatasetId"u8); - writer.WriteStringValue(TargetDatasetId); - } + writer.WritePropertyName("dataDriftId"u8); + writer.WriteStringValue(DataDriftId); + writer.WritePropertyName("dataDriftName"u8); + writer.WriteStringValue(DataDriftName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("baseDatasetId"u8); + writer.WriteStringValue(BaseDatasetId); + writer.WritePropertyName("targetDatasetId"u8); + writer.WriteStringValue(TargetDatasetId); if (Optional.IsDefined(DriftCoefficient)) { writer.WritePropertyName("driftCoefficient"u8); @@ -66,13 +51,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } if (Optional.IsDefined(StartTime)) { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartTime.Value, "O"); + if (StartTime != null) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime.Value, "O"); + } + else + { + writer.WriteNull("startTime"); + } } if (Optional.IsDefined(EndTime)) { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndTime.Value, "O"); + if (EndTime != null) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + else + { + writer.WriteNull("endTime"); + } } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -161,6 +160,7 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize { if (property.Value.ValueKind == JsonValueKind.Null) { + startTime = null; continue; } startTime = property.Value.GetDateTimeOffset("O"); @@ -170,6 +170,7 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize { if (property.Value.ValueKind == JsonValueKind.Null) { + endTime = null; continue; } endTime = property.Value.GetDateTimeOffset("O"); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs index f86f30e006be..66d7e5943085 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs @@ -46,8 +46,25 @@ public partial class MachineLearningServicesDatasetDriftDetectedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal MachineLearningServicesDatasetDriftDetectedEventData() + /// The ID of the data drift monitor that triggered the event. + /// The name of the data drift monitor that triggered the event. + /// The ID of the Run that detected data drift. + /// The ID of the base Dataset used to detect drift. + /// The ID of the target Dataset used to detect drift. + /// , , , or is null. + internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId, string dataDriftName, string runId, string baseDatasetId, string targetDatasetId) { + Argument.AssertNotNull(dataDriftId, nameof(dataDriftId)); + Argument.AssertNotNull(dataDriftName, nameof(dataDriftName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(baseDatasetId, nameof(baseDatasetId)); + Argument.AssertNotNull(targetDatasetId, nameof(targetDatasetId)); + + DataDriftId = dataDriftId; + DataDriftName = dataDriftName; + RunId = runId; + BaseDatasetId = baseDatasetId; + TargetDatasetId = targetDatasetId; } /// Initializes a new instance of . @@ -73,6 +90,11 @@ internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal MachineLearningServicesDatasetDriftDetectedEventData() + { + } + /// The ID of the data drift monitor that triggered the event. public string DataDriftId { get; } /// The name of the data drift monitor that triggered the event. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs index bc2c9c9fb87b..4e8e161a8da2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs @@ -34,61 +34,58 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelDeployedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ServiceName)) + writer.WritePropertyName("serviceName"u8); + writer.WriteStringValue(ServiceName); + writer.WritePropertyName("serviceComputeType"u8); + writer.WriteStringValue(ServiceComputeType); + writer.WritePropertyName("modelIds"u8); + writer.WriteStringValue(ModelIds); + if (Optional.IsCollectionDefined(ServiceTags)) { - writer.WritePropertyName("serviceName"u8); - writer.WriteStringValue(ServiceName); - } - if (Optional.IsDefined(ServiceComputeType)) - { - writer.WritePropertyName("serviceComputeType"u8); - writer.WriteStringValue(ServiceComputeType); - } - if (Optional.IsDefined(ModelIds)) - { - writer.WritePropertyName("modelIds"u8); - writer.WriteStringValue(ModelIds); - } - writer.WritePropertyName("serviceTags"u8); - writer.WriteStartObject(); - foreach (var item in ServiceTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("serviceTags"u8); + writer.WriteStartObject(); + foreach (var item in ServiceTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("serviceProperties"u8); - writer.WriteStartObject(); - foreach (var item in ServiceProperties) + if (Optional.IsCollectionDefined(ServiceProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("serviceProperties"u8); + writer.WriteStartObject(); + foreach (var item in ServiceProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -152,6 +149,10 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine } if (property.NameEquals("serviceTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -169,6 +170,10 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine } if (property.NameEquals("serviceProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -194,8 +199,8 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine serviceName, serviceComputeType, modelIds, - serviceTags, - serviceProperties, + serviceTags ?? new ChangeTrackingDictionary(), + serviceProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs index 8d759992c57d..86cce0670b04 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs @@ -46,16 +46,21 @@ public partial class MachineLearningServicesModelDeployedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the deployed service. - /// The properties of the deployed service. - /// or is null. - internal MachineLearningServicesModelDeployedEventData(IReadOnlyDictionary serviceTags, IReadOnlyDictionary serviceProperties) + /// The name of the deployed service. + /// The compute type (e.g. ACI, AKS) of the deployed service. + /// A common separated list of model IDs. The IDs of the models deployed in the service. + /// , or is null. + internal MachineLearningServicesModelDeployedEventData(string serviceName, string serviceComputeType, string modelIds) { - Argument.AssertNotNull(serviceTags, nameof(serviceTags)); - Argument.AssertNotNull(serviceProperties, nameof(serviceProperties)); + Argument.AssertNotNull(serviceName, nameof(serviceName)); + Argument.AssertNotNull(serviceComputeType, nameof(serviceComputeType)); + Argument.AssertNotNull(modelIds, nameof(modelIds)); - ServiceTags = serviceTags; - ServiceProperties = serviceProperties; + ServiceName = serviceName; + ServiceComputeType = serviceComputeType; + ModelIds = modelIds; + ServiceTags = new ChangeTrackingDictionary(); + ServiceProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs index 6e6446370ca4..f51226031422 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs @@ -34,56 +34,56 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelRegisteredEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ModelName)) + writer.WritePropertyName("modelName"u8); + writer.WriteStringValue(ModelName); + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + if (Optional.IsCollectionDefined(ModelTags)) { - writer.WritePropertyName("modelName"u8); - writer.WriteStringValue(ModelName); - } - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - writer.WritePropertyName("modelTags"u8); - writer.WriteStartObject(); - foreach (var item in ModelTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("modelTags"u8); + writer.WriteStartObject(); + foreach (var item in ModelTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("modelProperties"u8); - writer.WriteStartObject(); - foreach (var item in ModelProperties) + if (Optional.IsCollectionDefined(ModelProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("modelProperties"u8); + writer.WriteStartObject(); + foreach (var item in ModelProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -141,6 +141,10 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } if (property.NameEquals("modelTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -158,6 +162,10 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } if (property.NameEquals("modelProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -179,7 +187,7 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningServicesModelRegisteredEventData(modelName, modelVersion, modelTags, modelProperties, serializedAdditionalRawData); + return new MachineLearningServicesModelRegisteredEventData(modelName, modelVersion, modelTags ?? new ChangeTrackingDictionary(), modelProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs index 66af5a595773..e844c536e50b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs @@ -46,16 +46,18 @@ public partial class MachineLearningServicesModelRegisteredEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the model that was registered. - /// The properties of the model that was registered. - /// or is null. - internal MachineLearningServicesModelRegisteredEventData(IReadOnlyDictionary modelTags, IReadOnlyDictionary modelProperties) + /// The name of the model that was registered. + /// The version of the model that was registered. + /// or is null. + internal MachineLearningServicesModelRegisteredEventData(string modelName, string modelVersion) { - Argument.AssertNotNull(modelTags, nameof(modelTags)); - Argument.AssertNotNull(modelProperties, nameof(modelProperties)); + Argument.AssertNotNull(modelName, nameof(modelName)); + Argument.AssertNotNull(modelVersion, nameof(modelVersion)); - ModelTags = modelTags; - ModelProperties = modelProperties; + ModelName = modelName; + ModelVersion = modelVersion; + ModelTags = new ChangeTrackingDictionary(); + ModelProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs index 218cd1801335..62dd83415d96 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs @@ -34,66 +34,60 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunCompletedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExperimentId)) + writer.WritePropertyName("experimentId"u8); + writer.WriteStringValue(ExperimentId); + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("runType"u8); + writer.WriteStringValue(RunType); + if (Optional.IsCollectionDefined(RunTags)) { - writer.WritePropertyName("experimentId"u8); - writer.WriteStringValue(ExperimentId); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(RunType)) - { - writer.WritePropertyName("runType"u8); - writer.WriteStringValue(RunType); - } - writer.WritePropertyName("runTags"u8); - writer.WriteStartObject(); - foreach (var item in RunTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runTags"u8); + writer.WriteStartObject(); + foreach (var item in RunTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("runProperties"u8); - writer.WriteStartObject(); - foreach (var item in RunProperties) + if (Optional.IsCollectionDefined(RunProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runProperties"u8); + writer.WriteStartObject(); + foreach (var item in RunProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -163,6 +157,10 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL } if (property.NameEquals("runTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -180,6 +178,10 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL } if (property.NameEquals("runProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -206,8 +208,8 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL experimentName, runId, runType, - runTags, - runProperties, + runTags ?? new ChangeTrackingDictionary(), + runProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs index e8c1fb9d4264..bbfe86bdb3e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs @@ -46,16 +46,24 @@ public partial class MachineLearningServicesRunCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the completed Run. - /// The properties of the completed Run. - /// or is null. - internal MachineLearningServicesRunCompletedEventData(IReadOnlyDictionary runTags, IReadOnlyDictionary runProperties) + /// The ID of the experiment that the run belongs to. + /// The name of the experiment that the run belongs to. + /// The ID of the Run that was completed. + /// The Run Type of the completed Run. + /// , , or is null. + internal MachineLearningServicesRunCompletedEventData(string experimentId, string experimentName, string runId, string runType) { - Argument.AssertNotNull(runTags, nameof(runTags)); - Argument.AssertNotNull(runProperties, nameof(runProperties)); + Argument.AssertNotNull(experimentId, nameof(experimentId)); + Argument.AssertNotNull(experimentName, nameof(experimentName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(runType, nameof(runType)); - RunTags = runTags; - RunProperties = runProperties; + ExperimentId = experimentId; + ExperimentName = experimentName; + RunId = runId; + RunType = runType; + RunTags = new ChangeTrackingDictionary(); + RunProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs index 520679135bb8..1efc53ac3c3b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs @@ -34,71 +34,62 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunStatusChangedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExperimentId)) + writer.WritePropertyName("experimentId"u8); + writer.WriteStringValue(ExperimentId); + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("runType"u8); + writer.WriteStringValue(RunType); + if (Optional.IsCollectionDefined(RunTags)) { - writer.WritePropertyName("experimentId"u8); - writer.WriteStringValue(ExperimentId); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(RunType)) - { - writer.WritePropertyName("runType"u8); - writer.WriteStringValue(RunType); - } - writer.WritePropertyName("runTags"u8); - writer.WriteStartObject(); - foreach (var item in RunTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runTags"u8); + writer.WriteStartObject(); + foreach (var item in RunTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("runProperties"u8); - writer.WriteStartObject(); - foreach (var item in RunProperties) + if (Optional.IsCollectionDefined(RunProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runProperties"u8); + writer.WriteStartObject(); + foreach (var item in RunProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - if (Optional.IsDefined(RunStatus)) - { - writer.WritePropertyName("runStatus"u8); - writer.WriteStringValue(RunStatus); - } + writer.WritePropertyName("runStatus"u8); + writer.WriteStringValue(RunStatus); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -169,6 +160,10 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach } if (property.NameEquals("runTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -186,6 +181,10 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach } if (property.NameEquals("runProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -217,8 +216,8 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach experimentName, runId, runType, - runTags, - runProperties, + runTags ?? new ChangeTrackingDictionary(), + runProperties ?? new ChangeTrackingDictionary(), runStatus, serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs index 8af67e302b82..c7c35d6ed14e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs @@ -46,16 +46,27 @@ public partial class MachineLearningServicesRunStatusChangedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the Machine Learning Run. - /// The properties of the Machine Learning Run. - /// or is null. - internal MachineLearningServicesRunStatusChangedEventData(IReadOnlyDictionary runTags, IReadOnlyDictionary runProperties) + /// The ID of the experiment that the Machine Learning Run belongs to. + /// The name of the experiment that the Machine Learning Run belongs to. + /// The ID of the Machine Learning Run. + /// The Run Type of the Machine Learning Run. + /// The status of the Machine Learning Run. + /// , , , or is null. + internal MachineLearningServicesRunStatusChangedEventData(string experimentId, string experimentName, string runId, string runType, string runStatus) { - Argument.AssertNotNull(runTags, nameof(runTags)); - Argument.AssertNotNull(runProperties, nameof(runProperties)); + Argument.AssertNotNull(experimentId, nameof(experimentId)); + Argument.AssertNotNull(experimentName, nameof(experimentName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(runType, nameof(runType)); + Argument.AssertNotNull(runStatus, nameof(runStatus)); - RunTags = runTags; - RunProperties = runProperties; + ExperimentId = experimentId; + ExperimentName = experimentName; + RunId = runId; + RunType = runType; + RunTags = new ChangeTrackingDictionary(); + RunProperties = new ChangeTrackingDictionary(); + RunStatus = runStatus; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml index f6874a4d67e5..be3b68e31ccf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml @@ -1,3 +1,4 @@ +directory: specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents +commit: 5fc3cb785fefcc22fe5b5dd6cda386769824fa73 repo: Azure/azure-rest-api-specs -directory: "specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents" -commit: 5f079f3d5e4ec9d1e10bafbd58844fdb4977e338 +additionalDirectories: 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 77921eec3193..1c477126c170 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 @@ -21,6 +21,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? type = 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, string role = null) { 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; } @@ -66,6 +78,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)] @@ -150,6 +163,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; } @@ -160,6 +177,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; } @@ -232,6 +253,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; } @@ -441,6 +463,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"; @@ -457,6 +484,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"; @@ -496,6 +524,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"; @@ -506,6 +536,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"; @@ -545,6 +577,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"; @@ -664,6 +697,24 @@ 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.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsRouterJobStatus : System.IEquatable @@ -796,6 +847,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 string Name { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? Type { 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 string 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() { } @@ -958,6 +1083,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 { @@ -1678,6 +1809,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() { } @@ -1728,6 +1881,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() { } @@ -2214,6 +2390,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 77921eec3193..1c477126c170 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 @@ -21,6 +21,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? type = 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, string role = null) { 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; } @@ -66,6 +78,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)] @@ -150,6 +163,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; } @@ -160,6 +177,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; } @@ -232,6 +253,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; } @@ -441,6 +463,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"; @@ -457,6 +484,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"; @@ -496,6 +524,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"; @@ -506,6 +536,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"; @@ -545,6 +577,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"; @@ -664,6 +697,24 @@ 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.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsRouterJobStatus : System.IEquatable @@ -796,6 +847,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 string Name { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? Type { 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 string 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() { } @@ -958,6 +1083,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 { @@ -1678,6 +1809,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() { } @@ -1728,6 +1881,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() { } @@ -2214,6 +2390,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..8da59449004f 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, string 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? type = null, string name = null) + { + return new AcsCallEndedByProperties(communicationIdentifier, type, 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..8d93c7aa376b --- /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? type, string name) + { + CommunicationIdentifier = communicationIdentifier; + Type = type; + Name = name; + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The type of the call ended by. + public AcsCallEndedByKind? Type { 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/AcsCallParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs new file mode 100644 index 000000000000..102452d1d845 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs @@ -0,0 +1,50 @@ +// 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 AcsCallParticipantProperties + { + internal static AcsCallParticipantProperties DeserializeAcsCallParticipantProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + string 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)) + { + role = 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..9a84bc5fd11c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.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 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, string role) + { + CommunicationIdentifier = communicationIdentifier; + Role = role; + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The role of participant user. + public string 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.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs index f887d31afeb6..577c37aff8c8 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,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageDeletedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageDeletedEventData() + /// The chat message id. + /// The type of the message. + /// or is null. + internal AcsChatMessageDeletedEventData(string messageId, string type) : base(messageId, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + 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.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs index 6c447d2cac7e..2c5051e42185 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,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEditedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEditedEventData() + /// The chat message id. + /// The type of the message. + /// The body of the chat message. + /// , or is null. + internal AcsChatMessageEditedEventData(string messageId, string type, string messageBody) : base(messageId, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + 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.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs index 994534c4ad59..f64a08307532 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,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEventBaseProperties : AcsChatEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEventBaseProperties() + /// The chat message id. + /// The type of the message. + /// or is null. + internal AcsChatMessageEventBaseProperties(string messageId, string type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(type, nameof(type)); + + MessageId = messageId; + 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.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs index d61b4a63945c..94bc19d4e385 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,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageReceivedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageReceivedEventData() + /// The chat message id. + /// The type of the message. + /// or is null. + internal AcsChatMessageReceivedEventData(string messageId, string type) : base(messageId, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + 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/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/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.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs index 5648d282b33e..a49dabd167ed 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs @@ -14,8 +14,14 @@ 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. + /// or is null. + internal AcsChatThreadPropertiesUpdatedEventData(string transactionId, string threadId) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Properties = new ChangeTrackingDictionary(); Metadata = new ChangeTrackingDictionary(); } @@ -29,8 +35,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/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..c5f858990f2e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md @@ -4,7 +4,7 @@ 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: https://github.com/Azure/azure-rest-api-specs/blob/5fc3cb785fefcc22fe5b5dd6cda386769824fa73/specification/eventgrid/data-plane/readme.md generation1-convenience-client: true model-factory-for-hlc: - MediaJobOutputAsset