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 92092fa653b1..2ccf3c0214b6 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,191 @@ 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 System.TimeSpan? 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 Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind? 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallParticipantRoleKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantRoleKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind 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.AcsCallParticipantRoleKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind right) { throw null; } + public override string ToString() { 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 +492,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() { } @@ -1320,6 +1517,52 @@ 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 ApiManagementCircuitBreakerClosedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData 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.ApiManagementCircuitBreakerClosedEventData 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 ApiManagementCircuitBreakerOpenedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData 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.ApiManagementCircuitBreakerOpenedEventData 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 ApiManagementCircuitBreakerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary> Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties 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.ApiManagementCircuitBreakerProperties 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 ApiManagementExpiredGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties 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.ApiManagementExpiredGatewayTokenProperties 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 ApiManagementGatewayApiAddedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayApiAddedEventData() { } @@ -1430,6 +1673,42 @@ 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 ApiManagementGatewayProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties 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.ApiManagementGatewayProperties 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 ApiManagementGatewayTokenExpiredEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData 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.ApiManagementGatewayTokenExpiredEventData 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 ApiManagementGatewayTokenNearExpiryEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData 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.ApiManagementGatewayTokenNearExpiryEventData 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 ApiManagementGatewayUpdatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayUpdatedEventData() { } @@ -1441,6 +1720,17 @@ 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 ApiManagementNearExpiryGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementNearExpiryGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties 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.ApiManagementNearExpiryGatewayTokenProperties 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 ApiManagementProductCreatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementProductCreatedEventData() { } @@ -2338,6 +2628,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() { } @@ -2447,6 +2754,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, System.TimeSpan? callDurationInSeconds = default(System.TimeSpan?)) { 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, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind? role = default(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind?)) { 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; } @@ -2470,6 +2789,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; } @@ -2532,6 +2852,10 @@ public static partial class EventGridSystemEventsModelFactory 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 expiredAtUtc = 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; } @@ -2542,7 +2866,11 @@ public static partial class EventGridSystemEventsModelFactory 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 gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties tokenInfo = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { 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; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductUpdatedEventData ApiManagementProductUpdatedEventData(string resourceUri = null) { throw null; } @@ -2608,6 +2936,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; } @@ -4378,6 +4707,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"; @@ -4394,6 +4728,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"; @@ -4433,6 +4768,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"; @@ -4443,6 +4780,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"; @@ -4482,6 +4821,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 92092fa653b1..2ccf3c0214b6 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,191 @@ 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 System.TimeSpan? 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 Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind? 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallParticipantRoleKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantRoleKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind 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.AcsCallParticipantRoleKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind right) { throw null; } + public override string ToString() { 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 +492,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() { } @@ -1320,6 +1517,52 @@ 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 ApiManagementCircuitBreakerClosedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData 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.ApiManagementCircuitBreakerClosedEventData 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 ApiManagementCircuitBreakerOpenedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData 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.ApiManagementCircuitBreakerOpenedEventData 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 ApiManagementCircuitBreakerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary> Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties 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.ApiManagementCircuitBreakerProperties 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 ApiManagementExpiredGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties 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.ApiManagementExpiredGatewayTokenProperties 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 ApiManagementGatewayApiAddedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayApiAddedEventData() { } @@ -1430,6 +1673,42 @@ 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 ApiManagementGatewayProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties 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.ApiManagementGatewayProperties 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 ApiManagementGatewayTokenExpiredEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData 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.ApiManagementGatewayTokenExpiredEventData 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 ApiManagementGatewayTokenNearExpiryEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData 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.ApiManagementGatewayTokenNearExpiryEventData 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 ApiManagementGatewayUpdatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayUpdatedEventData() { } @@ -1441,6 +1720,17 @@ 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 ApiManagementNearExpiryGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementNearExpiryGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties 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.ApiManagementNearExpiryGatewayTokenProperties 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 ApiManagementProductCreatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementProductCreatedEventData() { } @@ -2338,6 +2628,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() { } @@ -2447,6 +2754,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, System.TimeSpan? callDurationInSeconds = default(System.TimeSpan?)) { 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, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind? role = default(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind?)) { 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; } @@ -2470,6 +2789,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; } @@ -2532,6 +2852,10 @@ public static partial class EventGridSystemEventsModelFactory 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 expiredAtUtc = 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; } @@ -2542,7 +2866,11 @@ public static partial class EventGridSystemEventsModelFactory 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 gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties tokenInfo = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { 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; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductUpdatedEventData ApiManagementProductUpdatedEventData(string resourceUri = null) { throw null; } @@ -2608,6 +2936,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; } @@ -4378,6 +4707,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"; @@ -4394,6 +4728,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"; @@ -4433,6 +4768,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"; @@ -4443,6 +4780,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"; @@ -4482,6 +4821,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..a3d90e809d06 --- /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, AzureMessagingEventGridSystemEventsContext.Default); + 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/AcsCallEndReasonProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.cs new file mode 100644 index 000000000000..b0c87d904258 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.cs @@ -0,0 +1,73 @@ +// 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 reason properties. + public partial class AcsCallEndReasonProperties + { + /// + /// 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 AcsCallEndReasonProperties() + { + } + + /// 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 AcsCallEndReasonProperties(int? code, int? subCode, string phrase, IDictionary serializedAdditionalRawData) + { + Code = code; + SubCode = subCode; + Phrase = phrase; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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..de140430957f --- /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, AzureMessagingEventGridSystemEventsContext.Default); + 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..d5f9948a9c95 --- /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 ended by 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..ea653bb281ee --- /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(Convert.ToDouble(CallDurationInSeconds.Value.ToString("s\\.FFFFFF"))); + } + } + + 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; + TimeSpan? 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 = TimeSpan.FromSeconds(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, AzureMessagingEventGridSystemEventsContext.Default); + 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..49033d56f937 --- /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, TimeSpan? 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 TimeSpan? CallDurationInSeconds { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.Serialization.cs new file mode 100644 index 000000000000..cccac49b1463 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.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 AcsCallGroupProperties : 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(AcsCallGroupProperties)} 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 + } + } + } + + AcsCallGroupProperties 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(AcsCallGroupProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallGroupProperties(document.RootElement, options); + } + + internal static AcsCallGroupProperties DeserializeAcsCallGroupProperties(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 AcsCallGroupProperties(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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallGroupProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallGroupProperties 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 DeserializeAcsCallGroupProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallGroupProperties)} 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 AcsCallGroupProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallGroupProperties(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/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..4ad08d138168 --- /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, AzureMessagingEventGridSystemEventsContext.Default); + 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..ccfbbae592d8 --- /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, AzureMessagingEventGridSystemEventsContext.Default); + 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..fe4c37ba7cb6 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs @@ -0,0 +1,164 @@ +// 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.Value.ToString()); + } + 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; + AcsCallParticipantRoleKind? 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)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new AcsCallParticipantRoleKind(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, AzureMessagingEventGridSystemEventsContext.Default); + 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..4bbc8bb0dd82 --- /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, AcsCallParticipantRoleKind? 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 AcsCallParticipantRoleKind? 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..67b9044dae03 --- /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, AzureMessagingEventGridSystemEventsContext.Default); + 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/AcsCallParticipantRoleKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRoleKind.cs new file mode 100644 index 000000000000..042f6d12491f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRoleKind.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Call participant role kind. + public readonly partial struct AcsCallParticipantRoleKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsCallParticipantRoleKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AttendeeValue = "Attendee"; + private const string PresenterValue = "Presenter"; + private const string OrganizerValue = "Organizer"; + private const string ConsumerValue = "Consumer"; + private const string CollaboratorValue = "Collaborator"; + + /// Attendee. + public static AcsCallParticipantRoleKind Attendee { get; } = new AcsCallParticipantRoleKind(AttendeeValue); + /// Presenter. + public static AcsCallParticipantRoleKind Presenter { get; } = new AcsCallParticipantRoleKind(PresenterValue); + /// Organizer. + public static AcsCallParticipantRoleKind Organizer { get; } = new AcsCallParticipantRoleKind(OrganizerValue); + /// Consumer. + public static AcsCallParticipantRoleKind Consumer { get; } = new AcsCallParticipantRoleKind(ConsumerValue); + /// Collaborator. + public static AcsCallParticipantRoleKind Collaborator { get; } = new AcsCallParticipantRoleKind(CollaboratorValue); + /// Determines if two values are the same. + public static bool operator ==(AcsCallParticipantRoleKind left, AcsCallParticipantRoleKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsCallParticipantRoleKind left, AcsCallParticipantRoleKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcsCallParticipantRoleKind(string value) => new AcsCallParticipantRoleKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsCallParticipantRoleKind other && Equals(other); + /// + public bool Equals(AcsCallParticipantRoleKind 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/AcsCallRoomProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.Serialization.cs new file mode 100644 index 000000000000..29a5accba97f --- /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, AzureMessagingEventGridSystemEventsContext.Default); + 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..ebf62eb5bebc --- /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, AzureMessagingEventGridSystemEventsContext.Default); + 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..b08680fc858a --- /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, AzureMessagingEventGridSystemEventsContext.Default); + 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..1092b50c80c1 --- /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, AzureMessagingEventGridSystemEventsContext.Default); + 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 3365f7470da2..18c1b8e175ba 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 bc048ca4a1d3..9457972cb6c8 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 989987894be7..64b6c90bc6bd 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 bd019e93220c..a0b8f5ed87b9 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 c3526fdc85b2..75098026e6a7 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 f44f356868b0..2921ac52b9b9 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 96099ec505ca..fbb27ab2b4ed 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 7400be92201e..3486dc834635 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 284a7cbf116e..c993ef1ff260 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,21 +57,27 @@ 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) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("participants"u8); + writer.WriteStartArray(); + foreach (var item in Participants) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsChatThreadCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -130,6 +136,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 +200,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..1b561ad11587 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -15,22 +14,20 @@ 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) : 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; - Participants = participants.ToList(); + Metadata = new ChangeTrackingDictionary(); + Participants = new ChangeTrackingList(); } /// Initializes a new instance of . 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 6a4d1d4ce236..5d4bdbbe8238 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,21 +57,27 @@ 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) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("participants"u8); + writer.WriteStartArray(); + foreach (var item in Participants) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsChatThreadCreatedWithUserEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -131,6 +137,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 +207,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..ec49d2bdc311 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -16,23 +15,21 @@ 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) : 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; - Participants = participants.ToList(); + Metadata = new ChangeTrackingDictionary(); + Participants = new ChangeTrackingList(); } /// Initializes a new instance of . 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 4c0db40a2cba..2c1c21d70f17 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 788bb4a1b95f..4e86417e37e5 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..4be3e4d48a3d --- /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, AzureMessagingEventGridSystemEventsContext.Default); + 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/AcsRecordingStorageInfoProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs index 897ecfa01ddc..245ed8cf9211 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs @@ -34,13 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRecordingStorageInfoProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("recordingChunks"u8); - writer.WriteStartArray(); - foreach (var item in RecordingChunks) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("recordingChunks"u8); + writer.WriteStartArray(); + foreach (var item in RecordingChunks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs index bc7b2ef0b31b..44b951440b82 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,13 +46,9 @@ public partial class AcsRecordingStorageInfoProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// List of details of recording chunks information. - /// is null. - internal AcsRecordingStorageInfoProperties(IEnumerable recordingChunks) + internal AcsRecordingStorageInfoProperties() { - Argument.AssertNotNull(recordingChunks, nameof(recordingChunks)); - - RecordingChunks = recordingChunks.ToList(); + RecordingChunks = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -65,11 +60,6 @@ internal AcsRecordingStorageInfoProperties(IReadOnlyList Initializes a new instance of for deserialization. - internal AcsRecordingStorageInfoProperties() - { - } - /// List of details of recording chunks information. public IReadOnlyList RecordingChunks { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs index 50209bd3bad8..b5474d2dca74 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs @@ -51,13 +51,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("innererror"u8); writer.WriteObjectValue(Innererror, options); - writer.WritePropertyName("details"u8); - writer.WriteStartArray(); - foreach (var item in Details) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs index 35ae98ef1222..36135cca5336 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -48,15 +47,13 @@ public partial class AcsRouterCommunicationError /// Initializes a new instance of . /// Router Communication Inner Error. - /// List of Router Communication Errors. - /// or is null. - internal AcsRouterCommunicationError(AcsRouterCommunicationError innererror, IEnumerable details) + /// is null. + internal AcsRouterCommunicationError(AcsRouterCommunicationError innererror) { Argument.AssertNotNull(innererror, nameof(innererror)); - Argument.AssertNotNull(details, nameof(details)); Innererror = innererror; - Details = details.ToList(); + Details = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs index 97119d00ab58..f2c36c0fac29 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs @@ -40,13 +40,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("classificationPolicyId"u8); writer.WriteStringValue(ClassificationPolicyId); } - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobClassificationFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs index 0dde294286a4..abb7f6850287 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,15 +16,13 @@ public partial class AcsRouterJobClassificationFailedEventData : AcsRouterJobEve /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Classification Failed Errors. - /// , or is null. - internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable errors) : base(labels, tags) + /// or is null. + internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(errors, nameof(errors)); - Errors = errors.ToList(); + Errors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs index 875998d46d28..bd7a45acb2a3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs @@ -47,13 +47,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("attachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in AttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("attachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in AttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobClassifiedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs index db2dbdd50165..6c87513cd751 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -18,17 +17,15 @@ public partial class AcsRouterJobClassifiedEventData : AcsRouterJobEventData /// Router Job events Labels. /// Router Jobs events Tags. /// Router Job Queue Info. - /// Router Job Attached Worker Selector. - /// , , or is null. - internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterQueueDetails queueDetails, IEnumerable attachedWorkerSelectors) : base(labels, tags) + /// , or is null. + internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterQueueDetails queueDetails) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); Argument.AssertNotNull(queueDetails, nameof(queueDetails)); - Argument.AssertNotNull(attachedWorkerSelectors, nameof(attachedWorkerSelectors)); QueueDetails = queueDetails; - AttachedWorkerSelectors = attachedWorkerSelectors.ToList(); + AttachedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs index 196abbfdca40..12ae0d33f0ed 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("attachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in AttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("attachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in AttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("requestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in RequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("requestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in RequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobQueuedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs index ac701da4ca38..6d1a918f7236 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobQueuedEventData : AcsRouterJobEventData /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Queued Attached Worker Selector. - /// Router Job Queued Requested Worker Selector. - /// , , or is null. - internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable attachedWorkerSelectors, IEnumerable requestedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(attachedWorkerSelectors, nameof(attachedWorkerSelectors)); - Argument.AssertNotNull(requestedWorkerSelectors, nameof(requestedWorkerSelectors)); - AttachedWorkerSelectors = attachedWorkerSelectors.ToList(); - RequestedWorkerSelectors = requestedWorkerSelectors.ToList(); + AttachedWorkerSelectors = new ChangeTrackingList(); + RequestedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs index 1b5fe0c105f1..fa9e7f27c6eb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs @@ -50,13 +50,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("requestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in RequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("requestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in RequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs index e13d3fb3647b..6df1c998602d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,16 +16,14 @@ public partial class AcsRouterJobReceivedEventData : AcsRouterJobEventData /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Received Requested Worker Selectors. /// Unavailable For Matching for Router Job Received. - /// , or is null. - internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable requestedWorkerSelectors, bool unavailableForMatching) : base(labels, tags) + /// or is null. + internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(requestedWorkerSelectors, nameof(requestedWorkerSelectors)); - RequestedWorkerSelectors = requestedWorkerSelectors.ToList(); + RequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs index 6de4ecc90325..a05943021676 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs index 2f38f8a6466d..603602f62c5b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobSchedulingFailedEventData : AcsRouterJobEventDa /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Scheduling Failed Attached Worker Selector Expired. - /// Router Job Scheduling Failed Requested Worker Selector Expired. - /// , , or is null. - internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs index f7dce42e5827..3cc59d45faa7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs index df1a3085421f..8c6ba6351ed6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,19 +16,15 @@ public partial class AcsRouterJobWaitingForActivationEventData : AcsRouterJobEve /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Waiting For Activation Worker Selector Expired. - /// Router Job Waiting For Activation Requested Worker Selector Expired. /// Router Job Waiting For Activation Unavailable For Matching. - /// , , or is null. - internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors, bool unavailableForMatching) : base(labels, tags) + /// or is null. + internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs index 07e064bc4208..f7da5f2ad1f4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs @@ -35,20 +35,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobWorkerSelectorsExpiredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs index 28655f6d0119..b9195fb5eec0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobWorkerSelectorsExpiredEventData : AcsRouterJobE /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Worker Selectors Expired Requested Worker Selectors. - /// Router Job Worker Selectors Expired Attached Worker Selectors. - /// , , or is null. - internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredRequestedWorkerSelectors, IEnumerable expiredAttachedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs index 6b870532df9d..b0866f1d12c6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs @@ -39,20 +39,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("workerId"u8); writer.WriteStringValue(WorkerId); } - writer.WritePropertyName("queueAssignments"u8); - writer.WriteStartArray(); - foreach (var item in QueueAssignments) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("queueAssignments"u8); + writer.WriteStartArray(); + foreach (var item in QueueAssignments) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("channelConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in ChannelConfigurations) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("channelConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in ChannelConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(TotalCapacity)) { writer.WritePropertyName("totalCapacity"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs index e5b8ab2dc682..3f3cc4465551 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,20 +46,16 @@ public partial class AcsRouterWorkerRegisteredEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Router Worker Registered Queue Info. - /// Router Worker Registered Channel Configuration. /// Router Worker Registered Labels. /// Router Worker Registered Tags. - /// , , or is null. - internal AcsRouterWorkerRegisteredEventData(IEnumerable queueAssignments, IEnumerable channelConfigurations, IReadOnlyDictionary labels, IReadOnlyDictionary tags) + /// or is null. + internal AcsRouterWorkerRegisteredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Argument.AssertNotNull(queueAssignments, nameof(queueAssignments)); - Argument.AssertNotNull(channelConfigurations, nameof(channelConfigurations)); Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - QueueAssignments = queueAssignments.ToList(); - ChannelConfigurations = channelConfigurations.ToList(); + QueueAssignments = new ChangeTrackingList(); + ChannelConfigurations = new ChangeTrackingList(); Labels = labels; Tags = tags; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs index 16de6d5361a9..e1cd7507173e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs @@ -39,20 +39,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("workerId"u8); writer.WriteStringValue(WorkerId); } - writer.WritePropertyName("queueAssignments"u8); - writer.WriteStartArray(); - foreach (var item in QueueAssignments) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("queueAssignments"u8); + writer.WriteStartArray(); + foreach (var item in QueueAssignments) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("channelConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in ChannelConfigurations) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("channelConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in ChannelConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(TotalCapacity)) { writer.WritePropertyName("totalCapacity"u8); @@ -74,13 +80,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(item.Value); } writer.WriteEndObject(); - writer.WritePropertyName("updatedWorkerProperties"u8); - writer.WriteStartArray(); - foreach (var item in UpdatedWorkerProperties) + if (options.Format != "W") { - writer.WriteStringValue(item.ToString()); + writer.WritePropertyName("updatedWorkerProperties"u8); + writer.WriteStartArray(); + foreach (var item in UpdatedWorkerProperties) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs index 3d1b2b1ca992..c5ff3fea7cb4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,25 +46,19 @@ public partial class AcsRouterWorkerUpdatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Router Worker Updated Queue Info. - /// Router Worker Updated Channel Configuration. /// Router Worker Updated Labels. /// Router Worker Updated Tags. - /// Router Worker Properties Updated. - /// , , , or is null. - internal AcsRouterWorkerUpdatedEventData(IEnumerable queueAssignments, IEnumerable channelConfigurations, IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable updatedWorkerProperties) + /// or is null. + internal AcsRouterWorkerUpdatedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Argument.AssertNotNull(queueAssignments, nameof(queueAssignments)); - Argument.AssertNotNull(channelConfigurations, nameof(channelConfigurations)); Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(updatedWorkerProperties, nameof(updatedWorkerProperties)); - QueueAssignments = queueAssignments.ToList(); - ChannelConfigurations = channelConfigurations.ToList(); + QueueAssignments = new ChangeTrackingList(); + ChannelConfigurations = new ChangeTrackingList(); Labels = labels; Tags = tags; - UpdatedWorkerProperties = updatedWorkerProperties.ToList(); + UpdatedWorkerProperties = new ChangeTrackingList(); } /// Initializes a new instance of . 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 8dd3525c17ef..73fb26b9841b 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,23 +35,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(DeliveryStatus)) + writer.WritePropertyName("deliveryStatus"u8); + writer.WriteStringValue(DeliveryStatus); + writer.WritePropertyName("deliveryStatusDetails"u8); + writer.WriteStringValue(DeliveryStatusDetails); + if (options.Format != "W") { - writer.WritePropertyName("deliveryStatus"u8); - writer.WriteStringValue(DeliveryStatus); - } - if (Optional.IsDefined(DeliveryStatusDetails)) - { - writer.WritePropertyName("deliveryStatusDetails"u8); - writer.WriteStringValue(DeliveryStatusDetails); - } - writer.WritePropertyName("deliveryAttempts"u8); - writer.WriteStartArray(); - foreach (var item in DeliveryAttempts) - { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("deliveryAttempts"u8); + writer.WriteStartArray(); + foreach (var item in DeliveryAttempts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ReceivedTimestamp)) { writer.WritePropertyName("receivedTimestamp"u8); 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..d7db623a9e57 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -15,13 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsDeliveryReportReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . - /// List of details of delivery attempts made. - /// is null. - internal AcsSmsDeliveryReportReceivedEventData(IEnumerable deliveryAttempts) + /// 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. + /// , , , or is null. + internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, string deliveryStatus, string deliveryStatusDetails) : base(messageId, @from, to) { - Argument.AssertNotNull(deliveryAttempts, nameof(deliveryAttempts)); + 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)); - DeliveryAttempts = deliveryAttempts.ToList(); + DeliveryStatus = deliveryStatus; + DeliveryStatusDetails = deliveryStatusDetails; + DeliveryAttempts = new ChangeTrackingList(); } /// Initializes a new instance of . 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 a03f690ca408..46b7ed110e39 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 24df1730c7a8..cff493a26eec 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/ApiManagementCircuitBreakerClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs new file mode 100644 index 000000000000..0b9333f55dfc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs @@ -0,0 +1,150 @@ +// 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 ApiManagementCircuitBreakerClosedEventData : 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(ApiManagementCircuitBreakerClosedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("backendName"u8); + writer.WriteStringValue(BackendName); + writer.WritePropertyName("circuitBreaker"u8); + writer.WriteObjectValue(CircuitBreaker, options); + 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 + } + } + } + + ApiManagementCircuitBreakerClosedEventData 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(ApiManagementCircuitBreakerClosedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerClosedEventData DeserializeApiManagementCircuitBreakerClosedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerClosedEventData 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 DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} 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 ApiManagementCircuitBreakerClosedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerClosedEventData(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/ApiManagementCircuitBreakerClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.cs new file mode 100644 index 000000000000..7b883eb64505 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.cs @@ -0,0 +1,82 @@ +// 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.ApiManagement.CircuitBreaker.Closed event. + public partial class ApiManagementCircuitBreakerClosedEventData + { + /// + /// 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 . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// or is null. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + Argument.AssertNotNull(backendName, nameof(backendName)); + Argument.AssertNotNull(circuitBreaker, nameof(circuitBreaker)); + + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// 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. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker, IDictionary serializedAdditionalRawData) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerClosedEventData() + { + } + + /// 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.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs new file mode 100644 index 000000000000..6e5ac8e33bb1 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs @@ -0,0 +1,150 @@ +// 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 ApiManagementCircuitBreakerOpenedEventData : 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(ApiManagementCircuitBreakerOpenedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("backendName"u8); + writer.WriteStringValue(BackendName); + writer.WritePropertyName("circuitBreaker"u8); + writer.WriteObjectValue(CircuitBreaker, options); + 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 + } + } + } + + ApiManagementCircuitBreakerOpenedEventData 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(ApiManagementCircuitBreakerOpenedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerOpenedEventData DeserializeApiManagementCircuitBreakerOpenedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerOpenedEventData 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 DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} 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 ApiManagementCircuitBreakerOpenedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerOpenedEventData(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/ApiManagementCircuitBreakerOpenedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.cs new file mode 100644 index 000000000000..d739428a4a42 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.cs @@ -0,0 +1,82 @@ +// 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.ApiManagement.CircuitBreaker.Opened event. + public partial class ApiManagementCircuitBreakerOpenedEventData + { + /// + /// 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 . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// or is null. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + Argument.AssertNotNull(backendName, nameof(backendName)); + Argument.AssertNotNull(circuitBreaker, nameof(circuitBreaker)); + + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// 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. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker, IDictionary serializedAdditionalRawData) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerOpenedEventData() + { + } + + /// 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.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs new file mode 100644 index 000000000000..919140e39aec --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs @@ -0,0 +1,195 @@ +// 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 ApiManagementCircuitBreakerProperties : 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(ApiManagementCircuitBreakerProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("rules"u8); + writer.WriteStartObject(); + foreach (var item in Rules) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartObject(); + foreach (var item0 in item.Value) + { + writer.WritePropertyName(item0.Key); + if (item0.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item0.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item0.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + 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 + } + } + } + + ApiManagementCircuitBreakerProperties 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(ApiManagementCircuitBreakerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerProperties DeserializeApiManagementCircuitBreakerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary> rules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"u8)) + { + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + Dictionary dictionary0 = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary0.Add(property1.Name, null); + } + else + { + dictionary0.Add(property1.Name, BinaryData.FromString(property1.Value.GetRawText())); + } + } + dictionary.Add(property0.Name, dictionary0); + } + } + rules = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerProperties(rules, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerProperties 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 DeserializeApiManagementCircuitBreakerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} 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 ApiManagementCircuitBreakerProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerProperties(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/ApiManagementCircuitBreakerProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.cs new file mode 100644 index 000000000000..a46867dad4e4 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.cs @@ -0,0 +1,104 @@ +// 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 +{ + /// Information related to the circuit breaker configured on the backend. + public partial class ApiManagementCircuitBreakerProperties + { + /// + /// 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 . + /// Overview of all configured rules and respective details. + /// is null. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary> rules) + { + Argument.AssertNotNull(rules, nameof(rules)); + + Rules = rules; + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary> rules, IDictionary serializedAdditionalRawData) + { + Rules = rules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerProperties() + { + } + + /// + /// Overview of all configured rules and respective details. + /// + /// 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" }. + /// + /// + /// + /// + public IReadOnlyDictionary> Rules { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..4e46e58afdac --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs @@ -0,0 +1,142 @@ +// 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 ApiManagementExpiredGatewayTokenProperties : 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(ApiManagementExpiredGatewayTokenProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expiredAtUtc"u8); + writer.WriteStringValue(ExpiredAtUtc, "O"); + 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 + } + } + } + + ApiManagementExpiredGatewayTokenProperties 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(ApiManagementExpiredGatewayTokenProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement, options); + } + + internal static ApiManagementExpiredGatewayTokenProperties DeserializeApiManagementExpiredGatewayTokenProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset expiredAtUtc = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementExpiredGatewayTokenProperties 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 DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} 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 ApiManagementExpiredGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementExpiredGatewayTokenProperties(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/ApiManagementExpiredGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.cs new file mode 100644 index 000000000000..dadba25ed570 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.cs @@ -0,0 +1,72 @@ +// 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 +{ + /// Information related to a gateway token that has expired for a self-hosted gateway deployment. + public partial class ApiManagementExpiredGatewayTokenProperties + { + /// + /// 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 . + /// Timestamp when the gateway token has expired. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc) + { + ExpiredAtUtc = expiredAtUtc; + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// Keeps track of any properties unknown to the library. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc, IDictionary serializedAdditionalRawData) + { + ExpiredAtUtc = expiredAtUtc; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementExpiredGatewayTokenProperties() + { + } + + /// Timestamp when the gateway token has expired. + public DateTimeOffset ExpiredAtUtc { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs new file mode 100644 index 000000000000..3e1b3550a9cb --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs @@ -0,0 +1,150 @@ +// 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 ApiManagementGatewayProperties : 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(ApiManagementGatewayProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayId"u8); + writer.WriteStringValue(GatewayId); + writer.WritePropertyName("instanceId"u8); + writer.WriteStringValue(InstanceId); + 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 + } + } + } + + ApiManagementGatewayProperties 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(ApiManagementGatewayProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayProperties(document.RootElement, options); + } + + internal static ApiManagementGatewayProperties DeserializeApiManagementGatewayProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string gatewayId = default; + string instanceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + 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; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayProperties(gatewayId, instanceId, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayProperties 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 DeserializeApiManagementGatewayProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} 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 ApiManagementGatewayProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayProperties(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/ApiManagementGatewayProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.cs new file mode 100644 index 000000000000..56075c0a60ee --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.cs @@ -0,0 +1,82 @@ +// 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 +{ + /// Information related to a given self-hosted gateway deployment. + public partial class ApiManagementGatewayProperties + { + /// + /// 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 . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// Unique instance ID of the deployed gateway. + /// or is null. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId) + { + Argument.AssertNotNull(gatewayId, nameof(gatewayId)); + Argument.AssertNotNull(instanceId, nameof(instanceId)); + + GatewayId = gatewayId; + InstanceId = instanceId; + } + + /// 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. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// Unique instance ID of the deployed gateway. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId, IDictionary serializedAdditionalRawData) + { + GatewayId = gatewayId; + InstanceId = instanceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayProperties() + { + } + + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + public string GatewayId { get; } + /// Unique instance ID of the deployed gateway. + public string InstanceId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs new file mode 100644 index 000000000000..68cef8d2e415 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs @@ -0,0 +1,150 @@ +// 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 ApiManagementGatewayTokenExpiredEventData : 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(ApiManagementGatewayTokenExpiredEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayInfo"u8); + writer.WriteObjectValue(GatewayInfo, options); + writer.WritePropertyName("tokenInfo"u8); + writer.WriteObjectValue(TokenInfo, options); + 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 + } + } + } + + ApiManagementGatewayTokenExpiredEventData 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(ApiManagementGatewayTokenExpiredEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement, options); + } + + internal static ApiManagementGatewayTokenExpiredEventData DeserializeApiManagementGatewayTokenExpiredEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementExpiredGatewayTokenProperties tokenInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value, options); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + tokenInfo = ApiManagementExpiredGatewayTokenProperties.DeserializeApiManagementExpiredGatewayTokenProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayTokenExpiredEventData 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 DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} 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 ApiManagementGatewayTokenExpiredEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenExpiredEventData(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/ApiManagementGatewayTokenExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.cs new file mode 100644 index 000000000000..a7acbceff381 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.cs @@ -0,0 +1,82 @@ +// 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.ApiManagement.GatewayTokenExpired event. + public partial class ApiManagementGatewayTokenExpiredEventData + { + /// + /// 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 . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// or is null. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementExpiredGatewayTokenProperties tokenInfo) + { + Argument.AssertNotNull(gatewayInfo, nameof(gatewayInfo)); + Argument.AssertNotNull(tokenInfo, nameof(tokenInfo)); + + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + } + + /// 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. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementExpiredGatewayTokenProperties tokenInfo, IDictionary serializedAdditionalRawData) + { + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayTokenExpiredEventData() + { + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties GatewayInfo { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementExpiredGatewayTokenProperties TokenInfo { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs new file mode 100644 index 000000000000..14a396df7cc4 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs @@ -0,0 +1,150 @@ +// 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 ApiManagementGatewayTokenNearExpiryEventData : 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(ApiManagementGatewayTokenNearExpiryEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayInfo"u8); + writer.WriteObjectValue(GatewayInfo, options); + writer.WritePropertyName("tokenInfo"u8); + writer.WriteObjectValue(TokenInfo, options); + 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 + } + } + } + + ApiManagementGatewayTokenNearExpiryEventData 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(ApiManagementGatewayTokenNearExpiryEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement, options); + } + + internal static ApiManagementGatewayTokenNearExpiryEventData DeserializeApiManagementGatewayTokenNearExpiryEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementNearExpiryGatewayTokenProperties tokenInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value, options); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + tokenInfo = ApiManagementNearExpiryGatewayTokenProperties.DeserializeApiManagementNearExpiryGatewayTokenProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayTokenNearExpiryEventData 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 DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} 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 ApiManagementGatewayTokenNearExpiryEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(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/ApiManagementGatewayTokenNearExpiryEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.cs new file mode 100644 index 000000000000..a66436311c5e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.cs @@ -0,0 +1,82 @@ +// 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.ApiManagement.GatewayTokenNearExpiry event. + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + /// + /// 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 . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// or is null. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementNearExpiryGatewayTokenProperties tokenInfo) + { + Argument.AssertNotNull(gatewayInfo, nameof(gatewayInfo)); + Argument.AssertNotNull(tokenInfo, nameof(tokenInfo)); + + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + } + + /// 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. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementNearExpiryGatewayTokenProperties tokenInfo, IDictionary serializedAdditionalRawData) + { + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayTokenNearExpiryEventData() + { + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties GatewayInfo { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..c903a5b5b374 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.Serialization.cs @@ -0,0 +1,142 @@ +// 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 ApiManagementNearExpiryGatewayTokenProperties : 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(ApiManagementNearExpiryGatewayTokenProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expiredAtUtc"u8); + writer.WriteStringValue(ExpiredAtUtc, "O"); + 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 + } + } + } + + ApiManagementNearExpiryGatewayTokenProperties 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(ApiManagementNearExpiryGatewayTokenProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementNearExpiryGatewayTokenProperties(document.RootElement, options); + } + + internal static ApiManagementNearExpiryGatewayTokenProperties DeserializeApiManagementNearExpiryGatewayTokenProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset expiredAtUtc = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementNearExpiryGatewayTokenProperties(expiredAtUtc, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementNearExpiryGatewayTokenProperties 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 DeserializeApiManagementNearExpiryGatewayTokenProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} 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 ApiManagementNearExpiryGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementNearExpiryGatewayTokenProperties(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/ApiManagementNearExpiryGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.cs new file mode 100644 index 000000000000..fcc22492a89d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.cs @@ -0,0 +1,72 @@ +// 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 +{ + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public partial class ApiManagementNearExpiryGatewayTokenProperties + { + /// + /// 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 . + /// Timestamp when the gateway token will expire. + internal ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc) + { + ExpiredAtUtc = expiredAtUtc; + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// Keeps track of any properties unknown to the library. + internal ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc, IDictionary serializedAdditionalRawData) + { + ExpiredAtUtc = expiredAtUtc; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementNearExpiryGatewayTokenProperties() + { + } + + /// Timestamp when the gateway token will expire. + public DateTimeOffset ExpiredAtUtc { get; } + } +} 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 b36758c2c2a4..96b5db001551 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 4eb183ad7ca7..b7557dd632ae 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 53796891500b..b7fabd263ca3 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/AvsClusterEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs index f9bfd63be34f..25a7f39e0005 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("operationId"u8); writer.WriteStringValue(OperationId); - if (Optional.IsCollectionDefined(AddedHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(AddedHostNames)) { writer.WritePropertyName("addedHostNames"u8); writer.WriteStartArray(); @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(RemovedHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(RemovedHostNames)) { writer.WritePropertyName("removedHostNames"u8); writer.WriteStartArray(); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(InMaintenanceHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(InMaintenanceHostNames)) { writer.WritePropertyName("inMaintenanceHostNames"u8); writer.WriteStartArray(); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs index 718d00b5c34a..06bf2a4fa347 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs @@ -38,7 +38,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(OperationId); writer.WritePropertyName("cmdletId"u8); writer.WriteStringValue(CmdletId); - if (Optional.IsCollectionDefined(Output)) + if (options.Format != "W" && Optional.IsCollectionDefined(Output)) { writer.WritePropertyName("output"u8); writer.WriteStartArray(); 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 e7339488d619..7fef7f4e04fa 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 d0e8d80c8a5c..57ae2aa7b651 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 3093a83c6dac..4c6132f4f59a 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 f38221ed7d47..60f04c71f52f 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..8fdc3f48de2b --- /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, AzureMessagingEventGridSystemEventsContext.Default); + 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..fe641f1f1335 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs @@ -251,6 +251,77 @@ public static ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRem return new ApiManagementGatewayApiRemovedEventData(resourceUri, serializedAdditionalRawData: null); } + /// 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, serializedAdditionalRawData: null); + } + + /// 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, serializedAdditionalRawData: null); + } + + /// 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, serializedAdditionalRawData: null); + } + + /// 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 ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo = null, ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) + { + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData: null); + } + + /// 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. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// 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, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// A new instance for mocking. + public static ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc = default) + { + return new ApiManagementNearExpiryGatewayTokenProperties(expiredAtUtc, serializedAdditionalRawData: null); + } + + /// 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 gatewayInfo = null, ApiManagementExpiredGatewayTokenProperties tokenInfo = null) + { + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// A new instance for mocking. + public static ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc = default) + { + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc, 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 +666,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, AcsCallParticipantRoleKind? 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, TimeSpan? 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 +974,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 +2812,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 548d205c8e34..c23d522eba09 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 e1bd24bd9f31..651a7d10ba06 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 0c60ac11ceab..9bff7d57999d 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 3c3b35cff214..b091b63623df 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 ed5a9e214388..2e679de2678e 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 c944a9fbf870..178e33f63bb6 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/src/Generated/MapsGeofenceEnteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs index 51ab73b06dc2..917a81f6db1a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceEnteredEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceEnteredEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceEnteredEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceEnteredEventData(IEnumerable expiredGeofenceGeometr internal MapsGeofenceEnteredEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceEnteredEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs index 47ae53e98be2..0f026d11d234 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs @@ -34,27 +34,36 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MapsGeofenceEventProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("expiredGeofenceGeometryId"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredGeofenceGeometryId) + if (options.Format != "W") { - writer.WriteStringValue(item); + writer.WritePropertyName("expiredGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("geometries"u8); - writer.WriteStartArray(); - foreach (var item in Geometries) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("geometries"u8); + writer.WriteStartArray(); + foreach (var item in Geometries) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("invalidPeriodGeofenceGeometryId"u8); - writer.WriteStartArray(); - foreach (var item in InvalidPeriodGeofenceGeometryId) + if (options.Format != "W") { - writer.WriteStringValue(item); + writer.WritePropertyName("invalidPeriodGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in InvalidPeriodGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(IsEventPublished)) { writer.WritePropertyName("isEventPublished"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs index 291c97afaace..6535b899695a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,19 +46,11 @@ public partial class MapsGeofenceEventProperties private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceEventProperties(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) + internal MapsGeofenceEventProperties() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); - - ExpiredGeofenceGeometryId = expiredGeofenceGeometryId.ToList(); - Geometries = geometries.ToList(); - InvalidPeriodGeofenceGeometryId = invalidPeriodGeofenceGeometryId.ToList(); + ExpiredGeofenceGeometryId = new ChangeTrackingList(); + Geometries = new ChangeTrackingList(); + InvalidPeriodGeofenceGeometryId = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -77,11 +68,6 @@ internal MapsGeofenceEventProperties(IReadOnlyList expiredGeofenceGeomet _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal MapsGeofenceEventProperties() - { - } - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. public IReadOnlyList ExpiredGeofenceGeometryId { get; } /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs index 29a1bc6813bd..ea1b7a3f4635 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceExitedEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceExitedEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceExitedEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceExitedEventData(IEnumerable expiredGeofenceGeometry internal MapsGeofenceExitedEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceExitedEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs index ba7fd1dfd496..b8a9abb6001c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceResultEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceResultEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceResultEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceResultEventData(IEnumerable expiredGeofenceGeometry internal MapsGeofenceResultEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceResultEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs index 8425b15b75fa..a5214a2e30d8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs @@ -10,7 +10,7 @@ namespace Azure.Messaging.EventGrid.SystemEvents { - /// Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event. + /// Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event.Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event. public partial class ResourceNotificationsContainerServiceEventResourcesScheduledEventData : ResourceNotificationsResourceUpdatedEventData { /// 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..184e534f0746 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: 2c6fb102e7f420fe04d5dd85f35f56e5691d3cdf 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 411fa9fac51b..a46c49ec69fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs @@ -27,6 +27,18 @@ public static partial class EventGridExtensions } public static partial class EventGridModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? kind = default(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind?), string name = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData AcsCallEndedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties endedBy = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties reason = null, float? callDurationInSeconds = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = default(int?), int? subCode = default(int?), string phrase = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties AcsCallGroupProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties AcsCallingEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData AcsCallParticipantEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties AcsCallParticipantProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? role = default(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties AcsCallRoomProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData AcsCallStartedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties AcsChatEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } @@ -72,6 +84,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel deletedByCommunicationIdentifier = null, System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string messageId, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails, System.DateTimeOffset? deliveryAttemptTimestamp) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -156,6 +169,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -166,6 +183,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } @@ -238,6 +259,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -447,6 +469,11 @@ public EventGridSasBuilder(System.Uri endpoint, System.DateTimeOffset expiresOn) } public static partial class SystemEventNames { + public const string AcsCallEnded = "Microsoft.Communication.CallEnded"; + public const string AcsCallParticipantAdded = "Microsoft.Communication.CallParticipantAdded"; + public const string AcsCallParticipantRemoved = "Microsoft.Communication.CallParticipantRemoved"; + public const string AcsCallStarted = "Microsoft.Communication.CallStarted"; + public const string AcsChatAzureBotCommandReceivedInThread = "Microsoft.Communication.ChatAzureBotCommandReceivedInThread"; public const string AcsChatMessageDeleted = "Microsoft.Communication.ChatMessageDeleted"; public const string AcsChatMessageDeletedInThread = "Microsoft.Communication.ChatMessageDeletedInThread"; public const string AcsChatMessageEdited = "Microsoft.Communication.ChatMessageEdited"; @@ -463,6 +490,7 @@ public static partial class SystemEventNames public const string AcsChatThreadPropertiesUpdated = "Microsoft.Communication.ChatThreadPropertiesUpdated"; public const string AcsChatThreadPropertiesUpdatedPerUser = "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser"; public const string AcsChatThreadWithUserDeleted = "Microsoft.Communication.ChatThreadWithUserDeleted"; + public const string AcsChatTypingIndicatorReceivedInThread = "Microsoft.Communication.ChatTypingIndicatorReceivedInThread"; public const string AcsEmailDeliveryReportReceived = "Microsoft.Communication.EmailDeliveryReportReceived"; public const string AcsEmailEngagementTrackingReportReceived = "Microsoft.Communication.EmailEngagementTrackingReportReceived"; public const string AcsIncomingCall = "Microsoft.Communication.IncomingCall"; @@ -502,6 +530,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -512,6 +542,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -551,6 +583,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; @@ -670,6 +703,45 @@ public static partial class SystemEventNames } namespace Azure.Messaging.EventGrid.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallEndedByKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallEndedByKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallParticipantKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallParticipantKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public override string ToString() { throw null; } + } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsRouterJobStatus : System.IEquatable @@ -802,6 +874,80 @@ namespace Azure.Messaging.EventGrid.Models } namespace Azure.Messaging.EventGrid.SystemEvents { + public partial class AcsCallEndedByProperties + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? Kind { get { throw null; } } + public string Name { get { throw null; } } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallEndedEventData() { } + public float? CallDurationInSeconds { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + } + public partial class AcsCallEndReasonProperties + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + } + public partial class AcsCallGroupProperties + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallingEventProperties + { + internal AcsCallingEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties Group { get { throw null; } } + public bool? IsRoomsCall { get { throw null; } } + public bool? IsTwoParty { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties Room { get { throw null; } } + public string ServerCallId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties StartedBy { get { throw null; } } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantAddedEventData() { } + } + public partial class AcsCallParticipantEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallParticipantEventData() { } + public string DisplayName { get { throw null; } } + public string ParticipantId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties User { get { throw null; } } + public string UserAgent { get { throw null; } } + } + public partial class AcsCallParticipantProperties + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? Role { get { throw null; } } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantRemovedEventData() { } + } + public partial class AcsCallRoomProperties + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallStartedEventData() { } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } public partial class AcsChatEventBaseProperties { internal AcsChatEventBaseProperties() { } @@ -964,6 +1110,12 @@ internal AcsChatThreadWithUserDeletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel DeletedByCommunicationIdentifier { get { throw null; } } public System.DateTimeOffset? DeleteTime { get { throw null; } } } + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsCommunicationIdentifierKind : System.IEquatable { @@ -1684,6 +1836,28 @@ public partial class ApiManagementApiUpdatedEventData internal ApiManagementApiUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerProperties + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + } + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayApiAddedEventData { internal ApiManagementGatewayApiAddedEventData() { } @@ -1734,6 +1908,29 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData internal ApiManagementGatewayHostnameConfigurationUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementGatewayProperties + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + } + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal ApiManagementGatewayTokenNearExpiryProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayUpdatedEventData { internal ApiManagementGatewayUpdatedEventData() { } @@ -2220,6 +2417,17 @@ internal DeviceTwinProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata Metadata { get { throw null; } } public float? Version { get { throw null; } } } + public partial class EdgeSolutionVersionPublishedEventData + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData { internal EventGridMqttClientCreatedOrUpdatedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs index 411fa9fac51b..a46c49ec69fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs @@ -27,6 +27,18 @@ public static partial class EventGridExtensions } public static partial class EventGridModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? kind = default(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind?), string name = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData AcsCallEndedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties endedBy = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties reason = null, float? callDurationInSeconds = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = default(int?), int? subCode = default(int?), string phrase = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties AcsCallGroupProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties AcsCallingEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData AcsCallParticipantEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties AcsCallParticipantProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? role = default(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties AcsCallRoomProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData AcsCallStartedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties AcsChatEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } @@ -72,6 +84,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel deletedByCommunicationIdentifier = null, System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string messageId, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails, System.DateTimeOffset? deliveryAttemptTimestamp) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -156,6 +169,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -166,6 +183,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } @@ -238,6 +259,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -447,6 +469,11 @@ public EventGridSasBuilder(System.Uri endpoint, System.DateTimeOffset expiresOn) } public static partial class SystemEventNames { + public const string AcsCallEnded = "Microsoft.Communication.CallEnded"; + public const string AcsCallParticipantAdded = "Microsoft.Communication.CallParticipantAdded"; + public const string AcsCallParticipantRemoved = "Microsoft.Communication.CallParticipantRemoved"; + public const string AcsCallStarted = "Microsoft.Communication.CallStarted"; + public const string AcsChatAzureBotCommandReceivedInThread = "Microsoft.Communication.ChatAzureBotCommandReceivedInThread"; public const string AcsChatMessageDeleted = "Microsoft.Communication.ChatMessageDeleted"; public const string AcsChatMessageDeletedInThread = "Microsoft.Communication.ChatMessageDeletedInThread"; public const string AcsChatMessageEdited = "Microsoft.Communication.ChatMessageEdited"; @@ -463,6 +490,7 @@ public static partial class SystemEventNames public const string AcsChatThreadPropertiesUpdated = "Microsoft.Communication.ChatThreadPropertiesUpdated"; public const string AcsChatThreadPropertiesUpdatedPerUser = "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser"; public const string AcsChatThreadWithUserDeleted = "Microsoft.Communication.ChatThreadWithUserDeleted"; + public const string AcsChatTypingIndicatorReceivedInThread = "Microsoft.Communication.ChatTypingIndicatorReceivedInThread"; public const string AcsEmailDeliveryReportReceived = "Microsoft.Communication.EmailDeliveryReportReceived"; public const string AcsEmailEngagementTrackingReportReceived = "Microsoft.Communication.EmailEngagementTrackingReportReceived"; public const string AcsIncomingCall = "Microsoft.Communication.IncomingCall"; @@ -502,6 +530,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -512,6 +542,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -551,6 +583,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; @@ -670,6 +703,45 @@ public static partial class SystemEventNames } namespace Azure.Messaging.EventGrid.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallEndedByKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallEndedByKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallParticipantKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallParticipantKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public override string ToString() { throw null; } + } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsRouterJobStatus : System.IEquatable @@ -802,6 +874,80 @@ namespace Azure.Messaging.EventGrid.Models } namespace Azure.Messaging.EventGrid.SystemEvents { + public partial class AcsCallEndedByProperties + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? Kind { get { throw null; } } + public string Name { get { throw null; } } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallEndedEventData() { } + public float? CallDurationInSeconds { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + } + public partial class AcsCallEndReasonProperties + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + } + public partial class AcsCallGroupProperties + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallingEventProperties + { + internal AcsCallingEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties Group { get { throw null; } } + public bool? IsRoomsCall { get { throw null; } } + public bool? IsTwoParty { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties Room { get { throw null; } } + public string ServerCallId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties StartedBy { get { throw null; } } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantAddedEventData() { } + } + public partial class AcsCallParticipantEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallParticipantEventData() { } + public string DisplayName { get { throw null; } } + public string ParticipantId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties User { get { throw null; } } + public string UserAgent { get { throw null; } } + } + public partial class AcsCallParticipantProperties + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? Role { get { throw null; } } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantRemovedEventData() { } + } + public partial class AcsCallRoomProperties + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallStartedEventData() { } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } public partial class AcsChatEventBaseProperties { internal AcsChatEventBaseProperties() { } @@ -964,6 +1110,12 @@ internal AcsChatThreadWithUserDeletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel DeletedByCommunicationIdentifier { get { throw null; } } public System.DateTimeOffset? DeleteTime { get { throw null; } } } + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsCommunicationIdentifierKind : System.IEquatable { @@ -1684,6 +1836,28 @@ public partial class ApiManagementApiUpdatedEventData internal ApiManagementApiUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerProperties + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + } + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayApiAddedEventData { internal ApiManagementGatewayApiAddedEventData() { } @@ -1734,6 +1908,29 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData internal ApiManagementGatewayHostnameConfigurationUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementGatewayProperties + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + } + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal ApiManagementGatewayTokenNearExpiryProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayUpdatedEventData { internal ApiManagementGatewayUpdatedEventData() { } @@ -2220,6 +2417,17 @@ internal DeviceTwinProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata Metadata { get { throw null; } } public float? Version { get { throw null; } } } + public partial class EdgeSolutionVersionPublishedEventData + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData { internal EventGridMqttClientCreatedOrUpdatedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs index fdc005e4a49a..6757f865c152 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.Messaging.EventGrid.Models; using Azure.Messaging.EventGrid.SystemEvents; namespace Azure.Messaging.EventGrid @@ -2468,7 +2469,7 @@ public static AcsRouterJobQueuedEventData AcsRouterJobQueuedEventData(string job /// Router Job Received Scheduled Time in UTC. /// Unavailable For Matching for Router Job Received. /// A new instance for mocking. - public static AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, AcsRouterJobStatus? status = null, string classificationPolicyId = null, int? priority = null, IEnumerable requestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, bool unavailableForMatching = default) + public static AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, SystemEvents.AcsRouterJobStatus? status = null, string classificationPolicyId = null, int? priority = null, IEnumerable requestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, bool unavailableForMatching = default) { labels ??= new Dictionary(); tags ??= new Dictionary(); @@ -2833,6 +2834,207 @@ public static AcsRouterWorkerUpdatedEventData AcsRouterWorkerUpdatedEventData(st updatedWorkerProperties?.ToList()); } + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantAddedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantEventData AcsCallParticipantEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The role of participant user. + /// A new instance for mocking. + public static AcsCallParticipantProperties AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier = null, AcsCallParticipantKind? role = null) + { + return new AcsCallParticipantProperties(communicationIdentifier, role); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// A new instance for mocking. + public static AcsCallingEventProperties AcsCallingEventProperties(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null) + { + return new AcsCallingEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Initializes a new instance of . + /// Group Id. Format is Guid as string. + /// A new instance for mocking. + public static AcsCallGroupProperties AcsCallGroupProperties(string id = null) + { + return new AcsCallGroupProperties(id); + } + + /// Initializes a new instance of . + /// Room Id. Format is Guid as string. + /// A new instance for mocking. + public static AcsCallRoomProperties AcsCallRoomProperties(string id = null) + { + return new AcsCallRoomProperties(id); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantRemovedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// A new instance for mocking. + public static AcsCallStartedEventData AcsCallStartedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null) + { + return new AcsCallStartedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The communication identifier of the user who was disconnected. + /// The reason for ending the call. + /// Duration of the call in seconds. + /// A new instance for mocking. + public static AcsCallEndedEventData AcsCallEndedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallEndedByProperties endedBy = null, AcsCallEndReasonProperties reason = null, float? callDurationInSeconds = null) + { + return new AcsCallEndedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + endedBy, + reason, + callDurationInSeconds); + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of the call ended by. + /// The name of the call ended by. + /// A new instance for mocking. + public static AcsCallEndedByProperties AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier = null, AcsCallEndedByKind? kind = null, string name = null) + { + return new AcsCallEndedByProperties(communicationIdentifier, kind, name); + } + + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for ending the call. + /// A new instance for mocking. + public static AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = null, int? subCode = null, string phrase = null) + { + return new AcsCallEndReasonProperties(code, subCode, phrase); + } + /// Initializes a new instance of . /// The communication identifier of the target user. /// The transaction id will be used as co-relation vector. @@ -2899,7 +3101,7 @@ public static AcsChatEventBaseProperties AcsChatEventBaseProperties(Communicatio return new AcsChatEventBaseProperties(recipientCommunicationIdentifier, transactionId, threadId); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. /// The chat message id. @@ -2910,12 +3112,21 @@ public static AcsChatEventBaseProperties AcsChatEventBaseProperties(Communicatio /// The version of the message. /// The body of the chat message. /// The chat message metadata. - /// A new instance for mocking. - public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + /// or is null. + /// A new instance for mocking. + public static AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } metadata ??= new Dictionary(); - return new AcsChatMessageReceivedInThreadEventData( + return new AcsChatAzureBotCommandReceivedInThreadEventData( transactionId, threadId, messageId, @@ -2937,9 +3148,19 @@ public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInTh /// The original compose time of the message. /// The type of the message. /// The version of the message. + /// or is null. /// A new instance for mocking. public static AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThreadBaseProperties(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatMessageEventInThreadBaseProperties( transactionId, threadId, @@ -2954,12 +3175,98 @@ public static AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThr /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. + /// or is null. /// A new instance for mocking. public static AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatEventInThreadBaseProperties(transactionId, threadId); } + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + /// A new instance for mocking. + public static AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + metadata ??= new Dictionary(); + + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + /// A new instance for mocking. + public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + metadata ??= new Dictionary(); + + return new AcsChatMessageReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata); + } + /// Initializes a new instance of . /// The communication identifier of the target user. /// The transaction id will be used as co-relation vector. @@ -3005,9 +3312,18 @@ public static AcsChatMessageEditedEventData AcsChatMessageEditedEventData(Commun /// The body of the chat message. /// The chat message metadata. /// The time at which the message was edited. + /// or is null. /// A new instance for mocking. public static AcsChatMessageEditedInThreadEventData AcsChatMessageEditedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null, DateTimeOffset? editTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } metadata ??= new Dictionary(); return new AcsChatMessageEditedInThreadEventData( @@ -3061,9 +3377,19 @@ public static AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Comm /// The type of the message. /// The version of the message. /// The time at which the message was deleted. + /// or is null. /// A new instance for mocking. public static AcsChatMessageDeletedInThreadEventData AcsChatMessageDeletedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, DateTimeOffset? deleteTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatMessageDeletedInThreadEventData( transactionId, threadId, @@ -3138,9 +3464,18 @@ public static AcsChatThreadEventBaseProperties AcsChatThreadEventBaseProperties( /// The thread properties. /// The chat thread created metadata. /// The list of properties of participants who are part of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel createdByCommunicationIdentifier = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null, IEnumerable participants = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } properties ??= new Dictionary(); metadata ??= new Dictionary(); participants ??= new List(); @@ -3161,9 +3496,19 @@ public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string /// The chat thread id. /// The original creation time of the thread. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadEventInThreadBaseProperties AcsChatThreadEventInThreadBaseProperties(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatThreadEventInThreadBaseProperties(transactionId, threadId, createTime, version); } @@ -3195,9 +3540,19 @@ public static AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeleted /// The version of the thread. /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadDeletedEventData AcsChatThreadDeletedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel deletedByCommunicationIdentifier = null, DateTimeOffset? deleteTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatThreadDeletedEventData( transactionId, threadId, @@ -3244,9 +3599,18 @@ public static AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadProper /// The time at which the properties of the thread were updated. /// The updated thread properties. /// The thread metadata. + /// or is null. /// A new instance for mocking. public static AcsChatThreadPropertiesUpdatedEventData AcsChatThreadPropertiesUpdatedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel editedByCommunicationIdentifier = null, DateTimeOffset? editTime = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } properties ??= new Dictionary(); metadata ??= new Dictionary(); @@ -3314,9 +3678,19 @@ public static AcsChatParticipantRemovedFromThreadWithUserEventData AcsChatPartic /// The communication identifier of the user who added the user. /// The details of the user who was added. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedToThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset? time = null, CommunicationIdentifierModel addedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantAdded = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatParticipantAddedToThreadEventData( transactionId, threadId, @@ -3333,9 +3707,19 @@ public static AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedTo /// The communication identifier of the user who removed the user. /// The details of the user who was removed. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRemovedFromThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset? time = null, CommunicationIdentifierModel removedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantRemoved = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatParticipantRemovedFromThreadEventData( transactionId, threadId, @@ -3354,9 +3738,22 @@ public static AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRem /// List of details of delivery attempts made. /// The time at which the SMS delivery report was received. /// Customer Content. + /// , or is null. /// A new instance for mocking. public static AcsSmsDeliveryReportReceivedEventData AcsSmsDeliveryReportReceivedEventData(string messageId = null, string @from = null, string to = null, string deliveryStatus = null, string deliveryStatusDetails = null, IEnumerable deliveryAttempts = null, DateTimeOffset? receivedTimestamp = null, string tag = null) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } deliveryAttempts ??= new List(); return new AcsSmsDeliveryReportReceivedEventData( @@ -3384,9 +3781,23 @@ public static AcsSmsDeliveryAttemptProperties AcsSmsDeliveryAttemptProperties(Da /// The identity of the SMS message. /// The identity of SMS message sender. /// The identity of SMS message receiver. + /// , or is null. /// A new instance for mocking. public static AcsSmsEventBaseProperties AcsSmsEventBaseProperties(string messageId = null, string @from = null, string to = null) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } + return new AcsSmsEventBaseProperties(messageId, @from, to); } @@ -3397,9 +3808,23 @@ public static AcsSmsEventBaseProperties AcsSmsEventBaseProperties(string message /// The SMS content. /// The time at which the SMS was received. /// Number of segments in the message. + /// , or is null. /// A new instance for mocking. public static AcsSmsReceivedEventData AcsSmsReceivedEventData(string messageId = null, string @from = null, string to = null, string message = null, DateTimeOffset? receivedTimestamp = null, int segmentCount = default) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } + return new AcsSmsReceivedEventData( messageId, @from, @@ -3916,6 +4341,77 @@ public static ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRem return new ApiManagementGatewayApiRemovedEventData(resourceUri); } + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules = null) + { + rules ??= new Dictionary(); + + return new ApiManagementCircuitBreakerProperties(rules); + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gateway = null, ApiManagementGatewayTokenNearExpiryProperties token = null) + { + return new ApiManagementGatewayTokenNearExpiryEventData(gateway, token); + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + /// Unique instance ID of the deployed gateway. + /// A new instance for mocking. + public static ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) + { + return new ApiManagementGatewayProperties(gatewayId, instanceId); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(DateTimeOffset? expiresOn = null) + { + return new ApiManagementGatewayTokenNearExpiryProperties(expiresOn); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gateway = null, ApiManagementExpiredGatewayTokenProperties token = null) + { + return new ApiManagementGatewayTokenExpiredEventData(gateway, token); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// A new instance for mocking. + public static ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(DateTimeOffset? expiresOn = null) + { + return new ApiManagementExpiredGatewayTokenProperties(expiresOn); + } + /// Initializes a new instance of . /// Type of HL7 FHIR resource. /// Domain name of FHIR account for this resource. @@ -4319,5 +4815,56 @@ public static ApiCenterApiDefinitionUpdatedEventData ApiCenterApiDefinitionUpdat { return new ApiCenterApiDefinitionUpdatedEventData(title, description, specification); } + + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + /// A new instance for mocking. + public static EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, Uri callbackUrl = null) + { + if (externalValidationId == null) + { + throw new ArgumentNullException(nameof(externalValidationId)); + } + if (targetId == null) + { + throw new ArgumentNullException(nameof(targetId)); + } + if (solutionTemplateId == null) + { + throw new ArgumentNullException(nameof(solutionTemplateId)); + } + if (solutionTemplateVersionId == null) + { + throw new ArgumentNullException(nameof(solutionTemplateVersionId)); + } + if (solutionVersionId == null) + { + throw new ArgumentNullException(nameof(solutionVersionId)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + if (callbackUrl == null) + { + throw new ArgumentNullException(nameof(callbackUrl)); + } + + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl); + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs new file mode 100644 index 000000000000..2ba1317a9b30 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndReasonProperties + { + internal static AcsCallEndReasonProperties DeserializeAcsCallEndReasonProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? code = default; + int? subCode = default; + string phrase = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + code = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("subCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("phrase"u8)) + { + phrase = property.Value.GetString(); + continue; + } + } + return new AcsCallEndReasonProperties(code, subCode, phrase); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallEndReasonProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndReasonProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs new file mode 100644 index 000000000000..92cb79be81e5 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event reason properties. + public partial class AcsCallEndReasonProperties + { + /// Initializes a new instance of . + internal AcsCallEndReasonProperties() + { + } + + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for ending the call. + internal AcsCallEndReasonProperties(int? code, int? subCode, string phrase) + { + Code = code; + SubCode = subCode; + Phrase = phrase; + } + + /// Reason code for ending the call. + public int? Code { get; } + /// Reason subcode for ending the call. + public int? SubCode { get; } + /// Reason for ending the call. + public string Phrase { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.cs new file mode 100644 index 000000000000..77b21fe5bb44 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.Models +{ + /// The type of the call ended by. + public readonly partial struct AcsCallEndedByKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsCallEndedByKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ParticipantValue = "Participant"; + private const string MicrosoftInternalValue = "MicrosoftInternal"; + + /// Call end initiator is a participant. + public static AcsCallEndedByKind Participant { get; } = new AcsCallEndedByKind(ParticipantValue); + /// Call end initiator is the local participant. + public static AcsCallEndedByKind MicrosoftInternal { get; } = new AcsCallEndedByKind(MicrosoftInternalValue); + /// Determines if two values are the same. + public static bool operator ==(AcsCallEndedByKind left, AcsCallEndedByKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsCallEndedByKind left, AcsCallEndedByKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcsCallEndedByKind(string value) => new AcsCallEndedByKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsCallEndedByKind other && Equals(other); + /// + public bool Equals(AcsCallEndedByKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs new file mode 100644 index 000000000000..f516c5131d25 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndedByProperties + { + internal static AcsCallEndedByProperties DeserializeAcsCallEndedByProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + AcsCallEndedByKind? type = default; + string name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new AcsCallEndedByKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + } + return new AcsCallEndedByProperties(communicationIdentifier, type, name); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallEndedByProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedByProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs new file mode 100644 index 000000000000..b65aa211f40d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event endedby properties. + public partial class AcsCallEndedByProperties + { + /// Initializes a new instance of . + internal AcsCallEndedByProperties() + { + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of the call ended by. + /// The name of the call ended by. + internal AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallEndedByKind? kind, string name) + { + CommunicationIdentifier = communicationIdentifier; + Kind = kind; + Name = name; + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The type of the call ended by. + public AcsCallEndedByKind? Kind { get; } + /// The name of the call ended by. + public string Name { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs new file mode 100644 index 000000000000..b6d5e1c0fcbc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallEndedEventDataConverter))] + public partial class AcsCallEndedEventData + { + internal static AcsCallEndedEventData DeserializeAcsCallEndedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallEndedByProperties endedBy = default; + AcsCallEndReasonProperties reason = default; + float? callDurationInSeconds = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endedBy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endedBy = AcsCallEndedByProperties.DeserializeAcsCallEndedByProperties(property.Value); + continue; + } + if (property.NameEquals("reason"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reason = AcsCallEndReasonProperties.DeserializeAcsCallEndReasonProperties(property.Value); + continue; + } + if (property.NameEquals("callDurationInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + callDurationInSeconds = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallEndedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + endedBy, + reason, + callDurationInSeconds); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallEndedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedEventData(document.RootElement); + } + + internal partial class AcsCallEndedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallEndedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallEndedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallEndedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs new file mode 100644 index 000000000000..fd37be43c6dc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallEnded event. + public partial class AcsCallEndedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallEndedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The communication identifier of the user who was disconnected. + /// The reason for ending the call. + /// Duration of the call in seconds. + internal AcsCallEndedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallEndedByProperties endedBy, AcsCallEndReasonProperties reason, float? callDurationInSeconds) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + EndedBy = endedBy; + Reason = reason; + CallDurationInSeconds = callDurationInSeconds; + } + + /// The communication identifier of the user who was disconnected. + public AcsCallEndedByProperties EndedBy { get; } + /// The reason for ending the call. + public AcsCallEndReasonProperties Reason { get; } + /// Duration of the call in seconds. + public float? CallDurationInSeconds { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs new file mode 100644 index 000000000000..edf7179ecb8b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallGroupProperties + { + internal static AcsCallGroupProperties DeserializeAcsCallGroupProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new AcsCallGroupProperties(id); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallGroupProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallGroupProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs new file mode 100644 index 000000000000..9390502bb868 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event group properties. + public partial class AcsCallGroupProperties + { + /// Initializes a new instance of . + internal AcsCallGroupProperties() + { + } + + /// Initializes a new instance of . + /// Group Id. Format is Guid as string. + internal AcsCallGroupProperties(string id) + { + Id = id; + } + + /// Group Id. Format is Guid as string. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs new file mode 100644 index 000000000000..f3589e20c13e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantAddedEventDataConverter))] + public partial class AcsCallParticipantAddedEventData + { + internal static AcsCallParticipantAddedEventData DeserializeAcsCallParticipantAddedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantAddedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantAddedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement); + } + + internal partial class AcsCallParticipantAddedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantAddedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantAddedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs new file mode 100644 index 000000000000..9e6c019ea273 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantAdded event. + public partial class AcsCallParticipantAddedEventData : AcsCallParticipantEventData + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, user, displayName, participantId, userAgent) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs new file mode 100644 index 000000000000..71fb453c9ec5 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantEventDataConverter))] + public partial class AcsCallParticipantEventData + { + internal static AcsCallParticipantEventData DeserializeAcsCallParticipantEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantEventData(document.RootElement); + } + + internal partial class AcsCallParticipantEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs new file mode 100644 index 000000000000..94f2021011f1 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of participant events. + public partial class AcsCallParticipantEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + User = user; + DisplayName = displayName; + ParticipantId = participantId; + UserAgent = userAgent; + } + + /// The user of the call participant. + public AcsCallParticipantProperties User { get; } + /// The display name of the participant. + public string DisplayName { get; } + /// The Id of the participant. + public string ParticipantId { get; } + /// The user agent of the participant. + public string UserAgent { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs new file mode 100644 index 000000000000..f7bbd1f19871 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.Models +{ + /// The role of participant user. + public readonly partial struct AcsCallParticipantKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsCallParticipantKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AttendeeValue = "Attendee"; + private const string PresenterValue = "Presenter"; + private const string ConsumerValue = "Consumer"; + private const string CollaboratorValue = "Collaborator"; + private const string OrganizerValue = "Organizer"; + + /// Call participant role is an attendee. + public static AcsCallParticipantKind Attendee { get; } = new AcsCallParticipantKind(AttendeeValue); + /// Call participant role is presenter. + public static AcsCallParticipantKind Presenter { get; } = new AcsCallParticipantKind(PresenterValue); + /// Call participant role is consumer. + public static AcsCallParticipantKind Consumer { get; } = new AcsCallParticipantKind(ConsumerValue); + /// Call participant role is collaborator. + public static AcsCallParticipantKind Collaborator { get; } = new AcsCallParticipantKind(CollaboratorValue); + /// Call participant role is organizer. + public static AcsCallParticipantKind Organizer { get; } = new AcsCallParticipantKind(OrganizerValue); + /// Determines if two values are the same. + public static bool operator ==(AcsCallParticipantKind left, AcsCallParticipantKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsCallParticipantKind left, AcsCallParticipantKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcsCallParticipantKind(string value) => new AcsCallParticipantKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsCallParticipantKind other && Equals(other); + /// + public bool Equals(AcsCallParticipantKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs new file mode 100644 index 000000000000..820f763b8960 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantProperties + { + internal static AcsCallParticipantProperties DeserializeAcsCallParticipantProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + AcsCallParticipantKind? role = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new AcsCallParticipantKind(property.Value.GetString()); + continue; + } + } + return new AcsCallParticipantProperties(communicationIdentifier, role); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallParticipantProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs new file mode 100644 index 000000000000..f3e453cf7e5f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event participant user. + public partial class AcsCallParticipantProperties + { + /// Initializes a new instance of . + internal AcsCallParticipantProperties() + { + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The role of participant user. + internal AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallParticipantKind? role) + { + CommunicationIdentifier = communicationIdentifier; + Role = role; + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The role of participant user. + public AcsCallParticipantKind? Role { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs new file mode 100644 index 000000000000..9417ceef4740 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantRemovedEventDataConverter))] + public partial class AcsCallParticipantRemovedEventData + { + internal static AcsCallParticipantRemovedEventData DeserializeAcsCallParticipantRemovedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantRemovedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantRemovedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement); + } + + internal partial class AcsCallParticipantRemovedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantRemovedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantRemovedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs new file mode 100644 index 000000000000..043bcaa98a10 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantRemoved event. + public partial class AcsCallParticipantRemovedEventData : AcsCallParticipantEventData + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, user, displayName, participantId, userAgent) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs new file mode 100644 index 000000000000..df58cdb6b727 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallRoomProperties + { + internal static AcsCallRoomProperties DeserializeAcsCallRoomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new AcsCallRoomProperties(id); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallRoomProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallRoomProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs new file mode 100644 index 000000000000..e76b63b858c7 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event room properties. + public partial class AcsCallRoomProperties + { + /// Initializes a new instance of . + internal AcsCallRoomProperties() + { + } + + /// Initializes a new instance of . + /// Room Id. Format is Guid as string. + internal AcsCallRoomProperties(string id) + { + Id = id; + } + + /// Room Id. Format is Guid as string. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs new file mode 100644 index 000000000000..fa62de8c59ef --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallStartedEventDataConverter))] + public partial class AcsCallStartedEventData + { + internal static AcsCallStartedEventData DeserializeAcsCallStartedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallStartedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallStartedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallStartedEventData(document.RootElement); + } + + internal partial class AcsCallStartedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallStartedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallStartedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallStartedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs new file mode 100644 index 000000000000..face68720585 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallStarted event. + public partial class AcsCallStartedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallStartedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + internal AcsCallStartedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs new file mode 100644 index 000000000000..271461263e59 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallingEventProperties + { + internal static AcsCallingEventProperties DeserializeAcsCallingEventProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallingEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallingEventProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallingEventProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs new file mode 100644 index 000000000000..d542dc66e407 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of all calling events. + public partial class AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallingEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + + StartedBy = startedBy; + ServerCallId = serverCallId; + CorrelationId = correlationId; + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + internal AcsCallingEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall) + { + StartedBy = startedBy; + ServerCallId = serverCallId; + Group = group; + Room = room; + IsTwoParty = isTwoParty; + CorrelationId = correlationId; + IsRoomsCall = isRoomsCall; + } + + /// The call participant who initiated the call. + public AcsCallParticipantProperties StartedBy { get; } + /// The callId of the server. + public string ServerCallId { get; } + /// The group metadata. + public AcsCallGroupProperties Group { get; } + /// The group metadata. + public AcsCallRoomProperties Room { get; } + /// Is two-party in calling event. + public bool? IsTwoParty { get; } + /// The correlation ID of the calling event. + public string CorrelationId { get; } + /// Is the calling event a room call. + public bool? IsRoomsCall { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..bb093e2c32ef --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsChatAzureBotCommandReceivedInThreadEventDataConverter))] + public partial class AcsChatAzureBotCommandReceivedInThreadEventData + { + internal static AcsChatAzureBotCommandReceivedInThreadEventData DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string messageBody = default; + IReadOnlyDictionary metadata = default; + string messageId = default; + CommunicationIdentifierModel senderCommunicationIdentifier = default; + string senderDisplayName = default; + DateTimeOffset? composeTime = default; + string type = default; + long? version = default; + string transactionId = default; + string threadId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("messageBody"u8)) + { + messageBody = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("senderCommunicationIdentifier"u8)) + { + senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("senderDisplayName"u8)) + { + senderDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("composeTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + composeTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("transactionId"u8)) + { + transactionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + } + return new AcsChatAzureBotCommandReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsChatAzureBotCommandReceivedInThreadEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement); + } + + internal partial class AcsChatAzureBotCommandReceivedInThreadEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsChatAzureBotCommandReceivedInThreadEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsChatAzureBotCommandReceivedInThreadEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs new file mode 100644 index 000000000000..aacbe351c02d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatAzureBotCommandReceivedInThread event. + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties + { + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + internal AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + + MessageBody = messageBody; + Metadata = metadata; + } + + /// The body of the chat message. + public string MessageBody { get; } + /// The chat message metadata. + public IReadOnlyDictionary Metadata { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs index 35fad4af31d7..cb705c3b2f54 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs @@ -5,21 +5,22 @@ #nullable disable +using System; + namespace Azure.Messaging.EventGrid.SystemEvents { /// Schema of common properties of all thread-level chat events. public partial class AcsChatEventInThreadBaseProperties { - /// Initializes a new instance of . - internal AcsChatEventInThreadBaseProperties() - { - } - /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. + /// or is null. internal AcsChatEventInThreadBaseProperties(string transactionId, string threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + TransactionId = transactionId; ThreadId = threadId; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs index b0e34e2551c6..412ade0e5f36 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsChatMessageDeletedEventData DeserializeAcsChatMessageDeletedE } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs index f887d31afeb6..d84d1c847edf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs @@ -13,8 +13,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageDeletedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageDeletedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageDeletedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs index 76b39cda1b45..42a85f12161d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs @@ -47,10 +47,6 @@ internal static AcsChatMessageDeletedInThreadEventData DeserializeAcsChatMessage } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs index ac131a18cea4..5de5749e3943 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs @@ -13,8 +13,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageDeletedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageDeletedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageDeletedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); } /// Initializes a new instance of . @@ -27,8 +38,12 @@ internal AcsChatMessageDeletedInThreadEventData() /// The type of the message. /// The version of the message. /// The time at which the message was deleted. + /// or is null. internal AcsChatMessageDeletedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, DateTimeOffset? deleteTime) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + DeleteTime = deleteTime; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs index dd9e84a70fdf..e55b47bfd35b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs @@ -70,10 +70,6 @@ internal static AcsChatMessageEditedEventData DeserializeAcsChatMessageEditedEve } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs index 6c447d2cac7e..e642000a1219 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs @@ -14,8 +14,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEditedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEditedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , or is null. + internal AcsChatMessageEditedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs index 0eeae702b68c..9ecdd0fa22a4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs @@ -69,10 +69,6 @@ internal static AcsChatMessageEditedInThreadEventData DeserializeAcsChatMessageE } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs index 0d03146d1b26..8d24520a3858 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs @@ -14,8 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEditedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEditedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageEditedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } @@ -31,8 +46,12 @@ internal AcsChatMessageEditedInThreadEventData() /// The body of the chat message. /// The chat message metadata. /// The time at which the message was edited. + /// or is null. internal AcsChatMessageEditedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata, DateTimeOffset? editTime) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageBody = messageBody; Metadata = metadata; EditTime = editTime; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs index c82ee40114b2..9dcd1117edd8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsChatMessageEventBaseProperties DeserializeAcsChatMessageEvent } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs index 994534c4ad59..f7e62ac8af7b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs @@ -13,8 +13,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEventBaseProperties : AcsChatEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEventBaseProperties() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageEventBaseProperties(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + + MessageId = messageId; + SenderCommunicationIdentifier = senderCommunicationIdentifier; + Type = type; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs index 21fa82eb0afc..5c94e28726e9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs @@ -35,10 +35,6 @@ internal static AcsChatMessageEventInThreadBaseProperties DeserializeAcsChatMess } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs index 685b6c8f4924..e2902be335cb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs @@ -13,8 +13,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEventInThreadBaseProperties() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageEventInThreadBaseProperties(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + + MessageId = messageId; + SenderCommunicationIdentifier = senderCommunicationIdentifier; + Type = type; } /// Initializes a new instance of . @@ -26,8 +41,12 @@ internal AcsChatMessageEventInThreadBaseProperties() /// The original compose time of the message. /// The type of the message. /// The version of the message. + /// or is null. internal AcsChatMessageEventInThreadBaseProperties(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageId = messageId; SenderCommunicationIdentifier = senderCommunicationIdentifier; SenderDisplayName = senderDisplayName; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs index 4eccff957138..9bb7e07bd654 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs @@ -60,10 +60,6 @@ internal static AcsChatMessageReceivedEventData DeserializeAcsChatMessageReceive } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs index d61b4a63945c..f1f2e8822ffe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs @@ -14,8 +14,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageReceivedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageReceivedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageReceivedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs index 076d2837ccef..439b59b9a542 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs @@ -59,10 +59,6 @@ internal static AcsChatMessageReceivedInThreadEventData DeserializeAcsChatMessag } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs index b4c2319c92eb..96be9775647a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs @@ -14,8 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageReceivedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } @@ -30,8 +45,12 @@ internal AcsChatMessageReceivedInThreadEventData() /// The version of the message. /// The body of the chat message. /// The chat message metadata. + /// or is null. internal AcsChatMessageReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageBody = messageBody; Metadata = metadata; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs index 01e5e5c55e5f..25c47fabb450 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs @@ -39,19 +39,11 @@ internal static AcsChatParticipantAddedToThreadEventData DeserializeAcsChatParti } if (property.NameEquals("addedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } addedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantAdded"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantAdded = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs index c205886b7b7b..4760962609c8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs @@ -13,8 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantAddedToThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantAddedToThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who added the user. + /// The details of the user who was added. + /// , , or is null. + internal AcsChatParticipantAddedToThreadEventData(string transactionId, string threadId, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); + Argument.AssertNotNull(participantAdded, nameof(participantAdded)); + + AddedByCommunicationIdentifier = addedByCommunicationIdentifier; + ParticipantAdded = participantAdded; } /// Initializes a new instance of . @@ -24,8 +36,12 @@ internal AcsChatParticipantAddedToThreadEventData() /// The communication identifier of the user who added the user. /// The details of the user who was added. /// The version of the thread. + /// or is null. internal AcsChatParticipantAddedToThreadEventData(string transactionId, string threadId, DateTimeOffset? time, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Time = time; AddedByCommunicationIdentifier = addedByCommunicationIdentifier; ParticipantAdded = participantAdded; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs index 76d4c099c082..b9e14ef1a2fa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs @@ -41,19 +41,11 @@ internal static AcsChatParticipantAddedToThreadWithUserEventData DeserializeAcsC } if (property.NameEquals("addedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } addedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantAdded"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantAdded = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs index f51c22fd17ed..cbff24655e89 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs @@ -13,8 +13,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantAddedToThreadWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantAddedToThreadWithUserEventData() + /// The communication identifier of the user who added the user. + /// The details of the user who was added. + /// or is null. + internal AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) { + Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); + Argument.AssertNotNull(participantAdded, nameof(participantAdded)); + + AddedByCommunicationIdentifier = addedByCommunicationIdentifier; + ParticipantAdded = participantAdded; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs index b4058aaa1092..ffd8afa045fa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs @@ -39,19 +39,11 @@ internal static AcsChatParticipantRemovedFromThreadEventData DeserializeAcsChatP } if (property.NameEquals("removedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } removedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantRemoved"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantRemoved = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs index 5be604dc92c1..4b264f8a27f5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs @@ -13,8 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantRemovedFromThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantRemovedFromThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who removed the user. + /// The details of the user who was removed. + /// , , or is null. + internal AcsChatParticipantRemovedFromThreadEventData(string transactionId, string threadId, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); + Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); + + RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; + ParticipantRemoved = participantRemoved; } /// Initializes a new instance of . @@ -24,8 +36,12 @@ internal AcsChatParticipantRemovedFromThreadEventData() /// The communication identifier of the user who removed the user. /// The details of the user who was removed. /// The version of the thread. + /// or is null. internal AcsChatParticipantRemovedFromThreadEventData(string transactionId, string threadId, DateTimeOffset? time, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Time = time; RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; ParticipantRemoved = participantRemoved; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs index c0e5a321610d..ca7da5e6a694 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs @@ -41,19 +41,11 @@ internal static AcsChatParticipantRemovedFromThreadWithUserEventData Deserialize } if (property.NameEquals("removedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } removedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantRemoved"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantRemoved = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs index b8ef04e76ab6..6843aecfeee6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs @@ -13,8 +13,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantRemovedFromThreadWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantRemovedFromThreadWithUserEventData() + /// The communication identifier of the user who removed the user. + /// The details of the user who was removed. + /// or is null. + internal AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) { + Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); + Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); + + RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; + ParticipantRemoved = participantRemoved; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs index b83032f6e45b..7dec53ad9353 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs @@ -33,19 +33,11 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve { if (property.NameEquals("createdByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } createdByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -77,10 +69,6 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve } if (property.NameEquals("participants"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -124,9 +112,9 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve createTime, version, createdByCommunicationIdentifier, - properties ?? new ChangeTrackingDictionary(), + properties, metadata ?? new ChangeTrackingDictionary(), - participants ?? new ChangeTrackingList()); + participants); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs index 07b76bf14be2..be9e55085a84 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,11 +15,24 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadCreatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadCreatedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who created the thread. + /// The thread properties. + /// The list of properties of participants who are part of the thread. + /// , , , or is null. + internal AcsChatThreadCreatedEventData(string transactionId, string threadId, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IEnumerable participants) : base(transactionId, threadId) { - Properties = new ChangeTrackingDictionary(); + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(participants, nameof(participants)); + + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; + Properties = properties; Metadata = new ChangeTrackingDictionary(); - Participants = new ChangeTrackingList(); + Participants = participants.ToList(); } /// Initializes a new instance of . @@ -30,8 +44,12 @@ internal AcsChatThreadCreatedEventData() /// The thread properties. /// The chat thread created metadata. /// The list of properties of participants who are part of the thread. + /// or is null. internal AcsChatThreadCreatedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IReadOnlyList participants) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; Metadata = metadata; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs index e0add658f568..b87ff68281e1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs @@ -34,19 +34,11 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr { if (property.NameEquals("createdByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } createdByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -78,10 +70,6 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr } if (property.NameEquals("participants"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -135,9 +123,9 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr createTime, version, createdByCommunicationIdentifier, - properties ?? new ChangeTrackingDictionary(), + properties, metadata ?? new ChangeTrackingDictionary(), - participants ?? new ChangeTrackingList()); + participants); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs index 21223daaa998..211bc5b72eee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,11 +15,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadCreatedWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadCreatedWithUserEventData() + /// The communication identifier of the user who created the thread. + /// The thread properties. + /// The list of properties of participants who are part of the thread. + /// , or is null. + internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IEnumerable participants) { - Properties = new ChangeTrackingDictionary(); + Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(participants, nameof(participants)); + + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; + Properties = properties; Metadata = new ChangeTrackingDictionary(); - Participants = new ChangeTrackingList(); + Participants = participants.ToList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs index 5de0fd9805f3..810fb19a9d7f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs @@ -30,10 +30,6 @@ internal static AcsChatThreadDeletedEventData DeserializeAcsChatThreadDeletedEve { if (property.NameEquals("deletedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deletedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs index 3b9aa7a8b808..5969ce68e9b0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs @@ -13,8 +13,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadDeletedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadDeletedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who deleted the thread. + /// , or is null. + internal AcsChatThreadDeletedEventData(string transactionId, string threadId, CommunicationIdentifierModel deletedByCommunicationIdentifier) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); + + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; } /// Initializes a new instance of . @@ -24,8 +33,12 @@ internal AcsChatThreadDeletedEventData() /// The version of the thread. /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. + /// or is null. internal AcsChatThreadDeletedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel deletedByCommunicationIdentifier, DateTimeOffset? deleteTime) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; DeleteTime = deleteTime; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs index 0583ea812be7..25b312e43764 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadEventInThreadBaseProperties() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// or is null. + internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string threadId) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); } /// Initializes a new instance of . @@ -22,8 +27,12 @@ internal AcsChatThreadEventInThreadBaseProperties() /// The chat thread id. /// The original creation time of the thread. /// The version of the thread. + /// or is null. internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string threadId, DateTimeOffset? createTime, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + CreateTime = createTime; Version = version; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs index 65df3bd79497..76c268e870cc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs @@ -30,10 +30,6 @@ internal static AcsChatThreadParticipantProperties DeserializeAcsChatThreadParti } if (property.NameEquals("participantCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs index c9abfa1a2fd4..8cd68cac7200 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadParticipantProperties { /// Initializes a new instance of . - internal AcsChatThreadParticipantProperties() + /// The communication identifier of the user. + /// is null. + internal AcsChatThreadParticipantProperties(CommunicationIdentifierModel participantCommunicationIdentifier) { + Argument.AssertNotNull(participantCommunicationIdentifier, nameof(participantCommunicationIdentifier)); + + ParticipantCommunicationIdentifier = participantCommunicationIdentifier; Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs index 02475209a4cd..9513a660cb01 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs @@ -33,10 +33,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread { if (property.NameEquals("editedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } editedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } @@ -51,10 +47,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -72,10 +64,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread } if (property.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -120,8 +108,8 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread version, editedByCommunicationIdentifier, editTime, - properties ?? new ChangeTrackingDictionary(), - metadata ?? new ChangeTrackingDictionary()); + properties, + metadata); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs index 5648d282b33e..edfc5c374b12 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs @@ -14,10 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadPropertiesUpdatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadPropertiesUpdatedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who updated the thread properties. + /// The updated thread properties. + /// The thread metadata. + /// , , , or is null. + internal AcsChatThreadPropertiesUpdatedEventData(string transactionId, string threadId, CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(transactionId, threadId) { - Properties = new ChangeTrackingDictionary(); - Metadata = new ChangeTrackingDictionary(); + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(metadata, nameof(metadata)); + + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; + Properties = properties; + Metadata = metadata; } /// Initializes a new instance of . @@ -29,8 +42,12 @@ internal AcsChatThreadPropertiesUpdatedEventData() /// The time at which the properties of the thread were updated. /// The updated thread properties. /// The thread metadata. + /// or is null. internal AcsChatThreadPropertiesUpdatedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel editedByCommunicationIdentifier, DateTimeOffset? editTime, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; EditTime = editTime; Properties = properties; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs index 85625ffe3d8b..83631ade6eb7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs @@ -34,10 +34,6 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha { if (property.NameEquals("editedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } editedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } @@ -66,10 +62,6 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -132,7 +124,7 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha editedByCommunicationIdentifier, editTime, metadata ?? new ChangeTrackingDictionary(), - properties ?? new ChangeTrackingDictionary()); + properties); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs index 4a892232df59..a7e3d37bab61 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs @@ -14,10 +14,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadPropertiesUpdatedPerUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadPropertiesUpdatedPerUserEventData() + /// The communication identifier of the user who updated the thread properties. + /// The updated thread properties. + /// or is null. + internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties) { + Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; Metadata = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); + Properties = properties; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs index 45b84ede59ed..b161b90b0960 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs @@ -31,10 +31,6 @@ internal static AcsChatThreadWithUserDeletedEventData DeserializeAcsChatThreadWi { if (property.NameEquals("deletedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deletedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs index 98ce51fb594b..53befac6b0fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadWithUserDeletedEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadWithUserDeletedEventData() + /// The communication identifier of the user who deleted the thread. + /// is null. + internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel deletedByCommunicationIdentifier) { + Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); + + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..bea560b58f4e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsChatTypingIndicatorReceivedInThreadEventDataConverter))] + public partial class AcsChatTypingIndicatorReceivedInThreadEventData + { + internal static AcsChatTypingIndicatorReceivedInThreadEventData DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string messageBody = default; + IReadOnlyDictionary metadata = default; + string messageId = default; + CommunicationIdentifierModel senderCommunicationIdentifier = default; + string senderDisplayName = default; + DateTimeOffset? composeTime = default; + string type = default; + long? version = default; + string transactionId = default; + string threadId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("messageBody"u8)) + { + messageBody = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("senderCommunicationIdentifier"u8)) + { + senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("senderDisplayName"u8)) + { + senderDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("composeTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + composeTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("transactionId"u8)) + { + transactionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + } + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsChatTypingIndicatorReceivedInThreadEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement); + } + + internal partial class AcsChatTypingIndicatorReceivedInThreadEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsChatTypingIndicatorReceivedInThreadEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsChatTypingIndicatorReceivedInThreadEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs new file mode 100644 index 000000000000..a425e3938e91 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatTypingIndicatorReceivedInThread event. + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties + { + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + internal AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + + MessageBody = messageBody; + Metadata = metadata; + } + + /// The body of the chat message. + public string MessageBody { get; } + /// The chat message metadata. + public IReadOnlyDictionary Metadata { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs index 699d625ddc06..614519d65a8e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs @@ -60,10 +60,6 @@ internal static AcsEmailDeliveryReportReceivedEventData DeserializeAcsEmailDeliv } if (property.NameEquals("deliveryStatusDetails"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deliveryStatusDetails = AcsEmailDeliveryReportStatusDetails.DeserializeAcsEmailDeliveryReportStatusDetails(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs index 35a4b18f2f05..76ee86c48a15 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs @@ -13,8 +13,22 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsEmailDeliveryReportReceivedEventData { /// Initializes a new instance of . - internal AcsEmailDeliveryReportReceivedEventData() + /// The Sender Email Address. + /// The recipient Email Address. + /// The Internet Message Id of the email been sent. + /// Detailed information about the status if any. + /// , , or is null. + internal AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string internetMessageId, AcsEmailDeliveryReportStatusDetails deliveryStatusDetails) { + Argument.AssertNotNull(sender, nameof(sender)); + Argument.AssertNotNull(recipient, nameof(recipient)); + Argument.AssertNotNull(internetMessageId, nameof(internetMessageId)); + Argument.AssertNotNull(deliveryStatusDetails, nameof(deliveryStatusDetails)); + + Sender = sender; + Recipient = recipient; + InternetMessageId = internetMessageId; + DeliveryStatusDetails = deliveryStatusDetails; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs index a73e40942035..526a2be14367 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs @@ -31,10 +31,6 @@ internal static AcsRecordingFileStatusUpdatedEventData DeserializeAcsRecordingFi { if (property.NameEquals("recordingStorageInfo"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } recordingStorageInfo = AcsRecordingStorageInfoProperties.DeserializeAcsRecordingStorageInfoProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs index 99097128a203..9539b2cc74f8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRecordingFileStatusUpdatedEventData { /// Initializes a new instance of . - internal AcsRecordingFileStatusUpdatedEventData() + /// The details of recording storage information. + /// is null. + internal AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo) { + Argument.AssertNotNull(recordingStorageInfo, nameof(recordingStorageInfo)); + + RecordingStorageInfo = recordingStorageInfo; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs index f550f0cdb19d..3d50fc0ed7a8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, note, dispositionCode); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs index d1a3f1dbc0e6..0127944158f3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobCancelledEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobCancelledEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobCancelledEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs index da6e88a040d1..5495126ab9be 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs @@ -57,10 +57,6 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -71,10 +67,6 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -104,8 +96,8 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, classificationPolicyId, errors ?? new ChangeTrackingList()); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs index e5808f84949b..6a3d32115007 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClassificationFailedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClassificationFailedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ErrorsInternal = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs index e5f641386a5d..8f3a9227820d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs @@ -77,10 +77,6 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -91,10 +87,6 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -124,8 +116,8 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, queueDetails, classificationPolicyId, priority, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs index 68edb7286203..f1f5f1bc63ca 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClassifiedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClassifiedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + AttachedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs index 6ee0f8a829f1..c15de98e74a1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs @@ -54,10 +54,6 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -68,10 +64,6 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -101,8 +93,8 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId, dispositionCode); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs index 7c07a79c1fa6..abaf8cab7d6e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClosedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClosedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClosedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs index 039f0fc7d09e..200b985e7f32 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs index c8f62735ce18..9df18d40daf0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobCompletedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobCompletedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobCompletedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs index 8d513a015823..eba6896d3464 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -50,10 +46,6 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -83,8 +75,8 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary()); + labels, + tags); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs index 4958b5deb302..d276890907b1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobDeletedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobDeletedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobDeletedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs index 95ed38702f2e..bd699d9e86cc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -50,10 +46,6 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -83,8 +75,8 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary()); + labels, + tags); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs index 225f5c98e994..a8212cc2cf97 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,10 +14,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobEventData : AcsRouterEventData { /// Initializes a new instance of . - internal AcsRouterJobEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Labels = new ChangeTrackingDictionary(); - Tags = new ChangeTrackingDictionary(); + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + + Labels = labels; + Tags = tags; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs index 060ec74483a1..6afc0e609cbd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, ruleKey, exceptionRuleId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs index 0da91a332506..f8bc69ebbb53 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobExceptionTriggeredEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobExceptionTriggeredEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobExceptionTriggeredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs index e998b5b551a5..9bbc4f9ae55e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs @@ -76,10 +76,6 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -90,10 +86,6 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -123,8 +115,8 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, attachedWorkerSelectors ?? new ChangeTrackingList(), requestedWorkerSelectors ?? new ChangeTrackingList()); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs index 044eb47870f2..797c4cfd8d4e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobQueuedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobQueuedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + AttachedWorkerSelectors = new ChangeTrackingList(); RequestedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs index a4f23d4ec7dc..f8fa64a54129 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs @@ -93,10 +93,6 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -107,10 +103,6 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -140,8 +132,8 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, jobStatus, classificationPolicyId, priority, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs index 13c6c91c8c64..c712d537cfe2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs @@ -14,9 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobReceivedEventData : AcsRouterJobEventData { /// Initializes a new instance of . + /// Router Job events Labels. + /// Router Jobs events Tags. /// Unavailable For Matching for Router Job Received. - internal AcsRouterJobReceivedEventData(bool unavailableForMatching) + /// or is null. + internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + RequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs index c8b8e96f4057..7d7c5e07956f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs @@ -92,10 +92,6 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -106,10 +102,6 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -139,8 +131,8 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, expiredAttachedWorkerSelectors ?? new ChangeTrackingList(), expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs index 4d8112a29709..5f400a1c0355 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs @@ -14,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobSchedulingFailedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobSchedulingFailedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs index 43af7a79bfdd..bce0dba3c9e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs index bffd65c3cbda..bcfc3db88d4a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobUnassignedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobUnassignedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobUnassignedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs index ac76ef097876..2ca035d25d96 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs @@ -92,10 +92,6 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -106,10 +102,6 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -139,8 +131,8 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, expiredAttachedWorkerSelectors ?? new ChangeTrackingList(), expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs index 63560d33256a..436bde258fb1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs @@ -14,9 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobWaitingForActivationEventData : AcsRouterJobEventData { /// Initializes a new instance of . + /// Router Job events Labels. + /// Router Jobs events Tags. /// Router Job Waiting For Activation Unavailable For Matching. - internal AcsRouterJobWaitingForActivationEventData(bool unavailableForMatching) + /// or is null. + internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs index 6fcb3dd32ab7..e778ac9ae112 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs @@ -66,10 +66,6 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -80,10 +76,6 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -113,8 +105,8 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), expiredAttachedWorkerSelectors ?? new ChangeTrackingList()); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs index 386be9d0060b..3f0bc7c56977 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobWorkerSelectorsExpiredEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobWorkerSelectorsExpiredEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs index 21c072e6265f..19f4af830866 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs @@ -43,10 +43,6 @@ internal static AcsSmsDeliveryReportReceivedEventData DeserializeAcsSmsDeliveryR } if (property.NameEquals("deliveryAttempts"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -91,7 +87,7 @@ internal static AcsSmsDeliveryReportReceivedEventData DeserializeAcsSmsDeliveryR to, deliveryStatus, deliveryStatusDetails, - deliveryAttempts ?? new ChangeTrackingList(), + deliveryAttempts, receivedTimestamp, tag); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs index ed1420496297..9f1914c177d7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,9 +15,25 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsDeliveryReportReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . - internal AcsSmsDeliveryReportReceivedEventData() + /// The identity of the SMS message. + /// The identity of SMS message sender. + /// The identity of SMS message receiver. + /// Status of Delivery. + /// Details about Delivery Status. + /// List of details of delivery attempts made. + /// , , , , or is null. + internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, string deliveryStatus, string deliveryStatusDetails, IEnumerable deliveryAttempts) : base(messageId, @from, to) { - DeliveryAttempts = new ChangeTrackingList(); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(deliveryStatus, nameof(deliveryStatus)); + Argument.AssertNotNull(deliveryStatusDetails, nameof(deliveryStatusDetails)); + Argument.AssertNotNull(deliveryAttempts, nameof(deliveryAttempts)); + + DeliveryStatus = deliveryStatus; + DeliveryStatusDetails = deliveryStatusDetails; + DeliveryAttempts = deliveryAttempts.ToList(); } /// Initializes a new instance of . @@ -28,8 +45,13 @@ internal AcsSmsDeliveryReportReceivedEventData() /// List of details of delivery attempts made. /// The time at which the SMS delivery report was received. /// Customer Content. + /// , or is null. internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, string deliveryStatus, string deliveryStatusDetails, IReadOnlyList deliveryAttempts, DateTimeOffset? receivedTimestamp, string tag) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + DeliveryStatus = deliveryStatus; DeliveryStatusDetails = deliveryStatusDetails; DeliveryAttempts = deliveryAttempts; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs index 8608591a1983..db2f1cd35bac 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs @@ -5,22 +5,24 @@ #nullable disable +using System; + namespace Azure.Messaging.EventGrid.SystemEvents { /// Schema of common properties of all SMS events. public partial class AcsSmsEventBaseProperties { - /// Initializes a new instance of . - internal AcsSmsEventBaseProperties() - { - } - /// Initializes a new instance of . /// The identity of the SMS message. /// The identity of SMS message sender. /// The identity of SMS message receiver. + /// , or is null. internal AcsSmsEventBaseProperties(string messageId, string @from, string to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + MessageId = messageId; From = @from; To = to; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs index 5cb9b0a642af..99c42b1b4626 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs @@ -13,9 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . + /// The identity of the SMS message. + /// The identity of SMS message sender. + /// The identity of SMS message receiver. + /// The SMS content. /// Number of segments in the message. - internal AcsSmsReceivedEventData(int segmentCount) + /// , , or is null. + internal AcsSmsReceivedEventData(string messageId, string @from, string to, string message, int segmentCount) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(message, nameof(message)); + + Message = message; SegmentCount = segmentCount; } @@ -26,8 +37,13 @@ internal AcsSmsReceivedEventData(int segmentCount) /// The SMS content. /// The time at which the SMS was received. /// Number of segments in the message. + /// , or is null. internal AcsSmsReceivedEventData(string messageId, string @from, string to, string message, DateTimeOffset? receivedTimestamp, int segmentCount) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Message = message; ReceivedTimestamp = receivedTimestamp; SegmentCount = segmentCount; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs new file mode 100644 index 000000000000..a58e224054df --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementCircuitBreakerClosedEventDataConverter))] + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal static ApiManagementCircuitBreakerClosedEventData DeserializeApiManagementCircuitBreakerClosedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value); + continue; + } + } + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerClosedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + + internal partial class ApiManagementCircuitBreakerClosedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementCircuitBreakerClosedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementCircuitBreakerClosedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs new file mode 100644 index 000000000000..897cfa437c87 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Closed event. + public partial class ApiManagementCircuitBreakerClosedEventData + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerClosedEventData() + { + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Name of the backend for which the circuit has closed. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs new file mode 100644 index 000000000000..c8f409d55e6f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementCircuitBreakerOpenedEventDataConverter))] + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal static ApiManagementCircuitBreakerOpenedEventData DeserializeApiManagementCircuitBreakerOpenedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value); + continue; + } + } + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerOpenedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + + internal partial class ApiManagementCircuitBreakerOpenedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementCircuitBreakerOpenedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementCircuitBreakerOpenedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs new file mode 100644 index 000000000000..a2e73568a90b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Opened event. + public partial class ApiManagementCircuitBreakerOpenedEventData + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerOpenedEventData() + { + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Name of the backend for which the circuit has opened. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs new file mode 100644 index 000000000000..78f35106bf1d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerProperties + { + internal static ApiManagementCircuitBreakerProperties DeserializeApiManagementCircuitBreakerProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary rules = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + rules = dictionary; + continue; + } + } + return new ApiManagementCircuitBreakerProperties(rules ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs new file mode 100644 index 000000000000..0aebae96e81b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to the circuit breaker configured on the backend. + public partial class ApiManagementCircuitBreakerProperties + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerProperties() + { + Rules = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules) + { + Rules = rules; + } + + /// Overview of all configured rules and respective details. + public IReadOnlyDictionary Rules { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..2845e4321078 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal static ApiManagementExpiredGatewayTokenProperties DeserializeApiManagementExpiredGatewayTokenProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expiredAtUtc = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementExpiredGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs new file mode 100644 index 000000000000..d6a2f1a4f92e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public partial class ApiManagementExpiredGatewayTokenProperties + { + /// Initializes a new instance of . + internal ApiManagementExpiredGatewayTokenProperties() + { + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset? expiresOn) + { + ExpiresOn = expiresOn; + } + + /// Timestamp when the gateway token has expired. + public DateTimeOffset? ExpiresOn { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs new file mode 100644 index 000000000000..514405425e94 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayProperties + { + internal static ApiManagementGatewayProperties DeserializeApiManagementGatewayProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string gatewayId = default; + string instanceId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayId"u8)) + { + gatewayId = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceId"u8)) + { + instanceId = property.Value.GetString(); + continue; + } + } + return new ApiManagementGatewayProperties(gatewayId, instanceId); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs new file mode 100644 index 000000000000..2dda56e1690e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a given self-hosted gateway deployment. + public partial class ApiManagementGatewayProperties + { + /// Initializes a new instance of . + internal ApiManagementGatewayProperties() + { + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + /// Unique instance ID of the deployed gateway. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId) + { + GatewayId = gatewayId; + InstanceId = instanceId; + } + + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + public string GatewayId { get; } + /// Unique instance ID of the deployed gateway. + public string InstanceId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs new file mode 100644 index 000000000000..0ed20221e377 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementGatewayTokenExpiredEventDataConverter))] + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal static ApiManagementGatewayTokenExpiredEventData DeserializeApiManagementGatewayTokenExpiredEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementExpiredGatewayTokenProperties tokenInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenInfo = ApiManagementExpiredGatewayTokenProperties.DeserializeApiManagementExpiredGatewayTokenProperties(property.Value); + continue; + } + } + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenExpiredEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + + internal partial class ApiManagementGatewayTokenExpiredEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementGatewayTokenExpiredEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementGatewayTokenExpiredEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs new file mode 100644 index 000000000000..99ce9f9f3bfc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenExpired event. + public partial class ApiManagementGatewayTokenExpiredEventData + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenExpiredEventData() + { + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gateway, ApiManagementExpiredGatewayTokenProperties token) + { + Gateway = gateway; + Token = token; + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties Gateway { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementExpiredGatewayTokenProperties Token { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs new file mode 100644 index 000000000000..842e50b94cde --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementGatewayTokenNearExpiryEventDataConverter))] + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal static ApiManagementGatewayTokenNearExpiryEventData DeserializeApiManagementGatewayTokenNearExpiryEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementGatewayTokenNearExpiryProperties tokenInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenInfo = ApiManagementGatewayTokenNearExpiryProperties.DeserializeApiManagementGatewayTokenNearExpiryProperties(property.Value); + continue; + } + } + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + + internal partial class ApiManagementGatewayTokenNearExpiryEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementGatewayTokenNearExpiryEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementGatewayTokenNearExpiryEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs new file mode 100644 index 000000000000..abc56161ade8 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenNearExpiry event. + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenNearExpiryEventData() + { + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gateway, ApiManagementGatewayTokenNearExpiryProperties token) + { + Gateway = gateway; + Token = token; + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties Gateway { get; } + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public ApiManagementGatewayTokenNearExpiryProperties Token { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs new file mode 100644 index 000000000000..5169abd95612 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal static ApiManagementGatewayTokenNearExpiryProperties DeserializeApiManagementGatewayTokenNearExpiryProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expiresAtUtc = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiresAtUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiresAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ApiManagementGatewayTokenNearExpiryProperties(expiresAtUtc); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs new file mode 100644 index 000000000000..7c6084b3a12d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenNearExpiryProperties() + { + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + internal ApiManagementGatewayTokenNearExpiryProperties(DateTimeOffset? expiresOn) + { + ExpiresOn = expiresOn; + } + + /// Timestamp when the gateway token will expire. + public DateTimeOffset? ExpiresOn { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs new file mode 100644 index 000000000000..c553e1b9cf6d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(EdgeSolutionVersionPublishedEventDataConverter))] + public partial class EdgeSolutionVersionPublishedEventData + { + internal static EdgeSolutionVersionPublishedEventData DeserializeEdgeSolutionVersionPublishedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string externalValidationId = default; + string targetId = default; + string solutionTemplateId = default; + string solutionTemplateVersionId = default; + string solutionVersionId = default; + string apiVersion = default; + Uri callbackUrl = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("externalValidationId"u8)) + { + externalValidationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetId"u8)) + { + targetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateId"u8)) + { + solutionTemplateId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateVersionId"u8)) + { + solutionTemplateVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("callbackUrl"u8)) + { + callbackUrl = new Uri(property.Value.GetString()); + continue; + } + } + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EdgeSolutionVersionPublishedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + + internal partial class EdgeSolutionVersionPublishedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, EdgeSolutionVersionPublishedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override EdgeSolutionVersionPublishedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs new file mode 100644 index 000000000000..12a8779da578 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Edge.SolutionVersionPublished event. + public partial class EdgeSolutionVersionPublishedEventData + { + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl) + { + Argument.AssertNotNull(externalValidationId, nameof(externalValidationId)); + Argument.AssertNotNull(targetId, nameof(targetId)); + Argument.AssertNotNull(solutionTemplateId, nameof(solutionTemplateId)); + Argument.AssertNotNull(solutionTemplateVersionId, nameof(solutionTemplateVersionId)); + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(callbackUrl, nameof(callbackUrl)); + + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + } + + /// A GUID to uniquely track External Solution Validation. + public string ExternalValidationId { get; } + /// ARM ID of the Target resource. + public string TargetId { get; } + /// ARM ID of the Solution Template resource. + public string SolutionTemplateId { get; } + /// ARM ID of the Solution Template Version resource. + public string SolutionTemplateVersionId { get; } + /// ARM ID of the Solution Version resource. + public string SolutionVersionId { get; } + /// API Version supported for the resources. + public string ApiVersion { get; } + /// Direct URL to callback for updating validation status. + public Uri CallbackUrl { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md index b12e339e22f2..634251ea0dfe 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/2c6fb102e7f420fe04d5dd85f35f56e5691d3cdf/specification/eventgrid/data-plane/readme.md generation1-convenience-client: true model-factory-for-hlc: - MediaJobOutputAsset