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 5cffdf30386c..aaf73bd7a265 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 @@ -13,7 +13,6 @@ internal AcsChatEventBaseProperties() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel RecipientCommunicationIdentifier { get { throw null; } } public string ThreadId { get { throw null; } } public string TransactionId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties 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.AcsChatEventBaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -25,7 +24,6 @@ public partial class AcsChatEventInThreadBaseProperties : System.ClientModel.Pri internal AcsChatEventInThreadBaseProperties() { } public string ThreadId { get { throw null; } } public string TransactionId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties 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.AcsChatEventInThreadBaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -35,8 +33,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class AcsChatMessageDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatMessageDeletedEventData() { } - public System.DateTimeOffset DeleteTime { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? DeleteTime { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedEventData 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.AcsChatMessageDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -46,8 +43,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AcsChatMessageDeletedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatMessageDeletedInThreadEventData() { } - public System.DateTimeOffset DeleteTime { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? DeleteTime { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedInThreadEventData 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.AcsChatMessageDeletedInThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -57,10 +53,9 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AcsChatMessageEditedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatMessageEditedEventData() { } - public System.DateTimeOffset EditTime { get { throw null; } } + public System.DateTimeOffset? EditTime { get { throw null; } } 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.AcsChatMessageEditedEventData 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.AcsChatMessageEditedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -70,10 +65,9 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AcsChatMessageEditedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatMessageEditedInThreadEventData() { } - public System.DateTimeOffset EditTime { get { throw null; } } + public System.DateTimeOffset? EditTime { get { throw null; } } 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.AcsChatMessageEditedInThreadEventData 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.AcsChatMessageEditedInThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -83,13 +77,12 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AcsChatMessageEventBaseProperties : Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatMessageEventBaseProperties() { } - public System.DateTimeOffset ComposeTime { get { throw null; } } + public System.DateTimeOffset? ComposeTime { get { throw null; } } public string MessageId { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel SenderCommunicationIdentifier { get { throw null; } } public string SenderDisplayName { get { throw null; } } public string Type { get { throw null; } } public long? Version { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventBaseProperties 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.AcsChatMessageEventBaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -99,13 +92,12 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AcsChatMessageEventInThreadBaseProperties : Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatMessageEventInThreadBaseProperties() { } - public System.DateTimeOffset ComposeTime { get { throw null; } } + public System.DateTimeOffset? ComposeTime { get { throw null; } } public string MessageId { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel SenderCommunicationIdentifier { get { throw null; } } public string SenderDisplayName { get { throw null; } } public string Type { get { throw null; } } public long? Version { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties 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.AcsChatMessageEventInThreadBaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -117,7 +109,6 @@ public partial class AcsChatMessageReceivedEventData : Azure.Messaging.EventGrid internal AcsChatMessageReceivedEventData() { } 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.AcsChatMessageReceivedEventData 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.AcsChatMessageReceivedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -129,7 +120,6 @@ public partial class AcsChatMessageReceivedInThreadEventData : Azure.Messaging.E internal AcsChatMessageReceivedInThreadEventData() { } 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.AcsChatMessageReceivedInThreadEventData 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.AcsChatMessageReceivedInThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -141,9 +131,8 @@ public partial class AcsChatParticipantAddedToThreadEventData : Azure.Messaging. internal AcsChatParticipantAddedToThreadEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel AddedByCommunicationIdentifier { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties ParticipantAdded { get { throw null; } } - public System.DateTimeOffset Time { get { throw null; } } + public System.DateTimeOffset? Time { get { throw null; } } public long? Version { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantAddedToThreadEventData 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.AcsChatParticipantAddedToThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -155,8 +144,7 @@ public partial class AcsChatParticipantAddedToThreadWithUserEventData : Azure.Me internal AcsChatParticipantAddedToThreadWithUserEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel AddedByCommunicationIdentifier { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties ParticipantAdded { get { throw null; } } - public System.DateTimeOffset Time { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? Time { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantAddedToThreadWithUserEventData 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.AcsChatParticipantAddedToThreadWithUserEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -168,9 +156,8 @@ public partial class AcsChatParticipantRemovedFromThreadEventData : Azure.Messag internal AcsChatParticipantRemovedFromThreadEventData() { } public Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties ParticipantRemoved { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel RemovedByCommunicationIdentifier { get { throw null; } } - public System.DateTimeOffset Time { get { throw null; } } + public System.DateTimeOffset? Time { get { throw null; } } public long? Version { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantRemovedFromThreadEventData 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.AcsChatParticipantRemovedFromThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -182,8 +169,7 @@ public partial class AcsChatParticipantRemovedFromThreadWithUserEventData : Azur internal AcsChatParticipantRemovedFromThreadWithUserEventData() { } public Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties ParticipantRemoved { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel RemovedByCommunicationIdentifier { get { throw null; } } - public System.DateTimeOffset Time { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? Time { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantRemovedFromThreadWithUserEventData 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.AcsChatParticipantRemovedFromThreadWithUserEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -197,7 +183,6 @@ internal AcsChatThreadCreatedEventData() { } public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public System.Collections.Generic.IReadOnlyList Participants { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadCreatedEventData 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.AcsChatThreadCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -211,7 +196,6 @@ internal AcsChatThreadCreatedWithUserEventData() { } public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public System.Collections.Generic.IReadOnlyList Participants { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadCreatedWithUserEventData 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.AcsChatThreadCreatedWithUserEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -222,8 +206,7 @@ public partial class AcsChatThreadDeletedEventData : Azure.Messaging.EventGrid.S { internal AcsChatThreadDeletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel DeletedByCommunicationIdentifier { get { throw null; } } - public System.DateTimeOffset DeleteTime { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? DeleteTime { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadDeletedEventData 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.AcsChatThreadDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -233,9 +216,8 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AcsChatThreadEventBaseProperties : Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatThreadEventBaseProperties() { } - public System.DateTimeOffset CreateTime { get { throw null; } } + public System.DateTimeOffset? CreateTime { get { throw null; } } public long? Version { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadEventBaseProperties 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.AcsChatThreadEventBaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -245,9 +227,8 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AcsChatThreadEventInThreadBaseProperties : Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatThreadEventInThreadBaseProperties() { } - public System.DateTimeOffset CreateTime { get { throw null; } } + public System.DateTimeOffset? CreateTime { get { throw null; } } public long? Version { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadEventInThreadBaseProperties 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.AcsChatThreadEventInThreadBaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -260,7 +241,6 @@ internal AcsChatThreadParticipantProperties() { } public string DisplayName { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel ParticipantCommunicationIdentifier { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties 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.AcsChatThreadParticipantProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -271,10 +251,9 @@ public partial class AcsChatThreadPropertiesUpdatedEventData : Azure.Messaging.E { internal AcsChatThreadPropertiesUpdatedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel EditedByCommunicationIdentifier { get { throw null; } } - public System.DateTimeOffset EditTime { get { throw null; } } + public System.DateTimeOffset? EditTime { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedEventData 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.AcsChatThreadPropertiesUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -285,10 +264,9 @@ public partial class AcsChatThreadPropertiesUpdatedPerUserEventData : Azure.Mess { internal AcsChatThreadPropertiesUpdatedPerUserEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel EditedByCommunicationIdentifier { get { throw null; } } - public System.DateTimeOffset EditTime { get { throw null; } } + public System.DateTimeOffset? EditTime { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData 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.AcsChatThreadPropertiesUpdatedPerUserEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -299,8 +277,7 @@ public partial class AcsChatThreadWithUserDeletedEventData : Azure.Messaging.Eve { internal AcsChatThreadWithUserDeletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel DeletedByCommunicationIdentifier { get { throw null; } } - public System.DateTimeOffset DeleteTime { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? DeleteTime { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadWithUserDeletedEventData 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.AcsChatThreadWithUserDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -310,13 +287,12 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AcsEmailDeliveryReportReceivedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsEmailDeliveryReportReceivedEventData() { } - public System.DateTimeOffset DeliveryAttemptTimestamp { get { throw null; } } + public System.DateTimeOffset? DeliveryAttemptTimestamp { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails DeliveryStatusDetails { get { throw null; } } public string MessageId { get { throw null; } } public string Recipient { get { throw null; } } public string Sender { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus Status { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? Status { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData 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.AcsEmailDeliveryReportReceivedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -349,7 +325,6 @@ public partial class AcsEmailDeliveryReportStatusDetails : System.ClientModel.Pr { internal AcsEmailDeliveryReportStatusDetails() { } public string StatusMessage { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails 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.AcsEmailDeliveryReportStatusDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -359,14 +334,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class AcsEmailEngagementTrackingReportReceivedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsEmailEngagementTrackingReportReceivedEventData() { } - public Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement Engagement { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement? Engagement { get { throw null; } } public string EngagementContext { get { throw null; } } public string MessageId { get { throw null; } } public string Recipient { get { throw null; } } public string Sender { get { throw null; } } - public System.DateTimeOffset UserActionTimestamp { get { throw null; } } + public System.DateTimeOffset? UserActionTimestamp { get { throw null; } } public string UserAgent { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsEmailEngagementTrackingReportReceivedEventData 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.AcsEmailEngagementTrackingReportReceivedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -378,7 +352,6 @@ public partial class AcsIncomingCallCustomContext : System.ClientModel.Primitive internal AcsIncomingCallCustomContext() { } public System.Collections.Generic.IReadOnlyDictionary SipHeaders { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary VoipHeaders { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallCustomContext 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.AcsIncomingCallCustomContext System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -393,9 +366,9 @@ internal AcsIncomingCallEventData() { } public Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallCustomContext CustomContext { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel FromCommunicationIdentifier { get { throw null; } } public string IncomingCallContext { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel OnBehalfOfCallee { get { throw null; } } public string ServerCallId { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel ToCommunicationIdentifier { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallEventData 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.AcsIncomingCallEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -426,7 +399,6 @@ public partial class AcsMessageButtonContent : System.ClientModel.Primitives.IJs internal AcsMessageButtonContent() { } public string Payload { get { throw null; } } public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsMessageButtonContent 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.AcsMessageButtonContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -438,7 +410,6 @@ public partial class AcsMessageChannelEventError : System.ClientModel.Primitives internal AcsMessageChannelEventError() { } public string ChannelCode { get { throw null; } } public string ChannelMessage { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelEventError 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.AcsMessageChannelEventError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -467,7 +438,6 @@ public partial class AcsMessageContext : System.ClientModel.Primitives.IJsonMode internal AcsMessageContext() { } public string From { get { throw null; } } public string MessageId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsMessageContext 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.AcsMessageContext System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -499,10 +469,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class AcsMessageDeliveryStatusUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsMessageEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsMessageDeliveryStatusUpdatedEventData() { } - public Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelKind ChannelKind { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelKind? ChannelKind { get { throw null; } } public string MessageId { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.AcsMessageDeliveryStatus Status { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.AcsMessageDeliveryStatus? Status { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsMessageDeliveryStatusUpdatedEventData 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.AcsMessageDeliveryStatusUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -514,9 +483,8 @@ public partial class AcsMessageEventData : System.ClientModel.Primitives.IJsonMo internal AcsMessageEventData() { } public Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelEventError Error { get { throw null; } } public string From { get { throw null; } } - public System.DateTimeOffset ReceivedTimestamp { get { throw null; } } + public System.DateTimeOffset? ReceivedTimestamp { get { throw null; } } public string To { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsMessageEventData 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.AcsMessageEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -528,7 +496,6 @@ public partial class AcsMessageInteractiveButtonReplyContent : System.ClientMode internal AcsMessageInteractiveButtonReplyContent() { } public string ButtonId { get { throw null; } } public string Title { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveButtonReplyContent 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.AcsMessageInteractiveButtonReplyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -540,8 +507,7 @@ public partial class AcsMessageInteractiveContent : System.ClientModel.Primitive internal AcsMessageInteractiveContent() { } public Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveButtonReplyContent ButtonReply { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveListReplyContent ListReply { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.AcsInteractiveReplyKind ReplyKind { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.AcsInteractiveReplyKind? ReplyKind { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveContent 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.AcsMessageInteractiveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -554,7 +520,6 @@ internal AcsMessageInteractiveListReplyContent() { } public string Description { get { throw null; } } public string ListItemId { get { throw null; } } public string Title { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveListReplyContent 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.AcsMessageInteractiveListReplyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -568,7 +533,6 @@ internal AcsMessageMediaContent() { } public string FileName { get { throw null; } } public string MediaId { get { throw null; } } public string MimeType { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsMessageMediaContent 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.AcsMessageMediaContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -584,7 +548,6 @@ internal AcsMessageReceivedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.AcsMessageContext Context { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveContent InteractiveContent { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsMessageMediaContent MediaContent { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsMessageReceivedEventData 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.AcsMessageReceivedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -600,7 +563,6 @@ internal AcsRecordingChunkInfoProperties() { } public string EndReason { get { throw null; } } public long? Index { get { throw null; } } public string MetadataLocation { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRecordingChunkInfoProperties 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.AcsRecordingChunkInfoProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -610,14 +572,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class AcsRecordingFileStatusUpdatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsRecordingFileStatusUpdatedEventData() { } - public Azure.Messaging.EventGrid.SystemEvents.RecordingChannelType RecordingChannelKind { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.RecordingContentType RecordingContentType { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.RecordingChannelType? RecordingChannelKind { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.RecordingContentType? RecordingContentType { get { throw null; } } public long? RecordingDurationMs { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType RecordingFormatType { get { throw null; } } - public System.DateTimeOffset RecordingStartTime { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType? RecordingFormatType { get { throw null; } } + public System.DateTimeOffset? RecordingStartTime { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsRecordingStorageInfoProperties RecordingStorageInfo { get { throw null; } } public string SessionEndReason { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRecordingFileStatusUpdatedEventData 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.AcsRecordingFileStatusUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -628,7 +589,6 @@ public partial class AcsRecordingStorageInfoProperties : System.ClientModel.Prim { internal AcsRecordingStorageInfoProperties() { } public System.Collections.Generic.IReadOnlyList RecordingChunks { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRecordingStorageInfoProperties 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.AcsRecordingStorageInfoProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -641,7 +601,6 @@ internal AcsRouterChannelConfiguration() { } public int? CapacityCostPerJob { get { throw null; } } public string ChannelId { get { throw null; } } public int? MaxNumberOfJobs { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterChannelConfiguration 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.AcsRouterChannelConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -656,7 +615,6 @@ internal AcsRouterCommunicationError() { } public Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError Innererror { get { throw null; } } public string Message { get { throw null; } } public string Target { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError 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.AcsRouterCommunicationError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -669,7 +627,6 @@ internal AcsRouterEventData() { } public string ChannelId { get { throw null; } } public string ChannelReference { get { throw null; } } public string JobId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterEventData 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.AcsRouterEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -681,7 +638,6 @@ public partial class AcsRouterJobCancelledEventData : Azure.Messaging.EventGrid. internal AcsRouterJobCancelledEventData() { } public string DispositionCode { get { throw null; } } public string Note { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobCancelledEventData 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.AcsRouterJobCancelledEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -693,7 +649,6 @@ public partial class AcsRouterJobClassificationFailedEventData : Azure.Messaging internal AcsRouterJobClassificationFailedEventData() { } public string ClassificationPolicyId { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobClassificationFailedEventData 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.AcsRouterJobClassificationFailedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -707,7 +662,6 @@ internal AcsRouterJobClassifiedEventData() { } public string ClassificationPolicyId { get { throw null; } } public int? Priority { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsRouterQueueDetails QueueDetails { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobClassifiedEventData 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.AcsRouterJobClassifiedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -720,7 +674,6 @@ internal AcsRouterJobClosedEventData() { } public string AssignmentId { get { throw null; } } public string DispositionCode { get { throw null; } } public string WorkerId { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobClosedEventData 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.AcsRouterJobClosedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -732,7 +685,6 @@ public partial class AcsRouterJobCompletedEventData : Azure.Messaging.EventGrid. internal AcsRouterJobCompletedEventData() { } public string AssignmentId { get { throw null; } } public string WorkerId { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobCompletedEventData 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.AcsRouterJobCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -742,7 +694,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AcsRouterJobDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsRouterJobDeletedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobDeletedEventData 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.AcsRouterJobDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -755,7 +706,6 @@ internal AcsRouterJobEventData() { } public System.Collections.Generic.IReadOnlyDictionary Labels { get { throw null; } } public string QueueId { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData 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.AcsRouterJobEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -767,7 +717,6 @@ public partial class AcsRouterJobExceptionTriggeredEventData : Azure.Messaging.E internal AcsRouterJobExceptionTriggeredEventData() { } public string ExceptionRuleId { get { throw null; } } public string RuleKey { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobExceptionTriggeredEventData 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.AcsRouterJobExceptionTriggeredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -780,7 +729,6 @@ internal AcsRouterJobQueuedEventData() { } public System.Collections.Generic.IReadOnlyList AttachedWorkerSelectors { get { throw null; } } public int? Priority { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequestedWorkerSelectors { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobQueuedEventData 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.AcsRouterJobQueuedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -791,12 +739,11 @@ public partial class AcsRouterJobReceivedEventData : Azure.Messaging.EventGrid.S { internal AcsRouterJobReceivedEventData() { } public string ClassificationPolicyId { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobStatus JobStatus { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobStatus? JobStatus { get { throw null; } } public int? Priority { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequestedWorkerSelectors { get { throw null; } } - public System.DateTimeOffset ScheduledOn { get { throw null; } } + public System.DateTimeOffset? ScheduledOn { get { throw null; } } public bool UnavailableForMatching { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobReceivedEventData 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.AcsRouterJobReceivedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -810,8 +757,7 @@ internal AcsRouterJobSchedulingFailedEventData() { } public System.Collections.Generic.IReadOnlyList ExpiredRequestedWorkerSelectors { get { throw null; } } public string FailureReason { get { throw null; } } public int? Priority { get { throw null; } } - public System.DateTimeOffset ScheduledOn { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? ScheduledOn { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobSchedulingFailedEventData 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.AcsRouterJobSchedulingFailedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -851,7 +797,6 @@ public partial class AcsRouterJobUnassignedEventData : Azure.Messaging.EventGrid internal AcsRouterJobUnassignedEventData() { } public string AssignmentId { get { throw null; } } public string WorkerId { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobUnassignedEventData 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.AcsRouterJobUnassignedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -864,9 +809,8 @@ internal AcsRouterJobWaitingForActivationEventData() { } public System.Collections.Generic.IReadOnlyList ExpiredAttachedWorkerSelectors { get { throw null; } } public System.Collections.Generic.IReadOnlyList ExpiredRequestedWorkerSelectors { get { throw null; } } public int? Priority { get { throw null; } } - public System.DateTimeOffset ScheduledOn { get { throw null; } } + public System.DateTimeOffset? ScheduledOn { get { throw null; } } public bool UnavailableForMatching { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobWaitingForActivationEventData 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.AcsRouterJobWaitingForActivationEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -878,7 +822,6 @@ public partial class AcsRouterJobWorkerSelectorsExpiredEventData : Azure.Messagi internal AcsRouterJobWorkerSelectorsExpiredEventData() { } public System.Collections.Generic.IReadOnlyList ExpiredAttachedWorkerSelectors { get { throw null; } } public System.Collections.Generic.IReadOnlyList ExpiredRequestedWorkerSelectors { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobWorkerSelectorsExpiredEventData 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.AcsRouterJobWorkerSelectorsExpiredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -913,7 +856,6 @@ internal AcsRouterQueueDetails() { } public string Id { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Labels { get { throw null; } } public string Name { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterQueueDetails 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.AcsRouterQueueDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -945,7 +887,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class AcsRouterWorkerDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsRouterWorkerDeletedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerDeletedEventData 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.AcsRouterWorkerDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -956,7 +897,6 @@ public partial class AcsRouterWorkerDeregisteredEventData : System.ClientModel.P { internal AcsRouterWorkerDeregisteredEventData() { } public string WorkerId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerDeregisteredEventData 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.AcsRouterWorkerDeregisteredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -967,7 +907,6 @@ public partial class AcsRouterWorkerEventData : Azure.Messaging.EventGrid.System { internal AcsRouterWorkerEventData() { } public string WorkerId { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerEventData 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.AcsRouterWorkerEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -985,7 +924,6 @@ internal AcsRouterWorkerOfferAcceptedEventData() { } public string QueueId { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary WorkerLabels { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary WorkerTags { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferAcceptedEventData 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.AcsRouterWorkerOfferAcceptedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -997,7 +935,6 @@ public partial class AcsRouterWorkerOfferDeclinedEventData : Azure.Messaging.Eve internal AcsRouterWorkerOfferDeclinedEventData() { } public string OfferId { get { throw null; } } public string QueueId { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferDeclinedEventData 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.AcsRouterWorkerOfferDeclinedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1009,7 +946,6 @@ public partial class AcsRouterWorkerOfferExpiredEventData : Azure.Messaging.Even internal AcsRouterWorkerOfferExpiredEventData() { } public string OfferId { get { throw null; } } public string QueueId { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferExpiredEventData 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.AcsRouterWorkerOfferExpiredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1019,16 +955,15 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AcsRouterWorkerOfferIssuedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsRouterWorkerOfferIssuedEventData() { } - public System.DateTimeOffset ExpiresOn { get { throw null; } } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary JobLabels { get { throw null; } } public int? JobPriority { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary JobTags { get { throw null; } } - public System.DateTimeOffset OfferedOn { get { throw null; } } + public System.DateTimeOffset? OfferedOn { get { throw null; } } public string OfferId { get { throw null; } } public string QueueId { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary WorkerLabels { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary WorkerTags { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferIssuedEventData 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.AcsRouterWorkerOfferIssuedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1040,7 +975,6 @@ public partial class AcsRouterWorkerOfferRevokedEventData : Azure.Messaging.Even internal AcsRouterWorkerOfferRevokedEventData() { } public string OfferId { get { throw null; } } public string QueueId { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferRevokedEventData 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.AcsRouterWorkerOfferRevokedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1056,7 +990,6 @@ internal AcsRouterWorkerRegisteredEventData() { } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } public int? TotalCapacity { get { throw null; } } public string WorkerId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerRegisteredEventData 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.AcsRouterWorkerRegisteredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1066,13 +999,12 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class AcsRouterWorkerSelector : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsRouterWorkerSelector() { } - public System.DateTimeOffset ExpirationTime { get { throw null; } } + public System.DateTimeOffset? ExpirationTime { get { throw null; } } public string Key { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.AcsRouterLabelOperator LabelOperator { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsRouterLabelOperator? LabelOperator { get { throw null; } } public System.BinaryData LabelValue { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerSelectorState SelectorState { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerSelectorState? SelectorState { get { throw null; } } public double TimeToLive { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerSelector 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.AcsRouterWorkerSelector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1107,7 +1039,6 @@ internal AcsRouterWorkerUpdatedEventData() { } public int? TotalCapacity { get { throw null; } } public System.Collections.Generic.IReadOnlyList UpdatedWorkerProperties { get { throw null; } } public string WorkerId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerUpdatedEventData 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.AcsRouterWorkerUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1119,8 +1050,7 @@ public partial class AcsSmsDeliveryAttemptProperties : System.ClientModel.Primit internal AcsSmsDeliveryAttemptProperties() { } public int? SegmentsFailed { get { throw null; } } public int? SegmentsSucceeded { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? Timestamp { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsSmsDeliveryAttemptProperties 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.AcsSmsDeliveryAttemptProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1133,9 +1063,8 @@ internal AcsSmsDeliveryReportReceivedEventData() { } public System.Collections.Generic.IReadOnlyList DeliveryAttempts { get { throw null; } } public string DeliveryStatus { get { throw null; } } public string DeliveryStatusDetails { get { throw null; } } - public System.DateTimeOffset ReceivedTimestamp { get { throw null; } } + public System.DateTimeOffset? ReceivedTimestamp { get { throw null; } } public string Tag { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsSmsDeliveryReportReceivedEventData 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.AcsSmsDeliveryReportReceivedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1148,7 +1077,6 @@ internal AcsSmsEventBaseProperties() { } public string From { get { throw null; } } public string MessageId { get { throw null; } } public string To { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsSmsEventBaseProperties 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.AcsSmsEventBaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1159,8 +1087,7 @@ public partial class AcsSmsReceivedEventData : Azure.Messaging.EventGrid.SystemE { internal AcsSmsReceivedEventData() { } public string Message { get { throw null; } } - public System.DateTimeOffset ReceivedTimestamp { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? ReceivedTimestamp { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AcsSmsReceivedEventData 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.AcsSmsReceivedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1171,7 +1098,6 @@ public partial class AcsUserDisconnectedEventData : System.ClientModel.Primitive { internal AcsUserDisconnectedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel UserCommunicationIdentifier { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AcsUserDisconnectedEventData 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.AcsUserDisconnectedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1202,7 +1128,6 @@ internal ApiCenterApiDefinitionAddedEventData() { } public string Description { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification Specification { get { throw null; } } public string Title { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiDefinitionAddedEventData 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.ApiCenterApiDefinitionAddedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1215,7 +1140,6 @@ internal ApiCenterApiDefinitionUpdatedEventData() { } public string Description { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification Specification { get { throw null; } } public string Title { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiDefinitionUpdatedEventData 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.ApiCenterApiDefinitionUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1227,7 +1151,6 @@ public partial class ApiCenterApiSpecification : System.ClientModel.Primitives.I internal ApiCenterApiSpecification() { } public string Name { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification 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.ApiCenterApiSpecification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1238,7 +1161,6 @@ public partial class ApiManagementApiCreatedEventData : System.ClientModel.Primi { internal ApiManagementApiCreatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiCreatedEventData 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.ApiManagementApiCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1249,7 +1171,6 @@ public partial class ApiManagementApiDeletedEventData : System.ClientModel.Primi { internal ApiManagementApiDeletedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiDeletedEventData 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.ApiManagementApiDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1260,7 +1181,6 @@ public partial class ApiManagementApiReleaseCreatedEventData : System.ClientMode { internal ApiManagementApiReleaseCreatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseCreatedEventData 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.ApiManagementApiReleaseCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1271,7 +1191,6 @@ public partial class ApiManagementApiReleaseDeletedEventData : System.ClientMode { internal ApiManagementApiReleaseDeletedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData 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.ApiManagementApiReleaseDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1282,7 +1201,6 @@ public partial class ApiManagementApiReleaseUpdatedEventData : System.ClientMode { internal ApiManagementApiReleaseUpdatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData 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.ApiManagementApiReleaseUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1293,7 +1211,6 @@ public partial class ApiManagementApiUpdatedEventData : System.ClientModel.Primi { internal ApiManagementApiUpdatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData 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.ApiManagementApiUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1304,7 +1221,6 @@ public partial class ApiManagementGatewayApiAddedEventData : System.ClientModel. { internal ApiManagementGatewayApiAddedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData 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.ApiManagementGatewayApiAddedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1315,7 +1231,6 @@ public partial class ApiManagementGatewayApiRemovedEventData : System.ClientMode { internal ApiManagementGatewayApiRemovedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1326,7 +1241,6 @@ public partial class ApiManagementGatewayCertificateAuthorityCreatedEventData : { internal ApiManagementGatewayCertificateAuthorityCreatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData 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.ApiManagementGatewayCertificateAuthorityCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1337,7 +1251,6 @@ public partial class ApiManagementGatewayCertificateAuthorityDeletedEventData : { internal ApiManagementGatewayCertificateAuthorityDeletedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityDeletedEventData 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.ApiManagementGatewayCertificateAuthorityDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1348,7 +1261,6 @@ public partial class ApiManagementGatewayCertificateAuthorityUpdatedEventData : { internal ApiManagementGatewayCertificateAuthorityUpdatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityUpdatedEventData 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.ApiManagementGatewayCertificateAuthorityUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1359,7 +1271,6 @@ public partial class ApiManagementGatewayCreatedEventData : System.ClientModel.P { internal ApiManagementGatewayCreatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCreatedEventData 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.ApiManagementGatewayCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1370,7 +1281,6 @@ public partial class ApiManagementGatewayDeletedEventData : System.ClientModel.P { internal ApiManagementGatewayDeletedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayDeletedEventData 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.ApiManagementGatewayDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1381,7 +1291,6 @@ public partial class ApiManagementGatewayHostnameConfigurationCreatedEventData : { internal ApiManagementGatewayHostnameConfigurationCreatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData 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.ApiManagementGatewayHostnameConfigurationCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1392,7 +1301,6 @@ public partial class ApiManagementGatewayHostnameConfigurationDeletedEventData : { internal ApiManagementGatewayHostnameConfigurationDeletedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData 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.ApiManagementGatewayHostnameConfigurationDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1403,7 +1311,6 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData : { internal ApiManagementGatewayHostnameConfigurationUpdatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData 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.ApiManagementGatewayHostnameConfigurationUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1414,7 +1321,6 @@ public partial class ApiManagementGatewayUpdatedEventData : System.ClientModel.P { internal ApiManagementGatewayUpdatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData 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.ApiManagementGatewayUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1425,7 +1331,6 @@ public partial class ApiManagementProductCreatedEventData : System.ClientModel.P { internal ApiManagementProductCreatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData 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.ApiManagementProductCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1436,7 +1341,6 @@ public partial class ApiManagementProductDeletedEventData : System.ClientModel.P { internal ApiManagementProductDeletedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData 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.ApiManagementProductDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1447,7 +1351,6 @@ public partial class ApiManagementProductUpdatedEventData : System.ClientModel.P { internal ApiManagementProductUpdatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductUpdatedEventData 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.ApiManagementProductUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1458,7 +1361,6 @@ public partial class ApiManagementSubscriptionCreatedEventData : System.ClientMo { internal ApiManagementSubscriptionCreatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementSubscriptionCreatedEventData 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.ApiManagementSubscriptionCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1469,7 +1371,6 @@ public partial class ApiManagementSubscriptionDeletedEventData : System.ClientMo { internal ApiManagementSubscriptionDeletedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementSubscriptionDeletedEventData 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.ApiManagementSubscriptionDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1480,7 +1381,6 @@ public partial class ApiManagementSubscriptionUpdatedEventData : System.ClientMo { internal ApiManagementSubscriptionUpdatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementSubscriptionUpdatedEventData 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.ApiManagementSubscriptionUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1491,7 +1391,6 @@ public partial class ApiManagementUserCreatedEventData : System.ClientModel.Prim { internal ApiManagementUserCreatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementUserCreatedEventData 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.ApiManagementUserCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1502,7 +1401,6 @@ public partial class ApiManagementUserDeletedEventData : System.ClientModel.Prim { internal ApiManagementUserDeletedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementUserDeletedEventData 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.ApiManagementUserDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1513,7 +1411,6 @@ public partial class ApiManagementUserUpdatedEventData : System.ClientModel.Prim { internal ApiManagementUserUpdatedEventData() { } public string ResourceUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ApiManagementUserUpdatedEventData 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.ApiManagementUserUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1549,7 +1446,6 @@ internal AppConfigurationKeyValueDeletedEventData() { } public string Key { get { throw null; } } public string Label { get { throw null; } } public string SyncToken { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AppConfigurationKeyValueDeletedEventData 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.AppConfigurationKeyValueDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1563,7 +1459,6 @@ internal AppConfigurationKeyValueModifiedEventData() { } public string Key { get { throw null; } } public string Label { get { throw null; } } public string SyncToken { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AppConfigurationKeyValueModifiedEventData 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.AppConfigurationKeyValueModifiedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1573,7 +1468,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class AppConfigurationSnapshotCreatedEventData : Azure.Messaging.EventGrid.SystemEvents.AppConfigurationSnapshotEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AppConfigurationSnapshotCreatedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AppConfigurationSnapshotCreatedEventData 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.AppConfigurationSnapshotCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1586,7 +1480,6 @@ internal AppConfigurationSnapshotEventData() { } public string Etag { get { throw null; } } public string Name { get { throw null; } } public string SyncToken { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AppConfigurationSnapshotEventData 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.AppConfigurationSnapshotEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1596,7 +1489,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class AppConfigurationSnapshotModifiedEventData : Azure.Messaging.EventGrid.SystemEvents.AppConfigurationSnapshotEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AppConfigurationSnapshotModifiedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AppConfigurationSnapshotModifiedEventData 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.AppConfigurationSnapshotModifiedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1606,8 +1498,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AppEventTypeDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AppEventTypeDetail() { } - public Azure.Messaging.EventGrid.SystemEvents.AppAction Action { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.AppAction? Action { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AppEventTypeDetail 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.AppEventTypeDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1634,10 +1525,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class AppServicePlanEventTypeDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AppServicePlanEventTypeDetail() { } - public Azure.Messaging.EventGrid.SystemEvents.AppServicePlanAction Action { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.StampKind StampKind { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.AsyncStatus Status { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.AppServicePlanAction? Action { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.StampKind? StampKind { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AsyncStatus? Status { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.AppServicePlanEventTypeDetail 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.AppServicePlanEventTypeDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1666,7 +1556,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class AvsClusterCreatedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AvsClusterCreatedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsClusterCreatedEventData 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.AvsClusterCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1676,7 +1565,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AvsClusterDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AvsClusterDeletedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsClusterDeletedEventData 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.AvsClusterDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1690,7 +1578,6 @@ internal AvsClusterEventData() { } public System.Collections.Generic.IReadOnlyList InMaintenanceHostNames { get { throw null; } } public string OperationId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RemovedHostNames { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData 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.AvsClusterEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1701,7 +1588,6 @@ public partial class AvsClusterFailedEventData : Azure.Messaging.EventGrid.Syste { internal AvsClusterFailedEventData() { } public string FailureMessage { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsClusterFailedEventData 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.AvsClusterFailedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1711,7 +1597,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AvsClusterUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AvsClusterUpdatedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsClusterUpdatedEventData 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.AvsClusterUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1721,7 +1606,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AvsClusterUpdatingEventData : Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AvsClusterUpdatingEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsClusterUpdatingEventData 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.AvsClusterUpdatingEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1732,7 +1616,6 @@ public partial class AvsPrivateCloudEventData : System.ClientModel.Primitives.IJ { internal AvsPrivateCloudEventData() { } public string OperationId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudEventData 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.AvsPrivateCloudEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1743,7 +1626,6 @@ public partial class AvsPrivateCloudFailedEventData : Azure.Messaging.EventGrid. { internal AvsPrivateCloudFailedEventData() { } public string FailureMessage { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudFailedEventData 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.AvsPrivateCloudFailedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1753,7 +1635,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AvsPrivateCloudUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AvsPrivateCloudUpdatedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudUpdatedEventData 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.AvsPrivateCloudUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1763,7 +1644,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AvsPrivateCloudUpdatingEventData : Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AvsPrivateCloudUpdatingEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudUpdatingEventData 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.AvsPrivateCloudUpdatingEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1773,7 +1653,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AvsScriptExecutionCancelledEventData : Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AvsScriptExecutionCancelledEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionCancelledEventData 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.AvsScriptExecutionCancelledEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1786,7 +1665,6 @@ internal AvsScriptExecutionEventData() { } public string CmdletId { get { throw null; } } public string OperationId { get { throw null; } } public System.Collections.Generic.IReadOnlyList Output { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionEventData 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.AvsScriptExecutionEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1797,7 +1675,6 @@ public partial class AvsScriptExecutionFailedEventData : Azure.Messaging.EventGr { internal AvsScriptExecutionFailedEventData() { } public string FailureMessage { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionFailedEventData 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.AvsScriptExecutionFailedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1808,7 +1685,6 @@ public partial class AvsScriptExecutionFinishedEventData : Azure.Messaging.Event { internal AvsScriptExecutionFinishedEventData() { } public System.Collections.Generic.IReadOnlyDictionary NamedOutputs { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionFinishedEventData 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.AvsScriptExecutionFinishedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1818,7 +1694,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class AvsScriptExecutionStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AvsScriptExecutionStartedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionStartedEventData 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.AvsScriptExecutionStartedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1848,12 +1723,11 @@ public partial class CommunicationIdentifierModel : System.ClientModel.Primitive { internal CommunicationIdentifierModel() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationUserIdentifierModel CommunicationUser { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModelKind Kind { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModelKind? Kind { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsAppIdentifierModel MicrosoftTeamsApp { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsUserIdentifierModel MicrosoftTeamsUser { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.PhoneNumberIdentifierModel PhoneNumber { get { throw null; } } public string RawId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel 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.CommunicationIdentifierModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1884,7 +1758,6 @@ public partial class CommunicationUserIdentifierModel : System.ClientModel.Primi { internal CommunicationUserIdentifierModel() { } public string Id { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.CommunicationUserIdentifierModel 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.CommunicationUserIdentifierModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1899,8 +1772,7 @@ internal ContainerRegistryArtifactEventData() { } public string Id { get { throw null; } } public string Location { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventTarget Target { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? Timestamp { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventData 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.ContainerRegistryArtifactEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1917,7 +1789,6 @@ internal ContainerRegistryArtifactEventTarget() { } public long? Size { get { throw null; } } public string Tag { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventTarget 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.ContainerRegistryArtifactEventTarget System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1927,7 +1798,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryChartDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerRegistryChartDeletedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryChartDeletedEventData 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.ContainerRegistryChartDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1937,7 +1807,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class ContainerRegistryChartPushedEventData : Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerRegistryChartPushedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryChartPushedEventData 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.ContainerRegistryChartPushedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1948,7 +1817,6 @@ public partial class ContainerRegistryEventActor : System.ClientModel.Primitives { internal ContainerRegistryEventActor() { } public string Name { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventActor 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.ContainerRegistryEventActor System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1959,7 +1827,6 @@ public partial class ContainerRegistryEventConnectedRegistry : System.ClientMode { internal ContainerRegistryEventConnectedRegistry() { } public string Name { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry 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.ContainerRegistryEventConnectedRegistry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1977,8 +1844,7 @@ internal ContainerRegistryEventData() { } public Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventRequest Request { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventSource Source { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventTarget Target { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? Timestamp { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventData 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.ContainerRegistryEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1993,7 +1859,6 @@ internal ContainerRegistryEventRequest() { } public string Id { get { throw null; } } public string Method { get { throw null; } } public string Useragent { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventRequest 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.ContainerRegistryEventRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2005,7 +1870,6 @@ public partial class ContainerRegistryEventSource : System.ClientModel.Primitive internal ContainerRegistryEventSource() { } public string Addr { 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.ContainerRegistryEventSource 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.ContainerRegistryEventSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2022,7 +1886,6 @@ internal ContainerRegistryEventTarget() { } public long? Size { get { throw null; } } public string Tag { get { throw null; } } public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventTarget 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.ContainerRegistryEventTarget System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2032,7 +1895,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryImageDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerRegistryImageDeletedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryImageDeletedEventData 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.ContainerRegistryImageDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2042,7 +1904,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class ContainerRegistryImagePushedEventData : Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerRegistryImagePushedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryImagePushedEventData 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.ContainerRegistryImagePushedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2052,7 +1913,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class ContainerServiceClusterSupportEndedEventData : Azure.Messaging.EventGrid.SystemEvents.ContainerServiceClusterSupportEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerServiceClusterSupportEndedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerServiceClusterSupportEndedEventData 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.ContainerServiceClusterSupportEndedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2062,7 +1922,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class ContainerServiceClusterSupportEndingEventData : Azure.Messaging.EventGrid.SystemEvents.ContainerServiceClusterSupportEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerServiceClusterSupportEndingEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerServiceClusterSupportEndingEventData 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.ContainerServiceClusterSupportEndingEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2073,7 +1932,6 @@ public partial class ContainerServiceClusterSupportEventData : System.ClientMode { internal ContainerServiceClusterSupportEventData() { } public string KubernetesVersion { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerServiceClusterSupportEventData 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.ContainerServiceClusterSupportEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2087,7 +1945,6 @@ internal ContainerServiceNewKubernetesVersionAvailableEventData() { } public string LatestStableKubernetesVersion { get { throw null; } } public string LatestSupportedKubernetesVersion { get { throw null; } } public string LowestMinorKubernetesVersion { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerServiceNewKubernetesVersionAvailableEventData 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.ContainerServiceNewKubernetesVersionAvailableEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2098,7 +1955,6 @@ public partial class ContainerServiceNodePoolRollingEventData : System.ClientMod { internal ContainerServiceNodePoolRollingEventData() { } public string NodePoolName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerServiceNodePoolRollingEventData 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.ContainerServiceNodePoolRollingEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2108,7 +1964,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerServiceNodePoolRollingFailedEventData : Azure.Messaging.EventGrid.SystemEvents.ContainerServiceNodePoolRollingEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerServiceNodePoolRollingFailedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerServiceNodePoolRollingFailedEventData 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.ContainerServiceNodePoolRollingFailedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2118,7 +1973,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class ContainerServiceNodePoolRollingStartedEventData : Azure.Messaging.EventGrid.SystemEvents.ContainerServiceNodePoolRollingEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerServiceNodePoolRollingStartedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerServiceNodePoolRollingStartedEventData 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.ContainerServiceNodePoolRollingStartedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2128,7 +1982,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class ContainerServiceNodePoolRollingSucceededEventData : Azure.Messaging.EventGrid.SystemEvents.ContainerServiceNodePoolRollingEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerServiceNodePoolRollingSucceededEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ContainerServiceNodePoolRollingSucceededEventData 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.ContainerServiceNodePoolRollingSucceededEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2139,9 +1992,8 @@ public partial class DataBoxCopyCompletedEventData : System.ClientModel.Primitiv { internal DataBoxCopyCompletedEventData() { } public string SerialNumber { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName StageName { get { throw null; } } - public System.DateTimeOffset StageTime { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName? StageName { get { throw null; } } + public System.DateTimeOffset? StageTime { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.DataBoxCopyCompletedEventData 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.DataBoxCopyCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2152,9 +2004,8 @@ public partial class DataBoxCopyStartedEventData : System.ClientModel.Primitives { internal DataBoxCopyStartedEventData() { } public string SerialNumber { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName StageName { get { throw null; } } - public System.DateTimeOffset StageTime { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName? StageName { get { throw null; } } + public System.DateTimeOffset? StageTime { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.DataBoxCopyStartedEventData 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.DataBoxCopyStartedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2165,9 +2016,8 @@ public partial class DataBoxOrderCompletedEventData : System.ClientModel.Primiti { internal DataBoxOrderCompletedEventData() { } public string SerialNumber { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName StageName { get { throw null; } } - public System.DateTimeOffset StageTime { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName? StageName { get { throw null; } } + public System.DateTimeOffset? StageTime { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.DataBoxOrderCompletedEventData 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.DataBoxOrderCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2197,7 +2047,6 @@ public partial class DeviceConnectionStateEventInfo : System.ClientModel.Primiti { internal DeviceConnectionStateEventInfo() { } public string SequenceNumber { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.DeviceConnectionStateEventInfo 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.DeviceConnectionStateEventInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2211,7 +2060,6 @@ internal DeviceConnectionStateEventProperties() { } public string DeviceId { get { throw null; } } public string HubName { get { throw null; } } public string ModuleId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.DeviceConnectionStateEventProperties 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.DeviceConnectionStateEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2224,7 +2072,6 @@ internal DeviceLifeCycleEventProperties() { } public string DeviceId { get { throw null; } } public string HubName { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfo Twin { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.DeviceLifeCycleEventProperties 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.DeviceLifeCycleEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2237,7 +2084,6 @@ internal DeviceTelemetryEventProperties() { } public System.Collections.Generic.IReadOnlyDictionary Body { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary SystemProperties { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.DeviceTelemetryEventProperties 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.DeviceTelemetryEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2258,7 +2104,6 @@ internal DeviceTwinInfo() { } public string StatusUpdateTime { get { throw null; } } public float? Version { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint X509Thumbprint { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfo 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.DeviceTwinInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2270,7 +2115,6 @@ public partial class DeviceTwinInfoProperties : System.ClientModel.Primitives.IJ internal DeviceTwinInfoProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties Desired { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties Reported { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoProperties 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.DeviceTwinInfoProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2282,7 +2126,6 @@ public partial class DeviceTwinInfoX509Thumbprint : System.ClientModel.Primitive internal DeviceTwinInfoX509Thumbprint() { } public string PrimaryThumbprint { get { throw null; } } public string SecondaryThumbprint { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint 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.DeviceTwinInfoX509Thumbprint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2293,7 +2136,6 @@ public partial class DeviceTwinMetadata : System.ClientModel.Primitives.IJsonMod { internal DeviceTwinMetadata() { } public string LastUpdated { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata 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.DeviceTwinMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2305,162 +2147,156 @@ public partial class DeviceTwinProperties : System.ClientModel.Primitives.IJsonM internal DeviceTwinProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata Metadata { get { throw null; } } public float? Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties 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.DeviceTwinProperties 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 + public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal EventGridMQTTClientCreatedOrUpdatedEventData() { } + internal EventGridMqttClientCreatedOrUpdatedEventData() { } public System.Collections.Generic.IReadOnlyDictionary Attributes { get { throw null; } } - public System.DateTimeOffset CreatedOn { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientState State { get { throw null; } } - public System.DateTimeOffset UpdatedOn { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientCreatedOrUpdatedEventData 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.EventGridMQTTClientCreatedOrUpdatedEventData 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 EventGridMQTTClientDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal EventGridMQTTClientDeletedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDeletedEventData 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.EventGridMQTTClientDeletedEventData 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 System.DateTimeOffset? CreatedOn { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? State { get { throw null; } } + public System.DateTimeOffset? UpdatedOn { get { throw null; } } + Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData 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.EventGridMqttClientCreatedOrUpdatedEventData 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 EventGridMqttClientDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EventGridMqttClientDeletedEventData() { } + Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData 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.EventGridMqttClientDeletedEventData 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 EventGridMQTTClientDisconnectionReason : System.IEquatable + public readonly partial struct EventGridMqttClientDisconnectionReason : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EventGridMQTTClientDisconnectionReason(string value) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason ClientAuthenticationError { get { throw null; } } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason ClientAuthorizationError { get { throw null; } } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason ClientError { get { throw null; } } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason ClientInitiatedDisconnect { get { throw null; } } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason ConnectionLost { get { throw null; } } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason IpForbidden { get { throw null; } } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason QuotaExceeded { get { throw null; } } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason ServerError { get { throw null; } } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason ServerInitiatedDisconnect { get { throw null; } } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason SessionOverflow { get { throw null; } } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason SessionTakenOver { get { throw null; } } - public bool Equals(Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason other) { throw null; } + public EventGridMqttClientDisconnectionReason(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason ClientAuthenticationError { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason ClientAuthorizationError { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason ClientError { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason ClientInitiatedDisconnect { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason ConnectionLost { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason IpForbidden { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason QuotaExceeded { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason ServerError { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason ServerInitiatedDisconnect { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason SessionOverflow { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason SessionTakenOver { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason 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.EventGridMQTTClientDisconnectionReason left, Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason right) { throw null; } - public static implicit operator Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason (string value) { throw null; } - public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason left, Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason right) { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason left, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason left, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason right) { throw null; } public override string ToString() { throw null; } } - public partial class EventGridMQTTClientEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class EventGridMqttClientEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal EventGridMQTTClientEventData() { } + internal EventGridMqttClientEventData() { } public string ClientAuthenticationName { get { throw null; } } public string ClientName { get { throw null; } } public string NamespaceName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientEventData 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.EventGridMQTTClientEventData 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; } + Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData 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.EventGridMqttClientEventData 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 EventGridMQTTClientSessionConnectedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class EventGridMqttClientSessionConnectedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal EventGridMQTTClientSessionConnectedEventData() { } + internal EventGridMqttClientSessionConnectedEventData() { } public string ClientSessionName { get { throw null; } } public long? SequenceNumber { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientSessionConnectedEventData 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.EventGridMQTTClientSessionConnectedEventData 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; } + Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientSessionConnectedEventData 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.EventGridMqttClientSessionConnectedEventData 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 EventGridMQTTClientSessionDisconnectedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class EventGridMqttClientSessionDisconnectedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal EventGridMQTTClientSessionDisconnectedEventData() { } + internal EventGridMqttClientSessionDisconnectedEventData() { } public string ClientSessionName { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason DisconnectionReason { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason? DisconnectionReason { get { throw null; } } public long? SequenceNumber { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientSessionDisconnectedEventData 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.EventGridMQTTClientSessionDisconnectedEventData 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; } + Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientSessionDisconnectedEventData 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.EventGridMqttClientSessionDisconnectedEventData 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 EventGridMQTTClientState : System.IEquatable + public readonly partial struct EventGridMqttClientState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EventGridMQTTClientState(string value) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientState Disabled { get { throw null; } } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientState Enabled { get { throw null; } } - public bool Equals(Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientState other) { throw null; } + public EventGridMqttClientState(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState Disabled { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState Enabled { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState 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.EventGridMQTTClientState left, Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientState right) { throw null; } - public static implicit operator Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientState (string value) { throw null; } - public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientState left, Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientState right) { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState left, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState left, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState right) { throw null; } public override string ToString() { throw null; } } public static partial class EventGridSystemEventsModelFactory { 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; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedInThreadEventData AcsChatMessageDeletedInThreadEventData(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; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEditedEventData AcsChatMessageEditedEventData(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?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.DateTimeOffset editTime = default(System.DateTimeOffset)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEditedInThreadEventData AcsChatMessageEditedInThreadEventData(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, System.DateTimeOffset editTime = default(System.DateTimeOffset)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventBaseProperties AcsChatMessageEventBaseProperties(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?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThreadBaseProperties(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?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageReceivedEventData AcsChatMessageReceivedEventData(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?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInThreadEventData(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.AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedToThreadEventData(string transactionId = null, string threadId = null, System.DateTimeOffset time = default(System.DateTimeOffset), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel addedByCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties participantAdded = null, long? version = default(long?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantAddedToThreadWithUserEventData AcsChatParticipantAddedToThreadWithUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset createTime = default(System.DateTimeOffset), long? version = default(long?), System.DateTimeOffset time = default(System.DateTimeOffset), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel addedByCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties participantAdded = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRemovedFromThreadEventData(string transactionId = null, string threadId = null, System.DateTimeOffset time = default(System.DateTimeOffset), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel removedByCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties participantRemoved = null, long? version = default(long?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantRemovedFromThreadWithUserEventData AcsChatParticipantRemovedFromThreadWithUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset createTime = default(System.DateTimeOffset), long? version = default(long?), System.DateTimeOffset time = default(System.DateTimeOffset), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel removedByCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties participantRemoved = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, System.DateTimeOffset createTime = default(System.DateTimeOffset), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel createdByCommunicationIdentifier = null, System.Collections.Generic.IReadOnlyDictionary properties = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IEnumerable participants = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadCreatedWithUserEventData AcsChatThreadCreatedWithUserEventData(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 createdByCommunicationIdentifier = null, System.Collections.Generic.IReadOnlyDictionary properties = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IEnumerable participants = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadDeletedEventData AcsChatThreadDeletedEventData(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.AcsChatThreadEventBaseProperties AcsChatThreadEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset createTime = default(System.DateTimeOffset), long? version = default(long?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadEventInThreadBaseProperties AcsChatThreadEventInThreadBaseProperties(string transactionId = null, string threadId = null, System.DateTimeOffset createTime = default(System.DateTimeOffset), long? version = default(long?)) { 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; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedInThreadEventData AcsChatMessageDeletedInThreadEventData(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; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEditedEventData AcsChatMessageEditedEventData(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?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEditedInThreadEventData AcsChatMessageEditedInThreadEventData(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, System.DateTimeOffset? editTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventBaseProperties AcsChatMessageEventBaseProperties(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?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThreadBaseProperties(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?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageReceivedEventData AcsChatMessageReceivedEventData(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?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInThreadEventData(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.AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedToThreadEventData(string transactionId = null, string threadId = null, System.DateTimeOffset? time = default(System.DateTimeOffset?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel addedByCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties participantAdded = null, long? version = default(long?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantAddedToThreadWithUserEventData AcsChatParticipantAddedToThreadWithUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), System.DateTimeOffset? time = default(System.DateTimeOffset?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel addedByCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties participantAdded = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRemovedFromThreadEventData(string transactionId = null, string threadId = null, System.DateTimeOffset? time = default(System.DateTimeOffset?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel removedByCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties participantRemoved = null, long? version = default(long?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantRemovedFromThreadWithUserEventData AcsChatParticipantRemovedFromThreadWithUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), System.DateTimeOffset? time = default(System.DateTimeOffset?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel removedByCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties participantRemoved = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel createdByCommunicationIdentifier = null, System.Collections.Generic.IReadOnlyDictionary properties = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IEnumerable participants = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadCreatedWithUserEventData AcsChatThreadCreatedWithUserEventData(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 createdByCommunicationIdentifier = null, System.Collections.Generic.IReadOnlyDictionary properties = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IEnumerable participants = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadDeletedEventData AcsChatThreadDeletedEventData(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.AcsChatThreadEventBaseProperties AcsChatThreadEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadEventInThreadBaseProperties AcsChatThreadEventInThreadBaseProperties(string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties AcsChatThreadParticipantProperties(string displayName = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel participantCommunicationIdentifier = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } - 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.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender = null, string recipient = 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.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.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender = null, string recipient = 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) { 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; } + 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; } public static Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallCustomContext AcsIncomingCallCustomContext(System.Collections.Generic.IReadOnlyDictionary sipHeaders = null, System.Collections.Generic.IReadOnlyDictionary voipHeaders = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallEventData AcsIncomingCallEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel toCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel fromCommunicationIdentifier = null, string serverCallId = null, string callerDisplayName = null, Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallCustomContext customContext = null, string incomingCallContext = null, string correlationId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallEventData AcsIncomingCallEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel toCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel fromCommunicationIdentifier = null, string serverCallId = null, string callerDisplayName = null, Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallCustomContext customContext = null, string incomingCallContext = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel onBehalfOfCallee = null, string correlationId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageButtonContent AcsMessageButtonContent(string text = null, string payload = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelEventError AcsMessageChannelEventError(string channelCode = null, string channelMessage = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageContext AcsMessageContext(string from = null, string messageId = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageDeliveryStatusUpdatedEventData AcsMessageDeliveryStatusUpdatedEventData(string from = null, string to = null, System.DateTimeOffset receivedTimestamp = default(System.DateTimeOffset), Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelEventError error = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageDeliveryStatus status = default(Azure.Messaging.EventGrid.SystemEvents.AcsMessageDeliveryStatus), Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelKind channelKind = default(Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelKind)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageEventData AcsMessageEventData(string from = null, string to = null, System.DateTimeOffset receivedTimestamp = default(System.DateTimeOffset), Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelEventError error = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageDeliveryStatusUpdatedEventData AcsMessageDeliveryStatusUpdatedEventData(string from = null, string to = null, System.DateTimeOffset? receivedTimestamp = default(System.DateTimeOffset?), Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelEventError error = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageDeliveryStatus? status = default(Azure.Messaging.EventGrid.SystemEvents.AcsMessageDeliveryStatus?), Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelKind? channelKind = default(Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelKind?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageEventData AcsMessageEventData(string from = null, string to = null, System.DateTimeOffset? receivedTimestamp = default(System.DateTimeOffset?), Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelEventError error = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveButtonReplyContent AcsMessageInteractiveButtonReplyContent(string buttonId = null, string title = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveContent AcsMessageInteractiveContent(Azure.Messaging.EventGrid.SystemEvents.AcsInteractiveReplyKind replyKind = default(Azure.Messaging.EventGrid.SystemEvents.AcsInteractiveReplyKind), Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveButtonReplyContent buttonReply = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveListReplyContent listReply = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveContent AcsMessageInteractiveContent(Azure.Messaging.EventGrid.SystemEvents.AcsInteractiveReplyKind? replyKind = default(Azure.Messaging.EventGrid.SystemEvents.AcsInteractiveReplyKind?), Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveButtonReplyContent buttonReply = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveListReplyContent listReply = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveListReplyContent AcsMessageInteractiveListReplyContent(string listItemId = null, string title = null, string description = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageMediaContent AcsMessageMediaContent(string mimeType = null, string mediaId = null, string fileName = null, string caption = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageReceivedEventData AcsMessageReceivedEventData(string from = null, string to = null, System.DateTimeOffset receivedTimestamp = default(System.DateTimeOffset), Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelEventError error = null, string content = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelKind channelKind = default(Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelKind), Azure.Messaging.EventGrid.SystemEvents.AcsMessageMediaContent mediaContent = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageContext context = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageButtonContent button = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveContent interactiveContent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageReceivedEventData AcsMessageReceivedEventData(string from = null, string to = null, System.DateTimeOffset? receivedTimestamp = default(System.DateTimeOffset?), Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelEventError error = null, string content = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelKind channelKind = default(Azure.Messaging.EventGrid.SystemEvents.AcsMessageChannelKind), Azure.Messaging.EventGrid.SystemEvents.AcsMessageMediaContent mediaContent = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageContext context = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageButtonContent button = null, Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveContent interactiveContent = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRecordingChunkInfoProperties AcsRecordingChunkInfoProperties(string documentId = null, long? index = default(long?), string endReason = null, string metadataLocation = null, string contentLocation = null, string deleteLocation = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsRecordingFileStatusUpdatedEventData AcsRecordingFileStatusUpdatedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsRecordingStorageInfoProperties recordingStorageInfo = null, System.DateTimeOffset recordingStartTime = default(System.DateTimeOffset), long? recordingDurationMs = default(long?), Azure.Messaging.EventGrid.SystemEvents.RecordingContentType recordingContentType = default(Azure.Messaging.EventGrid.SystemEvents.RecordingContentType), Azure.Messaging.EventGrid.SystemEvents.RecordingChannelType recordingChannelKind = default(Azure.Messaging.EventGrid.SystemEvents.RecordingChannelType), Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType recordingFormatType = default(Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType), string sessionEndReason = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRecordingFileStatusUpdatedEventData AcsRecordingFileStatusUpdatedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsRecordingStorageInfoProperties recordingStorageInfo = null, System.DateTimeOffset? recordingStartTime = default(System.DateTimeOffset?), long? recordingDurationMs = default(long?), Azure.Messaging.EventGrid.SystemEvents.RecordingContentType? recordingContentType = default(Azure.Messaging.EventGrid.SystemEvents.RecordingContentType?), Azure.Messaging.EventGrid.SystemEvents.RecordingChannelType? recordingChannelKind = default(Azure.Messaging.EventGrid.SystemEvents.RecordingChannelType?), Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType? recordingFormatType = default(Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType?), string sessionEndReason = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRecordingStorageInfoProperties AcsRecordingStorageInfoProperties(System.Collections.Generic.IEnumerable recordingChunks = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterChannelConfiguration AcsRouterChannelConfiguration(string channelId = null, int? capacityCostPerJob = default(int?), int? maxNumberOfJobs = default(int?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError AcsRouterCommunicationError(string code = null, string message = null, string target = null, Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError innererror = null, System.Collections.Generic.IEnumerable details = null) { throw null; } @@ -2474,10 +2310,10 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData AcsRouterJobEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobExceptionTriggeredEventData AcsRouterJobExceptionTriggeredEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string ruleKey = null, string exceptionRuleId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobQueuedEventData AcsRouterJobQueuedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, int? priority = default(int?), System.Collections.Generic.IEnumerable attachedWorkerSelectors = null, System.Collections.Generic.IEnumerable requestedWorkerSelectors = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobStatus jobStatus = default(Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobStatus), string classificationPolicyId = null, int? priority = default(int?), System.Collections.Generic.IEnumerable requestedWorkerSelectors = null, System.DateTimeOffset scheduledOn = default(System.DateTimeOffset), bool unavailableForMatching = false) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobSchedulingFailedEventData AcsRouterJobSchedulingFailedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, int? priority = default(int?), System.Collections.Generic.IEnumerable expiredAttachedWorkerSelectors = null, System.Collections.Generic.IEnumerable expiredRequestedWorkerSelectors = null, System.DateTimeOffset scheduledOn = default(System.DateTimeOffset), string failureReason = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobStatus? jobStatus = default(Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobStatus?), string classificationPolicyId = null, int? priority = default(int?), System.Collections.Generic.IEnumerable requestedWorkerSelectors = null, System.DateTimeOffset? scheduledOn = default(System.DateTimeOffset?), bool unavailableForMatching = false) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobSchedulingFailedEventData AcsRouterJobSchedulingFailedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, int? priority = default(int?), System.Collections.Generic.IEnumerable expiredAttachedWorkerSelectors = null, System.Collections.Generic.IEnumerable expiredRequestedWorkerSelectors = null, System.DateTimeOffset? scheduledOn = default(System.DateTimeOffset?), string failureReason = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobUnassignedEventData AcsRouterJobUnassignedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string assignmentId = null, string workerId = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobWaitingForActivationEventData AcsRouterJobWaitingForActivationEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, int? priority = default(int?), System.Collections.Generic.IEnumerable expiredAttachedWorkerSelectors = null, System.Collections.Generic.IEnumerable expiredRequestedWorkerSelectors = null, System.DateTimeOffset scheduledOn = default(System.DateTimeOffset), bool unavailableForMatching = false) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobWaitingForActivationEventData AcsRouterJobWaitingForActivationEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, int? priority = default(int?), System.Collections.Generic.IEnumerable expiredAttachedWorkerSelectors = null, System.Collections.Generic.IEnumerable expiredRequestedWorkerSelectors = null, System.DateTimeOffset? scheduledOn = default(System.DateTimeOffset?), bool unavailableForMatching = false) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobWorkerSelectorsExpiredEventData AcsRouterJobWorkerSelectorsExpiredEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, System.Collections.Generic.IEnumerable expiredRequestedWorkerSelectors = null, System.Collections.Generic.IEnumerable expiredAttachedWorkerSelectors = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterQueueDetails AcsRouterQueueDetails(string id = null, string name = null, System.Collections.Generic.IReadOnlyDictionary labels = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerDeletedEventData AcsRouterWorkerDeletedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null) { throw null; } @@ -2486,15 +2322,15 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferAcceptedEventData AcsRouterWorkerOfferAcceptedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null, string assignmentId = null, int? jobPriority = default(int?), System.Collections.Generic.IReadOnlyDictionary workerLabels = null, System.Collections.Generic.IReadOnlyDictionary workerTags = null, System.Collections.Generic.IReadOnlyDictionary jobLabels = null, System.Collections.Generic.IReadOnlyDictionary jobTags = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferDeclinedEventData AcsRouterWorkerOfferDeclinedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferExpiredEventData AcsRouterWorkerOfferExpiredEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferIssuedEventData AcsRouterWorkerOfferIssuedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null, int? jobPriority = default(int?), System.Collections.Generic.IReadOnlyDictionary workerLabels = null, System.DateTimeOffset offeredOn = default(System.DateTimeOffset), System.DateTimeOffset expiresOn = default(System.DateTimeOffset), System.Collections.Generic.IReadOnlyDictionary workerTags = null, System.Collections.Generic.IReadOnlyDictionary jobLabels = null, System.Collections.Generic.IReadOnlyDictionary jobTags = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferIssuedEventData AcsRouterWorkerOfferIssuedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null, int? jobPriority = default(int?), System.Collections.Generic.IReadOnlyDictionary workerLabels = null, System.DateTimeOffset? offeredOn = default(System.DateTimeOffset?), System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary workerTags = null, System.Collections.Generic.IReadOnlyDictionary jobLabels = null, System.Collections.Generic.IReadOnlyDictionary jobTags = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferRevokedEventData AcsRouterWorkerOfferRevokedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerRegisteredEventData AcsRouterWorkerRegisteredEventData(string workerId = null, System.Collections.Generic.IEnumerable queueAssignments = null, System.Collections.Generic.IEnumerable channelConfigurations = null, int? totalCapacity = default(int?), System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerSelector AcsRouterWorkerSelector(string key = null, Azure.Messaging.EventGrid.SystemEvents.AcsRouterLabelOperator labelOperator = default(Azure.Messaging.EventGrid.SystemEvents.AcsRouterLabelOperator), System.BinaryData labelValue = null, double timeToLive = 0, Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerSelectorState selectorState = default(Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerSelectorState), System.DateTimeOffset expirationTime = default(System.DateTimeOffset)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerSelector AcsRouterWorkerSelector(string key = null, Azure.Messaging.EventGrid.SystemEvents.AcsRouterLabelOperator? labelOperator = default(Azure.Messaging.EventGrid.SystemEvents.AcsRouterLabelOperator?), System.BinaryData labelValue = null, double timeToLive = 0, Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerSelectorState? selectorState = default(Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerSelectorState?), System.DateTimeOffset? expirationTime = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerUpdatedEventData AcsRouterWorkerUpdatedEventData(string workerId = null, System.Collections.Generic.IEnumerable queueAssignments = null, System.Collections.Generic.IEnumerable channelConfigurations = null, int? totalCapacity = default(int?), System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, System.Collections.Generic.IEnumerable updatedWorkerProperties = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsSmsDeliveryAttemptProperties AcsSmsDeliveryAttemptProperties(System.DateTimeOffset timestamp = default(System.DateTimeOffset), int? segmentsSucceeded = default(int?), int? segmentsFailed = default(int?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsSmsDeliveryReportReceivedEventData AcsSmsDeliveryReportReceivedEventData(string messageId = null, string from = null, string to = null, string deliveryStatus = null, string deliveryStatusDetails = null, System.Collections.Generic.IEnumerable deliveryAttempts = null, System.DateTimeOffset receivedTimestamp = default(System.DateTimeOffset), string tag = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsSmsDeliveryAttemptProperties AcsSmsDeliveryAttemptProperties(System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), int? segmentsSucceeded = default(int?), int? segmentsFailed = default(int?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsSmsDeliveryReportReceivedEventData AcsSmsDeliveryReportReceivedEventData(string messageId = null, string from = null, string to = null, string deliveryStatus = null, string deliveryStatusDetails = null, System.Collections.Generic.IEnumerable deliveryAttempts = null, System.DateTimeOffset? receivedTimestamp = default(System.DateTimeOffset?), string tag = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsSmsEventBaseProperties AcsSmsEventBaseProperties(string messageId = null, string from = null, string to = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsSmsReceivedEventData AcsSmsReceivedEventData(string messageId = null, string from = null, string to = null, string message = null, System.DateTimeOffset receivedTimestamp = default(System.DateTimeOffset)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsSmsReceivedEventData AcsSmsReceivedEventData(string messageId = null, string from = null, string to = null, string message = null, System.DateTimeOffset? receivedTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsUserDisconnectedEventData AcsUserDisconnectedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel userCommunicationIdentifier = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiDefinitionAddedEventData ApiCenterApiDefinitionAddedEventData(string title = null, string description = null, Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification specification = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiDefinitionUpdatedEventData ApiCenterApiDefinitionUpdatedEventData(string title = null, string description = null, Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification specification = null) { throw null; } @@ -2530,8 +2366,8 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AppConfigurationSnapshotCreatedEventData AppConfigurationSnapshotCreatedEventData(string name = null, string etag = null, string syncToken = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AppConfigurationSnapshotEventData AppConfigurationSnapshotEventData(string name = null, string etag = null, string syncToken = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AppConfigurationSnapshotModifiedEventData AppConfigurationSnapshotModifiedEventData(string name = null, string etag = null, string syncToken = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AppEventTypeDetail AppEventTypeDetail(Azure.Messaging.EventGrid.SystemEvents.AppAction action = default(Azure.Messaging.EventGrid.SystemEvents.AppAction)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AppServicePlanEventTypeDetail AppServicePlanEventTypeDetail(Azure.Messaging.EventGrid.SystemEvents.StampKind stampKind = default(Azure.Messaging.EventGrid.SystemEvents.StampKind), Azure.Messaging.EventGrid.SystemEvents.AppServicePlanAction action = default(Azure.Messaging.EventGrid.SystemEvents.AppServicePlanAction), Azure.Messaging.EventGrid.SystemEvents.AsyncStatus status = default(Azure.Messaging.EventGrid.SystemEvents.AsyncStatus)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AppEventTypeDetail AppEventTypeDetail(Azure.Messaging.EventGrid.SystemEvents.AppAction? action = default(Azure.Messaging.EventGrid.SystemEvents.AppAction?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AppServicePlanEventTypeDetail AppServicePlanEventTypeDetail(Azure.Messaging.EventGrid.SystemEvents.StampKind? stampKind = default(Azure.Messaging.EventGrid.SystemEvents.StampKind?), Azure.Messaging.EventGrid.SystemEvents.AppServicePlanAction? action = default(Azure.Messaging.EventGrid.SystemEvents.AppServicePlanAction?), Azure.Messaging.EventGrid.SystemEvents.AsyncStatus? status = default(Azure.Messaging.EventGrid.SystemEvents.AsyncStatus?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AvsClusterCreatedEventData AvsClusterCreatedEventData(string operationId = null, System.Collections.Generic.IEnumerable addedHostNames = null, System.Collections.Generic.IEnumerable removedHostNames = null, System.Collections.Generic.IEnumerable inMaintenanceHostNames = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AvsClusterDeletedEventData AvsClusterDeletedEventData(string operationId = null, System.Collections.Generic.IEnumerable addedHostNames = null, System.Collections.Generic.IEnumerable removedHostNames = null, System.Collections.Generic.IEnumerable inMaintenanceHostNames = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData AvsClusterEventData(string operationId = null, System.Collections.Generic.IEnumerable addedHostNames = null, System.Collections.Generic.IEnumerable removedHostNames = null, System.Collections.Generic.IEnumerable inMaintenanceHostNames = null) { throw null; } @@ -2547,20 +2383,20 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionFailedEventData AvsScriptExecutionFailedEventData(string operationId = null, string cmdletId = null, System.Collections.Generic.IEnumerable output = null, string failureMessage = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionFinishedEventData AvsScriptExecutionFinishedEventData(string operationId = null, string cmdletId = null, System.Collections.Generic.IEnumerable output = null, System.Collections.Generic.IReadOnlyDictionary namedOutputs = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionStartedEventData AvsScriptExecutionStartedEventData(string operationId = null, string cmdletId = null, System.Collections.Generic.IEnumerable output = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifierModel(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModelKind kind = default(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModelKind), string rawId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationUserIdentifierModel communicationUser = null, Azure.Messaging.EventGrid.SystemEvents.PhoneNumberIdentifierModel phoneNumber = null, Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsUserIdentifierModel microsoftTeamsUser = null, Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsAppIdentifierModel microsoftTeamsApp = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifierModel(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModelKind? kind = default(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModelKind?), string rawId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationUserIdentifierModel communicationUser = null, Azure.Messaging.EventGrid.SystemEvents.PhoneNumberIdentifierModel phoneNumber = null, Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsUserIdentifierModel microsoftTeamsUser = null, Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsAppIdentifierModel microsoftTeamsApp = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.CommunicationUserIdentifierModel CommunicationUserIdentifierModel(string id = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventData ContainerRegistryArtifactEventData(string id = null, System.DateTimeOffset timestamp = default(System.DateTimeOffset), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventData ContainerRegistryArtifactEventData(string id = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventTarget ContainerRegistryArtifactEventTarget(string mediaType = null, long? size = default(long?), string digest = null, string repository = null, string tag = null, string name = null, string version = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryChartDeletedEventData ContainerRegistryChartDeletedEventData(string id = null, System.DateTimeOffset timestamp = default(System.DateTimeOffset), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryChartPushedEventData ContainerRegistryChartPushedEventData(string id = null, System.DateTimeOffset timestamp = default(System.DateTimeOffset), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryChartDeletedEventData ContainerRegistryChartDeletedEventData(string id = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryChartPushedEventData ContainerRegistryChartPushedEventData(string id = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryArtifactEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventActor ContainerRegistryEventActor(string name = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry ContainerRegistryEventConnectedRegistry(string name = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventData ContainerRegistryEventData(string id = null, System.DateTimeOffset timestamp = default(System.DateTimeOffset), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventRequest request = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventActor actor = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventSource source = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventData ContainerRegistryEventData(string id = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventRequest request = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventActor actor = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventSource source = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventRequest ContainerRegistryEventRequest(string id = null, string addr = null, string host = null, string method = null, string useragent = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventSource ContainerRegistryEventSource(string addr = null, string instanceID = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventTarget ContainerRegistryEventTarget(string mediaType = null, long? size = default(long?), string digest = null, long? length = default(long?), string repository = null, string url = null, string tag = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryImageDeletedEventData ContainerRegistryImageDeletedEventData(string id = null, System.DateTimeOffset timestamp = default(System.DateTimeOffset), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventRequest request = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventActor actor = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventSource source = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryImagePushedEventData ContainerRegistryImagePushedEventData(string id = null, System.DateTimeOffset timestamp = default(System.DateTimeOffset), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventRequest request = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventActor actor = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventSource source = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryImageDeletedEventData ContainerRegistryImageDeletedEventData(string id = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventRequest request = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventActor actor = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventSource source = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryImagePushedEventData ContainerRegistryImagePushedEventData(string id = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string action = null, string location = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventTarget target = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventRequest request = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventActor actor = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventSource source = null, Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventConnectedRegistry connectedRegistry = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ContainerServiceClusterSupportEndedEventData ContainerServiceClusterSupportEndedEventData(string kubernetesVersion = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ContainerServiceClusterSupportEndingEventData ContainerServiceClusterSupportEndingEventData(string kubernetesVersion = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ContainerServiceClusterSupportEventData ContainerServiceClusterSupportEventData(string kubernetesVersion = null) { throw null; } @@ -2569,9 +2405,9 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ContainerServiceNodePoolRollingFailedEventData ContainerServiceNodePoolRollingFailedEventData(string nodePoolName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ContainerServiceNodePoolRollingStartedEventData ContainerServiceNodePoolRollingStartedEventData(string nodePoolName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ContainerServiceNodePoolRollingSucceededEventData ContainerServiceNodePoolRollingSucceededEventData(string nodePoolName = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.DataBoxCopyCompletedEventData DataBoxCopyCompletedEventData(string serialNumber = null, Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName stageName = default(Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName), System.DateTimeOffset stageTime = default(System.DateTimeOffset)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.DataBoxCopyStartedEventData DataBoxCopyStartedEventData(string serialNumber = null, Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName stageName = default(Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName), System.DateTimeOffset stageTime = default(System.DateTimeOffset)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.DataBoxOrderCompletedEventData DataBoxOrderCompletedEventData(string serialNumber = null, Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName stageName = default(Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName), System.DateTimeOffset stageTime = default(System.DateTimeOffset)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.DataBoxCopyCompletedEventData DataBoxCopyCompletedEventData(string serialNumber = null, Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName? stageName = default(Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName?), System.DateTimeOffset? stageTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.DataBoxCopyStartedEventData DataBoxCopyStartedEventData(string serialNumber = null, Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName? stageName = default(Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName?), System.DateTimeOffset? stageTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.DataBoxOrderCompletedEventData DataBoxOrderCompletedEventData(string serialNumber = null, Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName? stageName = default(Azure.Messaging.EventGrid.SystemEvents.DataBoxStageName?), System.DateTimeOffset? stageTime = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceConnectionStateEventInfo DeviceConnectionStateEventInfo(string sequenceNumber = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceConnectionStateEventProperties DeviceConnectionStateEventProperties(string deviceId = null, string moduleId = null, string hubName = null, Azure.Messaging.EventGrid.SystemEvents.DeviceConnectionStateEventInfo deviceConnectionStateEventInfo = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceLifeCycleEventProperties DeviceLifeCycleEventProperties(string deviceId = null, string hubName = null, Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfo twin = null) { throw null; } @@ -2581,18 +2417,18 @@ 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.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; } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientSessionConnectedEventData EventGridMQTTClientSessionConnectedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, string clientSessionName = null, long? sequenceNumber = default(long?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientSessionDisconnectedEventData EventGridMQTTClientSessionDisconnectedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, string clientSessionName = null, long? sequenceNumber = default(long?), Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason disconnectionReason = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMQTTClientDisconnectionReason)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.EventHubCaptureFileCreatedEventData EventHubCaptureFileCreatedEventData(string fileurl = null, string fileType = null, string partitionId = null, int? sizeInBytes = default(int?), int? eventCount = default(int?), int? firstSequenceNumber = default(int?), int? lastSequenceNumber = default(int?), System.DateTimeOffset firstEnqueueTime = default(System.DateTimeOffset), System.DateTimeOffset lastEnqueueTime = default(System.DateTimeOffset)) { 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; } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientSessionConnectedEventData EventGridMqttClientSessionConnectedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, string clientSessionName = null, long? sequenceNumber = default(long?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientSessionDisconnectedEventData EventGridMqttClientSessionDisconnectedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, string clientSessionName = null, long? sequenceNumber = default(long?), Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason? disconnectionReason = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDisconnectionReason?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EventHubCaptureFileCreatedEventData EventHubCaptureFileCreatedEventData(string fileurl = null, string fileType = null, string partitionId = null, int? sizeInBytes = default(int?), int? eventCount = default(int?), int? firstSequenceNumber = default(int?), int? lastSequenceNumber = default(int?), System.DateTimeOffset? firstEnqueueTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastEnqueueTime = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.HealthcareDicomImageCreatedEventData HealthcareDicomImageCreatedEventData(string partitionName = null, string imageStudyInstanceUid = null, string imageSeriesInstanceUid = null, string imageSopInstanceUid = null, string serviceHostName = null, long? sequenceNumber = default(long?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.HealthcareDicomImageDeletedEventData HealthcareDicomImageDeletedEventData(string partitionName = null, string imageStudyInstanceUid = null, string imageSeriesInstanceUid = null, string imageSopInstanceUid = null, string serviceHostName = null, long? sequenceNumber = default(long?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.HealthcareDicomImageUpdatedEventData HealthcareDicomImageUpdatedEventData(string partitionName = null, string imageStudyInstanceUid = null, string imageSeriesInstanceUid = null, string imageSopInstanceUid = null, string serviceHostName = null, long? sequenceNumber = default(long?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceCreatedEventData HealthcareFhirResourceCreatedEventData(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType fhirResourceType = default(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType), string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = default(long?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceDeletedEventData HealthcareFhirResourceDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType fhirResourceType = default(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType), string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = default(long?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceUpdatedEventData HealthcareFhirResourceUpdatedEventData(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType fhirResourceType = default(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType), string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = default(long?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceCreatedEventData HealthcareFhirResourceCreatedEventData(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType? fhirResourceType = default(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType?), string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = default(long?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceDeletedEventData HealthcareFhirResourceDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType? fhirResourceType = default(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType?), string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = default(long?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceUpdatedEventData HealthcareFhirResourceUpdatedEventData(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType? fhirResourceType = default(Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType?), string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = default(long?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.IotHubDeviceConnectedEventData IotHubDeviceConnectedEventData(string deviceId = null, string moduleId = null, string hubName = null, Azure.Messaging.EventGrid.SystemEvents.DeviceConnectionStateEventInfo deviceConnectionStateEventInfo = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.IotHubDeviceCreatedEventData IotHubDeviceCreatedEventData(string deviceId = null, string hubName = null, Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfo twin = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.IotHubDeviceDeletedEventData IotHubDeviceDeletedEventData(string deviceId = null, string hubName = null, Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfo twin = null) { throw null; } @@ -2608,7 +2444,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.KeyVaultSecretExpiredEventData KeyVaultSecretExpiredEventData(string id = null, string vaultName = null, string objectType = null, string objectName = null, string version = null, float? nbf = default(float?), float? exp = default(float?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.KeyVaultSecretNearExpiryEventData KeyVaultSecretNearExpiryEventData(string id = null, string vaultName = null, string objectType = null, string objectName = null, string version = null, float? nbf = default(float?), float? exp = default(float?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.KeyVaultSecretNewVersionCreatedEventData KeyVaultSecretNewVersionCreatedEventData(string id = null, string vaultName = null, string objectType = null, string objectName = null, string version = null, float? nbf = default(float?), float? exp = default(float?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesDatasetDriftDetectedEventData MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId = null, string dataDriftName = null, string runId = null, string baseDatasetId = null, string targetDatasetId = null, double? driftCoefficient = default(double?), System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset endTime = default(System.DateTimeOffset)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesDatasetDriftDetectedEventData MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId = null, string dataDriftName = null, string runId = null, string baseDatasetId = null, string targetDatasetId = null, double? driftCoefficient = default(double?), System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesModelDeployedEventData MachineLearningServicesModelDeployedEventData(string serviceName = null, string serviceComputeType = null, string modelIds = null, System.Collections.Generic.IReadOnlyDictionary serviceTags = null, System.Collections.Generic.IReadOnlyDictionary serviceProperties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesModelRegisteredEventData MachineLearningServicesModelRegisteredEventData(string modelName = null, string modelVersion = null, System.Collections.Generic.IReadOnlyDictionary modelTags = null, System.Collections.Generic.IReadOnlyDictionary modelProperties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesRunCompletedEventData MachineLearningServicesRunCompletedEventData(string experimentId = null, string experimentName = null, string runId = null, string runType = null, System.Collections.Generic.IReadOnlyDictionary runTags = null, System.Collections.Generic.IReadOnlyDictionary runProperties = null) { throw null; } @@ -2618,25 +2454,25 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceExitedEventData MapsGeofenceExitedEventData(System.Collections.Generic.IEnumerable expiredGeofenceGeometryId = null, System.Collections.Generic.IEnumerable geometries = null, System.Collections.Generic.IEnumerable invalidPeriodGeofenceGeometryId = null, bool? isEventPublished = default(bool?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceGeometry MapsGeofenceGeometry(string deviceId = null, float? distance = default(float?), string geometryId = null, float? nearestLat = default(float?), float? nearestLon = default(float?), string udId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceResultEventData MapsGeofenceResultEventData(System.Collections.Generic.IEnumerable expiredGeofenceGeometryId = null, System.Collections.Generic.IEnumerable geometries = null, System.Collections.Generic.IEnumerable invalidPeriodGeofenceGeometryId = null, bool? isEventPublished = default(bool?)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobCanceledEventData MediaJobCanceledEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobState state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), System.Collections.Generic.IReadOnlyDictionary correlationData = null, System.Collections.Generic.IEnumerable outputs = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobCancelingEventData MediaJobCancelingEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobState state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), System.Collections.Generic.IReadOnlyDictionary correlationData = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobError MediaJobError(Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCode code = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCode), string message = null, Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCategory category = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCategory), Azure.Messaging.EventGrid.SystemEvents.MediaJobRetry retry = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobRetry), System.Collections.Generic.IEnumerable details = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobCanceledEventData MediaJobCanceledEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobState? state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), System.Collections.Generic.IReadOnlyDictionary correlationData = null, System.Collections.Generic.IEnumerable outputs = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobCancelingEventData MediaJobCancelingEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobState? state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), System.Collections.Generic.IReadOnlyDictionary correlationData = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobError MediaJobError(Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCode? code = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCode?), string message = null, Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCategory? category = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCategory?), Azure.Messaging.EventGrid.SystemEvents.MediaJobRetry? retry = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobRetry?), System.Collections.Generic.IEnumerable details = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorDetail MediaJobErrorDetail(string code = null, string message = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobErroredEventData MediaJobErroredEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobState state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), System.Collections.Generic.IReadOnlyDictionary correlationData = null, System.Collections.Generic.IEnumerable outputs = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobFinishedEventData MediaJobFinishedEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobState state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), System.Collections.Generic.IReadOnlyDictionary correlationData = null, System.Collections.Generic.IEnumerable outputs = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput MediaJobOutput(string odataType = null, Azure.Messaging.EventGrid.SystemEvents.MediaJobError error = null, string label = null, long progress = (long)0, Azure.Messaging.EventGrid.SystemEvents.MediaJobState state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputAsset MediaJobOutputAsset(Azure.Messaging.EventGrid.SystemEvents.MediaJobError error = null, string label = null, long progress = (long)0, Azure.Messaging.EventGrid.SystemEvents.MediaJobState state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), string assetName = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputCanceledEventData MediaJobOutputCanceledEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputCancelingEventData MediaJobOutputCancelingEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputErroredEventData MediaJobOutputErroredEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputFinishedEventData MediaJobOutputFinishedEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputProcessingEventData MediaJobOutputProcessingEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobErroredEventData MediaJobErroredEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobState? state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), System.Collections.Generic.IReadOnlyDictionary correlationData = null, System.Collections.Generic.IEnumerable outputs = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobFinishedEventData MediaJobFinishedEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobState? state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), System.Collections.Generic.IReadOnlyDictionary correlationData = null, System.Collections.Generic.IEnumerable outputs = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput MediaJobOutput(string odataType = null, Azure.Messaging.EventGrid.SystemEvents.MediaJobError error = null, string label = null, long progress = (long)0, Azure.Messaging.EventGrid.SystemEvents.MediaJobState? state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputAsset MediaJobOutputAsset(Azure.Messaging.EventGrid.SystemEvents.MediaJobError error = null, string label = null, long progress = (long)0, Azure.Messaging.EventGrid.SystemEvents.MediaJobState? state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), string assetName = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputCanceledEventData MediaJobOutputCanceledEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputCancelingEventData MediaJobOutputCancelingEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputErroredEventData MediaJobOutputErroredEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputFinishedEventData MediaJobOutputFinishedEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputProcessingEventData MediaJobOutputProcessingEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputProgressEventData MediaJobOutputProgressEventData(string label = null, long? progress = default(long?), System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputScheduledEventData MediaJobOutputScheduledEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputStateChangeEventData MediaJobOutputStateChangeEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobProcessingEventData MediaJobProcessingEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobState state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), System.Collections.Generic.IReadOnlyDictionary correlationData = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobScheduledEventData MediaJobScheduledEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobState state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), System.Collections.Generic.IReadOnlyDictionary correlationData = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MediaJobStateChangeEventData MediaJobStateChangeEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), Azure.Messaging.EventGrid.SystemEvents.MediaJobState state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState), System.Collections.Generic.IReadOnlyDictionary correlationData = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputScheduledEventData MediaJobOutputScheduledEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputStateChangeEventData MediaJobOutputStateChangeEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput output = null, System.Collections.Generic.IReadOnlyDictionary jobCorrelationData = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobProcessingEventData MediaJobProcessingEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobState? state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), System.Collections.Generic.IReadOnlyDictionary correlationData = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobScheduledEventData MediaJobScheduledEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobState? state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), System.Collections.Generic.IReadOnlyDictionary correlationData = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MediaJobStateChangeEventData MediaJobStateChangeEventData(Azure.Messaging.EventGrid.SystemEvents.MediaJobState? previousState = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), Azure.Messaging.EventGrid.SystemEvents.MediaJobState? state = default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState?), System.Collections.Generic.IReadOnlyDictionary correlationData = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventChannelArchiveHeartbeatEventData MediaLiveEventChannelArchiveHeartbeatEventData(string channelLatencyMs = null, string latencyResultCode = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventConnectionRejectedEventData MediaLiveEventConnectionRejectedEventData(string ingestUrl = null, string streamId = null, string encoderIp = null, string encoderPort = null, string resultCode = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventEncoderConnectedEventData MediaLiveEventEncoderConnectedEventData(string ingestUrl = null, string streamId = null, string encoderIp = null, string encoderPort = null) { throw null; } @@ -2647,16 +2483,16 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventIncomingVideoStreamsOutOfSyncEventData MediaLiveEventIncomingVideoStreamsOutOfSyncEventData(string firstTimestamp = null, string firstDuration = null, string secondTimestamp = null, string secondDuration = null, string timescale = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventIngestHeartbeatEventData MediaLiveEventIngestHeartbeatEventData(string trackType = null, string trackName = null, string transcriptionLanguage = null, string transcriptionState = null, long? bitrate = default(long?), long? incomingBitrate = default(long?), string ingestDriftValue = null, string lastFragmentArrivalTime = null, string lastTimestamp = null, string timescale = null, long? overlapCount = default(long?), long? discontinuityCount = default(long?), long? nonincreasingCount = default(long?), bool? unexpectedBitrate = default(bool?), string state = null, bool? healthy = default(bool?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventTrackDiscontinuityDetectedEventData MediaLiveEventTrackDiscontinuityDetectedEventData(string trackType = null, string trackName = null, long? bitrate = default(long?), string previousTimestamp = null, string newTimestamp = null, string timescale = null, string discontinuityGap = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsAppIdentifierModel MicrosoftTeamsAppIdentifierModel(string appId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel cloud = default(Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel)) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsUserIdentifierModel MicrosoftTeamsUserIdentifierModel(string userId = null, bool? isAnonymous = default(bool?), Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel cloud = default(Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsAppIdentifierModel MicrosoftTeamsAppIdentifierModel(string appId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel? cloud = default(Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsUserIdentifierModel MicrosoftTeamsUserIdentifierModel(string userId = null, bool? isAnonymous = default(bool?), Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel? cloud = default(Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.PhoneNumberIdentifierModel PhoneNumberIdentifierModel(string value = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.PolicyInsightsPolicyStateChangedEventData PolicyInsightsPolicyStateChangedEventData(System.DateTimeOffset timestamp = default(System.DateTimeOffset), string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.PolicyInsightsPolicyStateCreatedEventData PolicyInsightsPolicyStateCreatedEventData(System.DateTimeOffset timestamp = default(System.DateTimeOffset), string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.PolicyInsightsPolicyStateDeletedEventData PolicyInsightsPolicyStateDeletedEventData(System.DateTimeOffset timestamp = default(System.DateTimeOffset), string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.RedisExportRDBCompletedEventData RedisExportRDBCompletedEventData(System.DateTimeOffset timestamp = default(System.DateTimeOffset), string name = null, string status = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.RedisImportRDBCompletedEventData RedisImportRDBCompletedEventData(System.DateTimeOffset timestamp = default(System.DateTimeOffset), string name = null, string status = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.RedisPatchingCompletedEventData RedisPatchingCompletedEventData(System.DateTimeOffset timestamp = default(System.DateTimeOffset), string name = null, string status = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.RedisScalingCompletedEventData RedisScalingCompletedEventData(System.DateTimeOffset timestamp = default(System.DateTimeOffset), string name = null, string status = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.PolicyInsightsPolicyStateChangedEventData PolicyInsightsPolicyStateChangedEventData(System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.PolicyInsightsPolicyStateCreatedEventData PolicyInsightsPolicyStateCreatedEventData(System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.PolicyInsightsPolicyStateDeletedEventData PolicyInsightsPolicyStateDeletedEventData(System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.RedisExportRdbCompletedEventData RedisExportRdbCompletedEventData(System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string name = null, string status = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.RedisImportRdbCompletedEventData RedisImportRdbCompletedEventData(System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string name = null, string status = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.RedisPatchingCompletedEventData RedisPatchingCompletedEventData(System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string name = null, string status = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.RedisScalingCompletedEventData RedisScalingCompletedEventData(System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string name = null, string status = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceActionCancelEventData ResourceActionCancelEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, Azure.Messaging.EventGrid.SystemEvents.ResourceAuthorization authorization = null, System.Collections.Generic.IReadOnlyDictionary claims = null, string correlationId = null, Azure.Messaging.EventGrid.SystemEvents.ResourceHttpRequest httpRequest = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceActionFailureEventData ResourceActionFailureEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, Azure.Messaging.EventGrid.SystemEvents.ResourceAuthorization authorization = null, System.Collections.Generic.IReadOnlyDictionary claims = null, string correlationId = null, Azure.Messaging.EventGrid.SystemEvents.ResourceHttpRequest httpRequest = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceActionSuccessEventData ResourceActionSuccessEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, Azure.Messaging.EventGrid.SystemEvents.ResourceAuthorization authorization = null, System.Collections.Generic.IReadOnlyDictionary claims = null, string correlationId = null, Azure.Messaging.EventGrid.SystemEvents.ResourceHttpRequest httpRequest = null) { throw null; } @@ -2665,9 +2501,10 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ResourceDeleteFailureEventData ResourceDeleteFailureEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, Azure.Messaging.EventGrid.SystemEvents.ResourceAuthorization authorization = null, System.Collections.Generic.IReadOnlyDictionary claims = null, string correlationId = null, Azure.Messaging.EventGrid.SystemEvents.ResourceHttpRequest httpRequest = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceDeleteSuccessEventData ResourceDeleteSuccessEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, Azure.Messaging.EventGrid.SystemEvents.ResourceAuthorization authorization = null, System.Collections.Generic.IReadOnlyDictionary claims = null, string correlationId = null, Azure.Messaging.EventGrid.SystemEvents.ResourceHttpRequest httpRequest = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceHttpRequest ResourceHttpRequest(string clientRequestId = null, string clientIpAddress = null, string method = null, string url = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsContainerServiceEventResourcesScheduledEventData ResourceNotificationsContainerServiceEventResourcesScheduledEventData(Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails resourceDetails = null, Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsHealthResourcesAnnotatedEventData ResourceNotificationsHealthResourcesAnnotatedEventData(Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails resourceDetails = null, Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData(Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails resourceDetails = null, Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails ResourceNotificationsOperationalDetails(System.DateTimeOffset resourceEventTime = default(System.DateTimeOffset)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails ResourceNotificationsOperationalDetails(System.DateTimeOffset? resourceEventTime = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceDeletedDetails ResourceNotificationsResourceDeletedDetails(string id = null, string name = null, string type = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceDeletedEventData ResourceNotificationsResourceDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceDeletedDetails resourceDetails = null, Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails operationalDetails = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceManagementCreatedOrUpdatedEventData ResourceNotificationsResourceManagementCreatedOrUpdatedEventData(Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails resourceDetails = null, Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) { throw null; } @@ -2681,23 +2518,23 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ServiceBusActiveMessagesAvailableWithNoListenersEventData ServiceBusActiveMessagesAvailableWithNoListenersEventData(string namespaceName = null, string requestUri = null, string entityType = null, string queueName = null, string topicName = null, string subscriptionName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData(string namespaceName = null, string requestUri = null, string entityType = null, string queueName = null, string topicName = null, string subscriptionName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ServiceBusDeadletterMessagesAvailableWithNoListenersEventData ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(string namespaceName = null, string requestUri = null, string entityType = null, string queueName = null, string topicName = null, string subscriptionName = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.SignalRServiceClientConnectionConnectedEventData SignalRServiceClientConnectionConnectedEventData(System.DateTimeOffset timestamp = default(System.DateTimeOffset), string hubName = null, string connectionId = null, string userId = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.SignalRServiceClientConnectionDisconnectedEventData SignalRServiceClientConnectionDisconnectedEventData(System.DateTimeOffset timestamp = default(System.DateTimeOffset), string hubName = null, string connectionId = null, string userId = null, string errorMessage = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.SignalRServiceClientConnectionConnectedEventData SignalRServiceClientConnectionConnectedEventData(System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string hubName = null, string connectionId = null, string userId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.SignalRServiceClientConnectionDisconnectedEventData SignalRServiceClientConnectionDisconnectedEventData(System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string hubName = null, string connectionId = null, string userId = null, string errorMessage = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.StorageAsyncOperationInitiatedEventData StorageAsyncOperationInitiatedEventData(string api = null, string clientRequestId = null, string requestId = null, string contentType = null, long? contentLength = default(long?), string blobType = null, string url = null, string sequencer = null, string identity = null, System.Collections.Generic.IReadOnlyDictionary storageDiagnostics = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobCreatedEventData StorageBlobCreatedEventData(string api = null, string clientRequestId = null, string requestId = null, string eTag = null, string contentType = null, long? contentLength = default(long?), long? contentOffset = default(long?), string blobType = null, string url = null, string sequencer = null, string identity = null, System.Collections.Generic.IReadOnlyDictionary storageDiagnostics = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobCreatedEventData StorageBlobCreatedEventData(string api = null, string clientRequestId = null, string requestId = null, string eTag = null, string contentType = null, long? contentLength = default(long?), long? contentOffset = default(long?), string blobType = null, Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier accessTier = default(Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier), string url = null, string sequencer = null, string identity = null, System.Collections.Generic.IReadOnlyDictionary storageDiagnostics = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobDeletedEventData StorageBlobDeletedEventData(string api = null, string clientRequestId = null, string requestId = null, string contentType = null, string blobType = null, string url = null, string sequencer = null, string identity = null, System.Collections.Generic.IReadOnlyDictionary storageDiagnostics = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobInventoryPolicyCompletedEventData StorageBlobInventoryPolicyCompletedEventData(System.DateTimeOffset scheduleDateTime = default(System.DateTimeOffset), string accountName = null, string ruleName = null, string policyRunStatus = null, string policyRunStatusMessage = null, string policyRunId = null, string manifestBlobUrl = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobInventoryPolicyCompletedEventData StorageBlobInventoryPolicyCompletedEventData(System.DateTimeOffset? scheduleDateTime = default(System.DateTimeOffset?), string accountName = null, string ruleName = null, string policyRunStatus = null, string policyRunStatusMessage = null, string policyRunId = null, string manifestBlobUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobRenamedEventData StorageBlobRenamedEventData(string api = null, string clientRequestId = null, string requestId = null, string sourceUrl = null, string destinationUrl = null, string sequencer = null, string identity = null, System.Collections.Generic.IReadOnlyDictionary storageDiagnostics = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobTierChangedEventData StorageBlobTierChangedEventData(string api = null, string clientRequestId = null, string requestId = null, string contentType = null, long? contentLength = default(long?), string blobType = null, string url = null, string sequencer = null, string identity = null, System.Collections.Generic.IReadOnlyDictionary storageDiagnostics = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobTierChangedEventData StorageBlobTierChangedEventData(string api = null, string clientRequestId = null, string requestId = null, string contentType = null, long? contentLength = default(long?), string blobType = null, Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier accessTier = default(Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier), Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier previousTier = default(Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier), string url = null, string sequencer = null, string identity = null, System.Collections.Generic.IReadOnlyDictionary storageDiagnostics = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.StorageDirectoryCreatedEventData StorageDirectoryCreatedEventData(string api = null, string clientRequestId = null, string requestId = null, string eTag = null, string url = null, string sequencer = null, string identity = null, System.Collections.Generic.IReadOnlyDictionary storageDiagnostics = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.StorageDirectoryDeletedEventData StorageDirectoryDeletedEventData(string api = null, string clientRequestId = null, string requestId = null, string url = null, string recursive = null, string sequencer = null, string identity = null, System.Collections.Generic.IReadOnlyDictionary storageDiagnostics = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.StorageDirectoryRenamedEventData StorageDirectoryRenamedEventData(string api = null, string clientRequestId = null, string requestId = null, string sourceUrl = null, string destinationUrl = null, string sequencer = null, string identity = null, System.Collections.Generic.IReadOnlyDictionary storageDiagnostics = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail StorageLifecyclePolicyActionSummaryDetail(long? totalObjectsCount = default(long?), long? successCount = default(long?), string errorList = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyCompletedEventData StorageLifecyclePolicyCompletedEventData(string scheduleTime = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail deleteSummary = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedEventData StorageTaskAssignmentCompletedEventData(Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus status = default(Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus), System.DateTimeOffset completedOn = default(System.DateTimeOffset), string taskExecutionId = null, string taskName = null, System.Uri summaryReportBlobUri = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentQueuedEventData StorageTaskAssignmentQueuedEventData(System.DateTimeOffset queuedOn = default(System.DateTimeOffset), string taskExecutionId = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedEventData StorageTaskCompletedEventData(Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedStatus status = default(Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedStatus), System.DateTimeOffset completedDateTime = default(System.DateTimeOffset), string taskExecutionId = null, string taskName = null, System.Uri summaryReportBlobUrl = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskQueuedEventData StorageTaskQueuedEventData(System.DateTimeOffset queuedDateTime = default(System.DateTimeOffset), string taskExecutionId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyCompletedEventData StorageLifecyclePolicyCompletedEventData(string scheduleTime = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail deleteSummary = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail tierToColdSummary = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedEventData StorageTaskAssignmentCompletedEventData(Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus? status = default(Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), string taskExecutionId = null, string taskName = null, System.Uri summaryReportBlobUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentQueuedEventData StorageTaskAssignmentQueuedEventData(System.DateTimeOffset? queuedOn = default(System.DateTimeOffset?), string taskExecutionId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedEventData StorageTaskCompletedEventData(Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedStatus? status = default(Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedStatus?), System.DateTimeOffset? completedDateTime = default(System.DateTimeOffset?), string taskExecutionId = null, string taskName = null, System.Uri summaryReportBlobUrl = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskQueuedEventData StorageTaskQueuedEventData(System.DateTimeOffset? queuedDateTime = default(System.DateTimeOffset?), string taskExecutionId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.SubscriptionDeletedEventData SubscriptionDeletedEventData(string eventSubscriptionId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.SubscriptionValidationEventData SubscriptionValidationEventData(string validationCode = null, string validationUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.SubscriptionValidationResponse SubscriptionValidationResponse(string validationResponse = null) { throw null; } @@ -2722,13 +2559,12 @@ internal EventHubCaptureFileCreatedEventData() { } public int? EventCount { get { throw null; } } public string FileType { get { throw null; } } public string Fileurl { get { throw null; } } - public System.DateTimeOffset FirstEnqueueTime { get { throw null; } } + public System.DateTimeOffset? FirstEnqueueTime { get { throw null; } } public int? FirstSequenceNumber { get { throw null; } } - public System.DateTimeOffset LastEnqueueTime { get { throw null; } } + public System.DateTimeOffset? LastEnqueueTime { get { throw null; } } public int? LastSequenceNumber { get { throw null; } } public string PartitionId { get { throw null; } } public int? SizeInBytes { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.EventHubCaptureFileCreatedEventData 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.EventHubCaptureFileCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2744,7 +2580,6 @@ internal HealthcareDicomImageCreatedEventData() { } public string PartitionName { get { throw null; } } public long? SequenceNumber { get { throw null; } } public string ServiceHostName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.HealthcareDicomImageCreatedEventData 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.HealthcareDicomImageCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2760,7 +2595,6 @@ internal HealthcareDicomImageDeletedEventData() { } public string PartitionName { get { throw null; } } public long? SequenceNumber { get { throw null; } } public string ServiceHostName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.HealthcareDicomImageDeletedEventData 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.HealthcareDicomImageDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2776,7 +2610,6 @@ internal HealthcareDicomImageUpdatedEventData() { } public string PartitionName { get { throw null; } } public long? SequenceNumber { get { throw null; } } public string ServiceHostName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.HealthcareDicomImageUpdatedEventData 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.HealthcareDicomImageUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2787,10 +2620,9 @@ public partial class HealthcareFhirResourceCreatedEventData : System.ClientModel { internal HealthcareFhirResourceCreatedEventData() { } public string FhirResourceId { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType FhirResourceType { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType? FhirResourceType { get { throw null; } } public long? FhirResourceVersionId { get { throw null; } } public string FhirServiceHostName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceCreatedEventData 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.HealthcareFhirResourceCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2801,10 +2633,9 @@ public partial class HealthcareFhirResourceDeletedEventData : System.ClientModel { internal HealthcareFhirResourceDeletedEventData() { } public string FhirResourceId { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType FhirResourceType { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType? FhirResourceType { get { throw null; } } public long? FhirResourceVersionId { get { throw null; } } public string FhirServiceHostName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceDeletedEventData 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.HealthcareFhirResourceDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2992,10 +2823,9 @@ public partial class HealthcareFhirResourceUpdatedEventData : System.ClientModel { internal HealthcareFhirResourceUpdatedEventData() { } public string FhirResourceId { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType FhirResourceType { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceType? FhirResourceType { get { throw null; } } public long? FhirResourceVersionId { get { throw null; } } public string FhirServiceHostName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.HealthcareFhirResourceUpdatedEventData 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.HealthcareFhirResourceUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3005,7 +2835,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class IotHubDeviceConnectedEventData : Azure.Messaging.EventGrid.SystemEvents.DeviceConnectionStateEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal IotHubDeviceConnectedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.IotHubDeviceConnectedEventData 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.IotHubDeviceConnectedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3015,7 +2844,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class IotHubDeviceCreatedEventData : Azure.Messaging.EventGrid.SystemEvents.DeviceLifeCycleEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal IotHubDeviceCreatedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.IotHubDeviceCreatedEventData 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.IotHubDeviceCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3025,7 +2853,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class IotHubDeviceDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.DeviceLifeCycleEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal IotHubDeviceDeletedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.IotHubDeviceDeletedEventData 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.IotHubDeviceDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3035,7 +2862,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class IotHubDeviceDisconnectedEventData : Azure.Messaging.EventGrid.SystemEvents.DeviceConnectionStateEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal IotHubDeviceDisconnectedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.IotHubDeviceDisconnectedEventData 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.IotHubDeviceDisconnectedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3045,7 +2871,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class IotHubDeviceTelemetryEventData : Azure.Messaging.EventGrid.SystemEvents.DeviceTelemetryEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal IotHubDeviceTelemetryEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.IotHubDeviceTelemetryEventData 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.IotHubDeviceTelemetryEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3062,7 +2887,6 @@ internal KeyVaultAccessPolicyChangedEventData() { } public string ObjectType { get { throw null; } } public string VaultName { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.KeyVaultAccessPolicyChangedEventData 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.KeyVaultAccessPolicyChangedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3079,7 +2903,6 @@ internal KeyVaultCertificateExpiredEventData() { } public string ObjectType { get { throw null; } } public string VaultName { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.KeyVaultCertificateExpiredEventData 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.KeyVaultCertificateExpiredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3096,7 +2919,6 @@ internal KeyVaultCertificateNearExpiryEventData() { } public string ObjectType { get { throw null; } } public string VaultName { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.KeyVaultCertificateNearExpiryEventData 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.KeyVaultCertificateNearExpiryEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3113,7 +2935,6 @@ internal KeyVaultCertificateNewVersionCreatedEventData() { } public string ObjectType { get { throw null; } } public string VaultName { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.KeyVaultCertificateNewVersionCreatedEventData 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.KeyVaultCertificateNewVersionCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3130,7 +2951,6 @@ internal KeyVaultKeyExpiredEventData() { } public string ObjectType { get { throw null; } } public string VaultName { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.KeyVaultKeyExpiredEventData 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.KeyVaultKeyExpiredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3147,7 +2967,6 @@ internal KeyVaultKeyNearExpiryEventData() { } public string ObjectType { get { throw null; } } public string VaultName { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.KeyVaultKeyNearExpiryEventData 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.KeyVaultKeyNearExpiryEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3164,7 +2983,6 @@ internal KeyVaultKeyNewVersionCreatedEventData() { } public string ObjectType { get { throw null; } } public string VaultName { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.KeyVaultKeyNewVersionCreatedEventData 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.KeyVaultKeyNewVersionCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3181,7 +2999,6 @@ internal KeyVaultSecretExpiredEventData() { } public string ObjectType { get { throw null; } } public string VaultName { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.KeyVaultSecretExpiredEventData 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.KeyVaultSecretExpiredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3198,7 +3015,6 @@ internal KeyVaultSecretNearExpiryEventData() { } public string ObjectType { get { throw null; } } public string VaultName { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.KeyVaultSecretNearExpiryEventData 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.KeyVaultSecretNearExpiryEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3215,7 +3031,6 @@ internal KeyVaultSecretNewVersionCreatedEventData() { } public string ObjectType { get { throw null; } } public string VaultName { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.KeyVaultSecretNewVersionCreatedEventData 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.KeyVaultSecretNewVersionCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3229,11 +3044,10 @@ internal MachineLearningServicesDatasetDriftDetectedEventData() { } public string DataDriftId { get { throw null; } } public string DataDriftName { get { throw null; } } public double? DriftCoefficient { get { throw null; } } - public System.DateTimeOffset EndTime { get { throw null; } } + public System.DateTimeOffset? EndTime { get { throw null; } } public string RunId { get { throw null; } } - public System.DateTimeOffset StartTime { get { throw null; } } + public System.DateTimeOffset? StartTime { get { throw null; } } public string TargetDatasetId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesDatasetDriftDetectedEventData 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.MachineLearningServicesDatasetDriftDetectedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3248,7 +3062,6 @@ internal MachineLearningServicesModelDeployedEventData() { } public string ServiceName { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary ServiceProperties { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary ServiceTags { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesModelDeployedEventData 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.MachineLearningServicesModelDeployedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3262,7 +3075,6 @@ internal MachineLearningServicesModelRegisteredEventData() { } public System.Collections.Generic.IReadOnlyDictionary ModelProperties { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary ModelTags { get { throw null; } } public string ModelVersion { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesModelRegisteredEventData 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.MachineLearningServicesModelRegisteredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3278,7 +3090,6 @@ internal MachineLearningServicesRunCompletedEventData() { } public System.Collections.Generic.IReadOnlyDictionary RunProperties { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary RunTags { get { throw null; } } public string RunType { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesRunCompletedEventData 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.MachineLearningServicesRunCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3295,7 +3106,6 @@ internal MachineLearningServicesRunStatusChangedEventData() { } public string RunStatus { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary RunTags { get { throw null; } } public string RunType { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesRunStatusChangedEventData 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.MachineLearningServicesRunStatusChangedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3305,7 +3115,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MapsGeofenceEnteredEventData : Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MapsGeofenceEnteredEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceEnteredEventData 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.MapsGeofenceEnteredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3319,7 +3128,6 @@ internal MapsGeofenceEventProperties() { } public System.Collections.Generic.IReadOnlyList Geometries { get { throw null; } } public System.Collections.Generic.IReadOnlyList InvalidPeriodGeofenceGeometryId { get { throw null; } } public bool? IsEventPublished { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceEventProperties 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.MapsGeofenceEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3329,7 +3137,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MapsGeofenceExitedEventData : Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MapsGeofenceExitedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceExitedEventData 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.MapsGeofenceExitedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3345,7 +3152,6 @@ internal MapsGeofenceGeometry() { } public float? NearestLat { get { throw null; } } public float? NearestLon { get { throw null; } } public string UdId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceGeometry 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.MapsGeofenceGeometry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3355,7 +3161,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MapsGeofenceResultEventData : Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MapsGeofenceResultEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceResultEventData 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.MapsGeofenceResultEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3366,7 +3171,6 @@ public partial class MediaJobCanceledEventData : Azure.Messaging.EventGrid.Syste { internal MediaJobCanceledEventData() { } public System.Collections.Generic.IReadOnlyList Outputs { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobCanceledEventData 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.MediaJobCanceledEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3376,7 +3180,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class MediaJobCancelingEventData : Azure.Messaging.EventGrid.SystemEvents.MediaJobStateChangeEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MediaJobCancelingEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobCancelingEventData 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.MediaJobCancelingEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3386,12 +3189,11 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class MediaJobError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MediaJobError() { } - public Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCategory Category { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCode Code { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCategory? Category { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorCode? Code { get { throw null; } } public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } public string Message { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.MediaJobRetry Retry { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.MediaJobRetry? Retry { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.MediaJobError 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.MediaJobError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3451,7 +3253,6 @@ public partial class MediaJobErrorDetail : System.ClientModel.Primitives.IJsonMo internal MediaJobErrorDetail() { } public string Code { get { throw null; } } public string Message { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorDetail 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.MediaJobErrorDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3462,7 +3263,6 @@ public partial class MediaJobErroredEventData : Azure.Messaging.EventGrid.System { internal MediaJobErroredEventData() { } public System.Collections.Generic.IReadOnlyList Outputs { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobErroredEventData 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.MediaJobErroredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3473,7 +3273,6 @@ public partial class MediaJobFinishedEventData : Azure.Messaging.EventGrid.Syste { internal MediaJobFinishedEventData() { } public System.Collections.Generic.IReadOnlyList Outputs { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobFinishedEventData 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.MediaJobFinishedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3482,12 +3281,11 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write } public abstract partial class MediaJobOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - protected MediaJobOutput(Azure.Messaging.EventGrid.SystemEvents.MediaJobError error, long progress, Azure.Messaging.EventGrid.SystemEvents.MediaJobState state) { } + protected MediaJobOutput(Azure.Messaging.EventGrid.SystemEvents.MediaJobError error, long progress) { } public Azure.Messaging.EventGrid.SystemEvents.MediaJobError Error { get { throw null; } } public string Label { get { throw null; } } public long Progress { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.MediaJobState State { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.MediaJobState? State { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput 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.MediaJobOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3496,9 +3294,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class MediaJobOutputAsset : Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal MediaJobOutputAsset() : base (default(Azure.Messaging.EventGrid.SystemEvents.MediaJobError), default(long), default(Azure.Messaging.EventGrid.SystemEvents.MediaJobState)) { } + internal MediaJobOutputAsset() : base (default(Azure.Messaging.EventGrid.SystemEvents.MediaJobError), default(long)) { } public string AssetName { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputAsset 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.MediaJobOutputAsset System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3508,7 +3305,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class MediaJobOutputCanceledEventData : Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputStateChangeEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MediaJobOutputCanceledEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputCanceledEventData 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.MediaJobOutputCanceledEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3518,7 +3314,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class MediaJobOutputCancelingEventData : Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputStateChangeEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MediaJobOutputCancelingEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputCancelingEventData 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.MediaJobOutputCancelingEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3528,7 +3323,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class MediaJobOutputErroredEventData : Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputStateChangeEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MediaJobOutputErroredEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputErroredEventData 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.MediaJobOutputErroredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3538,7 +3332,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class MediaJobOutputFinishedEventData : Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputStateChangeEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MediaJobOutputFinishedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputFinishedEventData 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.MediaJobOutputFinishedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3548,7 +3341,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class MediaJobOutputProcessingEventData : Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputStateChangeEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MediaJobOutputProcessingEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputProcessingEventData 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.MediaJobOutputProcessingEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3561,7 +3353,6 @@ internal MediaJobOutputProgressEventData() { } public System.Collections.Generic.IReadOnlyDictionary JobCorrelationData { get { throw null; } } public string Label { get { throw null; } } public long? Progress { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputProgressEventData 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.MediaJobOutputProgressEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3571,7 +3362,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MediaJobOutputScheduledEventData : Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputStateChangeEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MediaJobOutputScheduledEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputScheduledEventData 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.MediaJobOutputScheduledEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3583,8 +3373,7 @@ public partial class MediaJobOutputStateChangeEventData : System.ClientModel.Pri internal MediaJobOutputStateChangeEventData() { } public System.Collections.Generic.IReadOnlyDictionary JobCorrelationData { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.MediaJobOutput Output { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.MediaJobState PreviousState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.MediaJobState? PreviousState { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputStateChangeEventData 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.MediaJobOutputStateChangeEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3594,7 +3383,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MediaJobProcessingEventData : Azure.Messaging.EventGrid.SystemEvents.MediaJobStateChangeEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MediaJobProcessingEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobProcessingEventData 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.MediaJobProcessingEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3622,7 +3410,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class MediaJobScheduledEventData : Azure.Messaging.EventGrid.SystemEvents.MediaJobStateChangeEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MediaJobScheduledEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaJobScheduledEventData 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.MediaJobScheduledEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3656,9 +3443,8 @@ public partial class MediaJobStateChangeEventData : System.ClientModel.Primitive { internal MediaJobStateChangeEventData() { } public System.Collections.Generic.IReadOnlyDictionary CorrelationData { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.MediaJobState PreviousState { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.MediaJobState State { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.MediaJobState? PreviousState { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.MediaJobState? State { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.MediaJobStateChangeEventData 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.MediaJobStateChangeEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3670,7 +3456,6 @@ public partial class MediaLiveEventChannelArchiveHeartbeatEventData : System.Cli internal MediaLiveEventChannelArchiveHeartbeatEventData() { } public string ChannelLatencyMs { get { throw null; } } public string LatencyResultCode { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventChannelArchiveHeartbeatEventData 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.MediaLiveEventChannelArchiveHeartbeatEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3685,7 +3470,6 @@ internal MediaLiveEventConnectionRejectedEventData() { } public string IngestUrl { get { throw null; } } public string ResultCode { get { throw null; } } public string StreamId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventConnectionRejectedEventData 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.MediaLiveEventConnectionRejectedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3699,7 +3483,6 @@ internal MediaLiveEventEncoderConnectedEventData() { } public string EncoderPort { get { throw null; } } public string IngestUrl { get { throw null; } } public string StreamId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventEncoderConnectedEventData 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.MediaLiveEventEncoderConnectedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3714,7 +3497,6 @@ internal MediaLiveEventEncoderDisconnectedEventData() { } public string IngestUrl { get { throw null; } } public string ResultCode { get { throw null; } } public string StreamId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventEncoderDisconnectedEventData 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.MediaLiveEventEncoderDisconnectedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3730,7 +3512,6 @@ internal MediaLiveEventIncomingDataChunkDroppedEventData() { } public string Timestamp { get { throw null; } } public string TrackName { get { throw null; } } public string TrackType { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventIncomingDataChunkDroppedEventData 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.MediaLiveEventIncomingDataChunkDroppedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3749,7 +3530,6 @@ internal MediaLiveEventIncomingStreamReceivedEventData() { } public string Timestamp { get { throw null; } } public string TrackName { get { throw null; } } public string TrackType { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventIncomingStreamReceivedEventData 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.MediaLiveEventIncomingStreamReceivedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3765,7 +3545,6 @@ internal MediaLiveEventIncomingStreamsOutOfSyncEventData() { } public string TimescaleOfMinLastTimestamp { get { throw null; } } public string TypeOfStreamWithMaxLastTimestamp { get { throw null; } } public string TypeOfStreamWithMinLastTimestamp { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventIncomingStreamsOutOfSyncEventData 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.MediaLiveEventIncomingStreamsOutOfSyncEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3780,7 +3559,6 @@ internal MediaLiveEventIncomingVideoStreamsOutOfSyncEventData() { } public string SecondDuration { get { throw null; } } public string SecondTimestamp { get { throw null; } } public string Timescale { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventIncomingVideoStreamsOutOfSyncEventData 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.MediaLiveEventIncomingVideoStreamsOutOfSyncEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3806,7 +3584,6 @@ internal MediaLiveEventIngestHeartbeatEventData() { } public string TranscriptionLanguage { get { throw null; } } public string TranscriptionState { get { throw null; } } public bool? UnexpectedBitrate { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventIngestHeartbeatEventData 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.MediaLiveEventIngestHeartbeatEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3823,7 +3600,6 @@ internal MediaLiveEventTrackDiscontinuityDetectedEventData() { } public string Timescale { get { throw null; } } public string TrackName { get { throw null; } } public string TrackType { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventTrackDiscontinuityDetectedEventData 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.MediaLiveEventTrackDiscontinuityDetectedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3834,8 +3610,7 @@ public partial class MicrosoftTeamsAppIdentifierModel : System.ClientModel.Primi { internal MicrosoftTeamsAppIdentifierModel() { } public string AppId { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel Cloud { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel? Cloud { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsAppIdentifierModel 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.MicrosoftTeamsAppIdentifierModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3845,10 +3620,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MicrosoftTeamsUserIdentifierModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MicrosoftTeamsUserIdentifierModel() { } - public Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel Cloud { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel? Cloud { get { throw null; } } public bool? IsAnonymous { get { throw null; } } public string UserId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsUserIdentifierModel 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.MicrosoftTeamsUserIdentifierModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3859,7 +3633,6 @@ public partial class PhoneNumberIdentifierModel : System.ClientModel.Primitives. { internal PhoneNumberIdentifierModel() { } public string Value { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.PhoneNumberIdentifierModel 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.PhoneNumberIdentifierModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3875,8 +3648,7 @@ internal PolicyInsightsPolicyStateChangedEventData() { } public string PolicyDefinitionId { get { throw null; } } public string PolicyDefinitionReferenceId { get { throw null; } } public string SubscriptionId { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? Timestamp { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.PolicyInsightsPolicyStateChangedEventData 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.PolicyInsightsPolicyStateChangedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3892,8 +3664,7 @@ internal PolicyInsightsPolicyStateCreatedEventData() { } public string PolicyDefinitionId { get { throw null; } } public string PolicyDefinitionReferenceId { get { throw null; } } public string SubscriptionId { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? Timestamp { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.PolicyInsightsPolicyStateCreatedEventData 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.PolicyInsightsPolicyStateCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3909,8 +3680,7 @@ internal PolicyInsightsPolicyStateDeletedEventData() { } public string PolicyDefinitionId { get { throw null; } } public string PolicyDefinitionReferenceId { get { throw null; } } public string SubscriptionId { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? Timestamp { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.PolicyInsightsPolicyStateDeletedEventData 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.PolicyInsightsPolicyStateDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3972,39 +3742,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType left, Azure.Messaging.EventGrid.SystemEvents.RecordingFormatType right) { throw null; } public override string ToString() { throw null; } } - public partial class RedisExportRDBCompletedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RedisExportRdbCompletedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal RedisExportRDBCompletedEventData() { } + internal RedisExportRdbCompletedEventData() { } public string Name { get { throw null; } } public string Status { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.Messaging.EventGrid.SystemEvents.RedisExportRDBCompletedEventData 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.RedisExportRDBCompletedEventData 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 System.DateTimeOffset? Timestamp { get { throw null; } } + Azure.Messaging.EventGrid.SystemEvents.RedisExportRdbCompletedEventData 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.RedisExportRdbCompletedEventData 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 RedisImportRDBCompletedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RedisImportRdbCompletedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal RedisImportRDBCompletedEventData() { } + internal RedisImportRdbCompletedEventData() { } public string Name { get { throw null; } } public string Status { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.Messaging.EventGrid.SystemEvents.RedisImportRDBCompletedEventData 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.RedisImportRDBCompletedEventData 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 System.DateTimeOffset? Timestamp { get { throw null; } } + Azure.Messaging.EventGrid.SystemEvents.RedisImportRdbCompletedEventData 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.RedisImportRdbCompletedEventData 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 RedisPatchingCompletedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal RedisPatchingCompletedEventData() { } public string Name { get { throw null; } } public string Status { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? Timestamp { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.RedisPatchingCompletedEventData 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.RedisPatchingCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4016,8 +3783,7 @@ public partial class RedisScalingCompletedEventData : System.ClientModel.Primiti internal RedisScalingCompletedEventData() { } public string Name { get { throw null; } } public string Status { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? Timestamp { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.RedisScalingCompletedEventData 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.RedisScalingCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4038,7 +3804,6 @@ internal ResourceActionCancelEventData() { } public string Status { get { throw null; } } public string SubscriptionId { get { throw null; } } public string TenantId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceActionCancelEventData 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.ResourceActionCancelEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4059,7 +3824,6 @@ internal ResourceActionFailureEventData() { } public string Status { get { throw null; } } public string SubscriptionId { get { throw null; } } public string TenantId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceActionFailureEventData 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.ResourceActionFailureEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4080,7 +3844,6 @@ internal ResourceActionSuccessEventData() { } public string Status { get { throw null; } } public string SubscriptionId { get { throw null; } } public string TenantId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceActionSuccessEventData 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.ResourceActionSuccessEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4093,7 +3856,6 @@ internal ResourceAuthorization() { } public string Action { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Evidence { get { throw null; } } public string Scope { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceAuthorization 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.ResourceAuthorization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4114,7 +3876,6 @@ internal ResourceDeleteCancelEventData() { } public string Status { get { throw null; } } public string SubscriptionId { get { throw null; } } public string TenantId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceDeleteCancelEventData 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.ResourceDeleteCancelEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4135,7 +3896,6 @@ internal ResourceDeleteFailureEventData() { } public string Status { get { throw null; } } public string SubscriptionId { get { throw null; } } public string TenantId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceDeleteFailureEventData 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.ResourceDeleteFailureEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4156,7 +3916,6 @@ internal ResourceDeleteSuccessEventData() { } public string Status { get { throw null; } } public string SubscriptionId { get { throw null; } } public string TenantId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceDeleteSuccessEventData 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.ResourceDeleteSuccessEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4170,17 +3929,24 @@ internal ResourceHttpRequest() { } public string ClientRequestId { get { throw null; } } public string Method { get { throw null; } } public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceHttpRequest 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.ResourceHttpRequest 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 ResourceNotificationsContainerServiceEventResourcesScheduledEventData : Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ResourceNotificationsContainerServiceEventResourcesScheduledEventData() { } + Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsContainerServiceEventResourcesScheduledEventData 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.ResourceNotificationsContainerServiceEventResourcesScheduledEventData 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 ResourceNotificationsHealthResourcesAnnotatedEventData : Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResourceNotificationsHealthResourcesAnnotatedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsHealthResourcesAnnotatedEventData 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.ResourceNotificationsHealthResourcesAnnotatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4190,7 +3956,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData : Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData 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.ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4200,8 +3965,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class ResourceNotificationsOperationalDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResourceNotificationsOperationalDetails() { } - public System.DateTimeOffset ResourceEventTime { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? ResourceEventTime { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails 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.ResourceNotificationsOperationalDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4214,7 +3978,6 @@ internal ResourceNotificationsResourceDeletedDetails() { } public string Id { get { throw null; } } public string Name { get { throw null; } } public string Type { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceDeletedDetails 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.ResourceNotificationsResourceDeletedDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4226,7 +3989,6 @@ public partial class ResourceNotificationsResourceDeletedEventData : System.Clie internal ResourceNotificationsResourceDeletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails OperationalDetails { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceDeletedDetails ResourceDetails { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceDeletedEventData 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.ResourceNotificationsResourceDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4236,7 +3998,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ResourceNotificationsResourceManagementCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResourceNotificationsResourceManagementCreatedOrUpdatedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceManagementCreatedOrUpdatedEventData 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.ResourceNotificationsResourceManagementCreatedOrUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4246,7 +4007,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class ResourceNotificationsResourceManagementDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceDeletedEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResourceNotificationsResourceManagementDeletedEventData() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceManagementDeletedEventData 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.ResourceNotificationsResourceManagementDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4262,7 +4022,6 @@ internal ResourceNotificationsResourceUpdatedDetails() { } public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } public string Type { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails 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.ResourceNotificationsResourceUpdatedDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4275,7 +4034,6 @@ internal ResourceNotificationsResourceUpdatedEventData() { } public string ApiVersion { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails OperationalDetails { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails ResourceDetails { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedEventData 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.ResourceNotificationsResourceUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4296,7 +4054,6 @@ internal ResourceWriteCancelEventData() { } public string Status { get { throw null; } } public string SubscriptionId { get { throw null; } } public string TenantId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceWriteCancelEventData 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.ResourceWriteCancelEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4317,7 +4074,6 @@ internal ResourceWriteFailureEventData() { } public string Status { get { throw null; } } public string SubscriptionId { get { throw null; } } public string TenantId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceWriteFailureEventData 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.ResourceWriteFailureEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4338,7 +4094,6 @@ internal ResourceWriteSuccessEventData() { } public string Status { get { throw null; } } public string SubscriptionId { get { throw null; } } public string TenantId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ResourceWriteSuccessEventData 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.ResourceWriteSuccessEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4354,7 +4109,6 @@ internal ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData() { } public string RequestUri { get { throw null; } } public string SubscriptionName { get { throw null; } } public string TopicName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData 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.ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4370,7 +4124,6 @@ internal ServiceBusActiveMessagesAvailableWithNoListenersEventData() { } public string RequestUri { get { throw null; } } public string SubscriptionName { get { throw null; } } public string TopicName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ServiceBusActiveMessagesAvailableWithNoListenersEventData 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.ServiceBusActiveMessagesAvailableWithNoListenersEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4386,7 +4139,6 @@ internal ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData() { public string RequestUri { get { throw null; } } public string SubscriptionName { get { throw null; } } public string TopicName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData 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.ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4402,7 +4154,6 @@ internal ServiceBusDeadletterMessagesAvailableWithNoListenersEventData() { } public string RequestUri { get { throw null; } } public string SubscriptionName { get { throw null; } } public string TopicName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.ServiceBusDeadletterMessagesAvailableWithNoListenersEventData 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.ServiceBusDeadletterMessagesAvailableWithNoListenersEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4414,9 +4165,8 @@ public partial class SignalRServiceClientConnectionConnectedEventData : System.C internal SignalRServiceClientConnectionConnectedEventData() { } public string ConnectionId { get { throw null; } } public string HubName { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } + public System.DateTimeOffset? Timestamp { get { throw null; } } public string UserId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.SignalRServiceClientConnectionConnectedEventData 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.SignalRServiceClientConnectionConnectedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4429,9 +4179,8 @@ internal SignalRServiceClientConnectionDisconnectedEventData() { } public string ConnectionId { get { throw null; } } public string ErrorMessage { get { throw null; } } public string HubName { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } + public System.DateTimeOffset? Timestamp { get { throw null; } } public string UserId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.SignalRServiceClientConnectionDisconnectedEventData 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.SignalRServiceClientConnectionDisconnectedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4470,16 +4219,37 @@ internal StorageAsyncOperationInitiatedEventData() { } public string Sequencer { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary StorageDiagnostics { get { throw null; } } public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageAsyncOperationInitiatedEventData 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.StorageAsyncOperationInitiatedEventData 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 StorageBlobAccessTier : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StorageBlobAccessTier(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier Archive { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier Cold { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier Cool { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier Default { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier Hot { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier 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.StorageBlobAccessTier left, Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier left, Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier right) { throw null; } + public override string ToString() { throw null; } + } public partial class StorageBlobCreatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal StorageBlobCreatedEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier AccessTier { get { throw null; } } public string Api { get { throw null; } } public string BlobType { get { throw null; } } public string ClientRequestId { get { throw null; } } @@ -4492,7 +4262,6 @@ internal StorageBlobCreatedEventData() { } public string Sequencer { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary StorageDiagnostics { get { throw null; } } public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageBlobCreatedEventData 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.StorageBlobCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4511,7 +4280,6 @@ internal StorageBlobDeletedEventData() { } public string Sequencer { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary StorageDiagnostics { get { throw null; } } public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageBlobDeletedEventData 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.StorageBlobDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4527,8 +4295,7 @@ internal StorageBlobInventoryPolicyCompletedEventData() { } public string PolicyRunStatus { get { throw null; } } public string PolicyRunStatusMessage { get { throw null; } } public string RuleName { get { throw null; } } - public System.DateTimeOffset ScheduleDateTime { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public System.DateTimeOffset? ScheduleDateTime { get { throw null; } } Azure.Messaging.EventGrid.SystemEvents.StorageBlobInventoryPolicyCompletedEventData 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.StorageBlobInventoryPolicyCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4546,7 +4313,6 @@ internal StorageBlobRenamedEventData() { } public string Sequencer { get { throw null; } } public string SourceUrl { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary StorageDiagnostics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageBlobRenamedEventData 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.StorageBlobRenamedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4556,17 +4322,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class StorageBlobTierChangedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal StorageBlobTierChangedEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier AccessTier { get { throw null; } } public string Api { get { throw null; } } public string BlobType { get { throw null; } } public string ClientRequestId { get { throw null; } } public long? ContentLength { get { throw null; } } public string ContentType { get { throw null; } } public string Identity { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.StorageBlobAccessTier PreviousTier { get { throw null; } } public string RequestId { get { throw null; } } public string Sequencer { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary StorageDiagnostics { get { throw null; } } public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageBlobTierChangedEventData 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.StorageBlobTierChangedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4584,7 +4351,6 @@ internal StorageDirectoryCreatedEventData() { } public string Sequencer { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary StorageDiagnostics { get { throw null; } } public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageDirectoryCreatedEventData 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.StorageDirectoryCreatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4602,7 +4368,6 @@ internal StorageDirectoryDeletedEventData() { } public string Sequencer { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary StorageDiagnostics { get { throw null; } } public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageDirectoryDeletedEventData 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.StorageDirectoryDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4620,7 +4385,6 @@ internal StorageDirectoryRenamedEventData() { } public string Sequencer { get { throw null; } } public string SourceUrl { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary StorageDiagnostics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageDirectoryRenamedEventData 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.StorageDirectoryRenamedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4633,7 +4397,6 @@ internal StorageLifecyclePolicyActionSummaryDetail() { } public string ErrorList { get { throw null; } } public long? SuccessCount { get { throw null; } } public long? TotalObjectsCount { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail 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.StorageLifecyclePolicyActionSummaryDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4646,8 +4409,8 @@ internal StorageLifecyclePolicyCompletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail DeleteSummary { get { throw null; } } public string ScheduleTime { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail TierToArchiveSummary { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail TierToColdSummary { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail TierToCoolSummary { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyCompletedEventData 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.StorageLifecyclePolicyCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4657,12 +4420,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class StorageTaskAssignmentCompletedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal StorageTaskAssignmentCompletedEventData() { } - public System.DateTimeOffset CompletedOn { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus Status { get { throw null; } } + public System.DateTimeOffset? CompletedOn { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus? Status { get { throw null; } } public System.Uri SummaryReportBlobUri { get { throw null; } } public string TaskExecutionId { get { throw null; } } public string TaskName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedEventData 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.StorageTaskAssignmentCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4690,9 +4452,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class StorageTaskAssignmentQueuedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal StorageTaskAssignmentQueuedEventData() { } - public System.DateTimeOffset QueuedOn { get { throw null; } } + public System.DateTimeOffset? QueuedOn { get { throw null; } } public string TaskExecutionId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentQueuedEventData 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.StorageTaskAssignmentQueuedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4702,12 +4463,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class StorageTaskCompletedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal StorageTaskCompletedEventData() { } - public System.DateTimeOffset CompletedDateTime { get { throw null; } } - public Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedStatus Status { get { throw null; } } + public System.DateTimeOffset? CompletedDateTime { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedStatus? Status { get { throw null; } } public System.Uri SummaryReportBlobUrl { get { throw null; } } public string TaskExecutionId { get { throw null; } } public string TaskName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedEventData 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.StorageTaskCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4735,9 +4495,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class StorageTaskQueuedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal StorageTaskQueuedEventData() { } - public System.DateTimeOffset QueuedDateTime { get { throw null; } } + public System.DateTimeOffset? QueuedDateTime { get { throw null; } } public string TaskExecutionId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.StorageTaskQueuedEventData 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.StorageTaskQueuedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4748,7 +4507,6 @@ public partial class SubscriptionDeletedEventData : System.ClientModel.Primitive { internal SubscriptionDeletedEventData() { } public string EventSubscriptionId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.SubscriptionDeletedEventData 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.SubscriptionDeletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4760,7 +4518,6 @@ public partial class SubscriptionValidationEventData : System.ClientModel.Primit internal SubscriptionValidationEventData() { } public string ValidationCode { get { throw null; } } public string ValidationUrl { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.SubscriptionValidationEventData 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.SubscriptionValidationEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4771,7 +4528,6 @@ public partial class SubscriptionValidationResponse : System.ClientModel.Primiti { internal SubscriptionValidationResponse() { } public string ValidationResponse { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.SubscriptionValidationResponse 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.SubscriptionValidationResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4884,10 +4640,10 @@ 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 EventGridMQTTClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; - public const string EventGridMQTTClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; - public const string EventGridMQTTClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; - public const string EventGridMQTTClientSessionDisconnected = "Microsoft.EventGrid.MQTTClientSessionDisconnected"; + public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; + public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; + public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; + public const string EventGridMqttClientSessionDisconnected = "Microsoft.EventGrid.MQTTClientSessionDisconnected"; public const string EventGridSubscriptionDeleted = "Microsoft.EventGrid.SubscriptionDeletedEvent"; public const string EventGridSubscriptionValidation = "Microsoft.EventGrid.SubscriptionValidationEvent"; public const string EventHubCaptureFileCreated = "Microsoft.EventHub.CaptureFileCreated"; @@ -4948,8 +4704,8 @@ public static partial class SystemEventNames public const string PolicyInsightsPolicyStateChanged = "Microsoft.PolicyInsights.PolicyStateChanged"; public const string PolicyInsightsPolicyStateCreated = "Microsoft.PolicyInsights.PolicyStateCreated"; public const string PolicyInsightsPolicyStateDeleted = "Microsoft.PolicyInsights.PolicyStateDeleted"; - public const string RedisExportRDBCompleted = "Microsoft.Cache.ExportRDBCompleted"; - public const string RedisImportRDBCompleted = "Microsoft.Cache.ImportRDBCompleted"; + public const string RedisExportRdbCompleted = "Microsoft.Cache.ExportRDBCompleted"; + public const string RedisImportRdbCompleted = "Microsoft.Cache.ImportRDBCompleted"; public const string RedisPatchingCompleted = "Microsoft.Cache.PatchingCompleted"; public const string RedisScalingCompleted = "Microsoft.Cache.ScalingCompleted"; public const string ResourceActionCancel = "Microsoft.Resources.ResourceActionCancel"; @@ -4958,6 +4714,7 @@ public static partial class SystemEventNames public const string ResourceDeleteCancel = "Microsoft.Resources.ResourceDeleteCancel"; public const string ResourceDeleteFailure = "Microsoft.Resources.ResourceDeleteFailure"; public const string ResourceDeleteSuccess = "Microsoft.Resources.ResourceDeleteSuccess"; + public const string ResourceNotificationsContainerServiceEventResourcesScheduled = "Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted"; public const string ResourceNotificationsHealthResourcesAnnotated = "Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated"; public const string ResourceNotificationsHealthResourcesAvailabilityStatusChanged = "Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged"; public const string ResourceNotificationsResourceManagementCreatedOrUpdated = "Microsoft.ResourceNotifications.Resources.CreatedOrUpdated"; @@ -5010,7 +4767,6 @@ internal WebAppServicePlanUpdatedEventData() { } public string RequestId { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.WebAppServicePlanUpdatedEventDataSku Sku { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebAppServicePlanUpdatedEventData 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.WebAppServicePlanUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5025,7 +4781,6 @@ internal WebAppServicePlanUpdatedEventDataSku() { } public string Name { get { throw null; } } public string Size { get { throw null; } } public string Tier { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebAppServicePlanUpdatedEventDataSku 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.WebAppServicePlanUpdatedEventDataSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5042,7 +4797,6 @@ internal WebAppUpdatedEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebAppUpdatedEventData 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.WebAppUpdatedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5059,7 +4813,6 @@ internal WebBackupOperationCompletedEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebBackupOperationCompletedEventData 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.WebBackupOperationCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5076,7 +4829,6 @@ internal WebBackupOperationFailedEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebBackupOperationFailedEventData 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.WebBackupOperationFailedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5093,7 +4845,6 @@ internal WebBackupOperationStartedEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebBackupOperationStartedEventData 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.WebBackupOperationStartedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5110,7 +4861,6 @@ internal WebRestoreOperationCompletedEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebRestoreOperationCompletedEventData 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.WebRestoreOperationCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5127,7 +4877,6 @@ internal WebRestoreOperationFailedEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebRestoreOperationFailedEventData 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.WebRestoreOperationFailedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5144,7 +4893,6 @@ internal WebRestoreOperationStartedEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebRestoreOperationStartedEventData 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.WebRestoreOperationStartedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5161,7 +4909,6 @@ internal WebSlotSwapCompletedEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebSlotSwapCompletedEventData 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.WebSlotSwapCompletedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5178,7 +4925,6 @@ internal WebSlotSwapFailedEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebSlotSwapFailedEventData 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.WebSlotSwapFailedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5195,7 +4941,6 @@ internal WebSlotSwapStartedEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebSlotSwapStartedEventData 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.WebSlotSwapStartedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5212,7 +4957,6 @@ internal WebSlotSwapWithPreviewCancelledEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebSlotSwapWithPreviewCancelledEventData 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.WebSlotSwapWithPreviewCancelledEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5229,7 +4973,6 @@ internal WebSlotSwapWithPreviewStartedEventData() { } public string Name { get { throw null; } } public string RequestId { get { throw null; } } public string Verb { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Messaging.EventGrid.SystemEvents.WebSlotSwapWithPreviewStartedEventData 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.WebSlotSwapWithPreviewStartedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } 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 172820121300..54283140fd91 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 @@ -18,15 +18,6 @@ public partial class AcsChatEventBaseProperties : IUtf8JsonSerializable, IJsonMo 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsChatEventBaseProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("recipientCommunicationIdentifier"u8); writer.WriteObjectValue(RecipientCommunicationIdentifier, options); if (Optional.IsDefined(TransactionId)) @@ -61,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsChatEventBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 8c1f443284ad..19fef5132660 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 @@ -18,15 +18,6 @@ public partial class AcsChatEventInThreadBaseProperties : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsChatEventInThreadBaseProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TransactionId)) { writer.WritePropertyName("transactionId"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsChatEventInThreadBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.Serialization.cs index a4aae168de79..40761e19f713 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsChatMessageDeletedEventData : IUtf8JsonSerializable, IJs 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") @@ -34,9 +25,67 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatMessageDeletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("deleteTime"u8); - writer.WriteStringValue(DeleteTime, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(DeleteTime)) + { + writer.WritePropertyName("deleteTime"u8); + writer.WriteStringValue(DeleteTime.Value, "O"); + } + if (Optional.IsDefined(MessageId)) + { + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); + } + writer.WritePropertyName("senderCommunicationIdentifier"u8); + writer.WriteObjectValue(SenderCommunicationIdentifier, options); + if (Optional.IsDefined(SenderDisplayName)) + { + writer.WritePropertyName("senderDisplayName"u8); + writer.WriteStringValue(SenderDisplayName); + } + if (Optional.IsDefined(ComposeTime)) + { + writer.WritePropertyName("composeTime"u8); + writer.WriteStringValue(ComposeTime.Value, "O"); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + writer.WritePropertyName("recipientCommunicationIdentifier"u8); + writer.WriteObjectValue(RecipientCommunicationIdentifier, options); + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatMessageDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -59,11 +108,11 @@ internal static AcsChatMessageDeletedEventData DeserializeAcsChatMessageDeletedE { return null; } - DateTimeOffset deleteTime = default; + DateTimeOffset? deleteTime = default; string messageId = default; CommunicationIdentifierModel senderCommunicationIdentifier = default; string senderDisplayName = default; - DateTimeOffset composeTime = default; + DateTimeOffset? composeTime = default; string type = default; long? version = default; CommunicationIdentifierModel recipientCommunicationIdentifier = default; @@ -75,6 +124,10 @@ internal static AcsChatMessageDeletedEventData DeserializeAcsChatMessageDeletedE { if (property.NameEquals("deleteTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } deleteTime = property.Value.GetDateTimeOffset("O"); continue; } @@ -95,6 +148,10 @@ internal static AcsChatMessageDeletedEventData DeserializeAcsChatMessageDeletedE } if (property.NameEquals("composeTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } composeTime = property.Value.GetDateTimeOffset("O"); continue; } 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 29bd2123a788..5f6a22502794 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.cs @@ -16,15 +16,11 @@ public partial class AcsChatMessageDeletedEventData : AcsChatMessageEventBasePro /// Initializes a new instance of . /// The communication identifier of the target user. /// The communication identifier of the sender. - /// The original compose time of the message. - /// The time at which the message was deleted. /// or is null. - internal AcsChatMessageDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier, DateTimeOffset composeTime, DateTimeOffset deleteTime) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier, composeTime) + internal AcsChatMessageDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); - - DeleteTime = deleteTime; } /// Initializes a new instance of . @@ -39,7 +35,7 @@ internal AcsChatMessageDeletedEventData(CommunicationIdentifierModel recipientCo /// The type of the message. /// The version of the message. /// The time at which the message was deleted. - internal AcsChatMessageDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset composeTime, string type, long? version, DateTimeOffset deleteTime) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + internal AcsChatMessageDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, DateTimeOffset? deleteTime) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { DeleteTime = deleteTime; } @@ -50,6 +46,6 @@ internal AcsChatMessageDeletedEventData() } /// The time at which the message was deleted. - public DateTimeOffset DeleteTime { get; } + public DateTimeOffset? DeleteTime { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.Serialization.cs index bceef0c48673..01c09eb8b6c9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsChatMessageDeletedInThreadEventData : IUtf8JsonSerializa 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") @@ -34,9 +25,65 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatMessageDeletedInThreadEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("deleteTime"u8); - writer.WriteStringValue(DeleteTime, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(DeleteTime)) + { + writer.WritePropertyName("deleteTime"u8); + writer.WriteStringValue(DeleteTime.Value, "O"); + } + if (Optional.IsDefined(MessageId)) + { + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); + } + writer.WritePropertyName("senderCommunicationIdentifier"u8); + writer.WriteObjectValue(SenderCommunicationIdentifier, options); + if (Optional.IsDefined(SenderDisplayName)) + { + writer.WritePropertyName("senderDisplayName"u8); + writer.WriteStringValue(SenderDisplayName); + } + if (Optional.IsDefined(ComposeTime)) + { + writer.WritePropertyName("composeTime"u8); + writer.WriteStringValue(ComposeTime.Value, "O"); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatMessageDeletedInThreadEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -59,11 +106,11 @@ internal static AcsChatMessageDeletedInThreadEventData DeserializeAcsChatMessage { return null; } - DateTimeOffset deleteTime = default; + DateTimeOffset? deleteTime = default; string messageId = default; CommunicationIdentifierModel senderCommunicationIdentifier = default; string senderDisplayName = default; - DateTimeOffset composeTime = default; + DateTimeOffset? composeTime = default; string type = default; long? version = default; string transactionId = default; @@ -74,6 +121,10 @@ internal static AcsChatMessageDeletedInThreadEventData DeserializeAcsChatMessage { if (property.NameEquals("deleteTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } deleteTime = property.Value.GetDateTimeOffset("O"); continue; } @@ -94,6 +145,10 @@ internal static AcsChatMessageDeletedInThreadEventData DeserializeAcsChatMessage } if (property.NameEquals("composeTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } composeTime = property.Value.GetDateTimeOffset("O"); continue; } 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 fdf50c683027..36a7b77ba1a3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.cs @@ -15,14 +15,10 @@ public partial class AcsChatMessageDeletedInThreadEventData : AcsChatMessageEven { /// Initializes a new instance of . /// The communication identifier of the sender. - /// The original compose time of the message. - /// The time at which the message was deleted. /// is null. - internal AcsChatMessageDeletedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier, DateTimeOffset composeTime, DateTimeOffset deleteTime) : base(senderCommunicationIdentifier, composeTime) + internal AcsChatMessageDeletedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier) : base(senderCommunicationIdentifier) { Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); - - DeleteTime = deleteTime; } /// Initializes a new instance of . @@ -36,7 +32,7 @@ internal AcsChatMessageDeletedInThreadEventData(CommunicationIdentifierModel sen /// The type of the message. /// The version of the message. /// The time at which the message was deleted. - internal AcsChatMessageDeletedInThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset composeTime, string type, long? version, DateTimeOffset deleteTime) : base(transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + internal AcsChatMessageDeletedInThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, DateTimeOffset? deleteTime) : base(transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { DeleteTime = deleteTime; } @@ -47,6 +43,6 @@ internal AcsChatMessageDeletedInThreadEventData() } /// The time at which the message was deleted. - public DateTimeOffset DeleteTime { get; } + public DateTimeOffset? DeleteTime { get; } } } 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 97ee30c1867a..ba4f0b0d34e3 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 @@ -18,15 +18,6 @@ public partial class AcsChatMessageEditedEventData : IUtf8JsonSerializable, IJso 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatMessageEditedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(MessageBody)) { writer.WritePropertyName("messageBody"u8); @@ -48,8 +39,66 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); - writer.WritePropertyName("editTime"u8); - writer.WriteStringValue(EditTime, "O"); + if (Optional.IsDefined(EditTime)) + { + writer.WritePropertyName("editTime"u8); + writer.WriteStringValue(EditTime.Value, "O"); + } + if (Optional.IsDefined(MessageId)) + { + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); + } + writer.WritePropertyName("senderCommunicationIdentifier"u8); + writer.WriteObjectValue(SenderCommunicationIdentifier, options); + if (Optional.IsDefined(SenderDisplayName)) + { + writer.WritePropertyName("senderDisplayName"u8); + writer.WriteStringValue(SenderDisplayName); + } + if (Optional.IsDefined(ComposeTime)) + { + writer.WritePropertyName("composeTime"u8); + writer.WriteStringValue(ComposeTime.Value, "O"); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + writer.WritePropertyName("recipientCommunicationIdentifier"u8); + writer.WriteObjectValue(RecipientCommunicationIdentifier, options); + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatMessageEditedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -74,11 +123,11 @@ internal static AcsChatMessageEditedEventData DeserializeAcsChatMessageEditedEve } string messageBody = default; IReadOnlyDictionary metadata = default; - DateTimeOffset editTime = default; + DateTimeOffset? editTime = default; string messageId = default; CommunicationIdentifierModel senderCommunicationIdentifier = default; string senderDisplayName = default; - DateTimeOffset composeTime = default; + DateTimeOffset? composeTime = default; string type = default; long? version = default; CommunicationIdentifierModel recipientCommunicationIdentifier = default; @@ -105,6 +154,10 @@ internal static AcsChatMessageEditedEventData DeserializeAcsChatMessageEditedEve } if (property.NameEquals("editTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } editTime = property.Value.GetDateTimeOffset("O"); continue; } @@ -125,6 +178,10 @@ internal static AcsChatMessageEditedEventData DeserializeAcsChatMessageEditedEve } if (property.NameEquals("composeTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } composeTime = property.Value.GetDateTimeOffset("O"); continue; } 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 92f3f537ac6c..b124a0af4025 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.cs @@ -16,18 +16,15 @@ public partial class AcsChatMessageEditedEventData : AcsChatMessageEventBaseProp /// Initializes a new instance of . /// The communication identifier of the target user. /// The communication identifier of the sender. - /// The original compose time of the message. /// The chat message metadata. - /// The time at which the message was edited. /// , or is null. - internal AcsChatMessageEditedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier, DateTimeOffset composeTime, IReadOnlyDictionary metadata, DateTimeOffset editTime) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier, composeTime) + internal AcsChatMessageEditedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); Argument.AssertNotNull(metadata, nameof(metadata)); Metadata = metadata; - EditTime = editTime; } /// Initializes a new instance of . @@ -44,7 +41,7 @@ internal AcsChatMessageEditedEventData(CommunicationIdentifierModel recipientCom /// The body of the chat message. /// The chat message metadata. /// The time at which the message was edited. - internal AcsChatMessageEditedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata, DateTimeOffset editTime) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + internal AcsChatMessageEditedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata, DateTimeOffset? editTime) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { MessageBody = messageBody; Metadata = metadata; @@ -61,6 +58,6 @@ internal AcsChatMessageEditedEventData() /// The chat message metadata. public IReadOnlyDictionary Metadata { get; } /// The time at which the message was edited. - public DateTimeOffset EditTime { get; } + public DateTimeOffset? EditTime { get; } } } 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 7bf5019d2ec1..52c02562502e 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 @@ -18,15 +18,6 @@ public partial class AcsChatMessageEditedInThreadEventData : IUtf8JsonSerializab 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatMessageEditedInThreadEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(MessageBody)) { writer.WritePropertyName("messageBody"u8); @@ -48,8 +39,64 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); - writer.WritePropertyName("editTime"u8); - writer.WriteStringValue(EditTime, "O"); + if (Optional.IsDefined(EditTime)) + { + writer.WritePropertyName("editTime"u8); + writer.WriteStringValue(EditTime.Value, "O"); + } + if (Optional.IsDefined(MessageId)) + { + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); + } + writer.WritePropertyName("senderCommunicationIdentifier"u8); + writer.WriteObjectValue(SenderCommunicationIdentifier, options); + if (Optional.IsDefined(SenderDisplayName)) + { + writer.WritePropertyName("senderDisplayName"u8); + writer.WriteStringValue(SenderDisplayName); + } + if (Optional.IsDefined(ComposeTime)) + { + writer.WritePropertyName("composeTime"u8); + writer.WriteStringValue(ComposeTime.Value, "O"); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatMessageEditedInThreadEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -74,11 +121,11 @@ internal static AcsChatMessageEditedInThreadEventData DeserializeAcsChatMessageE } string messageBody = default; IReadOnlyDictionary metadata = default; - DateTimeOffset editTime = default; + DateTimeOffset? editTime = default; string messageId = default; CommunicationIdentifierModel senderCommunicationIdentifier = default; string senderDisplayName = default; - DateTimeOffset composeTime = default; + DateTimeOffset? composeTime = default; string type = default; long? version = default; string transactionId = default; @@ -104,6 +151,10 @@ internal static AcsChatMessageEditedInThreadEventData DeserializeAcsChatMessageE } if (property.NameEquals("editTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } editTime = property.Value.GetDateTimeOffset("O"); continue; } @@ -124,6 +175,10 @@ internal static AcsChatMessageEditedInThreadEventData DeserializeAcsChatMessageE } if (property.NameEquals("composeTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } composeTime = property.Value.GetDateTimeOffset("O"); continue; } 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 99134233639c..70250f33da52 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.cs @@ -15,17 +15,14 @@ public partial class AcsChatMessageEditedInThreadEventData : AcsChatMessageEvent { /// Initializes a new instance of . /// The communication identifier of the sender. - /// The original compose time of the message. /// The chat message metadata. - /// The time at which the message was edited. /// or is null. - internal AcsChatMessageEditedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier, DateTimeOffset composeTime, IReadOnlyDictionary metadata, DateTimeOffset editTime) : base(senderCommunicationIdentifier, composeTime) + internal AcsChatMessageEditedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(senderCommunicationIdentifier) { Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); Argument.AssertNotNull(metadata, nameof(metadata)); Metadata = metadata; - EditTime = editTime; } /// Initializes a new instance of . @@ -41,7 +38,7 @@ internal AcsChatMessageEditedInThreadEventData(CommunicationIdentifierModel send /// The body of the chat message. /// The chat message metadata. /// The time at which the message was edited. - internal AcsChatMessageEditedInThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata, DateTimeOffset editTime) : base(transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + internal AcsChatMessageEditedInThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata, DateTimeOffset? editTime) : base(transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { MessageBody = messageBody; Metadata = metadata; @@ -58,6 +55,6 @@ internal AcsChatMessageEditedInThreadEventData() /// The chat message metadata. public IReadOnlyDictionary Metadata { get; } /// The time at which the message was edited. - public DateTimeOffset EditTime { get; } + public DateTimeOffset? EditTime { get; } } } 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 5c8edcacc2cc..fd64fd00f375 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 @@ -18,15 +18,6 @@ public partial class AcsChatMessageEventBaseProperties : IUtf8JsonSerializable, 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatMessageEventBaseProperties)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(MessageId)) { writer.WritePropertyName("messageId"u8); @@ -47,8 +38,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("senderDisplayName"u8); writer.WriteStringValue(SenderDisplayName); } - writer.WritePropertyName("composeTime"u8); - writer.WriteStringValue(ComposeTime, "O"); + if (Optional.IsDefined(ComposeTime)) + { + writer.WritePropertyName("composeTime"u8); + writer.WriteStringValue(ComposeTime.Value, "O"); + } if (Optional.IsDefined(Type)) { writer.WritePropertyName("type"u8); @@ -59,6 +53,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("version"u8); writer.WriteNumberValue(Version.Value); } + writer.WritePropertyName("recipientCommunicationIdentifier"u8); + writer.WriteObjectValue(RecipientCommunicationIdentifier, options); + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatMessageEventBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -84,7 +106,7 @@ internal static AcsChatMessageEventBaseProperties DeserializeAcsChatMessageEvent string messageId = default; CommunicationIdentifierModel senderCommunicationIdentifier = default; string senderDisplayName = default; - DateTimeOffset composeTime = default; + DateTimeOffset? composeTime = default; string type = default; long? version = default; CommunicationIdentifierModel recipientCommunicationIdentifier = default; @@ -111,6 +133,10 @@ internal static AcsChatMessageEventBaseProperties DeserializeAcsChatMessageEvent } if (property.NameEquals("composeTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } composeTime = property.Value.GetDateTimeOffset("O"); continue; } 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 d0109a86be03..0d2231a308ce 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.cs @@ -16,15 +16,13 @@ public partial class AcsChatMessageEventBaseProperties : AcsChatEventBasePropert /// Initializes a new instance of . /// The communication identifier of the target user. /// The communication identifier of the sender. - /// The original compose time of the message. /// or is null. - internal AcsChatMessageEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier, DateTimeOffset composeTime) : base(recipientCommunicationIdentifier) + internal AcsChatMessageEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier) : base(recipientCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); SenderCommunicationIdentifier = senderCommunicationIdentifier; - ComposeTime = composeTime; } /// Initializes a new instance of . @@ -38,7 +36,7 @@ internal AcsChatMessageEventBaseProperties(CommunicationIdentifierModel recipien /// The original compose time of the message. /// The type of the message. /// The version of the message. - internal AcsChatMessageEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset composeTime, string type, long? version) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData) + internal AcsChatMessageEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData) { MessageId = messageId; SenderCommunicationIdentifier = senderCommunicationIdentifier; @@ -60,7 +58,7 @@ internal AcsChatMessageEventBaseProperties() /// The display name of the sender. public string SenderDisplayName { get; } /// The original compose time of the message. - public DateTimeOffset ComposeTime { get; } + public DateTimeOffset? ComposeTime { get; } /// The type of the message. public string Type { get; } /// The version of the message. 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 daf9837f457b..ceb1b1a5f639 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 @@ -18,15 +18,6 @@ public partial class AcsChatMessageEventInThreadBaseProperties : IUtf8JsonSerial 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatMessageEventInThreadBaseProperties)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(MessageId)) { writer.WritePropertyName("messageId"u8); @@ -47,8 +38,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("senderDisplayName"u8); writer.WriteStringValue(SenderDisplayName); } - writer.WritePropertyName("composeTime"u8); - writer.WriteStringValue(ComposeTime, "O"); + if (Optional.IsDefined(ComposeTime)) + { + writer.WritePropertyName("composeTime"u8); + writer.WriteStringValue(ComposeTime.Value, "O"); + } if (Optional.IsDefined(Type)) { writer.WritePropertyName("type"u8); @@ -59,6 +53,32 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("version"u8); writer.WriteNumberValue(Version.Value); } + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatMessageEventInThreadBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -84,7 +104,7 @@ internal static AcsChatMessageEventInThreadBaseProperties DeserializeAcsChatMess string messageId = default; CommunicationIdentifierModel senderCommunicationIdentifier = default; string senderDisplayName = default; - DateTimeOffset composeTime = default; + DateTimeOffset? composeTime = default; string type = default; long? version = default; string transactionId = default; @@ -110,6 +130,10 @@ internal static AcsChatMessageEventInThreadBaseProperties DeserializeAcsChatMess } if (property.NameEquals("composeTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } composeTime = property.Value.GetDateTimeOffset("O"); continue; } 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 72fdab5e25f7..3ae4acc44ddd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.cs @@ -15,14 +15,12 @@ public partial class AcsChatMessageEventInThreadBaseProperties : AcsChatEventInT { /// Initializes a new instance of . /// The communication identifier of the sender. - /// The original compose time of the message. /// is null. - internal AcsChatMessageEventInThreadBaseProperties(CommunicationIdentifierModel senderCommunicationIdentifier, DateTimeOffset composeTime) + internal AcsChatMessageEventInThreadBaseProperties(CommunicationIdentifierModel senderCommunicationIdentifier) { Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); SenderCommunicationIdentifier = senderCommunicationIdentifier; - ComposeTime = composeTime; } /// Initializes a new instance of . @@ -35,7 +33,7 @@ internal AcsChatMessageEventInThreadBaseProperties(CommunicationIdentifierModel /// The original compose time of the message. /// The type of the message. /// The version of the message. - internal AcsChatMessageEventInThreadBaseProperties(string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset composeTime, string type, long? version) : base(transactionId, threadId, serializedAdditionalRawData) + internal AcsChatMessageEventInThreadBaseProperties(string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version) : base(transactionId, threadId, serializedAdditionalRawData) { MessageId = messageId; SenderCommunicationIdentifier = senderCommunicationIdentifier; @@ -57,7 +55,7 @@ internal AcsChatMessageEventInThreadBaseProperties() /// The display name of the sender. public string SenderDisplayName { get; } /// The original compose time of the message. - public DateTimeOffset ComposeTime { get; } + public DateTimeOffset? ComposeTime { get; } /// The type of the message. public string Type { get; } /// The version of the message. 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 30ba40046cec..33da4e20bebe 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 @@ -18,15 +18,6 @@ public partial class AcsChatMessageReceivedEventData : IUtf8JsonSerializable, IJ 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatMessageReceivedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(MessageBody)) { writer.WritePropertyName("messageBody"u8); @@ -48,6 +39,61 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); + if (Optional.IsDefined(MessageId)) + { + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); + } + writer.WritePropertyName("senderCommunicationIdentifier"u8); + writer.WriteObjectValue(SenderCommunicationIdentifier, options); + if (Optional.IsDefined(SenderDisplayName)) + { + writer.WritePropertyName("senderDisplayName"u8); + writer.WriteStringValue(SenderDisplayName); + } + if (Optional.IsDefined(ComposeTime)) + { + writer.WritePropertyName("composeTime"u8); + writer.WriteStringValue(ComposeTime.Value, "O"); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + writer.WritePropertyName("recipientCommunicationIdentifier"u8); + writer.WriteObjectValue(RecipientCommunicationIdentifier, options); + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatMessageReceivedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -75,7 +121,7 @@ internal static AcsChatMessageReceivedEventData DeserializeAcsChatMessageReceive string messageId = default; CommunicationIdentifierModel senderCommunicationIdentifier = default; string senderDisplayName = default; - DateTimeOffset composeTime = default; + DateTimeOffset? composeTime = default; string type = default; long? version = default; CommunicationIdentifierModel recipientCommunicationIdentifier = default; @@ -117,6 +163,10 @@ internal static AcsChatMessageReceivedEventData DeserializeAcsChatMessageReceive } if (property.NameEquals("composeTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } composeTime = property.Value.GetDateTimeOffset("O"); continue; } 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 2410db3e730b..1f9a4f91d206 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.cs @@ -16,10 +16,9 @@ public partial class AcsChatMessageReceivedEventData : AcsChatMessageEventBasePr /// Initializes a new instance of . /// The communication identifier of the target user. /// The communication identifier of the sender. - /// The original compose time of the message. /// The chat message metadata. /// , or is null. - internal AcsChatMessageReceivedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier, DateTimeOffset composeTime, IReadOnlyDictionary metadata) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier, composeTime) + internal AcsChatMessageReceivedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); @@ -41,7 +40,7 @@ internal AcsChatMessageReceivedEventData(CommunicationIdentifierModel recipientC /// The version of the message. /// The body of the chat message. /// The chat message metadata. - internal AcsChatMessageReceivedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + internal AcsChatMessageReceivedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { MessageBody = messageBody; Metadata = metadata; 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 03658d848d09..0a01774108b9 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 @@ -18,15 +18,6 @@ public partial class AcsChatMessageReceivedInThreadEventData : IUtf8JsonSerializ 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatMessageReceivedInThreadEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(MessageBody)) { writer.WritePropertyName("messageBody"u8); @@ -48,6 +39,59 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); + if (Optional.IsDefined(MessageId)) + { + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); + } + writer.WritePropertyName("senderCommunicationIdentifier"u8); + writer.WriteObjectValue(SenderCommunicationIdentifier, options); + if (Optional.IsDefined(SenderDisplayName)) + { + writer.WritePropertyName("senderDisplayName"u8); + writer.WriteStringValue(SenderDisplayName); + } + if (Optional.IsDefined(ComposeTime)) + { + writer.WritePropertyName("composeTime"u8); + writer.WriteStringValue(ComposeTime.Value, "O"); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatMessageReceivedInThreadEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -75,7 +119,7 @@ internal static AcsChatMessageReceivedInThreadEventData DeserializeAcsChatMessag string messageId = default; CommunicationIdentifierModel senderCommunicationIdentifier = default; string senderDisplayName = default; - DateTimeOffset composeTime = default; + DateTimeOffset? composeTime = default; string type = default; long? version = default; string transactionId = default; @@ -116,6 +160,10 @@ internal static AcsChatMessageReceivedInThreadEventData DeserializeAcsChatMessag } if (property.NameEquals("composeTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } composeTime = property.Value.GetDateTimeOffset("O"); continue; } 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 8698284721c1..c99363e44298 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.cs @@ -15,10 +15,9 @@ public partial class AcsChatMessageReceivedInThreadEventData : AcsChatMessageEve { /// Initializes a new instance of . /// The communication identifier of the sender. - /// The original compose time of the message. /// The chat message metadata. /// or is null. - internal AcsChatMessageReceivedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier, DateTimeOffset composeTime, IReadOnlyDictionary metadata) : base(senderCommunicationIdentifier, composeTime) + internal AcsChatMessageReceivedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(senderCommunicationIdentifier) { Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); Argument.AssertNotNull(metadata, nameof(metadata)); @@ -38,7 +37,7 @@ internal AcsChatMessageReceivedInThreadEventData(CommunicationIdentifierModel se /// The version of the message. /// The body of the chat message. /// The chat message metadata. - internal AcsChatMessageReceivedInThreadEventData(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) + internal AcsChatMessageReceivedInThreadEventData(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; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.Serialization.cs index 4acb68c7bf71..76e4b55b686e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsChatParticipantAddedToThreadEventData : IUtf8JsonSeriali 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") @@ -34,9 +25,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatParticipantAddedToThreadEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("time"u8); - writer.WriteStringValue(Time, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Time)) + { + writer.WritePropertyName("time"u8); + writer.WriteStringValue(Time.Value, "O"); + } writer.WritePropertyName("addedByCommunicationIdentifier"u8); writer.WriteObjectValue(AddedByCommunicationIdentifier, options); writer.WritePropertyName("participantAdded"u8); @@ -46,6 +40,32 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("version"u8); writer.WriteNumberValue(Version.Value); } + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatParticipantAddedToThreadEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -68,7 +88,7 @@ internal static AcsChatParticipantAddedToThreadEventData DeserializeAcsChatParti { return null; } - DateTimeOffset time = default; + DateTimeOffset? time = default; CommunicationIdentifierModel addedByCommunicationIdentifier = default; AcsChatThreadParticipantProperties participantAdded = default; long? version = default; @@ -80,6 +100,10 @@ internal static AcsChatParticipantAddedToThreadEventData DeserializeAcsChatParti { if (property.NameEquals("time"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } time = property.Value.GetDateTimeOffset("O"); continue; } 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 0c74e23af594..5ae69978e278 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.cs @@ -14,16 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantAddedToThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - /// The time at which the user was added to the thread. /// The communication identifier of the user who added the user. /// The details of the user who was added. /// or is null. - internal AcsChatParticipantAddedToThreadEventData(DateTimeOffset time, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) + internal AcsChatParticipantAddedToThreadEventData(CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) { Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); Argument.AssertNotNull(participantAdded, nameof(participantAdded)); - Time = time; AddedByCommunicationIdentifier = addedByCommunicationIdentifier; ParticipantAdded = participantAdded; } @@ -36,7 +34,7 @@ internal AcsChatParticipantAddedToThreadEventData(DateTimeOffset time, Communica /// The communication identifier of the user who added the user. /// The details of the user who was added. /// The version of the thread. - internal AcsChatParticipantAddedToThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset time, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded, long? version) : base(transactionId, threadId, serializedAdditionalRawData) + internal AcsChatParticipantAddedToThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? time, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded, long? version) : base(transactionId, threadId, serializedAdditionalRawData) { Time = time; AddedByCommunicationIdentifier = addedByCommunicationIdentifier; @@ -50,7 +48,7 @@ internal AcsChatParticipantAddedToThreadEventData() } /// The time at which the user was added to the thread. - public DateTimeOffset Time { get; } + public DateTimeOffset? Time { get; } /// The communication identifier of the user who added the user. public CommunicationIdentifierModel AddedByCommunicationIdentifier { get; } /// The details of the user who was added. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs index 656b0ad7865b..ea812f2030ed 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsChatParticipantAddedToThreadWithUserEventData : IUtf8Jso 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") @@ -34,13 +25,54 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatParticipantAddedToThreadWithUserEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("time"u8); - writer.WriteStringValue(Time, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Time)) + { + writer.WritePropertyName("time"u8); + writer.WriteStringValue(Time.Value, "O"); + } writer.WritePropertyName("addedByCommunicationIdentifier"u8); writer.WriteObjectValue(AddedByCommunicationIdentifier, options); writer.WritePropertyName("participantAdded"u8); writer.WriteObjectValue(ParticipantAdded, options); + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateTime.Value, "O"); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + writer.WritePropertyName("recipientCommunicationIdentifier"u8); + writer.WriteObjectValue(RecipientCommunicationIdentifier, options); + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatParticipantAddedToThreadWithUserEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -63,10 +95,10 @@ internal static AcsChatParticipantAddedToThreadWithUserEventData DeserializeAcsC { return null; } - DateTimeOffset time = default; + DateTimeOffset? time = default; CommunicationIdentifierModel addedByCommunicationIdentifier = default; AcsChatThreadParticipantProperties participantAdded = default; - DateTimeOffset createTime = default; + DateTimeOffset? createTime = default; long? version = default; CommunicationIdentifierModel recipientCommunicationIdentifier = default; string transactionId = default; @@ -77,6 +109,10 @@ internal static AcsChatParticipantAddedToThreadWithUserEventData DeserializeAcsC { if (property.NameEquals("time"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } time = property.Value.GetDateTimeOffset("O"); continue; } @@ -92,6 +128,10 @@ internal static AcsChatParticipantAddedToThreadWithUserEventData DeserializeAcsC } if (property.NameEquals("createTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } createTime = property.Value.GetDateTimeOffset("O"); continue; } 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 95e15aab1526..407412eb394b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.cs @@ -15,18 +15,15 @@ public partial class AcsChatParticipantAddedToThreadWithUserEventData : AcsChatT { /// Initializes a new instance of . /// The communication identifier of the target user. - /// The original creation time of the thread. - /// The time at which the user was added to the thread. /// 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, DateTimeOffset createTime, DateTimeOffset time, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(recipientCommunicationIdentifier, createTime) + internal AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(recipientCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); Argument.AssertNotNull(participantAdded, nameof(participantAdded)); - Time = time; AddedByCommunicationIdentifier = addedByCommunicationIdentifier; ParticipantAdded = participantAdded; } @@ -41,7 +38,7 @@ internal AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifie /// The time at which the user was added to the thread. /// The communication identifier of the user who added the user. /// The details of the user who was added. - internal AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset createTime, long? version, DateTimeOffset time, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, createTime, version) + internal AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? createTime, long? version, DateTimeOffset? time, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, createTime, version) { Time = time; AddedByCommunicationIdentifier = addedByCommunicationIdentifier; @@ -54,7 +51,7 @@ internal AcsChatParticipantAddedToThreadWithUserEventData() } /// The time at which the user was added to the thread. - public DateTimeOffset Time { get; } + public DateTimeOffset? Time { get; } /// The communication identifier of the user who added the user. public CommunicationIdentifierModel AddedByCommunicationIdentifier { get; } /// The details of the user who was added. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs index 34a1f1d8e6bd..4bf5b1a6ef97 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsChatParticipantRemovedFromThreadEventData : IUtf8JsonSer 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") @@ -34,9 +25,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatParticipantRemovedFromThreadEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("time"u8); - writer.WriteStringValue(Time, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Time)) + { + writer.WritePropertyName("time"u8); + writer.WriteStringValue(Time.Value, "O"); + } writer.WritePropertyName("removedByCommunicationIdentifier"u8); writer.WriteObjectValue(RemovedByCommunicationIdentifier, options); writer.WritePropertyName("participantRemoved"u8); @@ -46,6 +40,32 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("version"u8); writer.WriteNumberValue(Version.Value); } + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatParticipantRemovedFromThreadEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -68,7 +88,7 @@ internal static AcsChatParticipantRemovedFromThreadEventData DeserializeAcsChatP { return null; } - DateTimeOffset time = default; + DateTimeOffset? time = default; CommunicationIdentifierModel removedByCommunicationIdentifier = default; AcsChatThreadParticipantProperties participantRemoved = default; long? version = default; @@ -80,6 +100,10 @@ internal static AcsChatParticipantRemovedFromThreadEventData DeserializeAcsChatP { if (property.NameEquals("time"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } time = property.Value.GetDateTimeOffset("O"); continue; } 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 2984453d0a26..b3b2328112b9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.cs @@ -14,16 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantRemovedFromThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - /// The time at which the user was removed to the thread. /// The communication identifier of the user who removed the user. /// The details of the user who was removed. /// or is null. - internal AcsChatParticipantRemovedFromThreadEventData(DateTimeOffset time, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) + internal AcsChatParticipantRemovedFromThreadEventData(CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) { Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); - Time = time; RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; ParticipantRemoved = participantRemoved; } @@ -36,7 +34,7 @@ internal AcsChatParticipantRemovedFromThreadEventData(DateTimeOffset time, Commu /// The communication identifier of the user who removed the user. /// The details of the user who was removed. /// The version of the thread. - internal AcsChatParticipantRemovedFromThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset time, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved, long? version) : base(transactionId, threadId, serializedAdditionalRawData) + internal AcsChatParticipantRemovedFromThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? time, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved, long? version) : base(transactionId, threadId, serializedAdditionalRawData) { Time = time; RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; @@ -50,7 +48,7 @@ internal AcsChatParticipantRemovedFromThreadEventData() } /// The time at which the user was removed to the thread. - public DateTimeOffset Time { get; } + public DateTimeOffset? Time { get; } /// The communication identifier of the user who removed the user. public CommunicationIdentifierModel RemovedByCommunicationIdentifier { get; } /// The details of the user who was removed. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs index f7db6f14d6f8..25c5b4c35d84 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsChatParticipantRemovedFromThreadWithUserEventData : IUtf 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") @@ -34,13 +25,54 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatParticipantRemovedFromThreadWithUserEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("time"u8); - writer.WriteStringValue(Time, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Time)) + { + writer.WritePropertyName("time"u8); + writer.WriteStringValue(Time.Value, "O"); + } writer.WritePropertyName("removedByCommunicationIdentifier"u8); writer.WriteObjectValue(RemovedByCommunicationIdentifier, options); writer.WritePropertyName("participantRemoved"u8); writer.WriteObjectValue(ParticipantRemoved, options); + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateTime.Value, "O"); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + writer.WritePropertyName("recipientCommunicationIdentifier"u8); + writer.WriteObjectValue(RecipientCommunicationIdentifier, options); + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatParticipantRemovedFromThreadWithUserEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -63,10 +95,10 @@ internal static AcsChatParticipantRemovedFromThreadWithUserEventData Deserialize { return null; } - DateTimeOffset time = default; + DateTimeOffset? time = default; CommunicationIdentifierModel removedByCommunicationIdentifier = default; AcsChatThreadParticipantProperties participantRemoved = default; - DateTimeOffset createTime = default; + DateTimeOffset? createTime = default; long? version = default; CommunicationIdentifierModel recipientCommunicationIdentifier = default; string transactionId = default; @@ -77,6 +109,10 @@ internal static AcsChatParticipantRemovedFromThreadWithUserEventData Deserialize { if (property.NameEquals("time"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } time = property.Value.GetDateTimeOffset("O"); continue; } @@ -92,6 +128,10 @@ internal static AcsChatParticipantRemovedFromThreadWithUserEventData Deserialize } if (property.NameEquals("createTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } createTime = property.Value.GetDateTimeOffset("O"); continue; } 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 109684ffc523..d99153a59c67 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.cs @@ -15,18 +15,15 @@ public partial class AcsChatParticipantRemovedFromThreadWithUserEventData : AcsC { /// Initializes a new instance of . /// The communication identifier of the target user. - /// The original creation time of the thread. - /// The time at which the user was removed to the thread. /// 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, DateTimeOffset createTime, DateTimeOffset time, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(recipientCommunicationIdentifier, createTime) + internal AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(recipientCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); - Time = time; RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; ParticipantRemoved = participantRemoved; } @@ -41,7 +38,7 @@ internal AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdent /// The time at which the user was removed to the thread. /// The communication identifier of the user who removed the user. /// The details of the user who was removed. - internal AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset createTime, long? version, DateTimeOffset time, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, createTime, version) + internal AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? createTime, long? version, DateTimeOffset? time, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, createTime, version) { Time = time; RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; @@ -54,7 +51,7 @@ internal AcsChatParticipantRemovedFromThreadWithUserEventData() } /// The time at which the user was removed to the thread. - public DateTimeOffset Time { get; } + public DateTimeOffset? Time { get; } /// The communication identifier of the user who removed the user. public CommunicationIdentifierModel RemovedByCommunicationIdentifier { get; } /// The details of the user who was removed. 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 660520158e5d..79e744fed4d3 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 @@ -18,15 +18,6 @@ public partial class AcsChatThreadCreatedEventData : IUtf8JsonSerializable, IJso 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatThreadCreatedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("createdByCommunicationIdentifier"u8); writer.WriteObjectValue(CreatedByCommunicationIdentifier, options); writer.WritePropertyName("properties"u8); @@ -72,6 +63,42 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateTime.Value, "O"); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatThreadCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -98,7 +125,7 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve IReadOnlyDictionary properties = default; IReadOnlyDictionary metadata = default; IReadOnlyList participants = default; - DateTimeOffset createTime = default; + DateTimeOffset? createTime = default; long? version = default; string transactionId = default; string threadId = default; @@ -150,6 +177,10 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve } if (property.NameEquals("createTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } createTime = property.Value.GetDateTimeOffset("O"); continue; } 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 30a77e8200e9..dd366f600f08 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs @@ -15,13 +15,12 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadCreatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - /// The original creation time of the thread. /// 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(DateTimeOffset createTime, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) : base(createTime) + internal AcsChatThreadCreatedEventData(CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) { Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); @@ -44,7 +43,7 @@ internal AcsChatThreadCreatedEventData(DateTimeOffset createTime, CommunicationI /// The thread properties. /// The thread metadata. /// The list of properties of participants who are part of the thread. - internal AcsChatThreadCreatedEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset createTime, long? version, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IReadOnlyList participants) : base(transactionId, threadId, serializedAdditionalRawData, createTime, version) + internal AcsChatThreadCreatedEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IReadOnlyList participants) : base(transactionId, threadId, serializedAdditionalRawData, createTime, version) { CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; 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 096a08aa546a..edafdf9a4d8a 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 @@ -18,15 +18,6 @@ public partial class AcsChatThreadCreatedWithUserEventData : IUtf8JsonSerializab 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatThreadCreatedWithUserEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("createdByCommunicationIdentifier"u8); writer.WriteObjectValue(CreatedByCommunicationIdentifier, options); writer.WritePropertyName("properties"u8); @@ -72,6 +63,44 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateTime.Value, "O"); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + writer.WritePropertyName("recipientCommunicationIdentifier"u8); + writer.WriteObjectValue(RecipientCommunicationIdentifier, options); + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatThreadCreatedWithUserEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -98,7 +127,7 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr IReadOnlyDictionary properties = default; IReadOnlyDictionary metadata = default; IReadOnlyList participants = default; - DateTimeOffset createTime = default; + DateTimeOffset? createTime = default; long? version = default; CommunicationIdentifierModel recipientCommunicationIdentifier = default; string transactionId = default; @@ -151,6 +180,10 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr } if (property.NameEquals("createTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } createTime = property.Value.GetDateTimeOffset("O"); continue; } 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 1016b59134b6..428a332bf9a3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs @@ -16,13 +16,12 @@ public partial class AcsChatThreadCreatedWithUserEventData : AcsChatThreadEventB { /// Initializes a new instance of . /// The communication identifier of the target user. - /// The original creation time of the thread. /// 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, DateTimeOffset createTime, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) : base(recipientCommunicationIdentifier, createTime) + internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) : base(recipientCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); @@ -47,7 +46,7 @@ internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel reci /// The thread properties. /// The thread metadata. /// The list of properties of participants who are part of the thread. - internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset createTime, long? version, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IReadOnlyList participants) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, createTime, version) + internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IReadOnlyList participants) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, createTime, version) { CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.Serialization.cs index 8b2f2a7db481..853a18cacfe9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsChatThreadDeletedEventData : IUtf8JsonSerializable, IJso 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") @@ -34,11 +25,50 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatThreadDeletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("deletedByCommunicationIdentifier"u8); writer.WriteObjectValue(DeletedByCommunicationIdentifier, options); - writer.WritePropertyName("deleteTime"u8); - writer.WriteStringValue(DeleteTime, "O"); + if (Optional.IsDefined(DeleteTime)) + { + writer.WritePropertyName("deleteTime"u8); + writer.WriteStringValue(DeleteTime.Value, "O"); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateTime.Value, "O"); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatThreadDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -62,8 +92,8 @@ internal static AcsChatThreadDeletedEventData DeserializeAcsChatThreadDeletedEve return null; } CommunicationIdentifierModel deletedByCommunicationIdentifier = default; - DateTimeOffset deleteTime = default; - DateTimeOffset createTime = default; + DateTimeOffset? deleteTime = default; + DateTimeOffset? createTime = default; long? version = default; string transactionId = default; string threadId = default; @@ -78,11 +108,19 @@ internal static AcsChatThreadDeletedEventData DeserializeAcsChatThreadDeletedEve } if (property.NameEquals("deleteTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } deleteTime = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("createTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } createTime = property.Value.GetDateTimeOffset("O"); continue; } 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 68b39610ce9d..249893e1f9ee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.cs @@ -14,16 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadDeletedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - /// The original creation time of the thread. /// The communication identifier of the user who deleted the thread. - /// The deletion time of the thread. /// is null. - internal AcsChatThreadDeletedEventData(DateTimeOffset createTime, CommunicationIdentifierModel deletedByCommunicationIdentifier, DateTimeOffset deleteTime) : base(createTime) + internal AcsChatThreadDeletedEventData(CommunicationIdentifierModel deletedByCommunicationIdentifier) { Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; - DeleteTime = deleteTime; } /// Initializes a new instance of . @@ -34,7 +31,7 @@ internal AcsChatThreadDeletedEventData(DateTimeOffset createTime, CommunicationI /// The version of the thread. /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. - internal AcsChatThreadDeletedEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset createTime, long? version, CommunicationIdentifierModel deletedByCommunicationIdentifier, DateTimeOffset deleteTime) : base(transactionId, threadId, serializedAdditionalRawData, createTime, version) + internal AcsChatThreadDeletedEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel deletedByCommunicationIdentifier, DateTimeOffset? deleteTime) : base(transactionId, threadId, serializedAdditionalRawData, createTime, version) { DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; DeleteTime = deleteTime; @@ -48,6 +45,6 @@ internal AcsChatThreadDeletedEventData() /// The communication identifier of the user who deleted the thread. public CommunicationIdentifierModel DeletedByCommunicationIdentifier { get; } /// The deletion time of the thread. - public DateTimeOffset DeleteTime { get; } + public DateTimeOffset? DeleteTime { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.Serialization.cs index dbc9bad2c0fe..5e3865c3147f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsChatThreadEventBaseProperties : IUtf8JsonSerializable, I 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") @@ -34,14 +25,45 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatThreadEventBaseProperties)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("createTime"u8); - writer.WriteStringValue(CreateTime, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateTime.Value, "O"); + } if (Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); writer.WriteNumberValue(Version.Value); } + writer.WritePropertyName("recipientCommunicationIdentifier"u8); + writer.WriteObjectValue(RecipientCommunicationIdentifier, options); + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatThreadEventBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -64,7 +86,7 @@ internal static AcsChatThreadEventBaseProperties DeserializeAcsChatThreadEventBa { return null; } - DateTimeOffset createTime = default; + DateTimeOffset? createTime = default; long? version = default; CommunicationIdentifierModel recipientCommunicationIdentifier = default; string transactionId = default; @@ -75,6 +97,10 @@ internal static AcsChatThreadEventBaseProperties DeserializeAcsChatThreadEventBa { if (property.NameEquals("createTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } createTime = property.Value.GetDateTimeOffset("O"); continue; } 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 d2a25d81594d..1ead8005f0c1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.cs @@ -15,13 +15,10 @@ public partial class AcsChatThreadEventBaseProperties : AcsChatEventBaseProperti { /// Initializes a new instance of . /// The communication identifier of the target user. - /// The original creation time of the thread. /// is null. - internal AcsChatThreadEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, DateTimeOffset createTime) : base(recipientCommunicationIdentifier) + internal AcsChatThreadEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier) : base(recipientCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); - - CreateTime = createTime; } /// Initializes a new instance of . @@ -31,7 +28,7 @@ internal AcsChatThreadEventBaseProperties(CommunicationIdentifierModel recipient /// Keeps track of any properties unknown to the library. /// The original creation time of the thread. /// The version of the thread. - internal AcsChatThreadEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset createTime, long? version) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData) + internal AcsChatThreadEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? createTime, long? version) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData) { CreateTime = createTime; Version = version; @@ -43,7 +40,7 @@ internal AcsChatThreadEventBaseProperties() } /// The original creation time of the thread. - public DateTimeOffset CreateTime { get; } + public DateTimeOffset? CreateTime { get; } /// The version of the thread. public long? Version { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.Serialization.cs index c6a84493d388..f2c1c8f7daac 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsChatThreadEventInThreadBaseProperties : IUtf8JsonSeriali 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") @@ -34,14 +25,43 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatThreadEventInThreadBaseProperties)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("createTime"u8); - writer.WriteStringValue(CreateTime, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateTime.Value, "O"); + } if (Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); writer.WriteNumberValue(Version.Value); } + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatThreadEventInThreadBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -64,7 +84,7 @@ internal static AcsChatThreadEventInThreadBaseProperties DeserializeAcsChatThrea { return null; } - DateTimeOffset createTime = default; + DateTimeOffset? createTime = default; long? version = default; string transactionId = default; string threadId = default; @@ -74,6 +94,10 @@ internal static AcsChatThreadEventInThreadBaseProperties DeserializeAcsChatThrea { if (property.NameEquals("createTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } createTime = property.Value.GetDateTimeOffset("O"); continue; } 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 6f41f0fe85ee..511e7ddeba0e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.cs @@ -14,10 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - /// The original creation time of the thread. - internal AcsChatThreadEventInThreadBaseProperties(DateTimeOffset createTime) + internal AcsChatThreadEventInThreadBaseProperties() { - CreateTime = createTime; } /// Initializes a new instance of . @@ -26,19 +24,14 @@ internal AcsChatThreadEventInThreadBaseProperties(DateTimeOffset createTime) /// Keeps track of any properties unknown to the library. /// The original creation time of the thread. /// The version of the thread. - internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset createTime, long? version) : base(transactionId, threadId, serializedAdditionalRawData) + internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? createTime, long? version) : base(transactionId, threadId, serializedAdditionalRawData) { CreateTime = createTime; Version = version; } - /// Initializes a new instance of for deserialization. - internal AcsChatThreadEventInThreadBaseProperties() - { - } - /// The original creation time of the thread. - public DateTimeOffset CreateTime { get; } + public DateTimeOffset? CreateTime { get; } /// The version of the thread. public long? Version { get; } } 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 a1c77c4bfd43..d9cba25fa2ce 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 @@ -18,15 +18,6 @@ public partial class AcsChatThreadParticipantProperties : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsChatThreadParticipantProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsChatThreadParticipantProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs index 1b26923f5d7d..a318236b35f5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsChatThreadPropertiesUpdatedEventData : IUtf8JsonSerializ 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") @@ -34,11 +25,14 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatThreadPropertiesUpdatedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("editedByCommunicationIdentifier"u8); writer.WriteObjectValue(EditedByCommunicationIdentifier, options); - writer.WritePropertyName("editTime"u8); - writer.WriteStringValue(EditTime, "O"); + if (Optional.IsDefined(EditTime)) + { + writer.WritePropertyName("editTime"u8); + writer.WriteStringValue(EditTime.Value, "O"); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); foreach (var item in Properties) @@ -67,6 +61,42 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateTime.Value, "O"); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatThreadPropertiesUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -90,10 +120,10 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread return null; } CommunicationIdentifierModel editedByCommunicationIdentifier = default; - DateTimeOffset editTime = default; + DateTimeOffset? editTime = default; IReadOnlyDictionary properties = default; IReadOnlyDictionary metadata = default; - DateTimeOffset createTime = default; + DateTimeOffset? createTime = default; long? version = default; string transactionId = default; string threadId = default; @@ -108,6 +138,10 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread } if (property.NameEquals("editTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } editTime = property.Value.GetDateTimeOffset("O"); continue; } @@ -140,6 +174,10 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread } if (property.NameEquals("createTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } createTime = property.Value.GetDateTimeOffset("O"); continue; } 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 44f774f4f9a4..748afca8b6d6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.cs @@ -14,20 +14,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadPropertiesUpdatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - /// The original creation time of the thread. /// The communication identifier of the user who updated the thread properties. - /// The time at which the properties of the thread were updated. /// The updated thread properties. /// The thread metadata. /// , or is null. - internal AcsChatThreadPropertiesUpdatedEventData(DateTimeOffset createTime, CommunicationIdentifierModel editedByCommunicationIdentifier, DateTimeOffset editTime, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(createTime) + internal AcsChatThreadPropertiesUpdatedEventData(CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) { Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); Argument.AssertNotNull(metadata, nameof(metadata)); EditedByCommunicationIdentifier = editedByCommunicationIdentifier; - EditTime = editTime; Properties = properties; Metadata = metadata; } @@ -42,7 +39,7 @@ internal AcsChatThreadPropertiesUpdatedEventData(DateTimeOffset createTime, Comm /// The time at which the properties of the thread were updated. /// The updated thread properties. /// The thread metadata. - internal AcsChatThreadPropertiesUpdatedEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset createTime, long? version, CommunicationIdentifierModel editedByCommunicationIdentifier, DateTimeOffset editTime, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(transactionId, threadId, serializedAdditionalRawData, createTime, version) + internal AcsChatThreadPropertiesUpdatedEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel editedByCommunicationIdentifier, DateTimeOffset? editTime, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(transactionId, threadId, serializedAdditionalRawData, createTime, version) { EditedByCommunicationIdentifier = editedByCommunicationIdentifier; EditTime = editTime; @@ -58,7 +55,7 @@ internal AcsChatThreadPropertiesUpdatedEventData() /// The communication identifier of the user who updated the thread properties. public CommunicationIdentifierModel EditedByCommunicationIdentifier { get; } /// The time at which the properties of the thread were updated. - public DateTimeOffset EditTime { get; } + public DateTimeOffset? EditTime { get; } /// /// The updated thread properties /// 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 572d294f52df..125b74c9f7ea 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 @@ -18,15 +18,6 @@ public partial class AcsChatThreadPropertiesUpdatedPerUserEventData : IUtf8JsonS 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") @@ -34,11 +25,14 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatThreadPropertiesUpdatedPerUserEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("editedByCommunicationIdentifier"u8); writer.WriteObjectValue(EditedByCommunicationIdentifier, options); - writer.WritePropertyName("editTime"u8); - writer.WriteStringValue(EditTime, "O"); + if (Optional.IsDefined(EditTime)) + { + writer.WritePropertyName("editTime"u8); + writer.WriteStringValue(EditTime.Value, "O"); + } writer.WritePropertyName("metadata"u8); writer.WriteStartObject(); foreach (var item in Metadata) @@ -67,6 +61,44 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri #endif } writer.WriteEndObject(); + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateTime.Value, "O"); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + writer.WritePropertyName("recipientCommunicationIdentifier"u8); + writer.WriteObjectValue(RecipientCommunicationIdentifier, options); + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatThreadPropertiesUpdatedPerUserEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -90,10 +122,10 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha return null; } CommunicationIdentifierModel editedByCommunicationIdentifier = default; - DateTimeOffset editTime = default; + DateTimeOffset? editTime = default; IReadOnlyDictionary metadata = default; IReadOnlyDictionary properties = default; - DateTimeOffset createTime = default; + DateTimeOffset? createTime = default; long? version = default; CommunicationIdentifierModel recipientCommunicationIdentifier = default; string transactionId = default; @@ -109,6 +141,10 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha } if (property.NameEquals("editTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } editTime = property.Value.GetDateTimeOffset("O"); continue; } @@ -141,6 +177,10 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha } if (property.NameEquals("createTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } createTime = property.Value.GetDateTimeOffset("O"); continue; } 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 571ff029f325..dc53eadefb4c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.cs @@ -15,13 +15,11 @@ public partial class AcsChatThreadPropertiesUpdatedPerUserEventData : AcsChatThr { /// Initializes a new instance of . /// The communication identifier of the target user. - /// The original creation time of the thread. /// The communication identifier of the user who updated the thread properties. - /// The time at which the properties of the thread were updated. /// The thread metadata. /// The updated thread properties. /// , , or is null. - internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, DateTimeOffset createTime, CommunicationIdentifierModel editedByCommunicationIdentifier, DateTimeOffset editTime, IReadOnlyDictionary metadata, IReadOnlyDictionary properties) : base(recipientCommunicationIdentifier, createTime) + internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary metadata, IReadOnlyDictionary properties) : base(recipientCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); @@ -29,7 +27,6 @@ internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierM Argument.AssertNotNull(properties, nameof(properties)); EditedByCommunicationIdentifier = editedByCommunicationIdentifier; - EditTime = editTime; Metadata = metadata; Properties = properties; } @@ -45,7 +42,7 @@ internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierM /// The time at which the properties of the thread were updated. /// The thread metadata. /// The updated thread properties. - internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset createTime, long? version, CommunicationIdentifierModel editedByCommunicationIdentifier, DateTimeOffset editTime, IReadOnlyDictionary metadata, IReadOnlyDictionary properties) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, createTime, version) + internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel editedByCommunicationIdentifier, DateTimeOffset? editTime, IReadOnlyDictionary metadata, IReadOnlyDictionary properties) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, createTime, version) { EditedByCommunicationIdentifier = editedByCommunicationIdentifier; EditTime = editTime; @@ -61,7 +58,7 @@ internal AcsChatThreadPropertiesUpdatedPerUserEventData() /// The communication identifier of the user who updated the thread properties. public CommunicationIdentifierModel EditedByCommunicationIdentifier { get; } /// The time at which the properties of the thread were updated. - public DateTimeOffset EditTime { get; } + public DateTimeOffset? EditTime { get; } /// The thread metadata. public IReadOnlyDictionary Metadata { get; } /// diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.Serialization.cs index e3eb7fc57494..a771ac56e4fd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsChatThreadWithUserDeletedEventData : IUtf8JsonSerializab 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") @@ -34,11 +25,52 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsChatThreadWithUserDeletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("deletedByCommunicationIdentifier"u8); writer.WriteObjectValue(DeletedByCommunicationIdentifier, options); - writer.WritePropertyName("deleteTime"u8); - writer.WriteStringValue(DeleteTime, "O"); + if (Optional.IsDefined(DeleteTime)) + { + writer.WritePropertyName("deleteTime"u8); + writer.WriteStringValue(DeleteTime.Value, "O"); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateTime.Value, "O"); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + writer.WritePropertyName("recipientCommunicationIdentifier"u8); + writer.WriteObjectValue(RecipientCommunicationIdentifier, options); + if (Optional.IsDefined(TransactionId)) + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsChatThreadWithUserDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -62,8 +94,8 @@ internal static AcsChatThreadWithUserDeletedEventData DeserializeAcsChatThreadWi return null; } CommunicationIdentifierModel deletedByCommunicationIdentifier = default; - DateTimeOffset deleteTime = default; - DateTimeOffset createTime = default; + DateTimeOffset? deleteTime = default; + DateTimeOffset? createTime = default; long? version = default; CommunicationIdentifierModel recipientCommunicationIdentifier = default; string transactionId = default; @@ -79,11 +111,19 @@ internal static AcsChatThreadWithUserDeletedEventData DeserializeAcsChatThreadWi } if (property.NameEquals("deleteTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } deleteTime = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("createTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } createTime = property.Value.GetDateTimeOffset("O"); continue; } 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 2b366137bfd7..d0c52952554e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.cs @@ -15,17 +15,14 @@ public partial class AcsChatThreadWithUserDeletedEventData : AcsChatThreadEventB { /// Initializes a new instance of . /// The communication identifier of the target user. - /// The original creation time of the thread. /// The communication identifier of the user who deleted the thread. - /// The deletion time of the thread. /// or is null. - internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, DateTimeOffset createTime, CommunicationIdentifierModel deletedByCommunicationIdentifier, DateTimeOffset deleteTime) : base(recipientCommunicationIdentifier, createTime) + internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel deletedByCommunicationIdentifier) : base(recipientCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; - DeleteTime = deleteTime; } /// Initializes a new instance of . @@ -37,7 +34,7 @@ internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel reci /// The version of the thread. /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. - internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset createTime, long? version, CommunicationIdentifierModel deletedByCommunicationIdentifier, DateTimeOffset deleteTime) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, createTime, version) + internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string transactionId, string threadId, IDictionary serializedAdditionalRawData, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel deletedByCommunicationIdentifier, DateTimeOffset? deleteTime) : base(recipientCommunicationIdentifier, transactionId, threadId, serializedAdditionalRawData, createTime, version) { DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; DeleteTime = deleteTime; @@ -51,6 +48,6 @@ internal AcsChatThreadWithUserDeletedEventData() /// The communication identifier of the user who deleted the thread. public CommunicationIdentifierModel DeletedByCommunicationIdentifier { get; } /// The deletion time of the thread. - public DateTimeOffset DeleteTime { get; } + public DateTimeOffset? DeleteTime { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.Serialization.cs index e923e3d0b390..2526b1531166 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsEmailDeliveryReportReceivedEventData : IUtf8JsonSerializ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsEmailDeliveryReportReceivedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Sender)) { writer.WritePropertyName("sender"u8); @@ -49,12 +41,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("messageId"u8); writer.WriteStringValue(MessageId); } - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } writer.WritePropertyName("deliveryStatusDetails"u8); writer.WriteObjectValue(DeliveryStatusDetails, options); - writer.WritePropertyName("deliveryAttemptTimeStamp"u8); - writer.WriteStringValue(DeliveryAttemptTimestamp, "O"); + if (Optional.IsDefined(DeliveryAttemptTimestamp)) + { + writer.WritePropertyName("deliveryAttemptTimestamp"u8); + writer.WriteStringValue(DeliveryAttemptTimestamp.Value, "O"); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,6 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsEmailDeliveryReportReceivedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -95,9 +94,9 @@ internal static AcsEmailDeliveryReportReceivedEventData DeserializeAcsEmailDeliv string sender = default; string recipient = default; string messageId = default; - AcsEmailDeliveryReportStatus status = default; + AcsEmailDeliveryReportStatus? status = default; AcsEmailDeliveryReportStatusDetails deliveryStatusDetails = default; - DateTimeOffset deliveryAttemptTimeStamp = default; + DateTimeOffset? deliveryAttemptTimestamp = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -119,6 +118,10 @@ internal static AcsEmailDeliveryReportReceivedEventData DeserializeAcsEmailDeliv } if (property.NameEquals("status"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } status = new AcsEmailDeliveryReportStatus(property.Value.GetString()); continue; } @@ -127,9 +130,13 @@ internal static AcsEmailDeliveryReportReceivedEventData DeserializeAcsEmailDeliv deliveryStatusDetails = AcsEmailDeliveryReportStatusDetails.DeserializeAcsEmailDeliveryReportStatusDetails(property.Value, options); continue; } - if (property.NameEquals("deliveryAttemptTimeStamp"u8)) + if (property.NameEquals("deliveryAttemptTimestamp"u8)) { - deliveryAttemptTimeStamp = property.Value.GetDateTimeOffset("O"); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deliveryAttemptTimestamp = property.Value.GetDateTimeOffset("O"); continue; } if (options.Format != "W") @@ -144,7 +151,7 @@ internal static AcsEmailDeliveryReportReceivedEventData DeserializeAcsEmailDeliv messageId, status, deliveryStatusDetails, - deliveryAttemptTimeStamp, + deliveryAttemptTimestamp, serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.cs index f733218d6093..6b5ccc21acf3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.cs @@ -46,17 +46,13 @@ public partial class AcsEmailDeliveryReportReceivedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The status of the email. Any value other than Delivered is considered failed. /// Detailed information about the status if any. - /// The time at which the email delivery report received timestamp. /// is null. - internal AcsEmailDeliveryReportReceivedEventData(AcsEmailDeliveryReportStatus status, AcsEmailDeliveryReportStatusDetails deliveryStatusDetails, DateTimeOffset deliveryAttemptTimestamp) + internal AcsEmailDeliveryReportReceivedEventData(AcsEmailDeliveryReportStatusDetails deliveryStatusDetails) { Argument.AssertNotNull(deliveryStatusDetails, nameof(deliveryStatusDetails)); - Status = status; DeliveryStatusDetails = deliveryStatusDetails; - DeliveryAttemptTimestamp = deliveryAttemptTimestamp; } /// Initializes a new instance of . @@ -67,7 +63,7 @@ internal AcsEmailDeliveryReportReceivedEventData(AcsEmailDeliveryReportStatus st /// Detailed information about the status if any. /// The time at which the email delivery report received timestamp. /// Keeps track of any properties unknown to the library. - internal AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string messageId, AcsEmailDeliveryReportStatus status, AcsEmailDeliveryReportStatusDetails deliveryStatusDetails, DateTimeOffset deliveryAttemptTimestamp, IDictionary serializedAdditionalRawData) + internal AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string messageId, AcsEmailDeliveryReportStatus? status, AcsEmailDeliveryReportStatusDetails deliveryStatusDetails, DateTimeOffset? deliveryAttemptTimestamp, IDictionary serializedAdditionalRawData) { Sender = sender; Recipient = recipient; @@ -90,10 +86,10 @@ internal AcsEmailDeliveryReportReceivedEventData() /// The Id of the email been sent. public string MessageId { get; } /// The status of the email. Any value other than Delivered is considered failed. - public AcsEmailDeliveryReportStatus Status { get; } + public AcsEmailDeliveryReportStatus? Status { get; } /// Detailed information about the status if any. public AcsEmailDeliveryReportStatusDetails DeliveryStatusDetails { get; } /// The time at which the email delivery report received timestamp. - public DateTimeOffset DeliveryAttemptTimestamp { get; } + public DateTimeOffset? DeliveryAttemptTimestamp { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportStatusDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportStatusDetails.Serialization.cs index e1627716463b..0ff5d21ab531 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportStatusDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportStatusDetails.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsEmailDeliveryReportStatusDetails : IUtf8JsonSerializable 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsEmailDeliveryReportStatusDetails)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(StatusMessage)) { writer.WritePropertyName("statusMessage"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsEmailDeliveryReportStatusDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs index de59f4582b5e..4cbac52b9288 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsEmailEngagementTrackingReportReceivedEventData : IUtf8Js 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsEmailEngagementTrackingReportReceivedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Sender)) { writer.WritePropertyName("sender"u8); @@ -49,8 +41,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("messageId"u8); writer.WriteStringValue(MessageId); } - writer.WritePropertyName("userActionTimeStamp"u8); - writer.WriteStringValue(UserActionTimestamp, "O"); + if (Optional.IsDefined(UserActionTimestamp)) + { + writer.WritePropertyName("userActionTimestamp"u8); + writer.WriteStringValue(UserActionTimestamp.Value, "O"); + } if (Optional.IsDefined(EngagementContext)) { writer.WritePropertyName("engagementContext"u8); @@ -61,8 +56,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("userAgent"u8); writer.WriteStringValue(UserAgent); } - writer.WritePropertyName("engagementType"u8); - writer.WriteStringValue(Engagement.ToString()); + if (Optional.IsDefined(Engagement)) + { + writer.WritePropertyName("engagementType"u8); + writer.WriteStringValue(Engagement.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsEmailEngagementTrackingReportReceivedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -103,10 +102,10 @@ internal static AcsEmailEngagementTrackingReportReceivedEventData DeserializeAcs string sender = default; string recipient = default; string messageId = default; - DateTimeOffset userActionTimeStamp = default; + DateTimeOffset? userActionTimestamp = default; string engagementContext = default; string userAgent = default; - AcsUserEngagement engagementType = default; + AcsUserEngagement? engagementType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -126,9 +125,13 @@ internal static AcsEmailEngagementTrackingReportReceivedEventData DeserializeAcs messageId = property.Value.GetString(); continue; } - if (property.NameEquals("userActionTimeStamp"u8)) + if (property.NameEquals("userActionTimestamp"u8)) { - userActionTimeStamp = property.Value.GetDateTimeOffset("O"); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userActionTimestamp = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("engagementContext"u8)) @@ -143,6 +146,10 @@ internal static AcsEmailEngagementTrackingReportReceivedEventData DeserializeAcs } if (property.NameEquals("engagementType"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } engagementType = new AcsUserEngagement(property.Value.GetString()); continue; } @@ -156,7 +163,7 @@ internal static AcsEmailEngagementTrackingReportReceivedEventData DeserializeAcs sender, recipient, messageId, - userActionTimeStamp, + userActionTimestamp, engagementContext, userAgent, engagementType, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.cs index 9de2267639d7..78ece94104a5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.cs @@ -46,12 +46,8 @@ public partial class AcsEmailEngagementTrackingReportReceivedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time at which the user interacted with the email. - /// The type of engagement user have with email. - internal AcsEmailEngagementTrackingReportReceivedEventData(DateTimeOffset userActionTimestamp, AcsUserEngagement engagement) + internal AcsEmailEngagementTrackingReportReceivedEventData() { - UserActionTimestamp = userActionTimestamp; - Engagement = engagement; } /// Initializes a new instance of . @@ -63,7 +59,7 @@ internal AcsEmailEngagementTrackingReportReceivedEventData(DateTimeOffset userAc /// The user agent interacting with the email. /// The type of engagement user have with email. /// Keeps track of any properties unknown to the library. - internal AcsEmailEngagementTrackingReportReceivedEventData(string sender, string recipient, string messageId, DateTimeOffset userActionTimestamp, string engagementContext, string userAgent, AcsUserEngagement engagement, IDictionary serializedAdditionalRawData) + internal AcsEmailEngagementTrackingReportReceivedEventData(string sender, string recipient, string messageId, DateTimeOffset? userActionTimestamp, string engagementContext, string userAgent, AcsUserEngagement? engagement, IDictionary serializedAdditionalRawData) { Sender = sender; Recipient = recipient; @@ -75,11 +71,6 @@ internal AcsEmailEngagementTrackingReportReceivedEventData(string sender, string _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AcsEmailEngagementTrackingReportReceivedEventData() - { - } - /// The Sender Email Address. public string Sender { get; } /// The Recipient Email Address. @@ -87,12 +78,12 @@ internal AcsEmailEngagementTrackingReportReceivedEventData() /// The Id of the email that has been sent. public string MessageId { get; } /// The time at which the user interacted with the email. - public DateTimeOffset UserActionTimestamp { get; } + public DateTimeOffset? UserActionTimestamp { get; } /// The context of the type of engagement user had with email. public string EngagementContext { get; } /// The user agent interacting with the email. public string UserAgent { get; } /// The type of engagement user have with email. - public AcsUserEngagement Engagement { get; } + public AcsUserEngagement? Engagement { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallCustomContext.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallCustomContext.Serialization.cs index 469e084d67b5..5a7ad15d2f80 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallCustomContext.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallCustomContext.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsIncomingCallCustomContext : IUtf8JsonSerializable, IJson 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsIncomingCallCustomContext)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("sipHeaders"u8); writer.WriteStartObject(); foreach (var item in SipHeaders) @@ -65,6 +57,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsIncomingCallCustomContext IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.Serialization.cs index 30e667ddb263..9f8c9b320849 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsIncomingCallEventData : IUtf8JsonSerializable, IJsonMode 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsIncomingCallEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("to"u8); writer.WriteObjectValue(ToCommunicationIdentifier, options); writer.WritePropertyName("from"u8); @@ -55,6 +47,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("incomingCallContext"u8); writer.WriteStringValue(IncomingCallContext); } + if (Optional.IsDefined(OnBehalfOfCallee)) + { + writer.WritePropertyName("onBehalfOfCallee"u8); + writer.WriteObjectValue(OnBehalfOfCallee, options); + } if (Optional.IsDefined(CorrelationId)) { writer.WritePropertyName("correlationId"u8); @@ -75,6 +72,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsIncomingCallEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -103,6 +101,7 @@ internal static AcsIncomingCallEventData DeserializeAcsIncomingCallEventData(Jso string callerDisplayName = default; AcsIncomingCallCustomContext customContext = default; string incomingCallContext = default; + CommunicationIdentifierModel onBehalfOfCallee = default; string correlationId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -138,6 +137,15 @@ internal static AcsIncomingCallEventData DeserializeAcsIncomingCallEventData(Jso incomingCallContext = property.Value.GetString(); continue; } + if (property.NameEquals("onBehalfOfCallee"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onBehalfOfCallee = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value, options); + continue; + } if (property.NameEquals("correlationId"u8)) { correlationId = property.Value.GetString(); @@ -156,6 +164,7 @@ internal static AcsIncomingCallEventData DeserializeAcsIncomingCallEventData(Jso callerDisplayName, customContext, incomingCallContext, + onBehalfOfCallee, correlationId, serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.cs index a5ce2d8a623d..2a02164d5e87 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.cs @@ -68,9 +68,10 @@ internal AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationId /// Display name of caller. /// Custom Context of Incoming Call. /// Signed incoming call context. + /// The communication identifier of the user on behalf of whom the call is made. /// CorrelationId (CallId). /// Keeps track of any properties unknown to the library. - internal AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationIdentifier, CommunicationIdentifierModel fromCommunicationIdentifier, string serverCallId, string callerDisplayName, AcsIncomingCallCustomContext customContext, string incomingCallContext, string correlationId, IDictionary serializedAdditionalRawData) + internal AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationIdentifier, CommunicationIdentifierModel fromCommunicationIdentifier, string serverCallId, string callerDisplayName, AcsIncomingCallCustomContext customContext, string incomingCallContext, CommunicationIdentifierModel onBehalfOfCallee, string correlationId, IDictionary serializedAdditionalRawData) { ToCommunicationIdentifier = toCommunicationIdentifier; FromCommunicationIdentifier = fromCommunicationIdentifier; @@ -78,6 +79,7 @@ internal AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationId CallerDisplayName = callerDisplayName; CustomContext = customContext; IncomingCallContext = incomingCallContext; + OnBehalfOfCallee = onBehalfOfCallee; CorrelationId = correlationId; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -99,6 +101,8 @@ internal AcsIncomingCallEventData() public AcsIncomingCallCustomContext CustomContext { get; } /// Signed incoming call context. public string IncomingCallContext { get; } + /// The communication identifier of the user on behalf of whom the call is made. + public CommunicationIdentifierModel OnBehalfOfCallee { get; } /// CorrelationId (CallId). public string CorrelationId { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageButtonContent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageButtonContent.Serialization.cs index e275f42cae70..fcabdf356327 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageButtonContent.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageButtonContent.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsMessageButtonContent : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsMessageButtonContent)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Text)) { writer.WritePropertyName("text"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsMessageButtonContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageChannelEventError.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageChannelEventError.Serialization.cs index bcfd6c23a26a..35bb42e79091 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageChannelEventError.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageChannelEventError.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsMessageChannelEventError : IUtf8JsonSerializable, IJsonM 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsMessageChannelEventError)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ChannelCode)) { writer.WritePropertyName("channelCode"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsMessageChannelEventError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageContext.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageContext.Serialization.cs index 9ffc096f009a..241c868f3d38 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageContext.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageContext.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsMessageContext : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsMessageContext)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(From)) { writer.WritePropertyName("from"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsMessageContext IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.Serialization.cs index 72b0f5b834ec..488ef3417da5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsMessageDeliveryStatusUpdatedEventData : IUtf8JsonSeriali 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") @@ -34,16 +25,55 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsMessageDeliveryStatusUpdatedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(MessageId)) { writer.WritePropertyName("messageId"u8); writer.WriteStringValue(MessageId); } - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WritePropertyName("channelType"u8); - writer.WriteStringValue(ChannelKind.ToString()); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(ChannelKind)) + { + writer.WritePropertyName("channelType"u8); + writer.WriteStringValue(ChannelKind.Value.ToString()); + } + if (Optional.IsDefined(From)) + { + writer.WritePropertyName("from"u8); + writer.WriteStringValue(From); + } + if (Optional.IsDefined(To)) + { + writer.WritePropertyName("to"u8); + writer.WriteStringValue(To); + } + if (Optional.IsDefined(ReceivedTimestamp)) + { + writer.WritePropertyName("receivedTimeStamp"u8); + writer.WriteStringValue(ReceivedTimestamp.Value, "O"); + } + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsMessageDeliveryStatusUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -67,11 +97,11 @@ internal static AcsMessageDeliveryStatusUpdatedEventData DeserializeAcsMessageDe return null; } string messageId = default; - AcsMessageDeliveryStatus status = default; - AcsMessageChannelKind channelType = default; + AcsMessageDeliveryStatus? status = default; + AcsMessageChannelKind? channelType = default; string @from = default; string to = default; - DateTimeOffset receivedTimeStamp = default; + DateTimeOffset? receivedTimeStamp = default; AcsMessageChannelEventError error = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -84,11 +114,19 @@ internal static AcsMessageDeliveryStatusUpdatedEventData DeserializeAcsMessageDe } if (property.NameEquals("status"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } status = new AcsMessageDeliveryStatus(property.Value.GetString()); continue; } if (property.NameEquals("channelType"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } channelType = new AcsMessageChannelKind(property.Value.GetString()); continue; } @@ -104,6 +142,10 @@ internal static AcsMessageDeliveryStatusUpdatedEventData DeserializeAcsMessageDe } if (property.NameEquals("receivedTimeStamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } receivedTimeStamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.cs index 08ee6836ec0e..f4bd6f681f1e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.cs @@ -14,17 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsMessageDeliveryStatusUpdatedEventData : AcsMessageEventData { /// Initializes a new instance of . - /// The time message was received. /// The channel event error. - /// The updated message status. - /// The updated message channel type. /// is null. - internal AcsMessageDeliveryStatusUpdatedEventData(DateTimeOffset receivedTimestamp, AcsMessageChannelEventError error, AcsMessageDeliveryStatus status, AcsMessageChannelKind channelKind) : base(receivedTimestamp, error) + internal AcsMessageDeliveryStatusUpdatedEventData(AcsMessageChannelEventError error) : base(error) { Argument.AssertNotNull(error, nameof(error)); - - Status = status; - ChannelKind = channelKind; } /// Initializes a new instance of . @@ -36,7 +30,7 @@ internal AcsMessageDeliveryStatusUpdatedEventData(DateTimeOffset receivedTimesta /// The message id. /// The updated message status. /// The updated message channel type. - internal AcsMessageDeliveryStatusUpdatedEventData(string @from, string to, DateTimeOffset receivedTimestamp, AcsMessageChannelEventError error, IDictionary serializedAdditionalRawData, string messageId, AcsMessageDeliveryStatus status, AcsMessageChannelKind channelKind) : base(@from, to, receivedTimestamp, error, serializedAdditionalRawData) + internal AcsMessageDeliveryStatusUpdatedEventData(string @from, string to, DateTimeOffset? receivedTimestamp, AcsMessageChannelEventError error, IDictionary serializedAdditionalRawData, string messageId, AcsMessageDeliveryStatus? status, AcsMessageChannelKind? channelKind) : base(@from, to, receivedTimestamp, error, serializedAdditionalRawData) { MessageId = messageId; Status = status; @@ -51,8 +45,8 @@ internal AcsMessageDeliveryStatusUpdatedEventData() /// The message id. public string MessageId { get; } /// The updated message status. - public AcsMessageDeliveryStatus Status { get; } + public AcsMessageDeliveryStatus? Status { get; } /// The updated message channel type. - public AcsMessageChannelKind ChannelKind { get; } + public AcsMessageChannelKind? ChannelKind { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.Serialization.cs index a2d1c63653e7..85084fdd2334 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsMessageEventData : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsMessageEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(From)) { writer.WritePropertyName("from"u8); @@ -44,8 +36,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("to"u8); writer.WriteStringValue(To); } - writer.WritePropertyName("receivedTimeStamp"u8); - writer.WriteStringValue(ReceivedTimestamp, "O"); + if (Optional.IsDefined(ReceivedTimestamp)) + { + writer.WritePropertyName("receivedTimeStamp"u8); + writer.WriteStringValue(ReceivedTimestamp.Value, "O"); + } writer.WritePropertyName("error"u8); writer.WriteObjectValue(Error, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -63,6 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsMessageEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,7 +83,7 @@ internal static AcsMessageEventData DeserializeAcsMessageEventData(JsonElement e } string @from = default; string to = default; - DateTimeOffset receivedTimeStamp = default; + DateTimeOffset? receivedTimeStamp = default; AcsMessageChannelEventError error = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -105,6 +101,10 @@ internal static AcsMessageEventData DeserializeAcsMessageEventData(JsonElement e } if (property.NameEquals("receivedTimeStamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } receivedTimeStamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.cs index cedcc1dc0758..7bcb742ac6ae 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.cs @@ -46,14 +46,12 @@ public partial class AcsMessageEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time message was received. /// The channel event error. /// is null. - internal AcsMessageEventData(DateTimeOffset receivedTimestamp, AcsMessageChannelEventError error) + internal AcsMessageEventData(AcsMessageChannelEventError error) { Argument.AssertNotNull(error, nameof(error)); - ReceivedTimestamp = receivedTimestamp; Error = error; } @@ -63,7 +61,7 @@ internal AcsMessageEventData(DateTimeOffset receivedTimestamp, AcsMessageChannel /// The time message was received. /// The channel event error. /// Keeps track of any properties unknown to the library. - internal AcsMessageEventData(string @from, string to, DateTimeOffset receivedTimestamp, AcsMessageChannelEventError error, IDictionary serializedAdditionalRawData) + internal AcsMessageEventData(string @from, string to, DateTimeOffset? receivedTimestamp, AcsMessageChannelEventError error, IDictionary serializedAdditionalRawData) { From = @from; To = to; @@ -82,7 +80,7 @@ internal AcsMessageEventData() /// The message recipient. public string To { get; } /// The time message was received. - public DateTimeOffset ReceivedTimestamp { get; } + public DateTimeOffset? ReceivedTimestamp { get; } /// The channel event error. public AcsMessageChannelEventError Error { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveButtonReplyContent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveButtonReplyContent.Serialization.cs index 2216403a633d..758ac4239954 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveButtonReplyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveButtonReplyContent.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsMessageInteractiveButtonReplyContent : IUtf8JsonSerializ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsMessageInteractiveButtonReplyContent)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ButtonId)) { writer.WritePropertyName("id"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsMessageInteractiveButtonReplyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.Serialization.cs index 6ff87f62f04f..4ca652c9c616 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsMessageInteractiveContent : IUtf8JsonSerializable, IJson 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsMessageInteractiveContent)} does not support writing '{format}' format."); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ReplyKind.ToString()); + writer.WriteStartObject(); + if (Optional.IsDefined(ReplyKind)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ReplyKind.Value.ToString()); + } writer.WritePropertyName("buttonReply"u8); writer.WriteObjectValue(ButtonReply, options); writer.WritePropertyName("listReply"u8); @@ -55,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsMessageInteractiveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -77,7 +73,7 @@ internal static AcsMessageInteractiveContent DeserializeAcsMessageInteractiveCon { return null; } - AcsInteractiveReplyKind type = default; + AcsInteractiveReplyKind? type = default; AcsMessageInteractiveButtonReplyContent buttonReply = default; AcsMessageInteractiveListReplyContent listReply = default; IDictionary serializedAdditionalRawData = default; @@ -86,6 +82,10 @@ internal static AcsMessageInteractiveContent DeserializeAcsMessageInteractiveCon { if (property.NameEquals("type"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } type = new AcsInteractiveReplyKind(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.cs index 0d59cf31c2ff..9b8cdb2ab40a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.cs @@ -46,16 +46,14 @@ public partial class AcsMessageInteractiveContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The Message interactive reply type. /// The Message Sent when a customer clicks a button. /// The Message Sent when a customer selects an item from a list. /// or is null. - internal AcsMessageInteractiveContent(AcsInteractiveReplyKind replyKind, AcsMessageInteractiveButtonReplyContent buttonReply, AcsMessageInteractiveListReplyContent listReply) + internal AcsMessageInteractiveContent(AcsMessageInteractiveButtonReplyContent buttonReply, AcsMessageInteractiveListReplyContent listReply) { Argument.AssertNotNull(buttonReply, nameof(buttonReply)); Argument.AssertNotNull(listReply, nameof(listReply)); - ReplyKind = replyKind; ButtonReply = buttonReply; ListReply = listReply; } @@ -65,7 +63,7 @@ internal AcsMessageInteractiveContent(AcsInteractiveReplyKind replyKind, AcsMess /// The Message Sent when a customer clicks a button. /// The Message Sent when a customer selects an item from a list. /// Keeps track of any properties unknown to the library. - internal AcsMessageInteractiveContent(AcsInteractiveReplyKind replyKind, AcsMessageInteractiveButtonReplyContent buttonReply, AcsMessageInteractiveListReplyContent listReply, IDictionary serializedAdditionalRawData) + internal AcsMessageInteractiveContent(AcsInteractiveReplyKind? replyKind, AcsMessageInteractiveButtonReplyContent buttonReply, AcsMessageInteractiveListReplyContent listReply, IDictionary serializedAdditionalRawData) { ReplyKind = replyKind; ButtonReply = buttonReply; @@ -79,7 +77,7 @@ internal AcsMessageInteractiveContent() } /// The Message interactive reply type. - public AcsInteractiveReplyKind ReplyKind { get; } + public AcsInteractiveReplyKind? ReplyKind { get; } /// The Message Sent when a customer clicks a button. public AcsMessageInteractiveButtonReplyContent ButtonReply { get; } /// The Message Sent when a customer selects an item from a list. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveListReplyContent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveListReplyContent.Serialization.cs index 12bbb0dc4500..892ac653de5e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveListReplyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveListReplyContent.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsMessageInteractiveListReplyContent : IUtf8JsonSerializab 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsMessageInteractiveListReplyContent)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ListItemId)) { writer.WritePropertyName("id"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsMessageInteractiveListReplyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageMediaContent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageMediaContent.Serialization.cs index c1b6362d3b52..6654e00a99b9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageMediaContent.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageMediaContent.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsMessageMediaContent : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsMessageMediaContent)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(MimeType)) { writer.WritePropertyName("mimeType"u8); @@ -69,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsMessageMediaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.Serialization.cs index 29d76082dfa2..f9d053bd7287 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsMessageReceivedEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsMessageReceivedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Content)) { writer.WritePropertyName("content"u8); @@ -50,6 +41,39 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(Button, options); writer.WritePropertyName("interactive"u8); writer.WriteObjectValue(InteractiveContent, options); + if (Optional.IsDefined(From)) + { + writer.WritePropertyName("from"u8); + writer.WriteStringValue(From); + } + if (Optional.IsDefined(To)) + { + writer.WritePropertyName("to"u8); + writer.WriteStringValue(To); + } + if (Optional.IsDefined(ReceivedTimestamp)) + { + writer.WritePropertyName("receivedTimeStamp"u8); + writer.WriteStringValue(ReceivedTimestamp.Value, "O"); + } + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsMessageReceivedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -80,7 +104,7 @@ internal static AcsMessageReceivedEventData DeserializeAcsMessageReceivedEventDa AcsMessageInteractiveContent interactive = default; string @from = default; string to = default; - DateTimeOffset receivedTimeStamp = default; + DateTimeOffset? receivedTimeStamp = default; AcsMessageChannelEventError error = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -128,6 +152,10 @@ internal static AcsMessageReceivedEventData DeserializeAcsMessageReceivedEventDa } if (property.NameEquals("receivedTimeStamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } receivedTimeStamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.cs index b7435b051bdf..a15a9991bdda 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.cs @@ -14,7 +14,6 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsMessageReceivedEventData : AcsMessageEventData { /// Initializes a new instance of . - /// The time message was received. /// The channel event error. /// The message channel type. /// The received message media content. @@ -22,7 +21,7 @@ public partial class AcsMessageReceivedEventData : AcsMessageEventData /// The received message button content. /// The received message interactive content. /// , , , or is null. - internal AcsMessageReceivedEventData(DateTimeOffset receivedTimestamp, AcsMessageChannelEventError error, AcsMessageChannelKind channelKind, AcsMessageMediaContent mediaContent, AcsMessageContext context, AcsMessageButtonContent button, AcsMessageInteractiveContent interactiveContent) : base(receivedTimestamp, error) + internal AcsMessageReceivedEventData(AcsMessageChannelEventError error, AcsMessageChannelKind channelKind, AcsMessageMediaContent mediaContent, AcsMessageContext context, AcsMessageButtonContent button, AcsMessageInteractiveContent interactiveContent) : base(error) { Argument.AssertNotNull(error, nameof(error)); Argument.AssertNotNull(mediaContent, nameof(mediaContent)); @@ -49,7 +48,7 @@ internal AcsMessageReceivedEventData(DateTimeOffset receivedTimestamp, AcsMessag /// The received message context. /// The received message button content. /// The received message interactive content. - internal AcsMessageReceivedEventData(string @from, string to, DateTimeOffset receivedTimestamp, AcsMessageChannelEventError error, IDictionary serializedAdditionalRawData, string content, AcsMessageChannelKind channelKind, AcsMessageMediaContent mediaContent, AcsMessageContext context, AcsMessageButtonContent button, AcsMessageInteractiveContent interactiveContent) : base(@from, to, receivedTimestamp, error, serializedAdditionalRawData) + internal AcsMessageReceivedEventData(string @from, string to, DateTimeOffset? receivedTimestamp, AcsMessageChannelEventError error, IDictionary serializedAdditionalRawData, string content, AcsMessageChannelKind channelKind, AcsMessageMediaContent mediaContent, AcsMessageContext context, AcsMessageButtonContent button, AcsMessageInteractiveContent interactiveContent) : base(@from, to, receivedTimestamp, error, serializedAdditionalRawData) { Content = content; ChannelKind = channelKind; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingChunkInfoProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingChunkInfoProperties.Serialization.cs index a8f2e2d3be36..93e8e1528539 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingChunkInfoProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingChunkInfoProperties.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRecordingChunkInfoProperties : IUtf8JsonSerializable, IJ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRecordingChunkInfoProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(DocumentId)) { writer.WritePropertyName("documentId"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsRecordingChunkInfoProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.Serialization.cs index 395739dfd570..51f9f6f344a9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRecordingFileStatusUpdatedEventData : IUtf8JsonSerializa 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") @@ -34,21 +25,34 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRecordingFileStatusUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("recordingStorageInfo"u8); writer.WriteObjectValue(RecordingStorageInfo, options); - writer.WritePropertyName("recordingStartTime"u8); - writer.WriteStringValue(RecordingStartTime, "O"); + if (Optional.IsDefined(RecordingStartTime)) + { + writer.WritePropertyName("recordingStartTime"u8); + writer.WriteStringValue(RecordingStartTime.Value, "O"); + } if (Optional.IsDefined(RecordingDurationMs)) { writer.WritePropertyName("recordingDurationMs"u8); writer.WriteNumberValue(RecordingDurationMs.Value); } - writer.WritePropertyName("recordingContentType"u8); - writer.WriteStringValue(RecordingContentType.ToString()); - writer.WritePropertyName("recordingChannelType"u8); - writer.WriteStringValue(RecordingChannelKind.ToString()); - writer.WritePropertyName("recordingFormatType"u8); - writer.WriteStringValue(RecordingFormatType.ToString()); + if (Optional.IsDefined(RecordingContentType)) + { + writer.WritePropertyName("recordingContentType"u8); + writer.WriteStringValue(RecordingContentType.Value.ToString()); + } + if (Optional.IsDefined(RecordingChannelKind)) + { + writer.WritePropertyName("recordingChannelType"u8); + writer.WriteStringValue(RecordingChannelKind.Value.ToString()); + } + if (Optional.IsDefined(RecordingFormatType)) + { + writer.WritePropertyName("recordingFormatType"u8); + writer.WriteStringValue(RecordingFormatType.Value.ToString()); + } if (Optional.IsDefined(SessionEndReason)) { writer.WritePropertyName("sessionEndReason"u8); @@ -69,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsRecordingFileStatusUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -92,11 +97,11 @@ internal static AcsRecordingFileStatusUpdatedEventData DeserializeAcsRecordingFi return null; } AcsRecordingStorageInfoProperties recordingStorageInfo = default; - DateTimeOffset recordingStartTime = default; + DateTimeOffset? recordingStartTime = default; long? recordingDurationMs = default; - RecordingContentType recordingContentType = default; - RecordingChannelType recordingChannelType = default; - RecordingFormatType recordingFormatType = default; + RecordingContentType? recordingContentType = default; + RecordingChannelType? recordingChannelType = default; + RecordingFormatType? recordingFormatType = default; string sessionEndReason = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -109,6 +114,10 @@ internal static AcsRecordingFileStatusUpdatedEventData DeserializeAcsRecordingFi } if (property.NameEquals("recordingStartTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } recordingStartTime = property.Value.GetDateTimeOffset("O"); continue; } @@ -123,16 +132,28 @@ internal static AcsRecordingFileStatusUpdatedEventData DeserializeAcsRecordingFi } if (property.NameEquals("recordingContentType"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } recordingContentType = new RecordingContentType(property.Value.GetString()); continue; } if (property.NameEquals("recordingChannelType"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } recordingChannelType = new RecordingChannelType(property.Value.GetString()); continue; } if (property.NameEquals("recordingFormatType"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } recordingFormatType = new RecordingFormatType(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.cs index a5e50aee2cc8..6e00dccf4760 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.cs @@ -47,20 +47,12 @@ public partial class AcsRecordingFileStatusUpdatedEventData /// Initializes a new instance of . /// The details of recording storage information. - /// The time at which the recording started. - /// The recording content type- AudioVideo, or Audio. - /// The recording channel type - Mixed, Unmixed. - /// The recording format type - Mp4, Mp3, Wav. /// is null. - internal AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo, DateTimeOffset recordingStartTime, RecordingContentType recordingContentType, RecordingChannelType recordingChannelKind, RecordingFormatType recordingFormatType) + internal AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo) { Argument.AssertNotNull(recordingStorageInfo, nameof(recordingStorageInfo)); RecordingStorageInfo = recordingStorageInfo; - RecordingStartTime = recordingStartTime; - RecordingContentType = recordingContentType; - RecordingChannelKind = recordingChannelKind; - RecordingFormatType = recordingFormatType; } /// Initializes a new instance of . @@ -72,7 +64,7 @@ internal AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoPropertie /// The recording format type - Mp4, Mp3, Wav. /// The reason for ending recording session. /// Keeps track of any properties unknown to the library. - internal AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo, DateTimeOffset recordingStartTime, long? recordingDurationMs, RecordingContentType recordingContentType, RecordingChannelType recordingChannelKind, RecordingFormatType recordingFormatType, string sessionEndReason, IDictionary serializedAdditionalRawData) + internal AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo, DateTimeOffset? recordingStartTime, long? recordingDurationMs, RecordingContentType? recordingContentType, RecordingChannelType? recordingChannelKind, RecordingFormatType? recordingFormatType, string sessionEndReason, IDictionary serializedAdditionalRawData) { RecordingStorageInfo = recordingStorageInfo; RecordingStartTime = recordingStartTime; @@ -92,15 +84,15 @@ internal AcsRecordingFileStatusUpdatedEventData() /// The details of recording storage information. public AcsRecordingStorageInfoProperties RecordingStorageInfo { get; } /// The time at which the recording started. - public DateTimeOffset RecordingStartTime { get; } + public DateTimeOffset? RecordingStartTime { get; } /// The recording duration in milliseconds. public long? RecordingDurationMs { get; } /// The recording content type- AudioVideo, or Audio. - public RecordingContentType RecordingContentType { get; } + public RecordingContentType? RecordingContentType { get; } /// The recording channel type - Mixed, Unmixed. - public RecordingChannelType RecordingChannelKind { get; } + public RecordingChannelType? RecordingChannelKind { get; } /// The recording format type - Mp4, Mp3, Wav. - public RecordingFormatType RecordingFormatType { get; } + public RecordingFormatType? RecordingFormatType { get; } /// The reason for ending recording session. public string SessionEndReason { 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 b982628a55e1..f656ec18df5f 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 @@ -18,15 +18,6 @@ public partial class AcsRecordingStorageInfoProperties : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRecordingStorageInfoProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("recordingChunks"u8); writer.WriteStartArray(); foreach (var item in RecordingChunks) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsRecordingStorageInfoProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterChannelConfiguration.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterChannelConfiguration.Serialization.cs index 135e0f74c1e6..2330958a4bec 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterChannelConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterChannelConfiguration.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterChannelConfiguration : IUtf8JsonSerializable, IJso 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRouterChannelConfiguration)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ChannelId)) { writer.WritePropertyName("channelId"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsRouterChannelConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 ac35ce20f6dd..cf6a815c4a29 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 @@ -18,15 +18,6 @@ public partial class AcsRouterCommunicationError : IUtf8JsonSerializable, IJsonM 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRouterCommunicationError)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -73,6 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsRouterCommunicationError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterEventData.Serialization.cs index 5b32185ff864..5f700bcda105 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterEventData : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRouterEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(JobId)) { writer.WritePropertyName("jobId"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsRouterEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCancelledEventData.Serialization.cs index e15c613a25c7..5668e1add1d9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCancelledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCancelledEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterJobCancelledEventData : IUtf8JsonSerializable, IJs 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobCancelledEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Note)) { writer.WritePropertyName("note"u8); @@ -45,6 +36,58 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("dispositionCode"u8); writer.WriteStringValue(DispositionCode); } + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobCancelledEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 090664429c16..9b1a67c246bd 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 @@ -18,15 +18,6 @@ public partial class AcsRouterJobClassificationFailedEventData : IUtf8JsonSerial 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobClassificationFailedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(ClassificationPolicyId)) { writer.WritePropertyName("classificationPolicyId"u8); @@ -47,6 +38,58 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobClassificationFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 0b0a9bd354ec..f5263f2c3b39 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 @@ -18,15 +18,6 @@ public partial class AcsRouterJobClassifiedEventData : IUtf8JsonSerializable, IJ 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobClassifiedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("queueDetails"u8); writer.WriteObjectValue(QueueDetails, options); if (Optional.IsDefined(ClassificationPolicyId)) @@ -54,6 +45,58 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobClassifiedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClosedEventData.Serialization.cs index b9c7d767ce73..856c0ef3af2c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClosedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClosedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterJobClosedEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobClosedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(AssignmentId)) { writer.WritePropertyName("assignmentId"u8); @@ -50,6 +41,58 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("dispositionCode"u8); writer.WriteStringValue(DispositionCode); } + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobClosedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCompletedEventData.Serialization.cs index ad9d4e2b7562..69623e393d01 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterJobCompletedEventData : IUtf8JsonSerializable, IJs 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobCompletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(AssignmentId)) { writer.WritePropertyName("assignmentId"u8); @@ -45,6 +36,58 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("workerId"u8); writer.WriteStringValue(WorkerId); } + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobDeletedEventData.Serialization.cs index bbaef5ff3234..c3fba05a84fd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterJobDeletedEventData : IUtf8JsonSerializable, IJson 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") @@ -34,7 +25,59 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobDeletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobEventData.Serialization.cs index 87daa91a2b05..079c24120b3b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterJobEventData : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(QueueId)) { writer.WritePropertyName("queueId"u8); @@ -56,6 +47,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobExceptionTriggeredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobExceptionTriggeredEventData.Serialization.cs index d905440c958c..721c147d50c5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobExceptionTriggeredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobExceptionTriggeredEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterJobExceptionTriggeredEventData : IUtf8JsonSerializ 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobExceptionTriggeredEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(RuleKey)) { writer.WritePropertyName("ruleKey"u8); @@ -45,6 +36,58 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("exceptionRuleId"u8); writer.WriteStringValue(ExceptionRuleId); } + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobExceptionTriggeredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 75226e90cba1..ee99abbb3051 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 @@ -18,15 +18,6 @@ public partial class AcsRouterJobQueuedEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobQueuedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Priority)) { writer.WritePropertyName("priority"u8); @@ -54,6 +45,58 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobQueuedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 0e2b60e8c2da..655772773de2 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 @@ -18,15 +18,6 @@ public partial class AcsRouterJobReceivedEventData : IUtf8JsonSerializable, IJso 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") @@ -34,9 +25,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobReceivedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("jobStatus"u8); - writer.WriteStringValue(JobStatus.ToString()); + writer.WriteStartObject(); + if (Optional.IsDefined(JobStatus)) + { + writer.WritePropertyName("jobStatus"u8); + writer.WriteStringValue(JobStatus.Value.ToString()); + } if (Optional.IsDefined(ClassificationPolicyId)) { writer.WritePropertyName("classificationPolicyId"u8); @@ -54,10 +48,65 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("scheduledOn"u8); - writer.WriteStringValue(ScheduledOn, "O"); + if (Optional.IsDefined(ScheduledOn)) + { + writer.WritePropertyName("scheduledOn"u8); + writer.WriteStringValue(ScheduledOn.Value, "O"); + } writer.WritePropertyName("unavailableForMatching"u8); writer.WriteBooleanValue(UnavailableForMatching); + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobReceivedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -80,11 +129,11 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve { return null; } - AcsRouterJobStatus jobStatus = default; + AcsRouterJobStatus? jobStatus = default; string classificationPolicyId = default; int? priority = default; IReadOnlyList requestedWorkerSelectors = default; - DateTimeOffset scheduledOn = default; + DateTimeOffset? scheduledOn = default; bool unavailableForMatching = default; string queueId = default; IReadOnlyDictionary labels = default; @@ -98,6 +147,10 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve { if (property.NameEquals("jobStatus"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } jobStatus = new AcsRouterJobStatus(property.Value.GetString()); continue; } @@ -127,6 +180,10 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve } if (property.NameEquals("scheduledOn"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } scheduledOn = property.Value.GetDateTimeOffset("O"); continue; } 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 3a5d5a136ea7..e13d3fb3647b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs @@ -17,20 +17,16 @@ public partial class AcsRouterJobReceivedEventData : AcsRouterJobEventData /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Received Job Status. /// Router Job Received Requested Worker Selectors. - /// Router Job Received Scheduled Time in UTC. /// Unavailable For Matching for Router Job Received. /// , or is null. - internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterJobStatus jobStatus, IEnumerable requestedWorkerSelectors, DateTimeOffset scheduledOn, bool unavailableForMatching) : base(labels, tags) + internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable requestedWorkerSelectors, bool unavailableForMatching) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); Argument.AssertNotNull(requestedWorkerSelectors, nameof(requestedWorkerSelectors)); - JobStatus = jobStatus; RequestedWorkerSelectors = requestedWorkerSelectors.ToList(); - ScheduledOn = scheduledOn; UnavailableForMatching = unavailableForMatching; } @@ -48,7 +44,7 @@ internal AcsRouterJobReceivedEventData(IReadOnlyDictionary label /// Router Job Received Requested Worker Selectors. /// Router Job Received Scheduled Time in UTC. /// Unavailable For Matching for Router Job Received. - internal AcsRouterJobReceivedEventData(string jobId, string channelReference, string channelId, IDictionary serializedAdditionalRawData, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterJobStatus jobStatus, string classificationPolicyId, int? priority, IReadOnlyList requestedWorkerSelectors, DateTimeOffset scheduledOn, bool unavailableForMatching) : base(jobId, channelReference, channelId, serializedAdditionalRawData, queueId, labels, tags) + internal AcsRouterJobReceivedEventData(string jobId, string channelReference, string channelId, IDictionary serializedAdditionalRawData, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterJobStatus? jobStatus, string classificationPolicyId, int? priority, IReadOnlyList requestedWorkerSelectors, DateTimeOffset? scheduledOn, bool unavailableForMatching) : base(jobId, channelReference, channelId, serializedAdditionalRawData, queueId, labels, tags) { JobStatus = jobStatus; ClassificationPolicyId = classificationPolicyId; @@ -64,7 +60,7 @@ internal AcsRouterJobReceivedEventData() } /// Router Job Received Job Status. - public AcsRouterJobStatus JobStatus { get; } + public AcsRouterJobStatus? JobStatus { get; } /// Router Job Classification Policy Id. public string ClassificationPolicyId { get; } /// Router Job Priority. @@ -72,7 +68,7 @@ internal AcsRouterJobReceivedEventData() /// Router Job Received Requested Worker Selectors. public IReadOnlyList RequestedWorkerSelectors { get; } /// Router Job Received Scheduled Time in UTC. - public DateTimeOffset ScheduledOn { get; } + public DateTimeOffset? ScheduledOn { get; } /// Unavailable For Matching for Router Job Received. public bool UnavailableForMatching { get; } } 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 69d6854197d6..b0a931a00cac 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 @@ -18,15 +18,6 @@ public partial class AcsRouterJobSchedulingFailedEventData : IUtf8JsonSerializab 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobSchedulingFailedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Priority)) { writer.WritePropertyName("priority"u8); @@ -54,13 +45,68 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("scheduledOn"u8); - writer.WriteStringValue(ScheduledOn, "O"); + if (Optional.IsDefined(ScheduledOn)) + { + writer.WritePropertyName("scheduledOn"u8); + writer.WriteStringValue(ScheduledOn.Value, "O"); + } if (Optional.IsDefined(FailureReason)) { writer.WritePropertyName("failureReason"u8); writer.WriteStringValue(FailureReason); } + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobSchedulingFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -86,7 +132,7 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch int? priority = default; IReadOnlyList expiredAttachedWorkerSelectors = default; IReadOnlyList expiredRequestedWorkerSelectors = default; - DateTimeOffset scheduledOn = default; + DateTimeOffset? scheduledOn = default; string failureReason = default; string queueId = default; IReadOnlyDictionary labels = default; @@ -129,6 +175,10 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch } if (property.NameEquals("scheduledOn"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } scheduledOn = property.Value.GetDateTimeOffset("O"); continue; } 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 6d55b80f185a..2f38f8a6466d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs @@ -19,9 +19,8 @@ public partial class AcsRouterJobSchedulingFailedEventData : AcsRouterJobEventDa /// Router Jobs events Tags. /// Router Job Scheduling Failed Attached Worker Selector Expired. /// Router Job Scheduling Failed Requested Worker Selector Expired. - /// Router Job Scheduling Failed Scheduled Time in UTC. /// , , or is null. - internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors, DateTimeOffset scheduledOn) : base(labels, tags) + internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); @@ -30,7 +29,6 @@ internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary Initializes a new instance of . @@ -46,7 +44,7 @@ internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary Router Job Scheduling Failed Requested Worker Selector Expired. /// Router Job Scheduling Failed Scheduled Time in UTC. /// Router Job Scheduling Failed Reason. - internal AcsRouterJobSchedulingFailedEventData(string jobId, string channelReference, string channelId, IDictionary serializedAdditionalRawData, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, int? priority, IReadOnlyList expiredAttachedWorkerSelectors, IReadOnlyList expiredRequestedWorkerSelectors, DateTimeOffset scheduledOn, string failureReason) : base(jobId, channelReference, channelId, serializedAdditionalRawData, queueId, labels, tags) + internal AcsRouterJobSchedulingFailedEventData(string jobId, string channelReference, string channelId, IDictionary serializedAdditionalRawData, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, int? priority, IReadOnlyList expiredAttachedWorkerSelectors, IReadOnlyList expiredRequestedWorkerSelectors, DateTimeOffset? scheduledOn, string failureReason) : base(jobId, channelReference, channelId, serializedAdditionalRawData, queueId, labels, tags) { Priority = priority; ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors; @@ -67,7 +65,7 @@ internal AcsRouterJobSchedulingFailedEventData() /// Router Job Scheduling Failed Requested Worker Selector Expired. public IReadOnlyList ExpiredRequestedWorkerSelectors { get; } /// Router Job Scheduling Failed Scheduled Time in UTC. - public DateTimeOffset ScheduledOn { get; } + public DateTimeOffset? ScheduledOn { get; } /// Router Job Scheduling Failed Reason. public string FailureReason { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobUnassignedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobUnassignedEventData.Serialization.cs index 9441b48fa3fb..60a9540b6cc5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobUnassignedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobUnassignedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterJobUnassignedEventData : IUtf8JsonSerializable, IJ 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobUnassignedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(AssignmentId)) { writer.WritePropertyName("assignmentId"u8); @@ -45,6 +36,58 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("workerId"u8); writer.WriteStringValue(WorkerId); } + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobUnassignedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 fc5948af2cc9..628fb9c0a489 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 @@ -18,15 +18,6 @@ public partial class AcsRouterJobWaitingForActivationEventData : IUtf8JsonSerial 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobWaitingForActivationEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Priority)) { writer.WritePropertyName("priority"u8); @@ -54,10 +45,65 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("scheduledOn"u8); - writer.WriteStringValue(ScheduledOn, "O"); + if (Optional.IsDefined(ScheduledOn)) + { + writer.WritePropertyName("scheduledOn"u8); + writer.WriteStringValue(ScheduledOn.Value, "O"); + } writer.WritePropertyName("unavailableForMatching"u8); writer.WriteBooleanValue(UnavailableForMatching); + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobWaitingForActivationEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -83,7 +129,7 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo int? priority = default; IReadOnlyList expiredAttachedWorkerSelectors = default; IReadOnlyList expiredRequestedWorkerSelectors = default; - DateTimeOffset scheduledOn = default; + DateTimeOffset? scheduledOn = default; bool unavailableForMatching = default; string queueId = default; IReadOnlyDictionary labels = default; @@ -126,6 +172,10 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo } if (property.NameEquals("scheduledOn"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } scheduledOn = property.Value.GetDateTimeOffset("O"); continue; } 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 445da526d6c0..df1a3085421f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs @@ -19,10 +19,9 @@ public partial class AcsRouterJobWaitingForActivationEventData : AcsRouterJobEve /// 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 Scheduled Time in UTC. /// Router Job Waiting For Activation Unavailable For Matching. /// , , or is null. - internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors, DateTimeOffset scheduledOn, bool unavailableForMatching) : base(labels, tags) + internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors, bool unavailableForMatching) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); @@ -31,7 +30,6 @@ internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary Router Job Waiting For Activation Requested Worker Selector Expired. /// Router Job Waiting For Activation Scheduled Time in UTC. /// Router Job Waiting For Activation Unavailable For Matching. - internal AcsRouterJobWaitingForActivationEventData(string jobId, string channelReference, string channelId, IDictionary serializedAdditionalRawData, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, int? priority, IReadOnlyList expiredAttachedWorkerSelectors, IReadOnlyList expiredRequestedWorkerSelectors, DateTimeOffset scheduledOn, bool unavailableForMatching) : base(jobId, channelReference, channelId, serializedAdditionalRawData, queueId, labels, tags) + internal AcsRouterJobWaitingForActivationEventData(string jobId, string channelReference, string channelId, IDictionary serializedAdditionalRawData, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, int? priority, IReadOnlyList expiredAttachedWorkerSelectors, IReadOnlyList expiredRequestedWorkerSelectors, DateTimeOffset? scheduledOn, bool unavailableForMatching) : base(jobId, channelReference, channelId, serializedAdditionalRawData, queueId, labels, tags) { Priority = priority; ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors; @@ -69,7 +67,7 @@ internal AcsRouterJobWaitingForActivationEventData() /// Router Job Waiting For Activation Requested Worker Selector Expired. public IReadOnlyList ExpiredRequestedWorkerSelectors { get; } /// Router Job Waiting For Activation Scheduled Time in UTC. - public DateTimeOffset ScheduledOn { get; } + public DateTimeOffset? ScheduledOn { get; } /// Router Job Waiting For Activation Unavailable For Matching. public bool UnavailableForMatching { get; } } 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 c413c842d5f3..a4ddb64b3d3c 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 @@ -18,15 +18,6 @@ public partial class AcsRouterJobWorkerSelectorsExpiredEventData : IUtf8JsonSeri 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterJobWorkerSelectorsExpiredEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); writer.WriteStartArray(); foreach (var item in ExpiredRequestedWorkerSelectors) @@ -49,6 +40,58 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + if (Optional.IsDefined(QueueId)) + { + writer.WritePropertyName("queueId"u8); + writer.WriteStringValue(QueueId); + } + writer.WritePropertyName("labels"u8); + writer.WriteStartObject(); + foreach (var item in Labels) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterJobWorkerSelectorsExpiredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterQueueDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterQueueDetails.Serialization.cs index c25adb1efb16..9ce5c9d540c4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterQueueDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterQueueDetails.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterQueueDetails : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRouterQueueDetails)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -67,6 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsRouterQueueDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeletedEventData.Serialization.cs index 7c89f2dfa373..8750a9fbf716 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterWorkerDeletedEventData : IUtf8JsonSerializable, IJ 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") @@ -34,7 +25,43 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterWorkerDeletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(WorkerId)) + { + writer.WritePropertyName("workerId"u8); + writer.WriteStringValue(WorkerId); + } + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterWorkerDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeregisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeregisteredEventData.Serialization.cs index b248ed2ec1e4..0cf43afecb1b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeregisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeregisteredEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterWorkerDeregisteredEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRouterWorkerDeregisteredEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(WorkerId)) { writer.WritePropertyName("workerId"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsRouterWorkerDeregisteredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerEventData.Serialization.cs index 7c0739ea3ed8..eb0dc5f13e21 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterWorkerEventData : IUtf8JsonSerializable, IJsonMode 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") @@ -34,12 +25,43 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterWorkerEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(WorkerId)) { writer.WritePropertyName("workerId"u8); writer.WriteStringValue(WorkerId); } + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterWorkerEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferAcceptedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferAcceptedEventData.Serialization.cs index 3c17625dd6a3..0c2ce9e18442 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferAcceptedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferAcceptedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterWorkerOfferAcceptedEventData : IUtf8JsonSerializab 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterWorkerOfferAcceptedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(QueueId)) { writer.WritePropertyName("queueId"u8); @@ -87,6 +78,42 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); + if (Optional.IsDefined(WorkerId)) + { + writer.WritePropertyName("workerId"u8); + writer.WriteStringValue(WorkerId); + } + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterWorkerOfferAcceptedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferDeclinedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferDeclinedEventData.Serialization.cs index 03ac1ee19352..cebe412041ed 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferDeclinedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferDeclinedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterWorkerOfferDeclinedEventData : IUtf8JsonSerializab 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterWorkerOfferDeclinedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(QueueId)) { writer.WritePropertyName("queueId"u8); @@ -45,6 +36,42 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("offerId"u8); writer.WriteStringValue(OfferId); } + if (Optional.IsDefined(WorkerId)) + { + writer.WritePropertyName("workerId"u8); + writer.WriteStringValue(WorkerId); + } + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterWorkerOfferDeclinedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferExpiredEventData.Serialization.cs index 9dc8153fd970..3a0c7c130d7a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferExpiredEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterWorkerOfferExpiredEventData : IUtf8JsonSerializabl 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterWorkerOfferExpiredEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(QueueId)) { writer.WritePropertyName("queueId"u8); @@ -45,6 +36,42 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("offerId"u8); writer.WriteStringValue(OfferId); } + if (Optional.IsDefined(WorkerId)) + { + writer.WritePropertyName("workerId"u8); + writer.WriteStringValue(WorkerId); + } + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterWorkerOfferExpiredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.Serialization.cs index 817a8da1b0fd..ccf679cdea50 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterWorkerOfferIssuedEventData : IUtf8JsonSerializable 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterWorkerOfferIssuedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(QueueId)) { writer.WritePropertyName("queueId"u8); @@ -58,10 +49,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); - writer.WritePropertyName("offeredOn"u8); - writer.WriteStringValue(OfferedOn, "O"); - writer.WritePropertyName("expiresOn"u8); - writer.WriteStringValue(ExpiresOn, "O"); + if (Optional.IsDefined(OfferedOn)) + { + writer.WritePropertyName("offeredOn"u8); + writer.WriteStringValue(OfferedOn.Value, "O"); + } + if (Optional.IsDefined(ExpiresOn)) + { + writer.WritePropertyName("expiresOn"u8); + writer.WriteStringValue(ExpiresOn.Value, "O"); + } writer.WritePropertyName("workerTags"u8); writer.WriteStartObject(); foreach (var item in WorkerTags) @@ -86,6 +83,42 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); + if (Optional.IsDefined(WorkerId)) + { + writer.WritePropertyName("workerId"u8); + writer.WriteStringValue(WorkerId); + } + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterWorkerOfferIssuedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -112,8 +145,8 @@ internal static AcsRouterWorkerOfferIssuedEventData DeserializeAcsRouterWorkerOf string offerId = default; int? jobPriority = default; IReadOnlyDictionary workerLabels = default; - DateTimeOffset offeredOn = default; - DateTimeOffset expiresOn = default; + DateTimeOffset? offeredOn = default; + DateTimeOffset? expiresOn = default; IReadOnlyDictionary workerTags = default; IReadOnlyDictionary jobLabels = default; IReadOnlyDictionary jobTags = default; @@ -156,11 +189,19 @@ internal static AcsRouterWorkerOfferIssuedEventData DeserializeAcsRouterWorkerOf } if (property.NameEquals("offeredOn"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } offeredOn = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("expiresOn"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } expiresOn = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.cs index f964beba9d50..ac8aee0106c3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.cs @@ -15,13 +15,11 @@ public partial class AcsRouterWorkerOfferIssuedEventData : AcsRouterWorkerEventD { /// Initializes a new instance of . /// Router Worker Offer Issued Worker Labels. - /// Router Worker Offer Issued Time in UTC. - /// Router Worker Offer Issued Expiration Time in UTC. /// Router Worker Offer Issued Worker Tags. /// Router Worker Offer Issued Job Labels. /// Router Worker Offer Issued Job Tags. /// , , or is null. - internal AcsRouterWorkerOfferIssuedEventData(IReadOnlyDictionary workerLabels, DateTimeOffset offeredOn, DateTimeOffset expiresOn, IReadOnlyDictionary workerTags, IReadOnlyDictionary jobLabels, IReadOnlyDictionary jobTags) + internal AcsRouterWorkerOfferIssuedEventData(IReadOnlyDictionary workerLabels, IReadOnlyDictionary workerTags, IReadOnlyDictionary jobLabels, IReadOnlyDictionary jobTags) { Argument.AssertNotNull(workerLabels, nameof(workerLabels)); Argument.AssertNotNull(workerTags, nameof(workerTags)); @@ -29,8 +27,6 @@ internal AcsRouterWorkerOfferIssuedEventData(IReadOnlyDictionary Argument.AssertNotNull(jobTags, nameof(jobTags)); WorkerLabels = workerLabels; - OfferedOn = offeredOn; - ExpiresOn = expiresOn; WorkerTags = workerTags; JobLabels = jobLabels; JobTags = jobTags; @@ -51,7 +47,7 @@ internal AcsRouterWorkerOfferIssuedEventData(IReadOnlyDictionary /// Router Worker Offer Issued Worker Tags. /// Router Worker Offer Issued Job Labels. /// Router Worker Offer Issued Job Tags. - internal AcsRouterWorkerOfferIssuedEventData(string jobId, string channelReference, string channelId, IDictionary serializedAdditionalRawData, string workerId, string queueId, string offerId, int? jobPriority, IReadOnlyDictionary workerLabels, DateTimeOffset offeredOn, DateTimeOffset expiresOn, IReadOnlyDictionary workerTags, IReadOnlyDictionary jobLabels, IReadOnlyDictionary jobTags) : base(jobId, channelReference, channelId, serializedAdditionalRawData, workerId) + internal AcsRouterWorkerOfferIssuedEventData(string jobId, string channelReference, string channelId, IDictionary serializedAdditionalRawData, string workerId, string queueId, string offerId, int? jobPriority, IReadOnlyDictionary workerLabels, DateTimeOffset? offeredOn, DateTimeOffset? expiresOn, IReadOnlyDictionary workerTags, IReadOnlyDictionary jobLabels, IReadOnlyDictionary jobTags) : base(jobId, channelReference, channelId, serializedAdditionalRawData, workerId) { QueueId = queueId; OfferId = offerId; @@ -78,9 +74,9 @@ internal AcsRouterWorkerOfferIssuedEventData() /// Router Worker Offer Issued Worker Labels. public IReadOnlyDictionary WorkerLabels { get; } /// Router Worker Offer Issued Time in UTC. - public DateTimeOffset OfferedOn { get; } + public DateTimeOffset? OfferedOn { get; } /// Router Worker Offer Issued Expiration Time in UTC. - public DateTimeOffset ExpiresOn { get; } + public DateTimeOffset? ExpiresOn { get; } /// Router Worker Offer Issued Worker Tags. public IReadOnlyDictionary WorkerTags { get; } /// Router Worker Offer Issued Job Labels. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferRevokedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferRevokedEventData.Serialization.cs index 30122510eb90..efce5f9bce32 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferRevokedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferRevokedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterWorkerOfferRevokedEventData : IUtf8JsonSerializabl 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsRouterWorkerOfferRevokedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(QueueId)) { writer.WritePropertyName("queueId"u8); @@ -45,6 +36,42 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("offerId"u8); writer.WriteStringValue(OfferId); } + if (Optional.IsDefined(WorkerId)) + { + writer.WritePropertyName("workerId"u8); + writer.WriteStringValue(WorkerId); + } + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(ChannelReference)) + { + writer.WritePropertyName("channelReference"u8); + writer.WriteStringValue(ChannelReference); + } + if (Optional.IsDefined(ChannelId)) + { + writer.WritePropertyName("channelId"u8); + writer.WriteStringValue(ChannelId); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsRouterWorkerOfferRevokedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 22dbe3708dc4..ddc2b65b045f 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 @@ -18,15 +18,6 @@ public partial class AcsRouterWorkerRegisteredEventData : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRouterWorkerRegisteredEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(WorkerId)) { writer.WritePropertyName("workerId"u8); @@ -89,6 +81,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsRouterWorkerRegisteredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.Serialization.cs index 36871c0eb165..37c85b96aeb9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsRouterWorkerSelector : 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") @@ -34,13 +25,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRouterWorkerSelector)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Key)) { writer.WritePropertyName("key"u8); writer.WriteStringValue(Key); } - writer.WritePropertyName("labelOperator"u8); - writer.WriteStringValue(LabelOperator.ToString()); + if (Optional.IsDefined(LabelOperator)) + { + writer.WritePropertyName("labelOperator"u8); + writer.WriteStringValue(LabelOperator.Value.ToString()); + } writer.WritePropertyName("value"u8); #if NET6_0_OR_GREATER writer.WriteRawValue(LabelValue); @@ -52,10 +47,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif writer.WritePropertyName("ttlSeconds"u8); writer.WriteNumberValue(TimeToLive); - writer.WritePropertyName("state"u8); - writer.WriteStringValue(SelectorState.ToString()); - writer.WritePropertyName("expirationTime"u8); - writer.WriteStringValue(ExpirationTime, "O"); + if (Optional.IsDefined(SelectorState)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(SelectorState.Value.ToString()); + } + if (Optional.IsDefined(ExpirationTime)) + { + writer.WritePropertyName("expirationTime"u8); + writer.WriteStringValue(ExpirationTime.Value, "O"); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -71,6 +72,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsRouterWorkerSelector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -94,11 +96,11 @@ internal static AcsRouterWorkerSelector DeserializeAcsRouterWorkerSelector(JsonE return null; } string key = default; - AcsRouterLabelOperator labelOperator = default; + AcsRouterLabelOperator? labelOperator = default; BinaryData value = default; double ttlSeconds = default; - AcsRouterWorkerSelectorState state = default; - DateTimeOffset expirationTime = default; + AcsRouterWorkerSelectorState? state = default; + DateTimeOffset? expirationTime = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -110,6 +112,10 @@ internal static AcsRouterWorkerSelector DeserializeAcsRouterWorkerSelector(JsonE } if (property.NameEquals("labelOperator"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } labelOperator = new AcsRouterLabelOperator(property.Value.GetString()); continue; } @@ -125,11 +131,19 @@ internal static AcsRouterWorkerSelector DeserializeAcsRouterWorkerSelector(JsonE } if (property.NameEquals("state"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } state = new AcsRouterWorkerSelectorState(property.Value.GetString()); continue; } if (property.NameEquals("expirationTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } expirationTime = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.cs index 0de728036de4..fa8232506cbe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.cs @@ -46,21 +46,15 @@ public partial class AcsRouterWorkerSelector private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Router Job Worker Selector Label Operator. /// Router Job Worker Selector Value. /// Router Job Worker Selector Time to Live in Seconds. - /// Router Job Worker Selector State. - /// Router Job Worker Selector Expiration Time. /// is null. - internal AcsRouterWorkerSelector(AcsRouterLabelOperator labelOperator, BinaryData labelValue, double timeToLive, AcsRouterWorkerSelectorState selectorState, DateTimeOffset expirationTime) + internal AcsRouterWorkerSelector(BinaryData labelValue, double timeToLive) { Argument.AssertNotNull(labelValue, nameof(labelValue)); - LabelOperator = labelOperator; LabelValue = labelValue; TimeToLive = timeToLive; - SelectorState = selectorState; - ExpirationTime = expirationTime; } /// Initializes a new instance of . @@ -71,7 +65,7 @@ internal AcsRouterWorkerSelector(AcsRouterLabelOperator labelOperator, BinaryDat /// Router Job Worker Selector State. /// Router Job Worker Selector Expiration Time. /// Keeps track of any properties unknown to the library. - internal AcsRouterWorkerSelector(string key, AcsRouterLabelOperator labelOperator, BinaryData labelValue, double timeToLive, AcsRouterWorkerSelectorState selectorState, DateTimeOffset expirationTime, IDictionary serializedAdditionalRawData) + internal AcsRouterWorkerSelector(string key, AcsRouterLabelOperator? labelOperator, BinaryData labelValue, double timeToLive, AcsRouterWorkerSelectorState? selectorState, DateTimeOffset? expirationTime, IDictionary serializedAdditionalRawData) { Key = key; LabelOperator = labelOperator; @@ -90,7 +84,7 @@ internal AcsRouterWorkerSelector() /// Router Job Worker Selector Key. public string Key { get; } /// Router Job Worker Selector Label Operator. - public AcsRouterLabelOperator LabelOperator { get; } + public AcsRouterLabelOperator? LabelOperator { get; } /// /// Router Job Worker Selector Value /// @@ -125,8 +119,8 @@ internal AcsRouterWorkerSelector() /// Router Job Worker Selector Time to Live in Seconds. public double TimeToLive { get; } /// Router Job Worker Selector State. - public AcsRouterWorkerSelectorState SelectorState { get; } + public AcsRouterWorkerSelectorState? SelectorState { get; } /// Router Job Worker Selector Expiration Time. - public DateTimeOffset ExpirationTime { get; } + public DateTimeOffset? ExpirationTime { get; } } } 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 bb7ac8581576..1285c05cf3ac 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 @@ -18,15 +18,6 @@ public partial class AcsRouterWorkerUpdatedEventData : IUtf8JsonSerializable, IJ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRouterWorkerUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(WorkerId)) { writer.WritePropertyName("workerId"u8); @@ -96,6 +88,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsRouterWorkerUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.Serialization.cs index b717e628d80f..103fc7067f93 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsSmsDeliveryAttemptProperties : IUtf8JsonSerializable, IJ 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsSmsDeliveryAttemptProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(SegmentsSucceeded)) { writer.WritePropertyName("segmentsSucceeded"u8); @@ -61,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsSmsDeliveryAttemptProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -83,7 +79,7 @@ internal static AcsSmsDeliveryAttemptProperties DeserializeAcsSmsDeliveryAttempt { return null; } - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; int? segmentsSucceeded = default; int? segmentsFailed = default; IDictionary serializedAdditionalRawData = default; @@ -92,6 +88,10 @@ internal static AcsSmsDeliveryAttemptProperties DeserializeAcsSmsDeliveryAttempt { if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.cs index 79cc8014347e..21453a993a3f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.cs @@ -46,10 +46,8 @@ public partial class AcsSmsDeliveryAttemptProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// TimeStamp when delivery was attempted. - internal AcsSmsDeliveryAttemptProperties(DateTimeOffset timestamp) + internal AcsSmsDeliveryAttemptProperties() { - Timestamp = timestamp; } /// Initializes a new instance of . @@ -57,7 +55,7 @@ internal AcsSmsDeliveryAttemptProperties(DateTimeOffset timestamp) /// Number of segments that were successfully delivered. /// Number of segments whose delivery failed. /// Keeps track of any properties unknown to the library. - internal AcsSmsDeliveryAttemptProperties(DateTimeOffset timestamp, int? segmentsSucceeded, int? segmentsFailed, IDictionary serializedAdditionalRawData) + internal AcsSmsDeliveryAttemptProperties(DateTimeOffset? timestamp, int? segmentsSucceeded, int? segmentsFailed, IDictionary serializedAdditionalRawData) { Timestamp = timestamp; SegmentsSucceeded = segmentsSucceeded; @@ -65,13 +63,8 @@ internal AcsSmsDeliveryAttemptProperties(DateTimeOffset timestamp, int? segments _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AcsSmsDeliveryAttemptProperties() - { - } - /// TimeStamp when delivery was attempted. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// Number of segments that were successfully delivered. public int? SegmentsSucceeded { get; } /// Number of segments whose delivery failed. 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 3daf4e3535c6..56655757187b 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 @@ -18,15 +18,6 @@ public partial class AcsSmsDeliveryReportReceivedEventData : IUtf8JsonSerializab 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsSmsDeliveryReportReceivedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(DeliveryStatus)) { writer.WritePropertyName("deliveryStatus"u8); @@ -52,13 +43,47 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("receivedTimestamp"u8); - writer.WriteStringValue(ReceivedTimestamp, "O"); + if (Optional.IsDefined(ReceivedTimestamp)) + { + writer.WritePropertyName("receivedTimestamp"u8); + writer.WriteStringValue(ReceivedTimestamp.Value, "O"); + } if (Optional.IsDefined(Tag)) { writer.WritePropertyName("tag"u8); writer.WriteStringValue(Tag); } + 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); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsSmsDeliveryReportReceivedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -84,7 +109,7 @@ internal static AcsSmsDeliveryReportReceivedEventData DeserializeAcsSmsDeliveryR string deliveryStatus = default; string deliveryStatusDetails = default; IReadOnlyList deliveryAttempts = default; - DateTimeOffset receivedTimestamp = default; + DateTimeOffset? receivedTimestamp = default; string tag = default; string messageId = default; string @from = default; @@ -115,6 +140,10 @@ internal static AcsSmsDeliveryReportReceivedEventData DeserializeAcsSmsDeliveryR } if (property.NameEquals("receivedTimestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } receivedTimestamp = property.Value.GetDateTimeOffset("O"); continue; } 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 3f14eeca621a..3e3649e9affe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs @@ -16,14 +16,12 @@ public partial class AcsSmsDeliveryReportReceivedEventData : AcsSmsEventBaseProp { /// Initializes a new instance of . /// List of details of delivery attempts made. - /// The time at which the SMS delivery report was received. /// is null. - internal AcsSmsDeliveryReportReceivedEventData(IEnumerable deliveryAttempts, DateTimeOffset receivedTimestamp) + internal AcsSmsDeliveryReportReceivedEventData(IEnumerable deliveryAttempts) { Argument.AssertNotNull(deliveryAttempts, nameof(deliveryAttempts)); DeliveryAttempts = deliveryAttempts.ToList(); - ReceivedTimestamp = receivedTimestamp; } /// Initializes a new instance of . @@ -36,7 +34,7 @@ internal AcsSmsDeliveryReportReceivedEventData(IEnumerable List of details of delivery attempts made. /// The time at which the SMS delivery report was received. /// Customer Content. - internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, IDictionary serializedAdditionalRawData, string deliveryStatus, string deliveryStatusDetails, IReadOnlyList deliveryAttempts, DateTimeOffset receivedTimestamp, string tag) : base(messageId, @from, to, serializedAdditionalRawData) + internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, IDictionary serializedAdditionalRawData, string deliveryStatus, string deliveryStatusDetails, IReadOnlyList deliveryAttempts, DateTimeOffset? receivedTimestamp, string tag) : base(messageId, @from, to, serializedAdditionalRawData) { DeliveryStatus = deliveryStatus; DeliveryStatusDetails = deliveryStatusDetails; @@ -57,7 +55,7 @@ internal AcsSmsDeliveryReportReceivedEventData() /// List of details of delivery attempts made. public IReadOnlyList DeliveryAttempts { get; } /// The time at which the SMS delivery report was received. - public DateTimeOffset ReceivedTimestamp { get; } + public DateTimeOffset? ReceivedTimestamp { get; } /// Customer Content. public string Tag { get; } } 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 65ba807bd87f..d6e982d2b426 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 @@ -18,15 +18,6 @@ public partial class AcsSmsEventBaseProperties : IUtf8JsonSerializable, IJsonMod 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsSmsEventBaseProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(MessageId)) { writer.WritePropertyName("messageId"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsSmsEventBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 0f08b2151d59..bfda2ef8cd7e 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 @@ -18,15 +18,6 @@ public partial class AcsSmsReceivedEventData : 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") @@ -34,14 +25,48 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AcsSmsReceivedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - writer.WritePropertyName("receivedTimestamp"u8); - writer.WriteStringValue(ReceivedTimestamp, "O"); + if (Optional.IsDefined(ReceivedTimestamp)) + { + writer.WritePropertyName("receivedTimestamp"u8); + writer.WriteStringValue(ReceivedTimestamp.Value, "O"); + } + 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); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AcsSmsReceivedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -65,7 +90,7 @@ internal static AcsSmsReceivedEventData DeserializeAcsSmsReceivedEventData(JsonE return null; } string message = default; - DateTimeOffset receivedTimestamp = default; + DateTimeOffset? receivedTimestamp = default; string messageId = default; string @from = default; string to = default; @@ -80,6 +105,10 @@ internal static AcsSmsReceivedEventData DeserializeAcsSmsReceivedEventData(JsonE } if (property.NameEquals("receivedTimestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } receivedTimestamp = property.Value.GetDateTimeOffset("O"); continue; } 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 75b7cdc072c2..3891a5e2fa73 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.cs @@ -14,10 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . - /// The time at which the SMS was received. - internal AcsSmsReceivedEventData(DateTimeOffset receivedTimestamp) + internal AcsSmsReceivedEventData() { - ReceivedTimestamp = receivedTimestamp; } /// Initializes a new instance of . @@ -27,20 +25,15 @@ internal AcsSmsReceivedEventData(DateTimeOffset receivedTimestamp) /// Keeps track of any properties unknown to the library. /// The SMS content. /// The time at which the SMS was received. - internal AcsSmsReceivedEventData(string messageId, string @from, string to, IDictionary serializedAdditionalRawData, string message, DateTimeOffset receivedTimestamp) : base(messageId, @from, to, serializedAdditionalRawData) + internal AcsSmsReceivedEventData(string messageId, string @from, string to, IDictionary serializedAdditionalRawData, string message, DateTimeOffset? receivedTimestamp) : base(messageId, @from, to, serializedAdditionalRawData) { Message = message; ReceivedTimestamp = receivedTimestamp; } - /// Initializes a new instance of for deserialization. - internal AcsSmsReceivedEventData() - { - } - /// The SMS content. public string Message { get; } /// The time at which the SMS was received. - public DateTimeOffset ReceivedTimestamp { get; } + public DateTimeOffset? ReceivedTimestamp { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsUserDisconnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsUserDisconnectedEventData.Serialization.cs index 611bd185e924..a5a621b2e5b4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsUserDisconnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsUserDisconnectedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcsUserDisconnectedEventData : IUtf8JsonSerializable, IJson 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsUserDisconnectedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("userCommunicationIdentifier"u8); writer.WriteObjectValue(UserCommunicationIdentifier, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcsUserDisconnectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionAddedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionAddedEventData.Serialization.cs index 800e8325ee3a..9ada8cee92d1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionAddedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionAddedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiCenterApiDefinitionAddedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiCenterApiDefinitionAddedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -61,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiCenterApiDefinitionAddedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.Serialization.cs index 67da914fdaef..2c9135bb21f7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiCenterApiDefinitionUpdatedEventData : IUtf8JsonSerializa 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiCenterApiDefinitionUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -61,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiCenterApiDefinitionUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.Serialization.cs index 795c1c8642f9..690c2c510579 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiCenterApiSpecification : IUtf8JsonSerializable, IJsonMod 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiCenterApiSpecification)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiCenterApiSpecification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiCreatedEventData.Serialization.cs index 37ecb8627dd2..a5a2e3c8dd13 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementApiCreatedEventData : IUtf8JsonSerializable, I 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementApiCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementApiCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiDeletedEventData.Serialization.cs index 25351792dc41..58642d0f41ba 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementApiDeletedEventData : IUtf8JsonSerializable, I 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementApiDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementApiDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseCreatedEventData.Serialization.cs index bb621ed76bf8..a1b8fb876c67 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementApiReleaseCreatedEventData : IUtf8JsonSerializ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementApiReleaseCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementApiReleaseCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseDeletedEventData.Serialization.cs index c9a0c71fb8c5..84543d50e2d4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementApiReleaseDeletedEventData : IUtf8JsonSerializ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementApiReleaseDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementApiReleaseDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseUpdatedEventData.Serialization.cs index c2a8785791c3..0fe8c0fbb4f5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementApiReleaseUpdatedEventData : IUtf8JsonSerializ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementApiReleaseUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementApiReleaseUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiUpdatedEventData.Serialization.cs index d5f1490488f7..24349ca596a9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementApiUpdatedEventData : IUtf8JsonSerializable, I 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementApiUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementApiUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiAddedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiAddedEventData.Serialization.cs index 475b185487ad..90fa00803200 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiAddedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiAddedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementGatewayApiAddedEventData : IUtf8JsonSerializab 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementGatewayApiAddedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementGatewayApiAddedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.Serialization.cs index 35dc0c246114..0e338ab8e693 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementGatewayApiRemovedEventData : IUtf8JsonSerializ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementGatewayApiRemovedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementGatewayApiRemovedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityCreatedEventData.Serialization.cs index f9429debc593..e8ca5e83cca0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementGatewayCertificateAuthorityCreatedEventData : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementGatewayCertificateAuthorityCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementGatewayCertificateAuthorityCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityDeletedEventData.Serialization.cs index 7209c9da9043..a4de7645c59c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementGatewayCertificateAuthorityDeletedEventData : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementGatewayCertificateAuthorityDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementGatewayCertificateAuthorityDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityUpdatedEventData.Serialization.cs index f0d7e939da8c..0b34008c9d6c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementGatewayCertificateAuthorityUpdatedEventData : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementGatewayCertificateAuthorityUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementGatewayCertificateAuthorityUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCreatedEventData.Serialization.cs index bf6bf9bf82e8..e5c373a52d55 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementGatewayCreatedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementGatewayCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementGatewayCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayDeletedEventData.Serialization.cs index 1c4c03f55956..9a401bc54e39 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementGatewayDeletedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementGatewayDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementGatewayDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationCreatedEventData.Serialization.cs index 8f5e8fae4a35..5c6d7116f504 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementGatewayHostnameConfigurationCreatedEventData : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementGatewayHostnameConfigurationCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementGatewayHostnameConfigurationCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationDeletedEventData.Serialization.cs index 2a65de8c566b..eae41e836889 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementGatewayHostnameConfigurationDeletedEventData : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementGatewayHostnameConfigurationDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementGatewayHostnameConfigurationDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationUpdatedEventData.Serialization.cs index b97060c07e9f..14e61434fa13 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementGatewayHostnameConfigurationUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementGatewayHostnameConfigurationUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayUpdatedEventData.Serialization.cs index 12106bcdb3a5..242aca915b6c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementGatewayUpdatedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementGatewayUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementGatewayUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductCreatedEventData.Serialization.cs index 8370b13bfdc9..d3e6b0428435 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementProductCreatedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementProductCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementProductCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductDeletedEventData.Serialization.cs index 7da867ded040..b1f703bfa6db 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementProductDeletedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementProductDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementProductDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductUpdatedEventData.Serialization.cs index 11ac30448ea3..6a430c8a6405 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementProductUpdatedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementProductUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementProductUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionCreatedEventData.Serialization.cs index d1e89813c46a..22fdf928ecad 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementSubscriptionCreatedEventData : IUtf8JsonSerial 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementSubscriptionCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementSubscriptionCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionDeletedEventData.Serialization.cs index aa09d39871b2..623bb5140781 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementSubscriptionDeletedEventData : IUtf8JsonSerial 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementSubscriptionDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementSubscriptionDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionUpdatedEventData.Serialization.cs index 290798ec0562..0868235064b1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementSubscriptionUpdatedEventData : IUtf8JsonSerial 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementSubscriptionUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementSubscriptionUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserCreatedEventData.Serialization.cs index 7700a92dd618..28edd9fed33a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementUserCreatedEventData : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementUserCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementUserCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserDeletedEventData.Serialization.cs index 997b13aa9d49..4391dbd8adb5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementUserDeletedEventData : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementUserDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementUserDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserUpdatedEventData.Serialization.cs index aefcba2c8c70..7a8915341fa3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ApiManagementUserUpdatedEventData : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiManagementUserUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ApiManagementUserUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 d02ce8908a3f..15db7926e4a5 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 @@ -18,15 +18,6 @@ public partial class AppConfigurationKeyValueDeletedEventData : IUtf8JsonSeriali 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Key)) { writer.WritePropertyName("key"u8); @@ -69,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AppConfigurationKeyValueDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 73f91a283b8c..4c69ca96e62d 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 @@ -18,15 +18,6 @@ public partial class AppConfigurationKeyValueModifiedEventData : IUtf8JsonSerial 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueModifiedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Key)) { writer.WritePropertyName("key"u8); @@ -69,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AppConfigurationKeyValueModifiedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.Serialization.cs index f5af7a38bbc8..4951b4d65edc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AppConfigurationSnapshotCreatedEventData : IUtf8JsonSeriali 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") @@ -34,7 +25,38 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AppConfigurationSnapshotCreatedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + 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); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AppConfigurationSnapshotCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 540ed46bcbaf..be09aac5b172 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 @@ -18,15 +18,6 @@ public partial class AppConfigurationSnapshotEventData : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationSnapshotEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AppConfigurationSnapshotEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.Serialization.cs index c787e6e2197c..d5334d4e6dda 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AppConfigurationSnapshotModifiedEventData : IUtf8JsonSerial 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") @@ -34,7 +25,38 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AppConfigurationSnapshotModifiedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + 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); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AppConfigurationSnapshotModifiedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.Serialization.cs index fb9093c7757e..b6036da6e5e1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.Serialization.cs @@ -18,15 +18,6 @@ public partial class AppEventTypeDetail : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppEventTypeDetail)} does not support writing '{format}' format."); } - writer.WritePropertyName("action"u8); - writer.WriteStringValue(Action.ToString()); + writer.WriteStartObject(); + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -51,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AppEventTypeDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -73,13 +69,17 @@ internal static AppEventTypeDetail DeserializeAppEventTypeDetail(JsonElement ele { return null; } - AppAction action = default; + AppAction? action = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("action"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } action = new AppAction(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.cs index 43550772de8f..236b12ab039c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.cs @@ -46,27 +46,20 @@ public partial class AppEventTypeDetail private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Type of action of the operation. - internal AppEventTypeDetail(AppAction action) + internal AppEventTypeDetail() { - Action = action; } /// Initializes a new instance of . /// Type of action of the operation. /// Keeps track of any properties unknown to the library. - internal AppEventTypeDetail(AppAction action, IDictionary serializedAdditionalRawData) + internal AppEventTypeDetail(AppAction? action, IDictionary serializedAdditionalRawData) { Action = action; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AppEventTypeDetail() - { - } - /// Type of action of the operation. - public AppAction Action { get; } + public AppAction? Action { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.Serialization.cs index af722568a779..fbc2bc30f422 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.Serialization.cs @@ -18,15 +18,6 @@ public partial class AppServicePlanEventTypeDetail : IUtf8JsonSerializable, IJso 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") @@ -34,12 +25,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppServicePlanEventTypeDetail)} does not support writing '{format}' format."); } - writer.WritePropertyName("stampKind"u8); - writer.WriteStringValue(StampKind.ToString()); - writer.WritePropertyName("action"u8); - writer.WriteStringValue(Action.ToString()); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + writer.WriteStartObject(); + if (Optional.IsDefined(StampKind)) + { + writer.WritePropertyName("stampKind"u8); + writer.WriteStringValue(StampKind.Value.ToString()); + } + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.Value.ToString()); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -55,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AppServicePlanEventTypeDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -77,25 +79,37 @@ internal static AppServicePlanEventTypeDetail DeserializeAppServicePlanEventType { return null; } - StampKind stampKind = default; - AppServicePlanAction action = default; - AsyncStatus status = default; + StampKind? stampKind = default; + AppServicePlanAction? action = default; + AsyncStatus? status = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("stampKind"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } stampKind = new StampKind(property.Value.GetString()); continue; } if (property.NameEquals("action"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } action = new AppServicePlanAction(property.Value.GetString()); continue; } if (property.NameEquals("status"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } status = new AsyncStatus(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.cs index f4c61633045b..52cf7ca3592a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.cs @@ -46,14 +46,8 @@ public partial class AppServicePlanEventTypeDetail private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Kind of environment where app service plan is. - /// Type of action on the app service plan. - /// Asynchronous operation status of the operation on the app service plan. - internal AppServicePlanEventTypeDetail(StampKind stampKind, AppServicePlanAction action, AsyncStatus status) + internal AppServicePlanEventTypeDetail() { - StampKind = stampKind; - Action = action; - Status = status; } /// Initializes a new instance of . @@ -61,7 +55,7 @@ internal AppServicePlanEventTypeDetail(StampKind stampKind, AppServicePlanAction /// Type of action on the app service plan. /// Asynchronous operation status of the operation on the app service plan. /// Keeps track of any properties unknown to the library. - internal AppServicePlanEventTypeDetail(StampKind stampKind, AppServicePlanAction action, AsyncStatus status, IDictionary serializedAdditionalRawData) + internal AppServicePlanEventTypeDetail(StampKind? stampKind, AppServicePlanAction? action, AsyncStatus? status, IDictionary serializedAdditionalRawData) { StampKind = stampKind; Action = action; @@ -69,16 +63,11 @@ internal AppServicePlanEventTypeDetail(StampKind stampKind, AppServicePlanAction _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AppServicePlanEventTypeDetail() - { - } - /// Kind of environment where app service plan is. - public StampKind StampKind { get; } + public StampKind? StampKind { get; } /// Type of action on the app service plan. - public AppServicePlanAction Action { get; } + public AppServicePlanAction? Action { get; } /// Asynchronous operation status of the operation on the app service plan. - public AsyncStatus Status { get; } + public AsyncStatus? Status { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.Serialization.cs index 55b8f25b0e9e..d8794a8cedcc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsClusterCreatedEventData : IUtf8JsonSerializable, IJsonMo 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") @@ -34,7 +25,55 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsClusterCreatedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + if (Optional.IsCollectionDefined(AddedHostNames)) + { + writer.WritePropertyName("addedHostNames"u8); + writer.WriteStartArray(); + foreach (var item in AddedHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RemovedHostNames)) + { + writer.WritePropertyName("removedHostNames"u8); + writer.WriteStartArray(); + foreach (var item in RemovedHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(InMaintenanceHostNames)) + { + writer.WritePropertyName("inMaintenanceHostNames"u8); + writer.WriteStartArray(); + foreach (var item in InMaintenanceHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsClusterCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.cs index 46bc8cc4d87a..3bfe56d1ac5b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsClusterCreatedEventData : AvsClusterEventData { /// Initializes a new instance of . - internal AvsClusterCreatedEventData() + /// Id of the operation that caused this event. + /// is null. + internal AvsClusterCreatedEventData(string operationId) : base(operationId) { + Argument.AssertNotNull(operationId, nameof(operationId)); } /// Initializes a new instance of . @@ -27,5 +30,10 @@ internal AvsClusterCreatedEventData() internal AvsClusterCreatedEventData(string operationId, IReadOnlyList addedHostNames, IReadOnlyList removedHostNames, IReadOnlyList inMaintenanceHostNames, IDictionary serializedAdditionalRawData) : base(operationId, addedHostNames, removedHostNames, inMaintenanceHostNames, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AvsClusterCreatedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.Serialization.cs index 125230ad0867..56f5ed1b7b5a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsClusterDeletedEventData : IUtf8JsonSerializable, IJsonMo 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") @@ -34,7 +25,55 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsClusterDeletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + if (Optional.IsCollectionDefined(AddedHostNames)) + { + writer.WritePropertyName("addedHostNames"u8); + writer.WriteStartArray(); + foreach (var item in AddedHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RemovedHostNames)) + { + writer.WritePropertyName("removedHostNames"u8); + writer.WriteStartArray(); + foreach (var item in RemovedHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(InMaintenanceHostNames)) + { + writer.WritePropertyName("inMaintenanceHostNames"u8); + writer.WriteStartArray(); + foreach (var item in InMaintenanceHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsClusterDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.cs index 9dc7f3790647..785c205d911b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsClusterDeletedEventData : AvsClusterEventData { /// Initializes a new instance of . - internal AvsClusterDeletedEventData() + /// Id of the operation that caused this event. + /// is null. + internal AvsClusterDeletedEventData(string operationId) : base(operationId) { + Argument.AssertNotNull(operationId, nameof(operationId)); } /// Initializes a new instance of . @@ -27,5 +30,10 @@ internal AvsClusterDeletedEventData() internal AvsClusterDeletedEventData(string operationId, IReadOnlyList addedHostNames, IReadOnlyList removedHostNames, IReadOnlyList inMaintenanceHostNames, IDictionary serializedAdditionalRawData) : base(operationId, addedHostNames, removedHostNames, inMaintenanceHostNames, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AvsClusterDeletedEventData() + { + } } } 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 3b0b93de6011..bcd1ef4530a9 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 @@ -18,15 +18,6 @@ public partial class AvsClusterEventData : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,11 +25,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AvsClusterEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(OperationId)) - { - writer.WritePropertyName("operationId"u8); - writer.WriteStringValue(OperationId); - } + writer.WriteStartObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); if (Optional.IsCollectionDefined(AddedHostNames)) { writer.WritePropertyName("addedHostNames"u8); @@ -84,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AvsClusterEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.cs index 4eef16191dbf..9bcbb7937d13 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.cs @@ -46,8 +46,13 @@ public partial class AvsClusterEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AvsClusterEventData() + /// Id of the operation that caused this event. + /// is null. + internal AvsClusterEventData(string operationId) { + Argument.AssertNotNull(operationId, nameof(operationId)); + + OperationId = operationId; AddedHostNames = new ChangeTrackingList(); RemovedHostNames = new ChangeTrackingList(); InMaintenanceHostNames = new ChangeTrackingList(); @@ -68,6 +73,11 @@ internal AvsClusterEventData(string operationId, IReadOnlyList addedHost _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AvsClusterEventData() + { + } + /// Id of the operation that caused this event. public string OperationId { get; } /// Hosts added to the cluster in this event, if any. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.Serialization.cs index 9baf71ab8d87..d6646a9562c4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsClusterFailedEventData : IUtf8JsonSerializable, IJsonMod 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") @@ -34,12 +25,60 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsClusterFailedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(FailureMessage)) { writer.WritePropertyName("failureMessage"u8); writer.WriteStringValue(FailureMessage); } + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + if (Optional.IsCollectionDefined(AddedHostNames)) + { + writer.WritePropertyName("addedHostNames"u8); + writer.WriteStartArray(); + foreach (var item in AddedHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RemovedHostNames)) + { + writer.WritePropertyName("removedHostNames"u8); + writer.WriteStartArray(); + foreach (var item in RemovedHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(InMaintenanceHostNames)) + { + writer.WritePropertyName("inMaintenanceHostNames"u8); + writer.WriteStartArray(); + foreach (var item in InMaintenanceHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsClusterFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.cs index 35f0e1353db6..d1a51d6c905a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsClusterFailedEventData : AvsClusterEventData { /// Initializes a new instance of . - internal AvsClusterFailedEventData() + /// Id of the operation that caused this event. + /// is null. + internal AvsClusterFailedEventData(string operationId) : base(operationId) { + Argument.AssertNotNull(operationId, nameof(operationId)); } /// Initializes a new instance of . @@ -30,6 +33,11 @@ internal AvsClusterFailedEventData(string operationId, IReadOnlyList add FailureMessage = failureMessage; } + /// Initializes a new instance of for deserialization. + internal AvsClusterFailedEventData() + { + } + /// Failure reason of an event. public string FailureMessage { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.Serialization.cs index 5d6c2758eaab..46cf8749c4f9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsClusterUpdatedEventData : IUtf8JsonSerializable, IJsonMo 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") @@ -34,7 +25,55 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsClusterUpdatedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + if (Optional.IsCollectionDefined(AddedHostNames)) + { + writer.WritePropertyName("addedHostNames"u8); + writer.WriteStartArray(); + foreach (var item in AddedHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RemovedHostNames)) + { + writer.WritePropertyName("removedHostNames"u8); + writer.WriteStartArray(); + foreach (var item in RemovedHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(InMaintenanceHostNames)) + { + writer.WritePropertyName("inMaintenanceHostNames"u8); + writer.WriteStartArray(); + foreach (var item in InMaintenanceHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsClusterUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.cs index 7ec6e28e0484..8c2a1e287b48 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsClusterUpdatedEventData : AvsClusterEventData { /// Initializes a new instance of . - internal AvsClusterUpdatedEventData() + /// Id of the operation that caused this event. + /// is null. + internal AvsClusterUpdatedEventData(string operationId) : base(operationId) { + Argument.AssertNotNull(operationId, nameof(operationId)); } /// Initializes a new instance of . @@ -27,5 +30,10 @@ internal AvsClusterUpdatedEventData() internal AvsClusterUpdatedEventData(string operationId, IReadOnlyList addedHostNames, IReadOnlyList removedHostNames, IReadOnlyList inMaintenanceHostNames, IDictionary serializedAdditionalRawData) : base(operationId, addedHostNames, removedHostNames, inMaintenanceHostNames, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AvsClusterUpdatedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.Serialization.cs index abe83f07c523..3172c0605ef3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsClusterUpdatingEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,7 +25,55 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsClusterUpdatingEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + if (Optional.IsCollectionDefined(AddedHostNames)) + { + writer.WritePropertyName("addedHostNames"u8); + writer.WriteStartArray(); + foreach (var item in AddedHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RemovedHostNames)) + { + writer.WritePropertyName("removedHostNames"u8); + writer.WriteStartArray(); + foreach (var item in RemovedHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(InMaintenanceHostNames)) + { + writer.WritePropertyName("inMaintenanceHostNames"u8); + writer.WriteStartArray(); + foreach (var item in InMaintenanceHostNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsClusterUpdatingEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.cs index 92b2529146e6..94e2a20e48e5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsClusterUpdatingEventData : AvsClusterEventData { /// Initializes a new instance of . - internal AvsClusterUpdatingEventData() + /// Id of the operation that caused this event. + /// is null. + internal AvsClusterUpdatingEventData(string operationId) : base(operationId) { + Argument.AssertNotNull(operationId, nameof(operationId)); } /// Initializes a new instance of . @@ -27,5 +30,10 @@ internal AvsClusterUpdatingEventData() internal AvsClusterUpdatingEventData(string operationId, IReadOnlyList addedHostNames, IReadOnlyList removedHostNames, IReadOnlyList inMaintenanceHostNames, IDictionary serializedAdditionalRawData) : base(operationId, addedHostNames, removedHostNames, inMaintenanceHostNames, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AvsClusterUpdatingEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.Serialization.cs index 2e7a26a87921..331c720dda99 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsPrivateCloudEventData : IUtf8JsonSerializable, IJsonMode 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") @@ -34,11 +25,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AvsPrivateCloudEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(OperationId)) - { - writer.WritePropertyName("operationId"u8); - writer.WriteStringValue(OperationId); - } + writer.WriteStartObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -54,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AvsPrivateCloudEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.cs index 391917dfb4a6..34b79d5aa63c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.cs @@ -46,8 +46,13 @@ public partial class AvsPrivateCloudEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AvsPrivateCloudEventData() + /// Id of the operation that caused this event. + /// is null. + internal AvsPrivateCloudEventData(string operationId) { + Argument.AssertNotNull(operationId, nameof(operationId)); + + OperationId = operationId; } /// Initializes a new instance of . @@ -59,6 +64,11 @@ internal AvsPrivateCloudEventData(string operationId, IDictionary Initializes a new instance of for deserialization. + internal AvsPrivateCloudEventData() + { + } + /// Id of the operation that caused this event. public string OperationId { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.Serialization.cs index a958fc84ad61..4a38a872c57a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsPrivateCloudFailedEventData : IUtf8JsonSerializable, IJs 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") @@ -34,12 +25,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsPrivateCloudFailedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(FailureMessage)) { writer.WritePropertyName("failureMessage"u8); writer.WriteStringValue(FailureMessage); } + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsPrivateCloudFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.cs index 58e2c3216b39..462c74752b07 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsPrivateCloudFailedEventData : AvsPrivateCloudEventData { /// Initializes a new instance of . - internal AvsPrivateCloudFailedEventData() + /// Id of the operation that caused this event. + /// is null. + internal AvsPrivateCloudFailedEventData(string operationId) : base(operationId) { + Argument.AssertNotNull(operationId, nameof(operationId)); } /// Initializes a new instance of . @@ -27,6 +30,11 @@ internal AvsPrivateCloudFailedEventData(string operationId, IDictionary Initializes a new instance of for deserialization. + internal AvsPrivateCloudFailedEventData() + { + } + /// Failure reason of an event. public string FailureMessage { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.Serialization.cs index aaee57b3c3ab..1bae8fad4aa5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsPrivateCloudUpdatedEventData : IUtf8JsonSerializable, IJ 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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsPrivateCloudUpdatedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsPrivateCloudUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.cs index 523ad0039dad..08700112d7a0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsPrivateCloudUpdatedEventData : AvsPrivateCloudEventData { /// Initializes a new instance of . - internal AvsPrivateCloudUpdatedEventData() + /// Id of the operation that caused this event. + /// is null. + internal AvsPrivateCloudUpdatedEventData(string operationId) : base(operationId) { + Argument.AssertNotNull(operationId, nameof(operationId)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal AvsPrivateCloudUpdatedEventData() internal AvsPrivateCloudUpdatedEventData(string operationId, IDictionary serializedAdditionalRawData) : base(operationId, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AvsPrivateCloudUpdatedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.Serialization.cs index e1f205446223..9a78311c0005 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsPrivateCloudUpdatingEventData : IUtf8JsonSerializable, I 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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsPrivateCloudUpdatingEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsPrivateCloudUpdatingEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.cs index d3bd82ababd3..160c3343a6cf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsPrivateCloudUpdatingEventData : AvsPrivateCloudEventData { /// Initializes a new instance of . - internal AvsPrivateCloudUpdatingEventData() + /// Id of the operation that caused this event. + /// is null. + internal AvsPrivateCloudUpdatingEventData(string operationId) : base(operationId) { + Argument.AssertNotNull(operationId, nameof(operationId)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal AvsPrivateCloudUpdatingEventData() internal AvsPrivateCloudUpdatingEventData(string operationId, IDictionary serializedAdditionalRawData) : base(operationId, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AvsPrivateCloudUpdatingEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.Serialization.cs index ad1156bb8117..f4e34282af69 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsScriptExecutionCancelledEventData : IUtf8JsonSerializabl 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") @@ -34,7 +25,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsScriptExecutionCancelledEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + writer.WritePropertyName("cmdletId"u8); + writer.WriteStringValue(CmdletId); + if (Optional.IsCollectionDefined(Output)) + { + writer.WritePropertyName("output"u8); + writer.WriteStartArray(); + foreach (var item in Output) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsScriptExecutionCancelledEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.cs index 0116ef430dee..c19de0780976 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.cs @@ -14,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsScriptExecutionCancelledEventData : AvsScriptExecutionEventData { /// Initializes a new instance of . - internal AvsScriptExecutionCancelledEventData() + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// or is null. + internal AvsScriptExecutionCancelledEventData(string operationId, string cmdletId) : base(operationId, cmdletId) { + Argument.AssertNotNull(operationId, nameof(operationId)); + Argument.AssertNotNull(cmdletId, nameof(cmdletId)); } /// Initializes a new instance of . @@ -26,5 +31,10 @@ internal AvsScriptExecutionCancelledEventData() internal AvsScriptExecutionCancelledEventData(string operationId, string cmdletId, IReadOnlyList output, IDictionary serializedAdditionalRawData) : base(operationId, cmdletId, output, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AvsScriptExecutionCancelledEventData() + { + } } } 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 c22765b20104..3f3458285dd3 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 @@ -18,15 +18,6 @@ public partial class AvsScriptExecutionEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,16 +25,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AvsScriptExecutionEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(OperationId)) - { - writer.WritePropertyName("operationId"u8); - writer.WriteStringValue(OperationId); - } - if (Optional.IsDefined(CmdletId)) - { - writer.WritePropertyName("cmdletId"u8); - writer.WriteStringValue(CmdletId); - } + writer.WriteStartObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + writer.WritePropertyName("cmdletId"u8); + writer.WriteStringValue(CmdletId); if (Optional.IsCollectionDefined(Output)) { writer.WritePropertyName("output"u8); @@ -69,6 +55,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AvsScriptExecutionEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.cs index d21ddf7920bf..90ddfcbfd12d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.cs @@ -46,8 +46,16 @@ public partial class AvsScriptExecutionEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AvsScriptExecutionEventData() + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// or is null. + internal AvsScriptExecutionEventData(string operationId, string cmdletId) { + Argument.AssertNotNull(operationId, nameof(operationId)); + Argument.AssertNotNull(cmdletId, nameof(cmdletId)); + + OperationId = operationId; + CmdletId = cmdletId; Output = new ChangeTrackingList(); } @@ -64,6 +72,11 @@ internal AvsScriptExecutionEventData(string operationId, string cmdletId, IReadO _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AvsScriptExecutionEventData() + { + } + /// Id of the operation that caused this event. public string OperationId { get; } /// Cmdlet referenced in the execution that caused this event. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.Serialization.cs index 69310ee24c2b..320a0d705cee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsScriptExecutionFailedEventData : IUtf8JsonSerializable, 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") @@ -34,12 +25,42 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsScriptExecutionFailedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(FailureMessage)) { writer.WritePropertyName("failureMessage"u8); writer.WriteStringValue(FailureMessage); } + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + writer.WritePropertyName("cmdletId"u8); + writer.WriteStringValue(CmdletId); + if (Optional.IsCollectionDefined(Output)) + { + writer.WritePropertyName("output"u8); + writer.WriteStartArray(); + foreach (var item in Output) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsScriptExecutionFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.cs index e5a135482869..c508a421bf97 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.cs @@ -14,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsScriptExecutionFailedEventData : AvsScriptExecutionEventData { /// Initializes a new instance of . - internal AvsScriptExecutionFailedEventData() + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// or is null. + internal AvsScriptExecutionFailedEventData(string operationId, string cmdletId) : base(operationId, cmdletId) { + Argument.AssertNotNull(operationId, nameof(operationId)); + Argument.AssertNotNull(cmdletId, nameof(cmdletId)); } /// Initializes a new instance of . @@ -29,6 +34,11 @@ internal AvsScriptExecutionFailedEventData(string operationId, string cmdletId, FailureMessage = failureMessage; } + /// Initializes a new instance of for deserialization. + internal AvsScriptExecutionFailedEventData() + { + } + /// Failure reason of an event. public string FailureMessage { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.Serialization.cs index 6556b3dd64fb..8273d36734c8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsScriptExecutionFinishedEventData : IUtf8JsonSerializable 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsScriptExecutionFinishedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("namedOutputs"u8); writer.WriteStartObject(); foreach (var item in NamedOutputs) @@ -43,6 +34,36 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + writer.WritePropertyName("cmdletId"u8); + writer.WriteStringValue(CmdletId); + if (Optional.IsCollectionDefined(Output)) + { + writer.WritePropertyName("output"u8); + writer.WriteStartArray(); + foreach (var item in Output) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsScriptExecutionFinishedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.cs index 84f2fd9fd36a..caca8718ae2e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.cs @@ -14,10 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsScriptExecutionFinishedEventData : AvsScriptExecutionEventData { /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. /// Named outputs of completed execution, if any. - /// is null. - internal AvsScriptExecutionFinishedEventData(IReadOnlyDictionary namedOutputs) + /// , or is null. + internal AvsScriptExecutionFinishedEventData(string operationId, string cmdletId, IReadOnlyDictionary namedOutputs) : base(operationId, cmdletId) { + Argument.AssertNotNull(operationId, nameof(operationId)); + Argument.AssertNotNull(cmdletId, nameof(cmdletId)); Argument.AssertNotNull(namedOutputs, nameof(namedOutputs)); NamedOutputs = namedOutputs; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.Serialization.cs index 314ff99da136..61d5046c0290 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class AvsScriptExecutionStartedEventData : IUtf8JsonSerializable, 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") @@ -34,7 +25,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvsScriptExecutionStartedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + writer.WritePropertyName("cmdletId"u8); + writer.WriteStringValue(CmdletId); + if (Optional.IsCollectionDefined(Output)) + { + writer.WritePropertyName("output"u8); + writer.WriteStartArray(); + foreach (var item in Output) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AvsScriptExecutionStartedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.cs index 08424798e522..2f07a5a6a36a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.cs @@ -14,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AvsScriptExecutionStartedEventData : AvsScriptExecutionEventData { /// Initializes a new instance of . - internal AvsScriptExecutionStartedEventData() + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// or is null. + internal AvsScriptExecutionStartedEventData(string operationId, string cmdletId) : base(operationId, cmdletId) { + Argument.AssertNotNull(operationId, nameof(operationId)); + Argument.AssertNotNull(cmdletId, nameof(cmdletId)); } /// Initializes a new instance of . @@ -26,5 +31,10 @@ internal AvsScriptExecutionStartedEventData() internal AvsScriptExecutionStartedEventData(string operationId, string cmdletId, IReadOnlyList output, IDictionary serializedAdditionalRawData) : base(operationId, cmdletId, output, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AvsScriptExecutionStartedEventData() + { + } } } 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 cc557dfeed21..8f8c8383eb59 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 @@ -18,15 +18,6 @@ public partial class CommunicationIdentifierModel : IUtf8JsonSerializable, IJson 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CommunicationIdentifierModel)} does not support writing '{format}' format."); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.Value.ToString()); + } if (Optional.IsDefined(RawId)) { writer.WritePropertyName("rawId"u8); @@ -64,6 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } CommunicationIdentifierModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -86,7 +82,7 @@ internal static CommunicationIdentifierModel DeserializeCommunicationIdentifierM { return null; } - CommunicationIdentifierModelKind kind = default; + CommunicationIdentifierModelKind? kind = default; string rawId = default; CommunicationUserIdentifierModel communicationUser = default; PhoneNumberIdentifierModel phoneNumber = default; @@ -98,6 +94,10 @@ internal static CommunicationIdentifierModel DeserializeCommunicationIdentifierM { if (property.NameEquals("kind"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } kind = new CommunicationIdentifierModelKind(property.Value.GetString()); 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 391730bf3a99..00e7ea22dcd5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.cs @@ -46,20 +46,18 @@ public partial class CommunicationIdentifierModel private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The identifier kind. Only required in responses. /// The communication user. /// The phone number. /// The Microsoft Teams user. /// The Microsoft Teams application. /// , , or is null. - internal CommunicationIdentifierModel(CommunicationIdentifierModelKind kind, CommunicationUserIdentifierModel communicationUser, PhoneNumberIdentifierModel phoneNumber, MicrosoftTeamsUserIdentifierModel microsoftTeamsUser, MicrosoftTeamsAppIdentifierModel microsoftTeamsApp) + internal CommunicationIdentifierModel(CommunicationUserIdentifierModel communicationUser, PhoneNumberIdentifierModel phoneNumber, MicrosoftTeamsUserIdentifierModel microsoftTeamsUser, MicrosoftTeamsAppIdentifierModel microsoftTeamsApp) { Argument.AssertNotNull(communicationUser, nameof(communicationUser)); Argument.AssertNotNull(phoneNumber, nameof(phoneNumber)); Argument.AssertNotNull(microsoftTeamsUser, nameof(microsoftTeamsUser)); Argument.AssertNotNull(microsoftTeamsApp, nameof(microsoftTeamsApp)); - Kind = kind; CommunicationUser = communicationUser; PhoneNumber = phoneNumber; MicrosoftTeamsUser = microsoftTeamsUser; @@ -74,7 +72,7 @@ internal CommunicationIdentifierModel(CommunicationIdentifierModelKind kind, Com /// The Microsoft Teams user. /// The Microsoft Teams application. /// Keeps track of any properties unknown to the library. - internal CommunicationIdentifierModel(CommunicationIdentifierModelKind kind, string rawId, CommunicationUserIdentifierModel communicationUser, PhoneNumberIdentifierModel phoneNumber, MicrosoftTeamsUserIdentifierModel microsoftTeamsUser, MicrosoftTeamsAppIdentifierModel microsoftTeamsApp, IDictionary serializedAdditionalRawData) + internal CommunicationIdentifierModel(CommunicationIdentifierModelKind? kind, string rawId, CommunicationUserIdentifierModel communicationUser, PhoneNumberIdentifierModel phoneNumber, MicrosoftTeamsUserIdentifierModel microsoftTeamsUser, MicrosoftTeamsAppIdentifierModel microsoftTeamsApp, IDictionary serializedAdditionalRawData) { Kind = kind; RawId = rawId; @@ -91,7 +89,7 @@ internal CommunicationIdentifierModel() } /// The identifier kind. Only required in responses. - public CommunicationIdentifierModelKind Kind { get; } + public CommunicationIdentifierModelKind? Kind { get; } /// Raw Id of the identifier. Optional in requests, required in responses. public string RawId { get; } /// The communication user. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationUserIdentifierModel.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationUserIdentifierModel.Serialization.cs index 782d8c253d17..4e5982e60cee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationUserIdentifierModel.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationUserIdentifierModel.Serialization.cs @@ -18,15 +18,6 @@ public partial class CommunicationUserIdentifierModel : IUtf8JsonSerializable, I 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CommunicationUserIdentifierModel)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } CommunicationUserIdentifierModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.Serialization.cs index 9c0c10f7ce8b..fc59a5762926 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryArtifactEventData : IUtf8JsonSerializable, 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") @@ -34,13 +25,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerRegistryArtifactEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(Action)) { writer.WritePropertyName("action"u8); @@ -70,6 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContainerRegistryArtifactEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -93,7 +89,7 @@ internal static ContainerRegistryArtifactEventData DeserializeContainerRegistryA return null; } string id = default; - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string action = default; string location = default; ContainerRegistryArtifactEventTarget target = default; @@ -109,6 +105,10 @@ internal static ContainerRegistryArtifactEventData DeserializeContainerRegistryA } if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.cs index 9fb1972e3d56..4f0d15c62790 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.cs @@ -46,16 +46,14 @@ public partial class ContainerRegistryArtifactEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time at which the event occurred. /// The target of the event. /// The connected registry information if the event is generated by a connected registry. /// or is null. - internal ContainerRegistryArtifactEventData(DateTimeOffset timestamp, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry) + internal ContainerRegistryArtifactEventData(ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry) { Argument.AssertNotNull(target, nameof(target)); Argument.AssertNotNull(connectedRegistry, nameof(connectedRegistry)); - Timestamp = timestamp; Target = target; ConnectedRegistry = connectedRegistry; } @@ -68,7 +66,7 @@ internal ContainerRegistryArtifactEventData(DateTimeOffset timestamp, ContainerR /// The target of the event. /// The connected registry information if the event is generated by a connected registry. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryArtifactEventData(string id, DateTimeOffset timestamp, string action, string location, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) + internal ContainerRegistryArtifactEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) { Id = id; Timestamp = timestamp; @@ -87,7 +85,7 @@ internal ContainerRegistryArtifactEventData() /// The event ID. public string Id { get; } /// The time at which the event occurred. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// The action that encompasses the provided event. public string Action { get; } /// The location of the event. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventTarget.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventTarget.Serialization.cs index a34f0291630d..d494aa306d8b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventTarget.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventTarget.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryArtifactEventTarget : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerRegistryArtifactEventTarget)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(MediaType)) { writer.WritePropertyName("mediaType"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContainerRegistryArtifactEventTarget IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.Serialization.cs index e10e1f4b30e6..7430e3eb3089 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryChartDeletedEventData : IUtf8JsonSerializa 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") @@ -34,7 +25,47 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ContainerRegistryChartDeletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + writer.WritePropertyName("target"u8); + writer.WriteObjectValue(Target, options); + writer.WritePropertyName("connectedRegistry"u8); + writer.WriteObjectValue(ConnectedRegistry, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ContainerRegistryChartDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -58,7 +89,7 @@ internal static ContainerRegistryChartDeletedEventData DeserializeContainerRegis return null; } string id = default; - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string action = default; string location = default; ContainerRegistryArtifactEventTarget target = default; @@ -74,6 +105,10 @@ internal static ContainerRegistryChartDeletedEventData DeserializeContainerRegis } if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.cs index c51cacba09e9..1e84b783aed2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.cs @@ -14,11 +14,10 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerRegistryChartDeletedEventData : ContainerRegistryArtifactEventData { /// Initializes a new instance of . - /// The time at which the event occurred. /// The target of the event. /// The connected registry information if the event is generated by a connected registry. /// or is null. - internal ContainerRegistryChartDeletedEventData(DateTimeOffset timestamp, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(timestamp, target, connectedRegistry) + internal ContainerRegistryChartDeletedEventData(ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(target, connectedRegistry) { Argument.AssertNotNull(target, nameof(target)); Argument.AssertNotNull(connectedRegistry, nameof(connectedRegistry)); @@ -32,7 +31,7 @@ internal ContainerRegistryChartDeletedEventData(DateTimeOffset timestamp, Contai /// The target of the event. /// The connected registry information if the event is generated by a connected registry. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryChartDeletedEventData(string id, DateTimeOffset timestamp, string action, string location, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) : base(id, timestamp, action, location, target, connectedRegistry, serializedAdditionalRawData) + internal ContainerRegistryChartDeletedEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) : base(id, timestamp, action, location, target, connectedRegistry, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.Serialization.cs index 6e292e2bd1fd..ab8f85385723 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryChartPushedEventData : IUtf8JsonSerializab 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") @@ -34,7 +25,47 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ContainerRegistryChartPushedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + writer.WritePropertyName("target"u8); + writer.WriteObjectValue(Target, options); + writer.WritePropertyName("connectedRegistry"u8); + writer.WriteObjectValue(ConnectedRegistry, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ContainerRegistryChartPushedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -58,7 +89,7 @@ internal static ContainerRegistryChartPushedEventData DeserializeContainerRegist return null; } string id = default; - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string action = default; string location = default; ContainerRegistryArtifactEventTarget target = default; @@ -74,6 +105,10 @@ internal static ContainerRegistryChartPushedEventData DeserializeContainerRegist } if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.cs index 1e05ff576eac..276a12341e2f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.cs @@ -14,11 +14,10 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerRegistryChartPushedEventData : ContainerRegistryArtifactEventData { /// Initializes a new instance of . - /// The time at which the event occurred. /// The target of the event. /// The connected registry information if the event is generated by a connected registry. /// or is null. - internal ContainerRegistryChartPushedEventData(DateTimeOffset timestamp, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(timestamp, target, connectedRegistry) + internal ContainerRegistryChartPushedEventData(ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(target, connectedRegistry) { Argument.AssertNotNull(target, nameof(target)); Argument.AssertNotNull(connectedRegistry, nameof(connectedRegistry)); @@ -32,7 +31,7 @@ internal ContainerRegistryChartPushedEventData(DateTimeOffset timestamp, Contain /// The target of the event. /// The connected registry information if the event is generated by a connected registry. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryChartPushedEventData(string id, DateTimeOffset timestamp, string action, string location, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) : base(id, timestamp, action, location, target, connectedRegistry, serializedAdditionalRawData) + internal ContainerRegistryChartPushedEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) : base(id, timestamp, action, location, target, connectedRegistry, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventActor.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventActor.Serialization.cs index bff224370e7f..de29b152188a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventActor.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventActor.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryEventActor : IUtf8JsonSerializable, IJsonM 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerRegistryEventActor)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContainerRegistryEventActor IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventConnectedRegistry.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventConnectedRegistry.Serialization.cs index b28bb98afa41..ceb741c61343 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventConnectedRegistry.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventConnectedRegistry.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryEventConnectedRegistry : IUtf8JsonSerializ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerRegistryEventConnectedRegistry)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContainerRegistryEventConnectedRegistry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.Serialization.cs index e9f801089099..7204aef8ab50 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryEventData : IUtf8JsonSerializable, IJsonMo 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") @@ -34,13 +25,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerRegistryEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(Action)) { writer.WritePropertyName("action"u8); @@ -76,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContainerRegistryEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -99,7 +95,7 @@ internal static ContainerRegistryEventData DeserializeContainerRegistryEventData return null; } string id = default; - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string action = default; string location = default; ContainerRegistryEventTarget target = default; @@ -118,6 +114,10 @@ internal static ContainerRegistryEventData DeserializeContainerRegistryEventData } if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.cs index 6f9e05701bed..76f516a629a2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.cs @@ -46,14 +46,13 @@ public partial class ContainerRegistryEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time at which the event occurred. /// The target of the event. /// The request that generated the event. /// The agent that initiated the event. For most situations, this could be from the authorization context of the request. /// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. /// The connected registry information if the event is generated by a connected registry. /// , , , or is null. - internal ContainerRegistryEventData(DateTimeOffset timestamp, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry) + internal ContainerRegistryEventData(ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry) { Argument.AssertNotNull(target, nameof(target)); Argument.AssertNotNull(request, nameof(request)); @@ -61,7 +60,6 @@ internal ContainerRegistryEventData(DateTimeOffset timestamp, ContainerRegistryE Argument.AssertNotNull(source, nameof(source)); Argument.AssertNotNull(connectedRegistry, nameof(connectedRegistry)); - Timestamp = timestamp; Target = target; Request = request; Actor = actor; @@ -80,7 +78,7 @@ internal ContainerRegistryEventData(DateTimeOffset timestamp, ContainerRegistryE /// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. /// The connected registry information if the event is generated by a connected registry. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryEventData(string id, DateTimeOffset timestamp, string action, string location, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) + internal ContainerRegistryEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) { Id = id; Timestamp = timestamp; @@ -102,7 +100,7 @@ internal ContainerRegistryEventData() /// The event ID. public string Id { get; } /// The time at which the event occurred. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// The action that encompasses the provided event. public string Action { get; } /// The location of the event. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventRequest.Serialization.cs index f1d8f38ecf9f..4d68086e877f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventRequest.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventRequest.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryEventRequest : IUtf8JsonSerializable, IJso 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerRegistryEventRequest)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -74,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContainerRegistryEventRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventSource.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventSource.Serialization.cs index 5594050a3df3..2de5810e1664 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventSource.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventSource.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryEventSource : IUtf8JsonSerializable, IJson 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerRegistryEventSource)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Addr)) { writer.WritePropertyName("addr"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContainerRegistryEventSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventTarget.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventTarget.Serialization.cs index b04cd91daf5b..1415ece00cf4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventTarget.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventTarget.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryEventTarget : IUtf8JsonSerializable, IJson 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerRegistryEventTarget)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(MediaType)) { writer.WritePropertyName("mediaType"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContainerRegistryEventTarget IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.Serialization.cs index 2317c3678deb..f8fd9a1db32d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryImageDeletedEventData : IUtf8JsonSerializa 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") @@ -34,7 +25,53 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ContainerRegistryImageDeletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + writer.WritePropertyName("target"u8); + writer.WriteObjectValue(Target, options); + writer.WritePropertyName("request"u8); + writer.WriteObjectValue(Request, options); + writer.WritePropertyName("actor"u8); + writer.WriteObjectValue(Actor, options); + writer.WritePropertyName("source"u8); + writer.WriteObjectValue(Source, options); + writer.WritePropertyName("connectedRegistry"u8); + writer.WriteObjectValue(ConnectedRegistry, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ContainerRegistryImageDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -58,7 +95,7 @@ internal static ContainerRegistryImageDeletedEventData DeserializeContainerRegis return null; } string id = default; - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string action = default; string location = default; ContainerRegistryEventTarget target = default; @@ -77,6 +114,10 @@ internal static ContainerRegistryImageDeletedEventData DeserializeContainerRegis } if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.cs index c839e9590b91..d6c928eaa580 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.cs @@ -14,14 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerRegistryImageDeletedEventData : ContainerRegistryEventData { /// Initializes a new instance of . - /// The time at which the event occurred. /// The target of the event. /// The request that generated the event. /// The agent that initiated the event. For most situations, this could be from the authorization context of the request. /// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. /// The connected registry information if the event is generated by a connected registry. /// , , , or is null. - internal ContainerRegistryImageDeletedEventData(DateTimeOffset timestamp, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(timestamp, target, request, actor, source, connectedRegistry) + internal ContainerRegistryImageDeletedEventData(ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(target, request, actor, source, connectedRegistry) { Argument.AssertNotNull(target, nameof(target)); Argument.AssertNotNull(request, nameof(request)); @@ -41,7 +40,7 @@ internal ContainerRegistryImageDeletedEventData(DateTimeOffset timestamp, Contai /// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. /// The connected registry information if the event is generated by a connected registry. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryImageDeletedEventData(string id, DateTimeOffset timestamp, string action, string location, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) : base(id, timestamp, action, location, target, request, actor, source, connectedRegistry, serializedAdditionalRawData) + internal ContainerRegistryImageDeletedEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) : base(id, timestamp, action, location, target, request, actor, source, connectedRegistry, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.Serialization.cs index 99f3256056db..3672163ec71e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerRegistryImagePushedEventData : IUtf8JsonSerializab 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") @@ -34,7 +25,53 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ContainerRegistryImagePushedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + writer.WritePropertyName("target"u8); + writer.WriteObjectValue(Target, options); + writer.WritePropertyName("request"u8); + writer.WriteObjectValue(Request, options); + writer.WritePropertyName("actor"u8); + writer.WriteObjectValue(Actor, options); + writer.WritePropertyName("source"u8); + writer.WriteObjectValue(Source, options); + writer.WritePropertyName("connectedRegistry"u8); + writer.WriteObjectValue(ConnectedRegistry, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ContainerRegistryImagePushedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -58,7 +95,7 @@ internal static ContainerRegistryImagePushedEventData DeserializeContainerRegist return null; } string id = default; - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string action = default; string location = default; ContainerRegistryEventTarget target = default; @@ -77,6 +114,10 @@ internal static ContainerRegistryImagePushedEventData DeserializeContainerRegist } if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.cs index 32fbf481e6df..429b19cf91b5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.cs @@ -14,14 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerRegistryImagePushedEventData : ContainerRegistryEventData { /// Initializes a new instance of . - /// The time at which the event occurred. /// The target of the event. /// The request that generated the event. /// The agent that initiated the event. For most situations, this could be from the authorization context of the request. /// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. /// The connected registry information if the event is generated by a connected registry. /// , , , or is null. - internal ContainerRegistryImagePushedEventData(DateTimeOffset timestamp, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(timestamp, target, request, actor, source, connectedRegistry) + internal ContainerRegistryImagePushedEventData(ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(target, request, actor, source, connectedRegistry) { Argument.AssertNotNull(target, nameof(target)); Argument.AssertNotNull(request, nameof(request)); @@ -41,7 +40,7 @@ internal ContainerRegistryImagePushedEventData(DateTimeOffset timestamp, Contain /// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. /// The connected registry information if the event is generated by a connected registry. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryImagePushedEventData(string id, DateTimeOffset timestamp, string action, string location, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) : base(id, timestamp, action, location, target, request, actor, source, connectedRegistry, serializedAdditionalRawData) + internal ContainerRegistryImagePushedEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry, IDictionary serializedAdditionalRawData) : base(id, timestamp, action, location, target, request, actor, source, connectedRegistry, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.Serialization.cs index da702ca3e31f..272cde6292d3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerServiceClusterSupportEndedEventData : IUtf8JsonSer 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") @@ -34,7 +25,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ContainerServiceClusterSupportEndedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(KubernetesVersion)) + { + writer.WritePropertyName("kubernetesVersion"u8); + writer.WriteStringValue(KubernetesVersion); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ContainerServiceClusterSupportEndedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.Serialization.cs index db44b5ec660c..a076af973220 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerServiceClusterSupportEndingEventData : IUtf8JsonSe 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") @@ -34,7 +25,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ContainerServiceClusterSupportEndingEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(KubernetesVersion)) + { + writer.WritePropertyName("kubernetesVersion"u8); + writer.WriteStringValue(KubernetesVersion); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ContainerServiceClusterSupportEndingEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 48a01092b872..20c67afcc3d7 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 @@ -18,15 +18,6 @@ public partial class ContainerServiceClusterSupportEventData : IUtf8JsonSerializ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceClusterSupportEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(KubernetesVersion)) { writer.WritePropertyName("kubernetesVersion"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContainerServiceClusterSupportEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 8836e65a21e0..1166370ac2aa 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 @@ -18,15 +18,6 @@ public partial class ContainerServiceNewKubernetesVersionAvailableEventData : IU 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNewKubernetesVersionAvailableEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(LatestSupportedKubernetesVersion)) { writer.WritePropertyName("latestSupportedKubernetesVersion"u8); @@ -69,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContainerServiceNewKubernetesVersionAvailableEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 a27699c1016e..86e51b75389e 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 @@ -18,15 +18,6 @@ public partial class ContainerServiceNodePoolRollingEventData : IUtf8JsonSeriali 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNodePoolRollingEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(NodePoolName)) { writer.WritePropertyName("nodePoolName"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContainerServiceNodePoolRollingEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.Serialization.cs index 82cb9599f2c7..cea03db1e357 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerServiceNodePoolRollingFailedEventData : IUtf8JsonS 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") @@ -34,7 +25,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ContainerServiceNodePoolRollingFailedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(NodePoolName)) + { + writer.WritePropertyName("nodePoolName"u8); + writer.WriteStringValue(NodePoolName); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ContainerServiceNodePoolRollingFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.Serialization.cs index 5ce556b9cfdf..9fa7aa321975 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerServiceNodePoolRollingStartedEventData : IUtf8Json 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") @@ -34,7 +25,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ContainerServiceNodePoolRollingStartedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(NodePoolName)) + { + writer.WritePropertyName("nodePoolName"u8); + writer.WriteStringValue(NodePoolName); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ContainerServiceNodePoolRollingStartedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.Serialization.cs index e7b4799f29cf..d53b9a1e414f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContainerServiceNodePoolRollingSucceededEventData : IUtf8Js 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") @@ -34,7 +25,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ContainerServiceNodePoolRollingSucceededEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(NodePoolName)) + { + writer.WritePropertyName("nodePoolName"u8); + writer.WriteStringValue(NodePoolName); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ContainerServiceNodePoolRollingSucceededEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.Serialization.cs index 48825fb0fed9..f6d1c91fc3e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class DataBoxCopyCompletedEventData : IUtf8JsonSerializable, IJso 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") @@ -34,15 +25,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DataBoxCopyCompletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(SerialNumber)) { writer.WritePropertyName("serialNumber"u8); writer.WriteStringValue(SerialNumber); } - writer.WritePropertyName("stageName"u8); - writer.WriteStringValue(StageName.ToString()); - writer.WritePropertyName("stageTime"u8); - writer.WriteStringValue(StageTime, "O"); + if (Optional.IsDefined(StageName)) + { + writer.WritePropertyName("stageName"u8); + writer.WriteStringValue(StageName.Value.ToString()); + } + if (Optional.IsDefined(StageTime)) + { + writer.WritePropertyName("stageTime"u8); + writer.WriteStringValue(StageTime.Value, "O"); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -58,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DataBoxCopyCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -81,8 +80,8 @@ internal static DataBoxCopyCompletedEventData DeserializeDataBoxCopyCompletedEve return null; } string serialNumber = default; - DataBoxStageName stageName = default; - DateTimeOffset stageTime = default; + DataBoxStageName? stageName = default; + DateTimeOffset? stageTime = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -94,11 +93,19 @@ internal static DataBoxCopyCompletedEventData DeserializeDataBoxCopyCompletedEve } if (property.NameEquals("stageName"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } stageName = new DataBoxStageName(property.Value.GetString()); continue; } if (property.NameEquals("stageTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } stageTime = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.cs index 75a73c0475e9..9ec03066cd5e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.cs @@ -46,12 +46,8 @@ public partial class DataBoxCopyCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Name of the current Stage. - /// The time at which the stage happened. - internal DataBoxCopyCompletedEventData(DataBoxStageName stageName, DateTimeOffset stageTime) + internal DataBoxCopyCompletedEventData() { - StageName = stageName; - StageTime = stageTime; } /// Initializes a new instance of . @@ -59,7 +55,7 @@ internal DataBoxCopyCompletedEventData(DataBoxStageName stageName, DateTimeOffse /// Name of the current Stage. /// The time at which the stage happened. /// Keeps track of any properties unknown to the library. - internal DataBoxCopyCompletedEventData(string serialNumber, DataBoxStageName stageName, DateTimeOffset stageTime, IDictionary serializedAdditionalRawData) + internal DataBoxCopyCompletedEventData(string serialNumber, DataBoxStageName? stageName, DateTimeOffset? stageTime, IDictionary serializedAdditionalRawData) { SerialNumber = serialNumber; StageName = stageName; @@ -67,16 +63,11 @@ internal DataBoxCopyCompletedEventData(string serialNumber, DataBoxStageName sta _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DataBoxCopyCompletedEventData() - { - } - /// Serial Number of the device associated with the event. The list is comma separated if more than one serial number is associated. public string SerialNumber { get; } /// Name of the current Stage. - public DataBoxStageName StageName { get; } + public DataBoxStageName? StageName { get; } /// The time at which the stage happened. - public DateTimeOffset StageTime { get; } + public DateTimeOffset? StageTime { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.Serialization.cs index e0603dee3265..e649959117c2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class DataBoxCopyStartedEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,15 +25,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DataBoxCopyStartedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(SerialNumber)) { writer.WritePropertyName("serialNumber"u8); writer.WriteStringValue(SerialNumber); } - writer.WritePropertyName("stageName"u8); - writer.WriteStringValue(StageName.ToString()); - writer.WritePropertyName("stageTime"u8); - writer.WriteStringValue(StageTime, "O"); + if (Optional.IsDefined(StageName)) + { + writer.WritePropertyName("stageName"u8); + writer.WriteStringValue(StageName.Value.ToString()); + } + if (Optional.IsDefined(StageTime)) + { + writer.WritePropertyName("stageTime"u8); + writer.WriteStringValue(StageTime.Value, "O"); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -58,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DataBoxCopyStartedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -81,8 +80,8 @@ internal static DataBoxCopyStartedEventData DeserializeDataBoxCopyStartedEventDa return null; } string serialNumber = default; - DataBoxStageName stageName = default; - DateTimeOffset stageTime = default; + DataBoxStageName? stageName = default; + DateTimeOffset? stageTime = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -94,11 +93,19 @@ internal static DataBoxCopyStartedEventData DeserializeDataBoxCopyStartedEventDa } if (property.NameEquals("stageName"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } stageName = new DataBoxStageName(property.Value.GetString()); continue; } if (property.NameEquals("stageTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } stageTime = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.cs index 2c607fcec991..137e68ee45c7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.cs @@ -46,12 +46,8 @@ public partial class DataBoxCopyStartedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Name of the current Stage. - /// The time at which the stage happened. - internal DataBoxCopyStartedEventData(DataBoxStageName stageName, DateTimeOffset stageTime) + internal DataBoxCopyStartedEventData() { - StageName = stageName; - StageTime = stageTime; } /// Initializes a new instance of . @@ -59,7 +55,7 @@ internal DataBoxCopyStartedEventData(DataBoxStageName stageName, DateTimeOffset /// Name of the current Stage. /// The time at which the stage happened. /// Keeps track of any properties unknown to the library. - internal DataBoxCopyStartedEventData(string serialNumber, DataBoxStageName stageName, DateTimeOffset stageTime, IDictionary serializedAdditionalRawData) + internal DataBoxCopyStartedEventData(string serialNumber, DataBoxStageName? stageName, DateTimeOffset? stageTime, IDictionary serializedAdditionalRawData) { SerialNumber = serialNumber; StageName = stageName; @@ -67,16 +63,11 @@ internal DataBoxCopyStartedEventData(string serialNumber, DataBoxStageName stage _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DataBoxCopyStartedEventData() - { - } - /// Serial Number of the device associated with the event. The list is comma separated if more than one serial number is associated. public string SerialNumber { get; } /// Name of the current Stage. - public DataBoxStageName StageName { get; } + public DataBoxStageName? StageName { get; } /// The time at which the stage happened. - public DateTimeOffset StageTime { get; } + public DateTimeOffset? StageTime { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.Serialization.cs index 036c53c1f5ca..9139088ced83 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class DataBoxOrderCompletedEventData : IUtf8JsonSerializable, IJs 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") @@ -34,15 +25,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DataBoxOrderCompletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(SerialNumber)) { writer.WritePropertyName("serialNumber"u8); writer.WriteStringValue(SerialNumber); } - writer.WritePropertyName("stageName"u8); - writer.WriteStringValue(StageName.ToString()); - writer.WritePropertyName("stageTime"u8); - writer.WriteStringValue(StageTime, "O"); + if (Optional.IsDefined(StageName)) + { + writer.WritePropertyName("stageName"u8); + writer.WriteStringValue(StageName.Value.ToString()); + } + if (Optional.IsDefined(StageTime)) + { + writer.WritePropertyName("stageTime"u8); + writer.WriteStringValue(StageTime.Value, "O"); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -58,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DataBoxOrderCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -81,8 +80,8 @@ internal static DataBoxOrderCompletedEventData DeserializeDataBoxOrderCompletedE return null; } string serialNumber = default; - DataBoxStageName stageName = default; - DateTimeOffset stageTime = default; + DataBoxStageName? stageName = default; + DateTimeOffset? stageTime = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -94,11 +93,19 @@ internal static DataBoxOrderCompletedEventData DeserializeDataBoxOrderCompletedE } if (property.NameEquals("stageName"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } stageName = new DataBoxStageName(property.Value.GetString()); continue; } if (property.NameEquals("stageTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } stageTime = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.cs index b610d5819b26..7e38471a034c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.cs @@ -46,12 +46,8 @@ public partial class DataBoxOrderCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Name of the current Stage. - /// The time at which the stage happened. - internal DataBoxOrderCompletedEventData(DataBoxStageName stageName, DateTimeOffset stageTime) + internal DataBoxOrderCompletedEventData() { - StageName = stageName; - StageTime = stageTime; } /// Initializes a new instance of . @@ -59,7 +55,7 @@ internal DataBoxOrderCompletedEventData(DataBoxStageName stageName, DateTimeOffs /// Name of the current Stage. /// The time at which the stage happened. /// Keeps track of any properties unknown to the library. - internal DataBoxOrderCompletedEventData(string serialNumber, DataBoxStageName stageName, DateTimeOffset stageTime, IDictionary serializedAdditionalRawData) + internal DataBoxOrderCompletedEventData(string serialNumber, DataBoxStageName? stageName, DateTimeOffset? stageTime, IDictionary serializedAdditionalRawData) { SerialNumber = serialNumber; StageName = stageName; @@ -67,16 +63,11 @@ internal DataBoxOrderCompletedEventData(string serialNumber, DataBoxStageName st _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DataBoxOrderCompletedEventData() - { - } - /// Serial Number of the device associated with the event. The list is comma separated if more than one serial number is associated. public string SerialNumber { get; } /// Name of the current Stage. - public DataBoxStageName StageName { get; } + public DataBoxStageName? StageName { get; } /// The time at which the stage happened. - public DateTimeOffset StageTime { get; } + public DateTimeOffset? StageTime { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventInfo.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventInfo.Serialization.cs index e5f7910703dc..82c24751c5f3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventInfo.Serialization.cs @@ -18,15 +18,6 @@ public partial class DeviceConnectionStateEventInfo : IUtf8JsonSerializable, IJs 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeviceConnectionStateEventInfo)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(SequenceNumber)) { writer.WritePropertyName("sequenceNumber"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DeviceConnectionStateEventInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventProperties.Serialization.cs index f281e719035a..b64926dabe70 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventProperties.Serialization.cs @@ -18,15 +18,6 @@ public partial class DeviceConnectionStateEventProperties : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeviceConnectionStateEventProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(DeviceId)) { writer.WritePropertyName("deviceId"u8); @@ -66,6 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DeviceConnectionStateEventProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceLifeCycleEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceLifeCycleEventProperties.Serialization.cs index 067326794b32..6c8d8559b650 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceLifeCycleEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceLifeCycleEventProperties.Serialization.cs @@ -18,15 +18,6 @@ public partial class DeviceLifeCycleEventProperties : IUtf8JsonSerializable, IJs 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeviceLifeCycleEventProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(DeviceId)) { writer.WritePropertyName("deviceId"u8); @@ -61,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DeviceLifeCycleEventProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTelemetryEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTelemetryEventProperties.Serialization.cs index 8c040868a652..1ce8b993cf9d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTelemetryEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTelemetryEventProperties.Serialization.cs @@ -18,15 +18,6 @@ public partial class DeviceTelemetryEventProperties : IUtf8JsonSerializable, IJs 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeviceTelemetryEventProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("body"u8); writer.WriteStartObject(); foreach (var item in Body) @@ -85,6 +77,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DeviceTelemetryEventProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfo.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfo.Serialization.cs index e5d3ab3d59e6..c20d89ee3818 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfo.Serialization.cs @@ -18,15 +18,6 @@ public partial class DeviceTwinInfo : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeviceTwinInfo)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(AuthenticationType)) { writer.WritePropertyName("authenticationType"u8); @@ -98,6 +90,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DeviceTwinInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoProperties.Serialization.cs index 6cea8bc485d0..9b6c1e740ec0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoProperties.Serialization.cs @@ -18,15 +18,6 @@ public partial class DeviceTwinInfoProperties : IUtf8JsonSerializable, IJsonMode 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeviceTwinInfoProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("desired"u8); writer.WriteObjectValue(Desired, options); writer.WritePropertyName("reported"u8); @@ -53,6 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DeviceTwinInfoProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoX509Thumbprint.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoX509Thumbprint.Serialization.cs index c239f0edb6a5..b8feec0e3211 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoX509Thumbprint.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoX509Thumbprint.Serialization.cs @@ -18,15 +18,6 @@ public partial class DeviceTwinInfoX509Thumbprint : IUtf8JsonSerializable, IJson 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeviceTwinInfoX509Thumbprint)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(PrimaryThumbprint)) { writer.WritePropertyName("primaryThumbprint"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DeviceTwinInfoX509Thumbprint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinMetadata.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinMetadata.Serialization.cs index 52a1525e9cec..612667b023e4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinMetadata.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinMetadata.Serialization.cs @@ -18,15 +18,6 @@ public partial class DeviceTwinMetadata : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeviceTwinMetadata)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(LastUpdated)) { writer.WritePropertyName("lastUpdated"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DeviceTwinMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinProperties.Serialization.cs index 1ce535a74966..6e8b8ee1f30d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinProperties.Serialization.cs @@ -18,15 +18,6 @@ public partial class DeviceTwinProperties : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeviceTwinProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("metadata"u8); writer.WriteObjectValue(Metadata, options); if (Optional.IsDefined(Version)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DeviceTwinProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientCreatedOrUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientCreatedOrUpdatedEventData.Serialization.cs similarity index 61% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientCreatedOrUpdatedEventData.Serialization.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientCreatedOrUpdatedEventData.Serialization.cs index 6ca3505ba0e6..5048a122d6b6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientCreatedOrUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientCreatedOrUpdatedEventData.Serialization.cs @@ -13,34 +13,34 @@ namespace Azure.Messaging.EventGrid.SystemEvents { - public partial class EventGridMQTTClientCreatedOrUpdatedEventData : IUtf8JsonSerializable, IJsonModel + public partial class EventGridMqttClientCreatedOrUpdatedEventData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EventGridMQTTClientCreatedOrUpdatedEventData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientCreatedOrUpdatedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.ToString()); - writer.WritePropertyName("createdOn"u8); - writer.WriteStringValue(CreatedOn, "O"); - writer.WritePropertyName("updatedOn"u8); - writer.WriteStringValue(UpdatedOn, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdOn"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (Optional.IsDefined(UpdatedOn)) + { + writer.WritePropertyName("updatedOn"u8); + writer.WriteStringValue(UpdatedOn.Value, "O"); + } writer.WritePropertyName("attributes"u8); writer.WriteStartObject(); foreach (var item in Attributes) @@ -49,21 +49,52 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); + if (Optional.IsDefined(ClientAuthenticationName)) + { + writer.WritePropertyName("clientAuthenticationName"u8); + writer.WriteStringValue(ClientAuthenticationName); + } + if (Optional.IsDefined(ClientName)) + { + writer.WritePropertyName("clientName"u8); + writer.WriteStringValue(ClientName); + } + if (Optional.IsDefined(NamespaceName)) + { + writer.WritePropertyName("namespaceName"u8); + writer.WriteStringValue(NamespaceName); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } - EventGridMQTTClientCreatedOrUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EventGridMqttClientCreatedOrUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EventGridMQTTClientCreatedOrUpdatedEventData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientCreatedOrUpdatedEventData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEventGridMQTTClientCreatedOrUpdatedEventData(document.RootElement, options); + return DeserializeEventGridMqttClientCreatedOrUpdatedEventData(document.RootElement, options); } - internal static EventGridMQTTClientCreatedOrUpdatedEventData DeserializeEventGridMQTTClientCreatedOrUpdatedEventData(JsonElement element, ModelReaderWriterOptions options = null) + internal static EventGridMqttClientCreatedOrUpdatedEventData DeserializeEventGridMqttClientCreatedOrUpdatedEventData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -71,9 +102,9 @@ internal static EventGridMQTTClientCreatedOrUpdatedEventData DeserializeEventGri { return null; } - EventGridMQTTClientState state = default; - DateTimeOffset createdOn = default; - DateTimeOffset updatedOn = default; + EventGridMqttClientState? state = default; + DateTimeOffset? createdOn = default; + DateTimeOffset? updatedOn = default; IReadOnlyDictionary attributes = default; string clientAuthenticationName = default; string clientName = default; @@ -84,16 +115,28 @@ internal static EventGridMQTTClientCreatedOrUpdatedEventData DeserializeEventGri { if (property.NameEquals("state"u8)) { - state = new EventGridMQTTClientState(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new EventGridMqttClientState(property.Value.GetString()); continue; } if (property.NameEquals("createdOn"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } createdOn = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("updatedOn"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } updatedOn = property.Value.GetDateTimeOffset("O"); continue; } @@ -128,7 +171,7 @@ internal static EventGridMQTTClientCreatedOrUpdatedEventData DeserializeEventGri } } serializedAdditionalRawData = rawDataDictionary; - return new EventGridMQTTClientCreatedOrUpdatedEventData( + return new EventGridMqttClientCreatedOrUpdatedEventData( clientAuthenticationName, clientName, namespaceName, @@ -139,43 +182,43 @@ internal static EventGridMQTTClientCreatedOrUpdatedEventData DeserializeEventGri attributes); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(EventGridMQTTClientCreatedOrUpdatedEventData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientCreatedOrUpdatedEventData)} does not support writing '{options.Format}' format."); } } - EventGridMQTTClientCreatedOrUpdatedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EventGridMqttClientCreatedOrUpdatedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEventGridMQTTClientCreatedOrUpdatedEventData(document.RootElement, options); + return DeserializeEventGridMqttClientCreatedOrUpdatedEventData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EventGridMQTTClientCreatedOrUpdatedEventData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientCreatedOrUpdatedEventData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new EventGridMQTTClientCreatedOrUpdatedEventData FromResponse(Response response) + internal static new EventGridMqttClientCreatedOrUpdatedEventData FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeEventGridMQTTClientCreatedOrUpdatedEventData(document.RootElement); + return DeserializeEventGridMqttClientCreatedOrUpdatedEventData(document.RootElement); } /// Convert into a . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientCreatedOrUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientCreatedOrUpdatedEventData.cs similarity index 66% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientCreatedOrUpdatedEventData.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientCreatedOrUpdatedEventData.cs index dde0c575b475..72730dd319f6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientCreatedOrUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientCreatedOrUpdatedEventData.cs @@ -11,29 +11,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents { /// Event data for Microsoft.EventGrid.MQTTClientCreatedOrUpdated event. - public partial class EventGridMQTTClientCreatedOrUpdatedEventData : EventGridMQTTClientEventData + public partial class EventGridMqttClientCreatedOrUpdatedEventData : EventGridMqttClientEventData { - /// Initializes a new instance of . - /// Configured state of the client. The value could be Enabled or Disabled. - /// Time the client resource is created based on the provider's UTC time. - /// - /// Time the client resource is last updated based on the provider's UTC time. If - /// the client resource was never updated, this value is identical to the value of - /// the 'createdOn' property. - /// + /// Initializes a new instance of . /// The key-value attributes that are assigned to the client resource. /// is null. - internal EventGridMQTTClientCreatedOrUpdatedEventData(EventGridMQTTClientState state, DateTimeOffset createdOn, DateTimeOffset updatedOn, IReadOnlyDictionary attributes) + internal EventGridMqttClientCreatedOrUpdatedEventData(IReadOnlyDictionary attributes) { Argument.AssertNotNull(attributes, nameof(attributes)); - State = state; - CreatedOn = createdOn; - UpdatedOn = updatedOn; Attributes = attributes; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Unique identifier for the MQTT client that the client presents to the service /// for authentication. This case-sensitive string can be up to 128 characters @@ -50,7 +40,7 @@ internal EventGridMQTTClientCreatedOrUpdatedEventData(EventGridMQTTClientState s /// the 'createdOn' property. /// /// The key-value attributes that are assigned to the client resource. - internal EventGridMQTTClientCreatedOrUpdatedEventData(string clientAuthenticationName, string clientName, string namespaceName, IDictionary serializedAdditionalRawData, EventGridMQTTClientState state, DateTimeOffset createdOn, DateTimeOffset updatedOn, IReadOnlyDictionary attributes) : base(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData) + internal EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName, string clientName, string namespaceName, IDictionary serializedAdditionalRawData, EventGridMqttClientState? state, DateTimeOffset? createdOn, DateTimeOffset? updatedOn, IReadOnlyDictionary attributes) : base(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData) { State = state; CreatedOn = createdOn; @@ -58,21 +48,21 @@ internal EventGridMQTTClientCreatedOrUpdatedEventData(string clientAuthenticatio Attributes = attributes; } - /// Initializes a new instance of for deserialization. - internal EventGridMQTTClientCreatedOrUpdatedEventData() + /// Initializes a new instance of for deserialization. + internal EventGridMqttClientCreatedOrUpdatedEventData() { } /// Configured state of the client. The value could be Enabled or Disabled. - public EventGridMQTTClientState State { get; } + public EventGridMqttClientState? State { get; } /// Time the client resource is created based on the provider's UTC time. - public DateTimeOffset CreatedOn { get; } + public DateTimeOffset? CreatedOn { get; } /// /// Time the client resource is last updated based on the provider's UTC time. If /// the client resource was never updated, this value is identical to the value of /// the 'createdOn' property. /// - public DateTimeOffset UpdatedOn { get; } + public DateTimeOffset? UpdatedOn { get; } /// The key-value attributes that are assigned to the client resource. public IReadOnlyDictionary Attributes { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDeletedEventData.Serialization.cs similarity index 62% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientDeletedEventData.Serialization.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDeletedEventData.Serialization.cs index 7e81e11c1acd..d601458d16e8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDeletedEventData.Serialization.cs @@ -13,43 +13,65 @@ namespace Azure.Messaging.EventGrid.SystemEvents { - public partial class EventGridMQTTClientDeletedEventData : IUtf8JsonSerializable, IJsonModel + public partial class EventGridMqttClientDeletedEventData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EventGridMQTTClientDeletedEventData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientDeletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(ClientAuthenticationName)) + { + writer.WritePropertyName("clientAuthenticationName"u8); + writer.WriteStringValue(ClientAuthenticationName); + } + if (Optional.IsDefined(ClientName)) + { + writer.WritePropertyName("clientName"u8); + writer.WriteStringValue(ClientName); + } + if (Optional.IsDefined(NamespaceName)) + { + writer.WritePropertyName("namespaceName"u8); + writer.WriteStringValue(NamespaceName); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } - EventGridMQTTClientDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EventGridMqttClientDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EventGridMQTTClientDeletedEventData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientDeletedEventData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEventGridMQTTClientDeletedEventData(document.RootElement, options); + return DeserializeEventGridMqttClientDeletedEventData(document.RootElement, options); } - internal static EventGridMQTTClientDeletedEventData DeserializeEventGridMQTTClientDeletedEventData(JsonElement element, ModelReaderWriterOptions options = null) + internal static EventGridMqttClientDeletedEventData DeserializeEventGridMqttClientDeletedEventData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -85,46 +107,46 @@ internal static EventGridMQTTClientDeletedEventData DeserializeEventGridMQTTClie } } serializedAdditionalRawData = rawDataDictionary; - return new EventGridMQTTClientDeletedEventData(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData); + return new EventGridMqttClientDeletedEventData(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(EventGridMQTTClientDeletedEventData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientDeletedEventData)} does not support writing '{options.Format}' format."); } } - EventGridMQTTClientDeletedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EventGridMqttClientDeletedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEventGridMQTTClientDeletedEventData(document.RootElement, options); + return DeserializeEventGridMqttClientDeletedEventData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EventGridMQTTClientDeletedEventData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientDeletedEventData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new EventGridMQTTClientDeletedEventData FromResponse(Response response) + internal static new EventGridMqttClientDeletedEventData FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeEventGridMQTTClientDeletedEventData(document.RootElement); + return DeserializeEventGridMqttClientDeletedEventData(document.RootElement); } /// Convert into a . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDeletedEventData.cs similarity index 81% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientDeletedEventData.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDeletedEventData.cs index a5660854989a..fe2cbeabdd6c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDeletedEventData.cs @@ -11,14 +11,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents { /// Event data for Microsoft.EventGrid.MQTTClientDeleted event. - public partial class EventGridMQTTClientDeletedEventData : EventGridMQTTClientEventData + public partial class EventGridMqttClientDeletedEventData : EventGridMqttClientEventData { - /// Initializes a new instance of . - internal EventGridMQTTClientDeletedEventData() + /// Initializes a new instance of . + internal EventGridMqttClientDeletedEventData() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Unique identifier for the MQTT client that the client presents to the service /// for authentication. This case-sensitive string can be up to 128 characters @@ -27,7 +27,7 @@ internal EventGridMQTTClientDeletedEventData() /// Name of the client resource in the Event Grid namespace. /// Name of the Event Grid namespace where the MQTT client was created or updated. /// Keeps track of any properties unknown to the library. - internal EventGridMQTTClientDeletedEventData(string clientAuthenticationName, string clientName, string namespaceName, IDictionary serializedAdditionalRawData) : base(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData) + internal EventGridMqttClientDeletedEventData(string clientAuthenticationName, string clientName, string namespaceName, IDictionary serializedAdditionalRawData) : base(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData) { } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientDisconnectionReason.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDisconnectionReason.cs similarity index 64% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientDisconnectionReason.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDisconnectionReason.cs index a8e88d5b0c30..9f960c3de714 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientDisconnectionReason.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDisconnectionReason.cs @@ -11,13 +11,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents { /// EventGrid MQTT Client Disconnection Reason. - public readonly partial struct EventGridMQTTClientDisconnectionReason : IEquatable + public readonly partial struct EventGridMqttClientDisconnectionReason : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public EventGridMQTTClientDisconnectionReason(string value) + public EventGridMqttClientDisconnectionReason(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -35,39 +35,39 @@ public EventGridMQTTClientDisconnectionReason(string value) private const string SessionTakenOverValue = "SessionTakenOver"; /// The client got disconnected for any authentication reasons (for example, certificate expired, client got disabled, or client configuration changed). - public static EventGridMQTTClientDisconnectionReason ClientAuthenticationError { get; } = new EventGridMQTTClientDisconnectionReason(ClientAuthenticationErrorValue); + public static EventGridMqttClientDisconnectionReason ClientAuthenticationError { get; } = new EventGridMqttClientDisconnectionReason(ClientAuthenticationErrorValue); /// The client got disconnected for any authorization reasons (for example, because of a change in the configuration of topic spaces, permission bindings, or client groups). - public static EventGridMQTTClientDisconnectionReason ClientAuthorizationError { get; } = new EventGridMQTTClientDisconnectionReason(ClientAuthorizationErrorValue); + public static EventGridMqttClientDisconnectionReason ClientAuthorizationError { get; } = new EventGridMqttClientDisconnectionReason(ClientAuthorizationErrorValue); /// The client sent a bad request or used one of the unsupported features that resulted in a connection termination by the service. - public static EventGridMQTTClientDisconnectionReason ClientError { get; } = new EventGridMQTTClientDisconnectionReason(ClientErrorValue); + public static EventGridMqttClientDisconnectionReason ClientError { get; } = new EventGridMqttClientDisconnectionReason(ClientErrorValue); /// The client initiated a graceful disconnect through a DISCONNECT packet for MQTT or a close frame for MQTT over WebSocket. - public static EventGridMQTTClientDisconnectionReason ClientInitiatedDisconnect { get; } = new EventGridMQTTClientDisconnectionReason(ClientInitiatedDisconnectValue); + public static EventGridMqttClientDisconnectionReason ClientInitiatedDisconnect { get; } = new EventGridMqttClientDisconnectionReason(ClientInitiatedDisconnectValue); /// The client-server connection is lost. (EXCHANGE ONLINE PROTECTION). - public static EventGridMQTTClientDisconnectionReason ConnectionLost { get; } = new EventGridMQTTClientDisconnectionReason(ConnectionLostValue); + public static EventGridMqttClientDisconnectionReason ConnectionLost { get; } = new EventGridMqttClientDisconnectionReason(ConnectionLostValue); /// The client's IP address is blocked by IP filter or Private links configuration. - public static EventGridMQTTClientDisconnectionReason IpForbidden { get; } = new EventGridMQTTClientDisconnectionReason(IpForbiddenValue); + public static EventGridMqttClientDisconnectionReason IpForbidden { get; } = new EventGridMqttClientDisconnectionReason(IpForbiddenValue); /// The client exceeded one or more of the throttling limits that resulted in a connection termination by the service. - public static EventGridMQTTClientDisconnectionReason QuotaExceeded { get; } = new EventGridMQTTClientDisconnectionReason(QuotaExceededValue); + public static EventGridMqttClientDisconnectionReason QuotaExceeded { get; } = new EventGridMqttClientDisconnectionReason(QuotaExceededValue); /// The connection got terminated due to an unexpected server error. - public static EventGridMQTTClientDisconnectionReason ServerError { get; } = new EventGridMQTTClientDisconnectionReason(ServerErrorValue); + public static EventGridMqttClientDisconnectionReason ServerError { get; } = new EventGridMqttClientDisconnectionReason(ServerErrorValue); /// The server initiates a graceful disconnect for any operational reason. - public static EventGridMQTTClientDisconnectionReason ServerInitiatedDisconnect { get; } = new EventGridMQTTClientDisconnectionReason(ServerInitiatedDisconnectValue); + public static EventGridMqttClientDisconnectionReason ServerInitiatedDisconnect { get; } = new EventGridMqttClientDisconnectionReason(ServerInitiatedDisconnectValue); /// The client's queue for unacknowledged QoS1 messages reached its limit, which resulted in a connection termination by the server. - public static EventGridMQTTClientDisconnectionReason SessionOverflow { get; } = new EventGridMQTTClientDisconnectionReason(SessionOverflowValue); + public static EventGridMqttClientDisconnectionReason SessionOverflow { get; } = new EventGridMqttClientDisconnectionReason(SessionOverflowValue); /// The client reconnected with the same authentication name, which resulted in the termination of the previous connection. - public static EventGridMQTTClientDisconnectionReason SessionTakenOver { get; } = new EventGridMQTTClientDisconnectionReason(SessionTakenOverValue); - /// Determines if two values are the same. - public static bool operator ==(EventGridMQTTClientDisconnectionReason left, EventGridMQTTClientDisconnectionReason right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EventGridMQTTClientDisconnectionReason left, EventGridMQTTClientDisconnectionReason right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator EventGridMQTTClientDisconnectionReason(string value) => new EventGridMQTTClientDisconnectionReason(value); + public static EventGridMqttClientDisconnectionReason SessionTakenOver { get; } = new EventGridMqttClientDisconnectionReason(SessionTakenOverValue); + /// Determines if two values are the same. + public static bool operator ==(EventGridMqttClientDisconnectionReason left, EventGridMqttClientDisconnectionReason right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EventGridMqttClientDisconnectionReason left, EventGridMqttClientDisconnectionReason right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EventGridMqttClientDisconnectionReason(string value) => new EventGridMqttClientDisconnectionReason(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EventGridMQTTClientDisconnectionReason other && Equals(other); + public override bool Equals(object obj) => obj is EventGridMqttClientDisconnectionReason other && Equals(other); /// - public bool Equals(EventGridMQTTClientDisconnectionReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(EventGridMqttClientDisconnectionReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientEventData.Serialization.cs similarity index 74% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientEventData.Serialization.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientEventData.Serialization.cs index eac1ae874e9f..6df34fcf65c0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientEventData.Serialization.cs @@ -13,27 +13,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents { - public partial class EventGridMQTTClientEventData : IUtf8JsonSerializable, IJsonModel + public partial class EventGridMqttClientEventData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EventGridMQTTClientEventData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ClientAuthenticationName)) { writer.WritePropertyName("clientAuthenticationName"u8); @@ -64,21 +56,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } - EventGridMQTTClientEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EventGridMqttClientEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EventGridMQTTClientEventData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientEventData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEventGridMQTTClientEventData(document.RootElement, options); + return DeserializeEventGridMqttClientEventData(document.RootElement, options); } - internal static EventGridMQTTClientEventData DeserializeEventGridMQTTClientEventData(JsonElement element, ModelReaderWriterOptions options = null) + internal static EventGridMqttClientEventData DeserializeEventGridMqttClientEventData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -114,46 +107,46 @@ internal static EventGridMQTTClientEventData DeserializeEventGridMQTTClientEvent } } serializedAdditionalRawData = rawDataDictionary; - return new EventGridMQTTClientEventData(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData); + return new EventGridMqttClientEventData(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(EventGridMQTTClientEventData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientEventData)} does not support writing '{options.Format}' format."); } } - EventGridMQTTClientEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EventGridMqttClientEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEventGridMQTTClientEventData(document.RootElement, options); + return DeserializeEventGridMqttClientEventData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EventGridMQTTClientEventData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientEventData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static EventGridMQTTClientEventData FromResponse(Response response) + internal static EventGridMqttClientEventData FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeEventGridMQTTClientEventData(document.RootElement); + return DeserializeEventGridMqttClientEventData(document.RootElement); } /// Convert into a . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientEventData.cs similarity index 93% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientEventData.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientEventData.cs index 8c69eb51fec2..0dd6c22cfee5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientEventData.cs @@ -11,7 +11,7 @@ namespace Azure.Messaging.EventGrid.SystemEvents { /// Schema of the Data property of an EventGridEvent for MQTT Client state changes. - public partial class EventGridMQTTClientEventData + public partial class EventGridMqttClientEventData { /// /// Keeps track of any properties unknown to the library. @@ -45,12 +45,12 @@ public partial class EventGridMQTTClientEventData /// private protected IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal EventGridMQTTClientEventData() + /// Initializes a new instance of . + internal EventGridMqttClientEventData() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Unique identifier for the MQTT client that the client presents to the service /// for authentication. This case-sensitive string can be up to 128 characters @@ -59,7 +59,7 @@ internal EventGridMQTTClientEventData() /// Name of the client resource in the Event Grid namespace. /// Name of the Event Grid namespace where the MQTT client was created or updated. /// Keeps track of any properties unknown to the library. - internal EventGridMQTTClientEventData(string clientAuthenticationName, string clientName, string namespaceName, IDictionary serializedAdditionalRawData) + internal EventGridMqttClientEventData(string clientAuthenticationName, string clientName, string namespaceName, IDictionary serializedAdditionalRawData) { ClientAuthenticationName = clientAuthenticationName; ClientName = clientName; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionConnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionConnectedEventData.Serialization.cs similarity index 68% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionConnectedEventData.Serialization.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionConnectedEventData.Serialization.cs index 79241a95385d..abc1054608d0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionConnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionConnectedEventData.Serialization.cs @@ -13,28 +13,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents { - public partial class EventGridMQTTClientSessionConnectedEventData : IUtf8JsonSerializable, IJsonModel + public partial class EventGridMqttClientSessionConnectedEventData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EventGridMQTTClientSessionConnectedEventData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientSessionConnectedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(ClientSessionName)) { writer.WritePropertyName("clientSessionName"u8); @@ -45,21 +36,52 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("sequenceNumber"u8); writer.WriteNumberValue(SequenceNumber.Value); } + if (Optional.IsDefined(ClientAuthenticationName)) + { + writer.WritePropertyName("clientAuthenticationName"u8); + writer.WriteStringValue(ClientAuthenticationName); + } + if (Optional.IsDefined(ClientName)) + { + writer.WritePropertyName("clientName"u8); + writer.WriteStringValue(ClientName); + } + if (Optional.IsDefined(NamespaceName)) + { + writer.WritePropertyName("namespaceName"u8); + writer.WriteStringValue(NamespaceName); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } - EventGridMQTTClientSessionConnectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EventGridMqttClientSessionConnectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EventGridMQTTClientSessionConnectedEventData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientSessionConnectedEventData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEventGridMQTTClientSessionConnectedEventData(document.RootElement, options); + return DeserializeEventGridMqttClientSessionConnectedEventData(document.RootElement, options); } - internal static EventGridMQTTClientSessionConnectedEventData DeserializeEventGridMQTTClientSessionConnectedEventData(JsonElement element, ModelReaderWriterOptions options = null) + internal static EventGridMqttClientSessionConnectedEventData DeserializeEventGridMqttClientSessionConnectedEventData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -111,7 +133,7 @@ internal static EventGridMQTTClientSessionConnectedEventData DeserializeEventGri } } serializedAdditionalRawData = rawDataDictionary; - return new EventGridMQTTClientSessionConnectedEventData( + return new EventGridMqttClientSessionConnectedEventData( clientAuthenticationName, clientName, namespaceName, @@ -120,43 +142,43 @@ internal static EventGridMQTTClientSessionConnectedEventData DeserializeEventGri sequenceNumber); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(EventGridMQTTClientSessionConnectedEventData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientSessionConnectedEventData)} does not support writing '{options.Format}' format."); } } - EventGridMQTTClientSessionConnectedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EventGridMqttClientSessionConnectedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEventGridMQTTClientSessionConnectedEventData(document.RootElement, options); + return DeserializeEventGridMqttClientSessionConnectedEventData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EventGridMQTTClientSessionConnectedEventData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientSessionConnectedEventData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new EventGridMQTTClientSessionConnectedEventData FromResponse(Response response) + internal static new EventGridMqttClientSessionConnectedEventData FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeEventGridMQTTClientSessionConnectedEventData(document.RootElement); + return DeserializeEventGridMqttClientSessionConnectedEventData(document.RootElement); } /// Convert into a . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionConnectedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionConnectedEventData.cs similarity index 88% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionConnectedEventData.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionConnectedEventData.cs index 3a8dcde09042..755f075c2a35 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionConnectedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionConnectedEventData.cs @@ -11,14 +11,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents { /// Event data for Microsoft.EventGrid.MQTTClientSessionConnected event. - public partial class EventGridMQTTClientSessionConnectedEventData : EventGridMQTTClientEventData + public partial class EventGridMqttClientSessionConnectedEventData : EventGridMqttClientEventData { - /// Initializes a new instance of . - internal EventGridMQTTClientSessionConnectedEventData() + /// Initializes a new instance of . + internal EventGridMqttClientSessionConnectedEventData() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Unique identifier for the MQTT client that the client presents to the service /// for authentication. This case-sensitive string can be up to 128 characters @@ -36,7 +36,7 @@ internal EventGridMQTTClientSessionConnectedEventData() /// disconnected events. Latest event will have a sequence number that is higher /// than the previous event. /// - internal EventGridMQTTClientSessionConnectedEventData(string clientAuthenticationName, string clientName, string namespaceName, IDictionary serializedAdditionalRawData, string clientSessionName, long? sequenceNumber) : base(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData) + internal EventGridMqttClientSessionConnectedEventData(string clientAuthenticationName, string clientName, string namespaceName, IDictionary serializedAdditionalRawData, string clientSessionName, long? sequenceNumber) : base(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData) { ClientSessionName = clientSessionName; SequenceNumber = sequenceNumber; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionDisconnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionDisconnectedEventData.Serialization.cs similarity index 65% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionDisconnectedEventData.Serialization.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionDisconnectedEventData.Serialization.cs index b0c2ea8c13df..b3900d971e47 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionDisconnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionDisconnectedEventData.Serialization.cs @@ -13,28 +13,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents { - public partial class EventGridMQTTClientSessionDisconnectedEventData : IUtf8JsonSerializable, IJsonModel + public partial class EventGridMqttClientSessionDisconnectedEventData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EventGridMQTTClientSessionDisconnectedEventData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientSessionDisconnectedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(ClientSessionName)) { writer.WritePropertyName("clientSessionName"u8); @@ -45,23 +36,57 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("sequenceNumber"u8); writer.WriteNumberValue(SequenceNumber.Value); } - writer.WritePropertyName("disconnectionReason"u8); - writer.WriteStringValue(DisconnectionReason.ToString()); + if (Optional.IsDefined(DisconnectionReason)) + { + writer.WritePropertyName("disconnectionReason"u8); + writer.WriteStringValue(DisconnectionReason.Value.ToString()); + } + if (Optional.IsDefined(ClientAuthenticationName)) + { + writer.WritePropertyName("clientAuthenticationName"u8); + writer.WriteStringValue(ClientAuthenticationName); + } + if (Optional.IsDefined(ClientName)) + { + writer.WritePropertyName("clientName"u8); + writer.WriteStringValue(ClientName); + } + if (Optional.IsDefined(NamespaceName)) + { + writer.WritePropertyName("namespaceName"u8); + writer.WriteStringValue(NamespaceName); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } - EventGridMQTTClientSessionDisconnectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EventGridMqttClientSessionDisconnectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EventGridMQTTClientSessionDisconnectedEventData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientSessionDisconnectedEventData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEventGridMQTTClientSessionDisconnectedEventData(document.RootElement, options); + return DeserializeEventGridMqttClientSessionDisconnectedEventData(document.RootElement, options); } - internal static EventGridMQTTClientSessionDisconnectedEventData DeserializeEventGridMQTTClientSessionDisconnectedEventData(JsonElement element, ModelReaderWriterOptions options = null) + internal static EventGridMqttClientSessionDisconnectedEventData DeserializeEventGridMqttClientSessionDisconnectedEventData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -71,7 +96,7 @@ internal static EventGridMQTTClientSessionDisconnectedEventData DeserializeEvent } string clientSessionName = default; long? sequenceNumber = default; - EventGridMQTTClientDisconnectionReason disconnectionReason = default; + EventGridMqttClientDisconnectionReason? disconnectionReason = default; string clientAuthenticationName = default; string clientName = default; string namespaceName = default; @@ -95,7 +120,11 @@ internal static EventGridMQTTClientSessionDisconnectedEventData DeserializeEvent } if (property.NameEquals("disconnectionReason"u8)) { - disconnectionReason = new EventGridMQTTClientDisconnectionReason(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disconnectionReason = new EventGridMqttClientDisconnectionReason(property.Value.GetString()); continue; } if (property.NameEquals("clientAuthenticationName"u8)) @@ -119,7 +148,7 @@ internal static EventGridMQTTClientSessionDisconnectedEventData DeserializeEvent } } serializedAdditionalRawData = rawDataDictionary; - return new EventGridMQTTClientSessionDisconnectedEventData( + return new EventGridMqttClientSessionDisconnectedEventData( clientAuthenticationName, clientName, namespaceName, @@ -129,43 +158,43 @@ internal static EventGridMQTTClientSessionDisconnectedEventData DeserializeEvent disconnectionReason); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(EventGridMQTTClientSessionDisconnectedEventData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientSessionDisconnectedEventData)} does not support writing '{options.Format}' format."); } } - EventGridMQTTClientSessionDisconnectedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EventGridMqttClientSessionDisconnectedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEventGridMQTTClientSessionDisconnectedEventData(document.RootElement, options); + return DeserializeEventGridMqttClientSessionDisconnectedEventData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EventGridMQTTClientSessionDisconnectedEventData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EventGridMqttClientSessionDisconnectedEventData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new EventGridMQTTClientSessionDisconnectedEventData FromResponse(Response response) + internal static new EventGridMqttClientSessionDisconnectedEventData FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeEventGridMQTTClientSessionDisconnectedEventData(document.RootElement); + return DeserializeEventGridMqttClientSessionDisconnectedEventData(document.RootElement); } /// Convert into a . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionDisconnectedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionDisconnectedEventData.cs similarity index 72% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionDisconnectedEventData.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionDisconnectedEventData.cs index 2f9fcb7f6158..64de1dbf64a2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientSessionDisconnectedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionDisconnectedEventData.cs @@ -11,19 +11,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents { /// Event data for Microsoft.EventGrid.MQTTClientSessionDisconnected event. - public partial class EventGridMQTTClientSessionDisconnectedEventData : EventGridMQTTClientEventData + public partial class EventGridMqttClientSessionDisconnectedEventData : EventGridMqttClientEventData { - /// Initializes a new instance of . - /// - /// Reason for the disconnection of the MQTT client's session. The value could be - /// one of the values in the disconnection reasons table. - /// - internal EventGridMQTTClientSessionDisconnectedEventData(EventGridMQTTClientDisconnectionReason disconnectionReason) + /// Initializes a new instance of . + internal EventGridMqttClientSessionDisconnectedEventData() { - DisconnectionReason = disconnectionReason; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Unique identifier for the MQTT client that the client presents to the service /// for authentication. This case-sensitive string can be up to 128 characters @@ -45,18 +40,13 @@ internal EventGridMQTTClientSessionDisconnectedEventData(EventGridMQTTClientDisc /// Reason for the disconnection of the MQTT client's session. The value could be /// one of the values in the disconnection reasons table. /// - internal EventGridMQTTClientSessionDisconnectedEventData(string clientAuthenticationName, string clientName, string namespaceName, IDictionary serializedAdditionalRawData, string clientSessionName, long? sequenceNumber, EventGridMQTTClientDisconnectionReason disconnectionReason) : base(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData) + internal EventGridMqttClientSessionDisconnectedEventData(string clientAuthenticationName, string clientName, string namespaceName, IDictionary serializedAdditionalRawData, string clientSessionName, long? sequenceNumber, EventGridMqttClientDisconnectionReason? disconnectionReason) : base(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData) { ClientSessionName = clientSessionName; SequenceNumber = sequenceNumber; DisconnectionReason = disconnectionReason; } - /// Initializes a new instance of for deserialization. - internal EventGridMQTTClientSessionDisconnectedEventData() - { - } - /// /// Unique identifier for the MQTT client's session. This case-sensitive string can /// be up to 128 characters long, and supports UTF-8 characters. @@ -72,6 +62,6 @@ internal EventGridMQTTClientSessionDisconnectedEventData() /// Reason for the disconnection of the MQTT client's session. The value could be /// one of the values in the disconnection reasons table. /// - public EventGridMQTTClientDisconnectionReason DisconnectionReason { get; } + public EventGridMqttClientDisconnectionReason? DisconnectionReason { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientState.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientState.cs similarity index 58% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientState.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientState.cs index 7d2907bb7bd0..d12b28d8e9aa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMQTTClientState.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientState.cs @@ -11,13 +11,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents { /// EventGrid MQTT Client State. - public readonly partial struct EventGridMQTTClientState : IEquatable + public readonly partial struct EventGridMqttClientState : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public EventGridMQTTClientState(string value) + public EventGridMqttClientState(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -26,21 +26,21 @@ public EventGridMQTTClientState(string value) private const string DisabledValue = "Disabled"; /// Enabled. - public static EventGridMQTTClientState Enabled { get; } = new EventGridMQTTClientState(EnabledValue); + public static EventGridMqttClientState Enabled { get; } = new EventGridMqttClientState(EnabledValue); /// Disabled. - public static EventGridMQTTClientState Disabled { get; } = new EventGridMQTTClientState(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(EventGridMQTTClientState left, EventGridMQTTClientState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EventGridMQTTClientState left, EventGridMQTTClientState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator EventGridMQTTClientState(string value) => new EventGridMQTTClientState(value); + public static EventGridMqttClientState Disabled { get; } = new EventGridMqttClientState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(EventGridMqttClientState left, EventGridMqttClientState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EventGridMqttClientState left, EventGridMqttClientState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EventGridMqttClientState(string value) => new EventGridMqttClientState(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EventGridMQTTClientState other && Equals(other); + public override bool Equals(object obj) => obj is EventGridMqttClientState other && Equals(other); /// - public bool Equals(EventGridMQTTClientState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(EventGridMqttClientState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] 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 3b3868356788..ab0f7cf8d280 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs @@ -503,9 +503,10 @@ public static AvsScriptExecutionFailedEventData AvsScriptExecutionFailedEventDat /// Display name of caller. /// Custom Context of Incoming Call. /// Signed incoming call context. + /// The communication identifier of the user on behalf of whom the call is made. /// CorrelationId (CallId). /// A new instance for mocking. - public static AcsIncomingCallEventData AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationIdentifier = null, CommunicationIdentifierModel fromCommunicationIdentifier = null, string serverCallId = null, string callerDisplayName = null, AcsIncomingCallCustomContext customContext = null, string incomingCallContext = null, string correlationId = null) + public static AcsIncomingCallEventData AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationIdentifier = null, CommunicationIdentifierModel fromCommunicationIdentifier = null, string serverCallId = null, string callerDisplayName = null, AcsIncomingCallCustomContext customContext = null, string incomingCallContext = null, CommunicationIdentifierModel onBehalfOfCallee = null, string correlationId = null) { return new AcsIncomingCallEventData( toCommunicationIdentifier, @@ -514,6 +515,7 @@ public static AcsIncomingCallEventData AcsIncomingCallEventData(CommunicationIde callerDisplayName, customContext, incomingCallContext, + onBehalfOfCallee, correlationId, serializedAdditionalRawData: null); } @@ -526,7 +528,7 @@ public static AcsIncomingCallEventData AcsIncomingCallEventData(CommunicationIde /// The Microsoft Teams user. /// The Microsoft Teams application. /// A new instance for mocking. - public static CommunicationIdentifierModel CommunicationIdentifierModel(CommunicationIdentifierModelKind kind = default, string rawId = null, CommunicationUserIdentifierModel communicationUser = null, PhoneNumberIdentifierModel phoneNumber = null, MicrosoftTeamsUserIdentifierModel microsoftTeamsUser = null, MicrosoftTeamsAppIdentifierModel microsoftTeamsApp = null) + public static CommunicationIdentifierModel CommunicationIdentifierModel(CommunicationIdentifierModelKind? kind = null, string rawId = null, CommunicationUserIdentifierModel communicationUser = null, PhoneNumberIdentifierModel phoneNumber = null, MicrosoftTeamsUserIdentifierModel microsoftTeamsUser = null, MicrosoftTeamsAppIdentifierModel microsoftTeamsApp = null) { return new CommunicationIdentifierModel( kind, @@ -559,7 +561,7 @@ public static PhoneNumberIdentifierModel PhoneNumberIdentifierModel(string value /// True if the Microsoft Teams user is anonymous. By default false if missing. /// The cloud that the Microsoft Teams user belongs to. By default 'public' if missing. /// A new instance for mocking. - public static MicrosoftTeamsUserIdentifierModel MicrosoftTeamsUserIdentifierModel(string userId = null, bool? isAnonymous = null, CommunicationCloudEnvironmentModel cloud = default) + public static MicrosoftTeamsUserIdentifierModel MicrosoftTeamsUserIdentifierModel(string userId = null, bool? isAnonymous = null, CommunicationCloudEnvironmentModel? cloud = null) { return new MicrosoftTeamsUserIdentifierModel(userId, isAnonymous, cloud, serializedAdditionalRawData: null); } @@ -568,7 +570,7 @@ public static MicrosoftTeamsUserIdentifierModel MicrosoftTeamsUserIdentifierMode /// The Id of the Microsoft Teams application. /// The cloud that the Microsoft Teams application belongs to. By default 'public' if missing. /// A new instance for mocking. - public static MicrosoftTeamsAppIdentifierModel MicrosoftTeamsAppIdentifierModel(string appId = null, CommunicationCloudEnvironmentModel cloud = default) + public static MicrosoftTeamsAppIdentifierModel MicrosoftTeamsAppIdentifierModel(string appId = null, CommunicationCloudEnvironmentModel? cloud = null) { return new MicrosoftTeamsAppIdentifierModel(appId, cloud, serializedAdditionalRawData: null); } @@ -623,7 +625,7 @@ public static AcsChatEventInThreadBaseProperties AcsChatEventInThreadBasePropert /// The type of the message. /// The version of the message. /// A new instance for mocking. - public static AcsChatMessageEventBaseProperties AcsChatMessageEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset composeTime = default, string type = null, long? version = null) + public static AcsChatMessageEventBaseProperties AcsChatMessageEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null) { return new AcsChatMessageEventBaseProperties( recipientCommunicationIdentifier, @@ -651,7 +653,7 @@ public static AcsChatMessageEventBaseProperties AcsChatMessageEventBasePropertie /// The body of the chat message. /// The chat message metadata. /// A new instance for mocking. - public static AcsChatMessageReceivedEventData AcsChatMessageReceivedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset composeTime = default, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + public static AcsChatMessageReceivedEventData AcsChatMessageReceivedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, 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(); @@ -680,7 +682,7 @@ public static AcsChatMessageReceivedEventData AcsChatMessageReceivedEventData(Co /// The type of the message. /// The version of the message. /// 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 = default, string type = null, long? version = null) + 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) { return new AcsChatMessageEventInThreadBaseProperties( transactionId, @@ -706,7 +708,7 @@ public static AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThr /// 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 = default, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + 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) { metadata ??= new Dictionary(); @@ -738,7 +740,7 @@ public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInTh /// The chat message metadata. /// The time at which the message was edited. /// A new instance for mocking. - public static AcsChatMessageEditedEventData AcsChatMessageEditedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset composeTime = default, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null, DateTimeOffset editTime = default) + public static AcsChatMessageEditedEventData AcsChatMessageEditedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, 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) { metadata ??= new Dictionary(); @@ -771,7 +773,7 @@ public static AcsChatMessageEditedEventData AcsChatMessageEditedEventData(Commun /// The chat message metadata. /// The time at which the message was edited. /// 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 = default, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null, DateTimeOffset editTime = default) + 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) { metadata ??= new Dictionary(); @@ -802,7 +804,7 @@ public static AcsChatMessageEditedInThreadEventData AcsChatMessageEditedInThread /// The version of the message. /// The time at which the message was deleted. /// A new instance for mocking. - public static AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset composeTime = default, string type = null, long? version = null, DateTimeOffset deleteTime = default) + public static AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, 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) { return new AcsChatMessageDeletedEventData( recipientCommunicationIdentifier, @@ -829,7 +831,7 @@ public static AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Comm /// The version of the message. /// The time at which the message was deleted. /// 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 = default, string type = null, long? version = null, DateTimeOffset deleteTime = default) + 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) { return new AcsChatMessageDeletedInThreadEventData( transactionId, @@ -851,7 +853,7 @@ public static AcsChatMessageDeletedInThreadEventData AcsChatMessageDeletedInThre /// The original creation time of the thread. /// The version of the thread. /// A new instance for mocking. - public static AcsChatThreadEventBaseProperties AcsChatThreadEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset createTime = default, long? version = null) + public static AcsChatThreadEventBaseProperties AcsChatThreadEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null) { return new AcsChatThreadEventBaseProperties( recipientCommunicationIdentifier, @@ -873,7 +875,7 @@ public static AcsChatThreadEventBaseProperties AcsChatThreadEventBaseProperties( /// The thread metadata. /// The list of properties of participants who are part of the thread. /// A new instance for mocking. - public static AcsChatThreadCreatedWithUserEventData AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset createTime = default, long? version = null, CommunicationIdentifierModel createdByCommunicationIdentifier = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null, IEnumerable participants = null) + public static AcsChatThreadCreatedWithUserEventData AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel createdByCommunicationIdentifier = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null, IEnumerable participants = null) { properties ??= new Dictionary(); metadata ??= new Dictionary(); @@ -910,7 +912,7 @@ public static AcsChatThreadParticipantProperties AcsChatThreadParticipantPropert /// The original creation time of the thread. /// The version of the thread. /// A new instance for mocking. - public static AcsChatThreadEventInThreadBaseProperties AcsChatThreadEventInThreadBaseProperties(string transactionId = null, string threadId = null, DateTimeOffset createTime = default, long? version = null) + public static AcsChatThreadEventInThreadBaseProperties AcsChatThreadEventInThreadBaseProperties(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null) { return new AcsChatThreadEventInThreadBaseProperties(transactionId, threadId, serializedAdditionalRawData: null, createTime, version); } @@ -925,7 +927,7 @@ public static AcsChatThreadEventInThreadBaseProperties AcsChatThreadEventInThrea /// The thread metadata. /// The list of properties of participants who are part of the thread. /// A new instance for mocking. - public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, DateTimeOffset createTime = default, long? version = null, CommunicationIdentifierModel createdByCommunicationIdentifier = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null, IEnumerable participants = null) + 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) { properties ??= new Dictionary(); metadata ??= new Dictionary(); @@ -952,7 +954,7 @@ public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. /// A new instance for mocking. - public static AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset createTime = default, long? version = null, CommunicationIdentifierModel deletedByCommunicationIdentifier = null, DateTimeOffset deleteTime = default) + public static AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel deletedByCommunicationIdentifier = null, DateTimeOffset? deleteTime = null) { return new AcsChatThreadWithUserDeletedEventData( recipientCommunicationIdentifier, @@ -973,7 +975,7 @@ public static AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeleted /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. /// A new instance for mocking. - public static AcsChatThreadDeletedEventData AcsChatThreadDeletedEventData(string transactionId = null, string threadId = null, DateTimeOffset createTime = default, long? version = null, CommunicationIdentifierModel deletedByCommunicationIdentifier = null, DateTimeOffset deleteTime = default) + public static AcsChatThreadDeletedEventData AcsChatThreadDeletedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel deletedByCommunicationIdentifier = null, DateTimeOffset? deleteTime = null) { return new AcsChatThreadDeletedEventData( transactionId, @@ -996,7 +998,7 @@ public static AcsChatThreadDeletedEventData AcsChatThreadDeletedEventData(string /// The thread metadata. /// The updated thread properties. /// A new instance for mocking. - public static AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset createTime = default, long? version = null, CommunicationIdentifierModel editedByCommunicationIdentifier = null, DateTimeOffset editTime = default, IReadOnlyDictionary metadata = null, IReadOnlyDictionary properties = null) + public static AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel editedByCommunicationIdentifier = null, DateTimeOffset? editTime = null, IReadOnlyDictionary metadata = null, IReadOnlyDictionary properties = null) { metadata ??= new Dictionary(); properties ??= new Dictionary(); @@ -1024,7 +1026,7 @@ public static AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadProper /// The updated thread properties. /// The thread metadata. /// A new instance for mocking. - public static AcsChatThreadPropertiesUpdatedEventData AcsChatThreadPropertiesUpdatedEventData(string transactionId = null, string threadId = null, DateTimeOffset createTime = default, long? version = null, CommunicationIdentifierModel editedByCommunicationIdentifier = null, DateTimeOffset editTime = default, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null) + 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) { properties ??= new Dictionary(); metadata ??= new Dictionary(); @@ -1051,7 +1053,7 @@ public static AcsChatThreadPropertiesUpdatedEventData AcsChatThreadPropertiesUpd /// The communication identifier of the user who added the user. /// The details of the user who was added. /// A new instance for mocking. - public static AcsChatParticipantAddedToThreadWithUserEventData AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset createTime = default, long? version = null, DateTimeOffset time = default, CommunicationIdentifierModel addedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantAdded = null) + public static AcsChatParticipantAddedToThreadWithUserEventData AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, DateTimeOffset? time = null, CommunicationIdentifierModel addedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantAdded = null) { return new AcsChatParticipantAddedToThreadWithUserEventData( recipientCommunicationIdentifier, @@ -1075,7 +1077,7 @@ public static AcsChatParticipantAddedToThreadWithUserEventData AcsChatParticipan /// The communication identifier of the user who removed the user. /// The details of the user who was removed. /// A new instance for mocking. - public static AcsChatParticipantRemovedFromThreadWithUserEventData AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset createTime = default, long? version = null, DateTimeOffset time = default, CommunicationIdentifierModel removedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantRemoved = null) + public static AcsChatParticipantRemovedFromThreadWithUserEventData AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, DateTimeOffset? time = null, CommunicationIdentifierModel removedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantRemoved = null) { return new AcsChatParticipantRemovedFromThreadWithUserEventData( recipientCommunicationIdentifier, @@ -1097,7 +1099,7 @@ public static AcsChatParticipantRemovedFromThreadWithUserEventData AcsChatPartic /// The details of the user who was added. /// The version of the thread. /// A new instance for mocking. - public static AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedToThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset time = default, CommunicationIdentifierModel addedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantAdded = null, long? version = null) + public static AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedToThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset? time = null, CommunicationIdentifierModel addedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantAdded = null, long? version = null) { return new AcsChatParticipantAddedToThreadEventData( transactionId, @@ -1117,7 +1119,7 @@ public static AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedTo /// The details of the user who was removed. /// The version of the thread. /// A new instance for mocking. - public static AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRemovedFromThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset time = default, CommunicationIdentifierModel removedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantRemoved = null, long? version = null) + public static AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRemovedFromThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset? time = null, CommunicationIdentifierModel removedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantRemoved = null, long? version = null) { return new AcsChatParticipantRemovedFromThreadEventData( transactionId, @@ -1149,7 +1151,7 @@ public static AcsSmsEventBaseProperties AcsSmsEventBaseProperties(string message /// The time at which the SMS delivery report was received. /// Customer Content. /// 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 = default, string tag = null) + 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) { deliveryAttempts ??= new List(); @@ -1170,7 +1172,7 @@ public static AcsSmsDeliveryReportReceivedEventData AcsSmsDeliveryReportReceived /// Number of segments that were successfully delivered. /// Number of segments whose delivery failed. /// A new instance for mocking. - public static AcsSmsDeliveryAttemptProperties AcsSmsDeliveryAttemptProperties(DateTimeOffset timestamp = default, int? segmentsSucceeded = null, int? segmentsFailed = null) + public static AcsSmsDeliveryAttemptProperties AcsSmsDeliveryAttemptProperties(DateTimeOffset? timestamp = null, int? segmentsSucceeded = null, int? segmentsFailed = null) { return new AcsSmsDeliveryAttemptProperties(timestamp, segmentsSucceeded, segmentsFailed, serializedAdditionalRawData: null); } @@ -1182,7 +1184,7 @@ public static AcsSmsDeliveryAttemptProperties AcsSmsDeliveryAttemptProperties(Da /// The SMS content. /// The time at which the SMS was received. /// A new instance for mocking. - public static AcsSmsReceivedEventData AcsSmsReceivedEventData(string messageId = null, string @from = null, string to = null, string message = null, DateTimeOffset receivedTimestamp = default) + public static AcsSmsReceivedEventData AcsSmsReceivedEventData(string messageId = null, string @from = null, string to = null, string message = null, DateTimeOffset? receivedTimestamp = null) { return new AcsSmsReceivedEventData( messageId, @@ -1202,7 +1204,7 @@ public static AcsSmsReceivedEventData AcsSmsReceivedEventData(string messageId = /// The recording format type - Mp4, Mp3, Wav. /// The reason for ending recording session. /// A new instance for mocking. - public static AcsRecordingFileStatusUpdatedEventData AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo = null, DateTimeOffset recordingStartTime = default, long? recordingDurationMs = null, RecordingContentType recordingContentType = default, RecordingChannelType recordingChannelKind = default, RecordingFormatType recordingFormatType = default, string sessionEndReason = null) + public static AcsRecordingFileStatusUpdatedEventData AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo = null, DateTimeOffset? recordingStartTime = null, long? recordingDurationMs = null, RecordingContentType? recordingContentType = null, RecordingChannelType? recordingChannelKind = null, RecordingFormatType? recordingFormatType = null, string sessionEndReason = null) { return new AcsRecordingFileStatusUpdatedEventData( recordingStorageInfo, @@ -1253,7 +1255,7 @@ public static AcsRecordingChunkInfoProperties AcsRecordingChunkInfoProperties(st /// Detailed information about the status if any. /// The time at which the email delivery report received timestamp. /// A new instance for mocking. - public static AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender = null, string recipient = null, string messageId = null, AcsEmailDeliveryReportStatus status = default, AcsEmailDeliveryReportStatusDetails deliveryStatusDetails = null, DateTimeOffset deliveryAttemptTimestamp = default) + public static AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender = null, string recipient = null, string messageId = null, AcsEmailDeliveryReportStatus? status = null, AcsEmailDeliveryReportStatusDetails deliveryStatusDetails = null, DateTimeOffset? deliveryAttemptTimestamp = null) { return new AcsEmailDeliveryReportReceivedEventData( sender, @@ -1282,7 +1284,7 @@ public static AcsEmailDeliveryReportStatusDetails AcsEmailDeliveryReportStatusDe /// The user agent interacting with the email. /// The type of engagement user have with email. /// A new instance for mocking. - public static AcsEmailEngagementTrackingReportReceivedEventData AcsEmailEngagementTrackingReportReceivedEventData(string sender = null, string recipient = null, string messageId = null, DateTimeOffset userActionTimestamp = default, string engagementContext = null, string userAgent = null, AcsUserEngagement engagement = default) + public static AcsEmailEngagementTrackingReportReceivedEventData AcsEmailEngagementTrackingReportReceivedEventData(string sender = null, string recipient = null, string messageId = null, DateTimeOffset? userActionTimestamp = null, string engagementContext = null, string userAgent = null, AcsUserEngagement? engagement = null) { return new AcsEmailEngagementTrackingReportReceivedEventData( sender, @@ -1455,7 +1457,7 @@ public static AcsRouterQueueDetails AcsRouterQueueDetails(string id = null, stri /// Router Job Worker Selector State. /// Router Job Worker Selector Expiration Time. /// A new instance for mocking. - public static AcsRouterWorkerSelector AcsRouterWorkerSelector(string key = null, AcsRouterLabelOperator labelOperator = default, BinaryData labelValue = null, double timeToLive = default, AcsRouterWorkerSelectorState selectorState = default, DateTimeOffset expirationTime = default) + public static AcsRouterWorkerSelector AcsRouterWorkerSelector(string key = null, AcsRouterLabelOperator? labelOperator = null, BinaryData labelValue = null, double timeToLive = default, AcsRouterWorkerSelectorState? selectorState = null, DateTimeOffset? expirationTime = null) { return new AcsRouterWorkerSelector( key, @@ -1618,7 +1620,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 jobStatus = default, string classificationPolicyId = null, int? priority = null, IEnumerable requestedWorkerSelectors = null, DateTimeOffset scheduledOn = default, 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, AcsRouterJobStatus? jobStatus = null, string classificationPolicyId = null, int? priority = null, IEnumerable requestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, bool unavailableForMatching = default) { labels ??= new Dictionary(); tags ??= new Dictionary(); @@ -1653,7 +1655,7 @@ public static AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string /// Router Job Scheduling Failed Scheduled Time in UTC. /// Router Job Scheduling Failed Reason. /// A new instance for mocking. - public static AcsRouterJobSchedulingFailedEventData AcsRouterJobSchedulingFailedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, int? priority = null, IEnumerable expiredAttachedWorkerSelectors = null, IEnumerable expiredRequestedWorkerSelectors = null, DateTimeOffset scheduledOn = default, string failureReason = null) + public static AcsRouterJobSchedulingFailedEventData AcsRouterJobSchedulingFailedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, int? priority = null, IEnumerable expiredAttachedWorkerSelectors = null, IEnumerable expiredRequestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, string failureReason = null) { labels ??= new Dictionary(); tags ??= new Dictionary(); @@ -1715,7 +1717,7 @@ public static AcsRouterJobUnassignedEventData AcsRouterJobUnassignedEventData(st /// Router Job Waiting For Activation Scheduled Time in UTC. /// Router Job Waiting For Activation Unavailable For Matching. /// A new instance for mocking. - public static AcsRouterJobWaitingForActivationEventData AcsRouterJobWaitingForActivationEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, int? priority = null, IEnumerable expiredAttachedWorkerSelectors = null, IEnumerable expiredRequestedWorkerSelectors = null, DateTimeOffset scheduledOn = default, bool unavailableForMatching = default) + public static AcsRouterJobWaitingForActivationEventData AcsRouterJobWaitingForActivationEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, int? priority = null, IEnumerable expiredAttachedWorkerSelectors = null, IEnumerable expiredRequestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, bool unavailableForMatching = default) { labels ??= new Dictionary(); tags ??= new Dictionary(); @@ -1888,7 +1890,7 @@ public static AcsRouterWorkerOfferExpiredEventData AcsRouterWorkerOfferExpiredEv /// Router Worker Offer Issued Job Labels. /// Router Worker Offer Issued Job Tags. /// A new instance for mocking. - public static AcsRouterWorkerOfferIssuedEventData AcsRouterWorkerOfferIssuedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null, int? jobPriority = null, IReadOnlyDictionary workerLabels = null, DateTimeOffset offeredOn = default, DateTimeOffset expiresOn = default, IReadOnlyDictionary workerTags = null, IReadOnlyDictionary jobLabels = null, IReadOnlyDictionary jobTags = null) + public static AcsRouterWorkerOfferIssuedEventData AcsRouterWorkerOfferIssuedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null, int? jobPriority = null, IReadOnlyDictionary workerLabels = null, DateTimeOffset? offeredOn = null, DateTimeOffset? expiresOn = null, IReadOnlyDictionary workerTags = null, IReadOnlyDictionary jobLabels = null, IReadOnlyDictionary jobTags = null) { workerLabels ??= new Dictionary(); workerTags ??= new Dictionary(); @@ -2001,7 +2003,7 @@ public static AcsRouterWorkerUpdatedEventData AcsRouterWorkerUpdatedEventData(st /// The time message was received. /// The channel event error. /// A new instance for mocking. - public static AcsMessageEventData AcsMessageEventData(string @from = null, string to = null, DateTimeOffset receivedTimestamp = default, AcsMessageChannelEventError error = null) + public static AcsMessageEventData AcsMessageEventData(string @from = null, string to = null, DateTimeOffset? receivedTimestamp = null, AcsMessageChannelEventError error = null) { return new AcsMessageEventData(@from, to, receivedTimestamp, error, serializedAdditionalRawData: null); } @@ -2024,7 +2026,7 @@ public static AcsMessageChannelEventError AcsMessageChannelEventError(string cha /// The updated message status. /// The updated message channel type. /// A new instance for mocking. - public static AcsMessageDeliveryStatusUpdatedEventData AcsMessageDeliveryStatusUpdatedEventData(string @from = null, string to = null, DateTimeOffset receivedTimestamp = default, AcsMessageChannelEventError error = null, string messageId = null, AcsMessageDeliveryStatus status = default, AcsMessageChannelKind channelKind = default) + public static AcsMessageDeliveryStatusUpdatedEventData AcsMessageDeliveryStatusUpdatedEventData(string @from = null, string to = null, DateTimeOffset? receivedTimestamp = null, AcsMessageChannelEventError error = null, string messageId = null, AcsMessageDeliveryStatus? status = null, AcsMessageChannelKind? channelKind = null) { return new AcsMessageDeliveryStatusUpdatedEventData( @from, @@ -2049,7 +2051,7 @@ public static AcsMessageDeliveryStatusUpdatedEventData AcsMessageDeliveryStatusU /// The received message button content. /// The received message interactive content. /// A new instance for mocking. - public static AcsMessageReceivedEventData AcsMessageReceivedEventData(string @from = null, string to = null, DateTimeOffset receivedTimestamp = default, AcsMessageChannelEventError error = null, string content = null, AcsMessageChannelKind channelKind = default, AcsMessageMediaContent mediaContent = null, AcsMessageContext context = null, AcsMessageButtonContent button = null, AcsMessageInteractiveContent interactiveContent = null) + public static AcsMessageReceivedEventData AcsMessageReceivedEventData(string @from = null, string to = null, DateTimeOffset? receivedTimestamp = null, AcsMessageChannelEventError error = null, string content = null, AcsMessageChannelKind channelKind = default, AcsMessageMediaContent mediaContent = null, AcsMessageContext context = null, AcsMessageButtonContent button = null, AcsMessageInteractiveContent interactiveContent = null) { return new AcsMessageReceivedEventData( @from, @@ -2099,7 +2101,7 @@ public static AcsMessageButtonContent AcsMessageButtonContent(string text = null /// The Message Sent when a customer clicks a button. /// The Message Sent when a customer selects an item from a list. /// A new instance for mocking. - public static AcsMessageInteractiveContent AcsMessageInteractiveContent(AcsInteractiveReplyKind replyKind = default, AcsMessageInteractiveButtonReplyContent buttonReply = null, AcsMessageInteractiveListReplyContent listReply = null) + public static AcsMessageInteractiveContent AcsMessageInteractiveContent(AcsInteractiveReplyKind? replyKind = null, AcsMessageInteractiveButtonReplyContent buttonReply = null, AcsMessageInteractiveListReplyContent listReply = null) { return new AcsMessageInteractiveContent(replyKind, buttonReply, listReply, serializedAdditionalRawData: null); } @@ -2134,7 +2136,7 @@ public static AcsMessageInteractiveListReplyContent AcsMessageInteractiveListRep /// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. /// The connected registry information if the event is generated by a connected registry. /// A new instance for mocking. - public static ContainerRegistryEventData ContainerRegistryEventData(string id = null, DateTimeOffset timestamp = default, string action = null, string location = null, ContainerRegistryEventTarget target = null, ContainerRegistryEventRequest request = null, ContainerRegistryEventActor actor = null, ContainerRegistryEventSource source = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) + public static ContainerRegistryEventData ContainerRegistryEventData(string id = null, DateTimeOffset? timestamp = null, string action = null, string location = null, ContainerRegistryEventTarget target = null, ContainerRegistryEventRequest request = null, ContainerRegistryEventActor actor = null, ContainerRegistryEventSource source = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) { return new ContainerRegistryEventData( id, @@ -2225,7 +2227,7 @@ public static ContainerRegistryEventConnectedRegistry ContainerRegistryEventConn /// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. /// The connected registry information if the event is generated by a connected registry. /// A new instance for mocking. - public static ContainerRegistryImagePushedEventData ContainerRegistryImagePushedEventData(string id = null, DateTimeOffset timestamp = default, string action = null, string location = null, ContainerRegistryEventTarget target = null, ContainerRegistryEventRequest request = null, ContainerRegistryEventActor actor = null, ContainerRegistryEventSource source = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) + public static ContainerRegistryImagePushedEventData ContainerRegistryImagePushedEventData(string id = null, DateTimeOffset? timestamp = null, string action = null, string location = null, ContainerRegistryEventTarget target = null, ContainerRegistryEventRequest request = null, ContainerRegistryEventActor actor = null, ContainerRegistryEventSource source = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) { return new ContainerRegistryImagePushedEventData( id, @@ -2251,7 +2253,7 @@ public static ContainerRegistryImagePushedEventData ContainerRegistryImagePushed /// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. /// The connected registry information if the event is generated by a connected registry. /// A new instance for mocking. - public static ContainerRegistryImageDeletedEventData ContainerRegistryImageDeletedEventData(string id = null, DateTimeOffset timestamp = default, string action = null, string location = null, ContainerRegistryEventTarget target = null, ContainerRegistryEventRequest request = null, ContainerRegistryEventActor actor = null, ContainerRegistryEventSource source = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) + public static ContainerRegistryImageDeletedEventData ContainerRegistryImageDeletedEventData(string id = null, DateTimeOffset? timestamp = null, string action = null, string location = null, ContainerRegistryEventTarget target = null, ContainerRegistryEventRequest request = null, ContainerRegistryEventActor actor = null, ContainerRegistryEventSource source = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) { return new ContainerRegistryImageDeletedEventData( id, @@ -2274,7 +2276,7 @@ public static ContainerRegistryImageDeletedEventData ContainerRegistryImageDelet /// The target of the event. /// The connected registry information if the event is generated by a connected registry. /// A new instance for mocking. - public static ContainerRegistryArtifactEventData ContainerRegistryArtifactEventData(string id = null, DateTimeOffset timestamp = default, string action = null, string location = null, ContainerRegistryArtifactEventTarget target = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) + public static ContainerRegistryArtifactEventData ContainerRegistryArtifactEventData(string id = null, DateTimeOffset? timestamp = null, string action = null, string location = null, ContainerRegistryArtifactEventTarget target = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) { return new ContainerRegistryArtifactEventData( id, @@ -2316,7 +2318,7 @@ public static ContainerRegistryArtifactEventTarget ContainerRegistryArtifactEven /// The target of the event. /// The connected registry information if the event is generated by a connected registry. /// A new instance for mocking. - public static ContainerRegistryChartPushedEventData ContainerRegistryChartPushedEventData(string id = null, DateTimeOffset timestamp = default, string action = null, string location = null, ContainerRegistryArtifactEventTarget target = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) + public static ContainerRegistryChartPushedEventData ContainerRegistryChartPushedEventData(string id = null, DateTimeOffset? timestamp = null, string action = null, string location = null, ContainerRegistryArtifactEventTarget target = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) { return new ContainerRegistryChartPushedEventData( id, @@ -2336,7 +2338,7 @@ public static ContainerRegistryChartPushedEventData ContainerRegistryChartPushed /// The target of the event. /// The connected registry information if the event is generated by a connected registry. /// A new instance for mocking. - public static ContainerRegistryChartDeletedEventData ContainerRegistryChartDeletedEventData(string id = null, DateTimeOffset timestamp = default, string action = null, string location = null, ContainerRegistryArtifactEventTarget target = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) + public static ContainerRegistryChartDeletedEventData ContainerRegistryChartDeletedEventData(string id = null, DateTimeOffset? timestamp = null, string action = null, string location = null, ContainerRegistryArtifactEventTarget target = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null) { return new ContainerRegistryChartDeletedEventData( id, @@ -2420,7 +2422,7 @@ public static ContainerServiceNodePoolRollingFailedEventData ContainerServiceNod /// Name of the current Stage. /// The time at which the stage happened. /// A new instance for mocking. - public static DataBoxCopyStartedEventData DataBoxCopyStartedEventData(string serialNumber = null, DataBoxStageName stageName = default, DateTimeOffset stageTime = default) + public static DataBoxCopyStartedEventData DataBoxCopyStartedEventData(string serialNumber = null, DataBoxStageName? stageName = null, DateTimeOffset? stageTime = null) { return new DataBoxCopyStartedEventData(serialNumber, stageName, stageTime, serializedAdditionalRawData: null); } @@ -2430,7 +2432,7 @@ public static DataBoxCopyStartedEventData DataBoxCopyStartedEventData(string ser /// Name of the current Stage. /// The time at which the stage happened. /// A new instance for mocking. - public static DataBoxCopyCompletedEventData DataBoxCopyCompletedEventData(string serialNumber = null, DataBoxStageName stageName = default, DateTimeOffset stageTime = default) + public static DataBoxCopyCompletedEventData DataBoxCopyCompletedEventData(string serialNumber = null, DataBoxStageName? stageName = null, DateTimeOffset? stageTime = null) { return new DataBoxCopyCompletedEventData(serialNumber, stageName, stageTime, serializedAdditionalRawData: null); } @@ -2440,7 +2442,7 @@ public static DataBoxCopyCompletedEventData DataBoxCopyCompletedEventData(string /// Name of the current Stage. /// The time at which the stage happened. /// A new instance for mocking. - public static DataBoxOrderCompletedEventData DataBoxOrderCompletedEventData(string serialNumber = null, DataBoxStageName stageName = default, DateTimeOffset stageTime = default) + public static DataBoxOrderCompletedEventData DataBoxOrderCompletedEventData(string serialNumber = null, DataBoxStageName? stageName = null, DateTimeOffset? stageTime = null) { return new DataBoxOrderCompletedEventData(serialNumber, stageName, stageTime, serializedAdditionalRawData: null); } @@ -2456,7 +2458,7 @@ public static DataBoxOrderCompletedEventData DataBoxOrderCompletedEventData(stri /// The first time from the queue. /// The last time from the queue. /// A new instance for mocking. - public static EventHubCaptureFileCreatedEventData EventHubCaptureFileCreatedEventData(string fileurl = null, string fileType = null, string partitionId = null, int? sizeInBytes = null, int? eventCount = null, int? firstSequenceNumber = null, int? lastSequenceNumber = null, DateTimeOffset firstEnqueueTime = default, DateTimeOffset lastEnqueueTime = default) + public static EventHubCaptureFileCreatedEventData EventHubCaptureFileCreatedEventData(string fileurl = null, string fileType = null, string partitionId = null, int? sizeInBytes = null, int? eventCount = null, int? firstSequenceNumber = null, int? lastSequenceNumber = null, DateTimeOffset? firstEnqueueTime = null, DateTimeOffset? lastEnqueueTime = null) { return new EventHubCaptureFileCreatedEventData( fileurl, @@ -2721,7 +2723,7 @@ public static IotHubDeviceTelemetryEventData IotHubDeviceTelemetryEventData(IRea /// Id of HL7 FHIR resource. /// VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion). /// A new instance for mocking. - public static HealthcareFhirResourceCreatedEventData HealthcareFhirResourceCreatedEventData(HealthcareFhirResourceType fhirResourceType = default, string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = null) + public static HealthcareFhirResourceCreatedEventData HealthcareFhirResourceCreatedEventData(HealthcareFhirResourceType? fhirResourceType = null, string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = null) { return new HealthcareFhirResourceCreatedEventData(fhirResourceType, fhirServiceHostName, fhirResourceId, fhirResourceVersionId, serializedAdditionalRawData: null); } @@ -2732,7 +2734,7 @@ public static HealthcareFhirResourceCreatedEventData HealthcareFhirResourceCreat /// Id of HL7 FHIR resource. /// VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion). /// A new instance for mocking. - public static HealthcareFhirResourceUpdatedEventData HealthcareFhirResourceUpdatedEventData(HealthcareFhirResourceType fhirResourceType = default, string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = null) + public static HealthcareFhirResourceUpdatedEventData HealthcareFhirResourceUpdatedEventData(HealthcareFhirResourceType? fhirResourceType = null, string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = null) { return new HealthcareFhirResourceUpdatedEventData(fhirResourceType, fhirServiceHostName, fhirResourceId, fhirResourceVersionId, serializedAdditionalRawData: null); } @@ -2743,7 +2745,7 @@ public static HealthcareFhirResourceUpdatedEventData HealthcareFhirResourceUpdat /// Id of HL7 FHIR resource. /// VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion). /// A new instance for mocking. - public static HealthcareFhirResourceDeletedEventData HealthcareFhirResourceDeletedEventData(HealthcareFhirResourceType fhirResourceType = default, string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = null) + public static HealthcareFhirResourceDeletedEventData HealthcareFhirResourceDeletedEventData(HealthcareFhirResourceType? fhirResourceType = null, string fhirServiceHostName = null, string fhirResourceId = null, long? fhirResourceVersionId = null) { return new HealthcareFhirResourceDeletedEventData(fhirResourceType, fhirServiceHostName, fhirResourceId, fhirResourceVersionId, serializedAdditionalRawData: null); } @@ -3096,7 +3098,7 @@ public static MachineLearningServicesRunCompletedEventData MachineLearningServic /// The start time of the target dataset time series that resulted in drift detection. /// The end time of the target dataset time series that resulted in drift detection. /// A new instance for mocking. - public static MachineLearningServicesDatasetDriftDetectedEventData MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId = null, string dataDriftName = null, string runId = null, string baseDatasetId = null, string targetDatasetId = null, double? driftCoefficient = null, DateTimeOffset startTime = default, DateTimeOffset endTime = default) + public static MachineLearningServicesDatasetDriftDetectedEventData MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId = null, string dataDriftName = null, string runId = null, string baseDatasetId = null, string targetDatasetId = null, double? driftCoefficient = null, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null) { return new MachineLearningServicesDatasetDriftDetectedEventData( dataDriftId, @@ -3140,7 +3142,7 @@ public static MachineLearningServicesRunStatusChangedEventData MachineLearningSe /// The new state of the Job. /// Gets the Job correlation data. /// A new instance for mocking. - public static MediaJobStateChangeEventData MediaJobStateChangeEventData(MediaJobState previousState = default, MediaJobState state = default, IReadOnlyDictionary correlationData = null) + public static MediaJobStateChangeEventData MediaJobStateChangeEventData(MediaJobState? previousState = null, MediaJobState? state = null, IReadOnlyDictionary correlationData = null) { correlationData ??= new Dictionary(); @@ -3154,7 +3156,7 @@ public static MediaJobStateChangeEventData MediaJobStateChangeEventData(MediaJob /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. /// An array of details about specific errors that led to this reported error. /// A new instance for mocking. - public static MediaJobError MediaJobError(MediaJobErrorCode code = default, string message = null, MediaJobErrorCategory category = default, MediaJobRetry retry = default, IEnumerable details = null) + public static MediaJobError MediaJobError(MediaJobErrorCode? code = null, string message = null, MediaJobErrorCategory? category = null, MediaJobRetry? retry = null, IEnumerable details = null) { details ??= new List(); @@ -3183,7 +3185,7 @@ public static MediaJobErrorDetail MediaJobErrorDetail(string code = null, string /// Gets the Job output progress. /// Gets the Job output state. /// A new instance for mocking. - public static MediaJobOutput MediaJobOutput(string odataType = null, MediaJobError error = null, string label = null, long progress = default, MediaJobState state = default) + public static MediaJobOutput MediaJobOutput(string odataType = null, MediaJobError error = null, string label = null, long progress = default, MediaJobState? state = null) { return new UnknownMediaJobOutput( odataType, @@ -3201,7 +3203,7 @@ public static MediaJobOutput MediaJobOutput(string odataType = null, MediaJobErr /// Gets the Job output state. /// Gets the Job output asset name. /// A new instance for mocking. - public static MediaJobOutputAsset MediaJobOutputAsset(MediaJobError error = null, string label = null, long progress = default, MediaJobState state = default, string assetName = null) + public static MediaJobOutputAsset MediaJobOutputAsset(MediaJobError error = null, string label = null, long progress = default, MediaJobState? state = null, string assetName = null) { return new MediaJobOutputAsset( "#Microsoft.Media.JobOutputAsset", @@ -3234,7 +3236,7 @@ public static MediaJobOutputProgressEventData MediaJobOutputProgressEventData(st /// /// Gets the Job correlation data. /// A new instance for mocking. - public static MediaJobOutputStateChangeEventData MediaJobOutputStateChangeEventData(MediaJobState previousState = default, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) + public static MediaJobOutputStateChangeEventData MediaJobOutputStateChangeEventData(MediaJobState? previousState = null, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) { jobCorrelationData ??= new Dictionary(); @@ -3246,7 +3248,7 @@ public static MediaJobOutputStateChangeEventData MediaJobOutputStateChangeEventD /// The new state of the Job. /// Gets the Job correlation data. /// A new instance for mocking. - public static MediaJobScheduledEventData MediaJobScheduledEventData(MediaJobState previousState = default, MediaJobState state = default, IReadOnlyDictionary correlationData = null) + public static MediaJobScheduledEventData MediaJobScheduledEventData(MediaJobState? previousState = null, MediaJobState? state = null, IReadOnlyDictionary correlationData = null) { correlationData ??= new Dictionary(); @@ -3258,7 +3260,7 @@ public static MediaJobScheduledEventData MediaJobScheduledEventData(MediaJobStat /// The new state of the Job. /// Gets the Job correlation data. /// A new instance for mocking. - public static MediaJobProcessingEventData MediaJobProcessingEventData(MediaJobState previousState = default, MediaJobState state = default, IReadOnlyDictionary correlationData = null) + public static MediaJobProcessingEventData MediaJobProcessingEventData(MediaJobState? previousState = null, MediaJobState? state = null, IReadOnlyDictionary correlationData = null) { correlationData ??= new Dictionary(); @@ -3270,7 +3272,7 @@ public static MediaJobProcessingEventData MediaJobProcessingEventData(MediaJobSt /// The new state of the Job. /// Gets the Job correlation data. /// A new instance for mocking. - public static MediaJobCancelingEventData MediaJobCancelingEventData(MediaJobState previousState = default, MediaJobState state = default, IReadOnlyDictionary correlationData = null) + public static MediaJobCancelingEventData MediaJobCancelingEventData(MediaJobState? previousState = null, MediaJobState? state = null, IReadOnlyDictionary correlationData = null) { correlationData ??= new Dictionary(); @@ -3287,7 +3289,7 @@ public static MediaJobCancelingEventData MediaJobCancelingEventData(MediaJobStat /// The available derived classes include . /// /// A new instance for mocking. - public static MediaJobFinishedEventData MediaJobFinishedEventData(MediaJobState previousState = default, MediaJobState state = default, IReadOnlyDictionary correlationData = null, IEnumerable outputs = null) + public static MediaJobFinishedEventData MediaJobFinishedEventData(MediaJobState? previousState = null, MediaJobState? state = null, IReadOnlyDictionary correlationData = null, IEnumerable outputs = null) { correlationData ??= new Dictionary(); outputs ??= new List(); @@ -3305,7 +3307,7 @@ public static MediaJobFinishedEventData MediaJobFinishedEventData(MediaJobState /// The available derived classes include . /// /// A new instance for mocking. - public static MediaJobCanceledEventData MediaJobCanceledEventData(MediaJobState previousState = default, MediaJobState state = default, IReadOnlyDictionary correlationData = null, IEnumerable outputs = null) + public static MediaJobCanceledEventData MediaJobCanceledEventData(MediaJobState? previousState = null, MediaJobState? state = null, IReadOnlyDictionary correlationData = null, IEnumerable outputs = null) { correlationData ??= new Dictionary(); outputs ??= new List(); @@ -3323,7 +3325,7 @@ public static MediaJobCanceledEventData MediaJobCanceledEventData(MediaJobState /// The available derived classes include . /// /// A new instance for mocking. - public static MediaJobErroredEventData MediaJobErroredEventData(MediaJobState previousState = default, MediaJobState state = default, IReadOnlyDictionary correlationData = null, IEnumerable outputs = null) + public static MediaJobErroredEventData MediaJobErroredEventData(MediaJobState? previousState = null, MediaJobState? state = null, IReadOnlyDictionary correlationData = null, IEnumerable outputs = null) { correlationData ??= new Dictionary(); outputs ??= new List(); @@ -3340,7 +3342,7 @@ public static MediaJobErroredEventData MediaJobErroredEventData(MediaJobState pr /// /// Gets the Job correlation data. /// A new instance for mocking. - public static MediaJobOutputCanceledEventData MediaJobOutputCanceledEventData(MediaJobState previousState = default, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) + public static MediaJobOutputCanceledEventData MediaJobOutputCanceledEventData(MediaJobState? previousState = null, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) { jobCorrelationData ??= new Dictionary(); @@ -3356,7 +3358,7 @@ public static MediaJobOutputCanceledEventData MediaJobOutputCanceledEventData(Me /// /// Gets the Job correlation data. /// A new instance for mocking. - public static MediaJobOutputCancelingEventData MediaJobOutputCancelingEventData(MediaJobState previousState = default, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) + public static MediaJobOutputCancelingEventData MediaJobOutputCancelingEventData(MediaJobState? previousState = null, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) { jobCorrelationData ??= new Dictionary(); @@ -3372,7 +3374,7 @@ public static MediaJobOutputCancelingEventData MediaJobOutputCancelingEventData( /// /// Gets the Job correlation data. /// A new instance for mocking. - public static MediaJobOutputErroredEventData MediaJobOutputErroredEventData(MediaJobState previousState = default, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) + public static MediaJobOutputErroredEventData MediaJobOutputErroredEventData(MediaJobState? previousState = null, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) { jobCorrelationData ??= new Dictionary(); @@ -3388,7 +3390,7 @@ public static MediaJobOutputErroredEventData MediaJobOutputErroredEventData(Medi /// /// Gets the Job correlation data. /// A new instance for mocking. - public static MediaJobOutputFinishedEventData MediaJobOutputFinishedEventData(MediaJobState previousState = default, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) + public static MediaJobOutputFinishedEventData MediaJobOutputFinishedEventData(MediaJobState? previousState = null, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) { jobCorrelationData ??= new Dictionary(); @@ -3404,7 +3406,7 @@ public static MediaJobOutputFinishedEventData MediaJobOutputFinishedEventData(Me /// /// Gets the Job correlation data. /// A new instance for mocking. - public static MediaJobOutputProcessingEventData MediaJobOutputProcessingEventData(MediaJobState previousState = default, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) + public static MediaJobOutputProcessingEventData MediaJobOutputProcessingEventData(MediaJobState? previousState = null, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) { jobCorrelationData ??= new Dictionary(); @@ -3420,7 +3422,7 @@ public static MediaJobOutputProcessingEventData MediaJobOutputProcessingEventDat /// /// Gets the Job correlation data. /// A new instance for mocking. - public static MediaJobOutputScheduledEventData MediaJobOutputScheduledEventData(MediaJobState previousState = default, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) + public static MediaJobOutputScheduledEventData MediaJobOutputScheduledEventData(MediaJobState? previousState = null, MediaJobOutput output = null, IReadOnlyDictionary jobCorrelationData = null) { jobCorrelationData ??= new Dictionary(); @@ -3638,7 +3640,7 @@ public static MediaLiveEventChannelArchiveHeartbeatEventData MediaLiveEventChann /// The subscription ID of the resource. /// The compliance reason code. May be empty. /// A new instance for mocking. - public static PolicyInsightsPolicyStateCreatedEventData PolicyInsightsPolicyStateCreatedEventData(DateTimeOffset timestamp = default, string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) + public static PolicyInsightsPolicyStateCreatedEventData PolicyInsightsPolicyStateCreatedEventData(DateTimeOffset? timestamp = null, string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) { return new PolicyInsightsPolicyStateCreatedEventData( timestamp, @@ -3660,7 +3662,7 @@ public static PolicyInsightsPolicyStateCreatedEventData PolicyInsightsPolicyStat /// The subscription ID of the resource. /// The compliance reason code. May be empty. /// A new instance for mocking. - public static PolicyInsightsPolicyStateChangedEventData PolicyInsightsPolicyStateChangedEventData(DateTimeOffset timestamp = default, string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) + public static PolicyInsightsPolicyStateChangedEventData PolicyInsightsPolicyStateChangedEventData(DateTimeOffset? timestamp = null, string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) { return new PolicyInsightsPolicyStateChangedEventData( timestamp, @@ -3682,7 +3684,7 @@ public static PolicyInsightsPolicyStateChangedEventData PolicyInsightsPolicyStat /// The subscription ID of the resource. /// The compliance reason code. May be empty. /// A new instance for mocking. - public static PolicyInsightsPolicyStateDeletedEventData PolicyInsightsPolicyStateDeletedEventData(DateTimeOffset timestamp = default, string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) + public static PolicyInsightsPolicyStateDeletedEventData PolicyInsightsPolicyStateDeletedEventData(DateTimeOffset? timestamp = null, string policyAssignmentId = null, string policyDefinitionId = null, string policyDefinitionReferenceId = null, string complianceState = null, string subscriptionId = null, string complianceReasonCode = null) { return new PolicyInsightsPolicyStateDeletedEventData( timestamp, @@ -3700,7 +3702,7 @@ public static PolicyInsightsPolicyStateDeletedEventData PolicyInsightsPolicyStat /// The name of this event. /// The status of this event. Failed or succeeded. /// A new instance for mocking. - public static RedisPatchingCompletedEventData RedisPatchingCompletedEventData(DateTimeOffset timestamp = default, string name = null, string status = null) + public static RedisPatchingCompletedEventData RedisPatchingCompletedEventData(DateTimeOffset? timestamp = null, string name = null, string status = null) { return new RedisPatchingCompletedEventData(timestamp, name, status, serializedAdditionalRawData: null); } @@ -3710,29 +3712,29 @@ public static RedisPatchingCompletedEventData RedisPatchingCompletedEventData(Da /// The name of this event. /// The status of this event. Failed or succeeded. /// A new instance for mocking. - public static RedisScalingCompletedEventData RedisScalingCompletedEventData(DateTimeOffset timestamp = default, string name = null, string status = null) + public static RedisScalingCompletedEventData RedisScalingCompletedEventData(DateTimeOffset? timestamp = null, string name = null, string status = null) { return new RedisScalingCompletedEventData(timestamp, name, status, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The time at which the event occurred. /// The name of this event. /// The status of this event. Failed or succeeded. - /// A new instance for mocking. - public static RedisExportRDBCompletedEventData RedisExportRDBCompletedEventData(DateTimeOffset timestamp = default, string name = null, string status = null) + /// A new instance for mocking. + public static RedisExportRdbCompletedEventData RedisExportRdbCompletedEventData(DateTimeOffset? timestamp = null, string name = null, string status = null) { - return new RedisExportRDBCompletedEventData(timestamp, name, status, serializedAdditionalRawData: null); + return new RedisExportRdbCompletedEventData(timestamp, name, status, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The time at which the event occurred. /// The name of this event. /// The status of this event. Failed or succeeded. - /// A new instance for mocking. - public static RedisImportRDBCompletedEventData RedisImportRDBCompletedEventData(DateTimeOffset timestamp = default, string name = null, string status = null) + /// A new instance for mocking. + public static RedisImportRdbCompletedEventData RedisImportRdbCompletedEventData(DateTimeOffset? timestamp = null, string name = null, string status = null) { - return new RedisImportRDBCompletedEventData(timestamp, name, status, serializedAdditionalRawData: null); + return new RedisImportRdbCompletedEventData(timestamp, name, status, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -4132,7 +4134,7 @@ public static ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventDat /// The connection Id of connected client connection. /// The user Id of connected client connection. /// A new instance for mocking. - public static SignalRServiceClientConnectionConnectedEventData SignalRServiceClientConnectionConnectedEventData(DateTimeOffset timestamp = default, string hubName = null, string connectionId = null, string userId = null) + public static SignalRServiceClientConnectionConnectedEventData SignalRServiceClientConnectionConnectedEventData(DateTimeOffset? timestamp = null, string hubName = null, string connectionId = null, string userId = null) { return new SignalRServiceClientConnectionConnectedEventData(timestamp, hubName, connectionId, userId, serializedAdditionalRawData: null); } @@ -4144,7 +4146,7 @@ public static SignalRServiceClientConnectionConnectedEventData SignalRServiceCli /// The user Id of connected client connection. /// The message of error that cause the client connection disconnected. /// A new instance for mocking. - public static SignalRServiceClientConnectionDisconnectedEventData SignalRServiceClientConnectionDisconnectedEventData(DateTimeOffset timestamp = default, string hubName = null, string connectionId = null, string userId = null, string errorMessage = null) + public static SignalRServiceClientConnectionDisconnectedEventData SignalRServiceClientConnectionDisconnectedEventData(DateTimeOffset? timestamp = null, string hubName = null, string connectionId = null, string userId = null, string errorMessage = null) { return new SignalRServiceClientConnectionDisconnectedEventData( timestamp, @@ -4164,12 +4166,13 @@ public static SignalRServiceClientConnectionDisconnectedEventData SignalRService /// The size of the blob in bytes. This is the same as what would be returned in the Content-Length header from the blob. /// The offset of the blob in bytes. /// The type of blob. + /// The current tier of the blob. /// The path to the blob. /// An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. /// The identity of the requester that triggered this event. /// For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. /// A new instance for mocking. - public static StorageBlobCreatedEventData StorageBlobCreatedEventData(string api = null, string clientRequestId = null, string requestId = null, string eTag = null, string contentType = null, long? contentLength = null, long? contentOffset = null, string blobType = null, string url = null, string sequencer = null, string identity = null, IReadOnlyDictionary storageDiagnostics = null) + public static StorageBlobCreatedEventData StorageBlobCreatedEventData(string api = null, string clientRequestId = null, string requestId = null, string eTag = null, string contentType = null, long? contentLength = null, long? contentOffset = null, string blobType = null, StorageBlobAccessTier accessTier = default, string url = null, string sequencer = null, string identity = null, IReadOnlyDictionary storageDiagnostics = null) { storageDiagnostics ??= new Dictionary(); @@ -4182,6 +4185,7 @@ public static StorageBlobCreatedEventData StorageBlobCreatedEventData(string api contentLength, contentOffset, blobType, + accessTier, url, sequencer, identity, @@ -4326,10 +4330,17 @@ public static StorageDirectoryRenamedEventData StorageDirectoryRenamedEventData( /// Execution statistics of a specific policy action in a Blob Management cycle. /// Execution statistics of a specific policy action in a Blob Management cycle. /// Execution statistics of a specific policy action in a Blob Management cycle. + /// Execution statistics of a specific policy action in a Blob Management cycle. /// A new instance for mocking. - public static StorageLifecyclePolicyCompletedEventData StorageLifecyclePolicyCompletedEventData(string scheduleTime = null, StorageLifecyclePolicyActionSummaryDetail deleteSummary = null, StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary = null, StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary = null) - { - return new StorageLifecyclePolicyCompletedEventData(scheduleTime, deleteSummary, tierToCoolSummary, tierToArchiveSummary, serializedAdditionalRawData: null); + public static StorageLifecyclePolicyCompletedEventData StorageLifecyclePolicyCompletedEventData(string scheduleTime = null, StorageLifecyclePolicyActionSummaryDetail deleteSummary = null, StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary = null, StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary = null, StorageLifecyclePolicyActionSummaryDetail tierToColdSummary = null) + { + return new StorageLifecyclePolicyCompletedEventData( + scheduleTime, + deleteSummary, + tierToCoolSummary, + tierToArchiveSummary, + tierToColdSummary, + serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -4349,12 +4360,14 @@ public static StorageLifecyclePolicyActionSummaryDetail StorageLifecyclePolicyAc /// The content type of the blob. This is the same as what would be returned in the Content-Type header from the blob. /// The size of the blob in bytes. This is the same as what would be returned in the Content-Length header from the blob. /// The type of blob. + /// The current tier of the blob. + /// The previous tier of the blob. /// The path to the blob. /// An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. /// The identity of the requester that triggered this event. /// For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. /// A new instance for mocking. - public static StorageBlobTierChangedEventData StorageBlobTierChangedEventData(string api = null, string clientRequestId = null, string requestId = null, string contentType = null, long? contentLength = null, string blobType = null, string url = null, string sequencer = null, string identity = null, IReadOnlyDictionary storageDiagnostics = null) + public static StorageBlobTierChangedEventData StorageBlobTierChangedEventData(string api = null, string clientRequestId = null, string requestId = null, string contentType = null, long? contentLength = null, string blobType = null, StorageBlobAccessTier accessTier = default, StorageBlobAccessTier previousTier = default, string url = null, string sequencer = null, string identity = null, IReadOnlyDictionary storageDiagnostics = null) { storageDiagnostics ??= new Dictionary(); @@ -4365,6 +4378,8 @@ public static StorageBlobTierChangedEventData StorageBlobTierChangedEventData(st contentType, contentLength, blobType, + accessTier, + previousTier, url, sequencer, identity, @@ -4411,7 +4426,7 @@ public static StorageAsyncOperationInitiatedEventData StorageAsyncOperationIniti /// The policy run id for inventory run. /// The blob URL for manifest file for inventory run. /// A new instance for mocking. - public static StorageBlobInventoryPolicyCompletedEventData StorageBlobInventoryPolicyCompletedEventData(DateTimeOffset scheduleDateTime = default, string accountName = null, string ruleName = null, string policyRunStatus = null, string policyRunStatusMessage = null, string policyRunId = null, string manifestBlobUrl = null) + public static StorageBlobInventoryPolicyCompletedEventData StorageBlobInventoryPolicyCompletedEventData(DateTimeOffset? scheduleDateTime = null, string accountName = null, string ruleName = null, string policyRunStatus = null, string policyRunStatusMessage = null, string policyRunId = null, string manifestBlobUrl = null) { return new StorageBlobInventoryPolicyCompletedEventData( scheduleDateTime, @@ -4431,7 +4446,7 @@ public static StorageBlobInventoryPolicyCompletedEventData StorageBlobInventoryP /// The task name for a storage task. /// The summary report blob url for a storage task. /// A new instance for mocking. - public static StorageTaskCompletedEventData StorageTaskCompletedEventData(StorageTaskCompletedStatus status = default, DateTimeOffset completedDateTime = default, string taskExecutionId = null, string taskName = null, Uri summaryReportBlobUrl = null) + public static StorageTaskCompletedEventData StorageTaskCompletedEventData(StorageTaskCompletedStatus? status = null, DateTimeOffset? completedDateTime = null, string taskExecutionId = null, string taskName = null, Uri summaryReportBlobUrl = null) { return new StorageTaskCompletedEventData( status, @@ -4446,7 +4461,7 @@ public static StorageTaskCompletedEventData StorageTaskCompletedEventData(Storag /// The time at which a storage task was queued. /// The execution id for a storage task. /// A new instance for mocking. - public static StorageTaskQueuedEventData StorageTaskQueuedEventData(DateTimeOffset queuedDateTime = default, string taskExecutionId = null) + public static StorageTaskQueuedEventData StorageTaskQueuedEventData(DateTimeOffset? queuedDateTime = null, string taskExecutionId = null) { return new StorageTaskQueuedEventData(queuedDateTime, taskExecutionId, serializedAdditionalRawData: null); } @@ -4455,7 +4470,7 @@ public static StorageTaskQueuedEventData StorageTaskQueuedEventData(DateTimeOffs /// The time at which a storage task was queued. /// The execution id for a storage task. /// A new instance for mocking. - public static StorageTaskAssignmentQueuedEventData StorageTaskAssignmentQueuedEventData(DateTimeOffset queuedOn = default, string taskExecutionId = null) + public static StorageTaskAssignmentQueuedEventData StorageTaskAssignmentQueuedEventData(DateTimeOffset? queuedOn = null, string taskExecutionId = null) { return new StorageTaskAssignmentQueuedEventData(queuedOn, taskExecutionId, serializedAdditionalRawData: null); } @@ -4467,7 +4482,7 @@ public static StorageTaskAssignmentQueuedEventData StorageTaskAssignmentQueuedEv /// The task name for a storage task. /// The summary report blob url for a storage task. /// A new instance for mocking. - public static StorageTaskAssignmentCompletedEventData StorageTaskAssignmentCompletedEventData(StorageTaskAssignmentCompletedStatus status = default, DateTimeOffset completedOn = default, string taskExecutionId = null, string taskName = null, Uri summaryReportBlobUri = null) + public static StorageTaskAssignmentCompletedEventData StorageTaskAssignmentCompletedEventData(StorageTaskAssignmentCompletedStatus? status = null, DateTimeOffset? completedOn = null, string taskExecutionId = null, string taskName = null, Uri summaryReportBlobUri = null) { return new StorageTaskAssignmentCompletedEventData( status, @@ -4481,7 +4496,7 @@ public static StorageTaskAssignmentCompletedEventData StorageTaskAssignmentCompl /// Initializes a new instance of . /// Type of action of the operation. /// A new instance for mocking. - public static AppEventTypeDetail AppEventTypeDetail(AppAction action = default) + public static AppEventTypeDetail AppEventTypeDetail(AppAction? action = null) { return new AppEventTypeDetail(action, serializedAdditionalRawData: null); } @@ -4779,7 +4794,7 @@ public static WebAppServicePlanUpdatedEventData WebAppServicePlanUpdatedEventDat /// Type of action on the app service plan. /// Asynchronous operation status of the operation on the app service plan. /// A new instance for mocking. - public static AppServicePlanEventTypeDetail AppServicePlanEventTypeDetail(StampKind stampKind = default, AppServicePlanAction action = default, AsyncStatus status = default) + public static AppServicePlanEventTypeDetail AppServicePlanEventTypeDetail(StampKind? stampKind = null, AppServicePlanAction? action = null, AsyncStatus? status = null) { return new AppServicePlanEventTypeDetail(stampKind, action, status, serializedAdditionalRawData: null); } @@ -4835,7 +4850,7 @@ public static SubscriptionDeletedEventData SubscriptionDeletedEventData(string e return new SubscriptionDeletedEventData(eventSubscriptionId, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Unique identifier for the MQTT client that the client presents to the service /// for authentication. This case-sensitive string can be up to 128 characters @@ -4843,13 +4858,13 @@ public static SubscriptionDeletedEventData SubscriptionDeletedEventData(string e /// /// Name of the client resource in the Event Grid namespace. /// Name of the Event Grid namespace where the MQTT client was created or updated. - /// A new instance for mocking. - public static EventGridMQTTClientEventData EventGridMQTTClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) + /// A new instance for mocking. + public static EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { - return new EventGridMQTTClientEventData(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData: null); + return new EventGridMqttClientEventData(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Unique identifier for the MQTT client that the client presents to the service /// for authentication. This case-sensitive string can be up to 128 characters @@ -4865,12 +4880,12 @@ public static EventGridMQTTClientEventData EventGridMQTTClientEventData(string c /// the 'createdOn' property. /// /// The key-value attributes that are assigned to the client resource. - /// A new instance for mocking. - public static EventGridMQTTClientCreatedOrUpdatedEventData EventGridMQTTClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, EventGridMQTTClientState state = default, DateTimeOffset createdOn = default, DateTimeOffset updatedOn = default, IReadOnlyDictionary attributes = null) + /// A new instance for mocking. + public static EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, EventGridMqttClientState? state = null, DateTimeOffset? createdOn = null, DateTimeOffset? updatedOn = null, IReadOnlyDictionary attributes = null) { attributes ??= new Dictionary(); - return new EventGridMQTTClientCreatedOrUpdatedEventData( + return new EventGridMqttClientCreatedOrUpdatedEventData( clientAuthenticationName, clientName, namespaceName, @@ -4881,7 +4896,7 @@ public static EventGridMQTTClientCreatedOrUpdatedEventData EventGridMQTTClientCr attributes); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Unique identifier for the MQTT client that the client presents to the service /// for authentication. This case-sensitive string can be up to 128 characters @@ -4889,13 +4904,13 @@ public static EventGridMQTTClientCreatedOrUpdatedEventData EventGridMQTTClientCr /// /// Name of the client resource in the Event Grid namespace. /// Name of the Event Grid namespace where the MQTT client was created or updated. - /// A new instance for mocking. - public static EventGridMQTTClientDeletedEventData EventGridMQTTClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) + /// A new instance for mocking. + public static EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { - return new EventGridMQTTClientDeletedEventData(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData: null); + return new EventGridMqttClientDeletedEventData(clientAuthenticationName, clientName, namespaceName, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Unique identifier for the MQTT client that the client presents to the service /// for authentication. This case-sensitive string can be up to 128 characters @@ -4912,10 +4927,10 @@ public static EventGridMQTTClientDeletedEventData EventGridMQTTClientDeletedEven /// disconnected events. Latest event will have a sequence number that is higher /// than the previous event. /// - /// A new instance for mocking. - public static EventGridMQTTClientSessionConnectedEventData EventGridMQTTClientSessionConnectedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, string clientSessionName = null, long? sequenceNumber = null) + /// A new instance for mocking. + public static EventGridMqttClientSessionConnectedEventData EventGridMqttClientSessionConnectedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, string clientSessionName = null, long? sequenceNumber = null) { - return new EventGridMQTTClientSessionConnectedEventData( + return new EventGridMqttClientSessionConnectedEventData( clientAuthenticationName, clientName, namespaceName, @@ -4924,7 +4939,7 @@ public static EventGridMQTTClientSessionConnectedEventData EventGridMQTTClientSe sequenceNumber); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Unique identifier for the MQTT client that the client presents to the service /// for authentication. This case-sensitive string can be up to 128 characters @@ -4945,10 +4960,10 @@ public static EventGridMQTTClientSessionConnectedEventData EventGridMQTTClientSe /// Reason for the disconnection of the MQTT client's session. The value could be /// one of the values in the disconnection reasons table. /// - /// A new instance for mocking. - public static EventGridMQTTClientSessionDisconnectedEventData EventGridMQTTClientSessionDisconnectedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, string clientSessionName = null, long? sequenceNumber = null, EventGridMQTTClientDisconnectionReason disconnectionReason = default) + /// A new instance for mocking. + public static EventGridMqttClientSessionDisconnectedEventData EventGridMqttClientSessionDisconnectedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, string clientSessionName = null, long? sequenceNumber = null, EventGridMqttClientDisconnectionReason? disconnectionReason = null) { - return new EventGridMQTTClientSessionDisconnectedEventData( + return new EventGridMqttClientSessionDisconnectedEventData( clientAuthenticationName, clientName, namespaceName, @@ -4994,7 +5009,7 @@ public static ResourceNotificationsResourceUpdatedDetails ResourceNotificationsR /// Initializes a new instance of . /// Date and Time when resource was updated. /// A new instance for mocking. - public static ResourceNotificationsOperationalDetails ResourceNotificationsOperationalDetails(DateTimeOffset resourceEventTime = default) + public static ResourceNotificationsOperationalDetails ResourceNotificationsOperationalDetails(DateTimeOffset? resourceEventTime = null) { return new ResourceNotificationsOperationalDetails(resourceEventTime, serializedAdditionalRawData: null); } @@ -5019,14 +5034,14 @@ public static ResourceNotificationsHealthResourcesAnnotatedEventData ResourceNot return new ResourceNotificationsHealthResourcesAnnotatedEventData(resourceDetails, operationalDetails, apiVersion, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// resourceInfo details for update event. - /// details about operational info. - /// api version of the resource properties bag. - /// A new instance for mocking. - public static ResourceNotificationsResourceManagementCreatedOrUpdatedEventData ResourceNotificationsResourceManagementCreatedOrUpdatedEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails = null, ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) + /// Initializes a new instance of . + /// id of the resource for which the event is being emitted. + /// name of the resource for which the event is being emitted. + /// the type of the resource for which the event is being emitted. + /// A new instance for mocking. + public static ResourceNotificationsResourceDeletedDetails ResourceNotificationsResourceDeletedDetails(string id = null, string name = null, string type = null) { - return new ResourceNotificationsResourceManagementCreatedOrUpdatedEventData(resourceDetails, operationalDetails, apiVersion, serializedAdditionalRawData: null); + return new ResourceNotificationsResourceDeletedDetails(id, name, type, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -5038,14 +5053,14 @@ public static ResourceNotificationsResourceDeletedEventData ResourceNotification return new ResourceNotificationsResourceDeletedEventData(resourceDetails, operationalDetails, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// id of the resource for which the event is being emitted. - /// name of the resource for which the event is being emitted. - /// the type of the resource for which the event is being emitted. - /// A new instance for mocking. - public static ResourceNotificationsResourceDeletedDetails ResourceNotificationsResourceDeletedDetails(string id = null, string name = null, string type = null) + /// Initializes a new instance of . + /// resourceInfo details for update event. + /// details about operational info. + /// api version of the resource properties bag. + /// A new instance for mocking. + public static ResourceNotificationsResourceManagementCreatedOrUpdatedEventData ResourceNotificationsResourceManagementCreatedOrUpdatedEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails = null, ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) { - return new ResourceNotificationsResourceDeletedDetails(id, name, type, serializedAdditionalRawData: null); + return new ResourceNotificationsResourceManagementCreatedOrUpdatedEventData(resourceDetails, operationalDetails, apiVersion, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -5056,5 +5071,15 @@ public static ResourceNotificationsResourceManagementDeletedEventData ResourceNo { return new ResourceNotificationsResourceManagementDeletedEventData(resourceDetails, operationalDetails, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// resourceInfo details for update event. + /// details about operational info. + /// api version of the resource properties bag. + /// A new instance for mocking. + public static ResourceNotificationsContainerServiceEventResourcesScheduledEventData ResourceNotificationsContainerServiceEventResourcesScheduledEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails = null, ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) + { + return new ResourceNotificationsContainerServiceEventResourcesScheduledEventData(resourceDetails, operationalDetails, apiVersion, serializedAdditionalRawData: null); + } } } 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 1df0132a3c36..badf70077248 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 @@ -18,15 +18,6 @@ public partial class EventHubCaptureFileCreatedEventData : IUtf8JsonSerializable 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EventHubCaptureFileCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Fileurl)) { writer.WritePropertyName("fileUrl"u8); @@ -69,10 +61,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("lastSequenceNumber"u8); writer.WriteNumberValue(LastSequenceNumber.Value); } - writer.WritePropertyName("firstEnqueueTime"u8); - writer.WriteStringValue(FirstEnqueueTime, "O"); - writer.WritePropertyName("lastEnqueueTime"u8); - writer.WriteStringValue(LastEnqueueTime, "O"); + if (Optional.IsDefined(FirstEnqueueTime)) + { + writer.WritePropertyName("firstEnqueueTime"u8); + writer.WriteStringValue(FirstEnqueueTime.Value, "O"); + } + if (Optional.IsDefined(LastEnqueueTime)) + { + writer.WritePropertyName("lastEnqueueTime"u8); + writer.WriteStringValue(LastEnqueueTime.Value, "O"); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -88,6 +86,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } EventHubCaptureFileCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -117,8 +116,8 @@ internal static EventHubCaptureFileCreatedEventData DeserializeEventHubCaptureFi int? eventCount = default; int? firstSequenceNumber = default; int? lastSequenceNumber = default; - DateTimeOffset firstEnqueueTime = default; - DateTimeOffset lastEnqueueTime = default; + DateTimeOffset? firstEnqueueTime = default; + DateTimeOffset? lastEnqueueTime = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -176,11 +175,19 @@ internal static EventHubCaptureFileCreatedEventData DeserializeEventHubCaptureFi } if (property.NameEquals("firstEnqueueTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } firstEnqueueTime = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("lastEnqueueTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } lastEnqueueTime = property.Value.GetDateTimeOffset("O"); continue; } 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 0c670ab7b195..ff8f7f2a0e35 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs @@ -46,12 +46,8 @@ public partial class EventHubCaptureFileCreatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The first time from the queue. - /// The last time from the queue. - internal EventHubCaptureFileCreatedEventData(DateTimeOffset firstEnqueueTime, DateTimeOffset lastEnqueueTime) + internal EventHubCaptureFileCreatedEventData() { - FirstEnqueueTime = firstEnqueueTime; - LastEnqueueTime = lastEnqueueTime; } /// Initializes a new instance of . @@ -65,7 +61,7 @@ internal EventHubCaptureFileCreatedEventData(DateTimeOffset firstEnqueueTime, Da /// The first time from the queue. /// The last time from the queue. /// Keeps track of any properties unknown to the library. - internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, string partitionId, int? sizeInBytes, int? eventCount, int? firstSequenceNumber, int? lastSequenceNumber, DateTimeOffset firstEnqueueTime, DateTimeOffset lastEnqueueTime, IDictionary serializedAdditionalRawData) + internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, string partitionId, int? sizeInBytes, int? eventCount, int? firstSequenceNumber, int? lastSequenceNumber, DateTimeOffset? firstEnqueueTime, DateTimeOffset? lastEnqueueTime, IDictionary serializedAdditionalRawData) { Fileurl = fileurl; FileType = fileType; @@ -79,11 +75,6 @@ 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. @@ -99,8 +90,8 @@ internal EventHubCaptureFileCreatedEventData() /// The last sequence number from the queue. public int? LastSequenceNumber { get; } /// The first time from the queue. - public DateTimeOffset FirstEnqueueTime { get; } + public DateTimeOffset? FirstEnqueueTime { get; } /// The last time from the queue. - public DateTimeOffset LastEnqueueTime { get; } + public DateTimeOffset? LastEnqueueTime { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageCreatedEventData.Serialization.cs index feacefff2563..d0f46b029999 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class HealthcareDicomImageCreatedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HealthcareDicomImageCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(PartitionName)) { writer.WritePropertyName("partitionName"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } HealthcareDicomImageCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageDeletedEventData.Serialization.cs index bb9a3dfd42ae..03055ebea4e5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class HealthcareDicomImageDeletedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HealthcareDicomImageDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(PartitionName)) { writer.WritePropertyName("partitionName"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } HealthcareDicomImageDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageUpdatedEventData.Serialization.cs index 54bba1c9d572..c314ee3182bd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class HealthcareDicomImageUpdatedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HealthcareDicomImageUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(PartitionName)) { writer.WritePropertyName("partitionName"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } HealthcareDicomImageUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.Serialization.cs index 5750aeda70b5..933ef2a240b5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class HealthcareFhirResourceCreatedEventData : IUtf8JsonSerializa 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HealthcareFhirResourceCreatedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(FhirResourceType.ToString()); + writer.WriteStartObject(); + if (Optional.IsDefined(FhirResourceType)) + { + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(FhirResourceType.Value.ToString()); + } if (Optional.IsDefined(FhirServiceHostName)) { writer.WritePropertyName("resourceFhirAccount"u8); @@ -66,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } HealthcareFhirResourceCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -88,7 +84,7 @@ internal static HealthcareFhirResourceCreatedEventData DeserializeHealthcareFhir { return null; } - HealthcareFhirResourceType resourceType = default; + HealthcareFhirResourceType? resourceType = default; string resourceFhirAccount = default; string resourceFhirId = default; long? resourceVersionId = default; @@ -98,6 +94,10 @@ internal static HealthcareFhirResourceCreatedEventData DeserializeHealthcareFhir { if (property.NameEquals("resourceType"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } resourceType = new HealthcareFhirResourceType(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.cs index ed48894c3e41..33b1ec472af0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.cs @@ -46,10 +46,8 @@ public partial class HealthcareFhirResourceCreatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Type of HL7 FHIR resource. - internal HealthcareFhirResourceCreatedEventData(HealthcareFhirResourceType fhirResourceType) + internal HealthcareFhirResourceCreatedEventData() { - FhirResourceType = fhirResourceType; } /// Initializes a new instance of . @@ -58,7 +56,7 @@ internal HealthcareFhirResourceCreatedEventData(HealthcareFhirResourceType fhirR /// Id of HL7 FHIR resource. /// VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion). /// Keeps track of any properties unknown to the library. - internal HealthcareFhirResourceCreatedEventData(HealthcareFhirResourceType fhirResourceType, string fhirServiceHostName, string fhirResourceId, long? fhirResourceVersionId, IDictionary serializedAdditionalRawData) + internal HealthcareFhirResourceCreatedEventData(HealthcareFhirResourceType? fhirResourceType, string fhirServiceHostName, string fhirResourceId, long? fhirResourceVersionId, IDictionary serializedAdditionalRawData) { FhirResourceType = fhirResourceType; FhirServiceHostName = fhirServiceHostName; @@ -67,13 +65,8 @@ internal HealthcareFhirResourceCreatedEventData(HealthcareFhirResourceType fhirR _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal HealthcareFhirResourceCreatedEventData() - { - } - /// Type of HL7 FHIR resource. - public HealthcareFhirResourceType FhirResourceType { get; } + public HealthcareFhirResourceType? FhirResourceType { get; } /// Domain name of FHIR account for this resource. public string FhirServiceHostName { get; } /// Id of HL7 FHIR resource. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.Serialization.cs index f51a529553b5..17160ec565f1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class HealthcareFhirResourceDeletedEventData : IUtf8JsonSerializa 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HealthcareFhirResourceDeletedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(FhirResourceType.ToString()); + writer.WriteStartObject(); + if (Optional.IsDefined(FhirResourceType)) + { + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(FhirResourceType.Value.ToString()); + } if (Optional.IsDefined(FhirServiceHostName)) { writer.WritePropertyName("resourceFhirAccount"u8); @@ -66,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } HealthcareFhirResourceDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -88,7 +84,7 @@ internal static HealthcareFhirResourceDeletedEventData DeserializeHealthcareFhir { return null; } - HealthcareFhirResourceType resourceType = default; + HealthcareFhirResourceType? resourceType = default; string resourceFhirAccount = default; string resourceFhirId = default; long? resourceVersionId = default; @@ -98,6 +94,10 @@ internal static HealthcareFhirResourceDeletedEventData DeserializeHealthcareFhir { if (property.NameEquals("resourceType"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } resourceType = new HealthcareFhirResourceType(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.cs index 6e883f6f61e4..587830f92c2e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.cs @@ -46,10 +46,8 @@ public partial class HealthcareFhirResourceDeletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Type of HL7 FHIR resource. - internal HealthcareFhirResourceDeletedEventData(HealthcareFhirResourceType fhirResourceType) + internal HealthcareFhirResourceDeletedEventData() { - FhirResourceType = fhirResourceType; } /// Initializes a new instance of . @@ -58,7 +56,7 @@ internal HealthcareFhirResourceDeletedEventData(HealthcareFhirResourceType fhirR /// Id of HL7 FHIR resource. /// VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion). /// Keeps track of any properties unknown to the library. - internal HealthcareFhirResourceDeletedEventData(HealthcareFhirResourceType fhirResourceType, string fhirServiceHostName, string fhirResourceId, long? fhirResourceVersionId, IDictionary serializedAdditionalRawData) + internal HealthcareFhirResourceDeletedEventData(HealthcareFhirResourceType? fhirResourceType, string fhirServiceHostName, string fhirResourceId, long? fhirResourceVersionId, IDictionary serializedAdditionalRawData) { FhirResourceType = fhirResourceType; FhirServiceHostName = fhirServiceHostName; @@ -67,13 +65,8 @@ internal HealthcareFhirResourceDeletedEventData(HealthcareFhirResourceType fhirR _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal HealthcareFhirResourceDeletedEventData() - { - } - /// Type of HL7 FHIR resource. - public HealthcareFhirResourceType FhirResourceType { get; } + public HealthcareFhirResourceType? FhirResourceType { get; } /// Domain name of FHIR account for this resource. public string FhirServiceHostName { get; } /// Id of HL7 FHIR resource. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.Serialization.cs index c8002a984a9c..52c18d67cdca 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class HealthcareFhirResourceUpdatedEventData : IUtf8JsonSerializa 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HealthcareFhirResourceUpdatedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(FhirResourceType.ToString()); + writer.WriteStartObject(); + if (Optional.IsDefined(FhirResourceType)) + { + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(FhirResourceType.Value.ToString()); + } if (Optional.IsDefined(FhirServiceHostName)) { writer.WritePropertyName("resourceFhirAccount"u8); @@ -66,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } HealthcareFhirResourceUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -88,7 +84,7 @@ internal static HealthcareFhirResourceUpdatedEventData DeserializeHealthcareFhir { return null; } - HealthcareFhirResourceType resourceType = default; + HealthcareFhirResourceType? resourceType = default; string resourceFhirAccount = default; string resourceFhirId = default; long? resourceVersionId = default; @@ -98,6 +94,10 @@ internal static HealthcareFhirResourceUpdatedEventData DeserializeHealthcareFhir { if (property.NameEquals("resourceType"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } resourceType = new HealthcareFhirResourceType(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.cs index 7133f01a47d2..d4d5a4ce3262 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.cs @@ -46,10 +46,8 @@ public partial class HealthcareFhirResourceUpdatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Type of HL7 FHIR resource. - internal HealthcareFhirResourceUpdatedEventData(HealthcareFhirResourceType fhirResourceType) + internal HealthcareFhirResourceUpdatedEventData() { - FhirResourceType = fhirResourceType; } /// Initializes a new instance of . @@ -58,7 +56,7 @@ internal HealthcareFhirResourceUpdatedEventData(HealthcareFhirResourceType fhirR /// Id of HL7 FHIR resource. /// VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion). /// Keeps track of any properties unknown to the library. - internal HealthcareFhirResourceUpdatedEventData(HealthcareFhirResourceType fhirResourceType, string fhirServiceHostName, string fhirResourceId, long? fhirResourceVersionId, IDictionary serializedAdditionalRawData) + internal HealthcareFhirResourceUpdatedEventData(HealthcareFhirResourceType? fhirResourceType, string fhirServiceHostName, string fhirResourceId, long? fhirResourceVersionId, IDictionary serializedAdditionalRawData) { FhirResourceType = fhirResourceType; FhirServiceHostName = fhirServiceHostName; @@ -67,13 +65,8 @@ internal HealthcareFhirResourceUpdatedEventData(HealthcareFhirResourceType fhirR _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal HealthcareFhirResourceUpdatedEventData() - { - } - /// Type of HL7 FHIR resource. - public HealthcareFhirResourceType FhirResourceType { get; } + public HealthcareFhirResourceType? FhirResourceType { get; } /// Domain name of FHIR account for this resource. public string FhirServiceHostName { get; } /// Id of HL7 FHIR resource. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceConnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceConnectedEventData.Serialization.cs index 0cde2d5698c8..8f39de24a276 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceConnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceConnectedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class IotHubDeviceConnectedEventData : IUtf8JsonSerializable, IJs 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") @@ -34,7 +25,40 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IotHubDeviceConnectedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(DeviceId)) + { + writer.WritePropertyName("deviceId"u8); + writer.WriteStringValue(DeviceId); + } + if (Optional.IsDefined(ModuleId)) + { + writer.WritePropertyName("moduleId"u8); + writer.WriteStringValue(ModuleId); + } + if (Optional.IsDefined(HubName)) + { + writer.WritePropertyName("hubName"u8); + writer.WriteStringValue(HubName); + } + writer.WritePropertyName("deviceConnectionStateEventInfo"u8); + writer.WriteObjectValue(DeviceConnectionStateEventInfo, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } IotHubDeviceConnectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceCreatedEventData.Serialization.cs index 119996600f1b..f8a0a5078f5d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class IotHubDeviceCreatedEventData : IUtf8JsonSerializable, IJson 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") @@ -34,7 +25,35 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IotHubDeviceCreatedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(DeviceId)) + { + writer.WritePropertyName("deviceId"u8); + writer.WriteStringValue(DeviceId); + } + if (Optional.IsDefined(HubName)) + { + writer.WritePropertyName("hubName"u8); + writer.WriteStringValue(HubName); + } + writer.WritePropertyName("twin"u8); + writer.WriteObjectValue(Twin, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } IotHubDeviceCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDeletedEventData.Serialization.cs index 14432f7ca5dd..a23da934f178 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class IotHubDeviceDeletedEventData : IUtf8JsonSerializable, IJson 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") @@ -34,7 +25,35 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IotHubDeviceDeletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(DeviceId)) + { + writer.WritePropertyName("deviceId"u8); + writer.WriteStringValue(DeviceId); + } + if (Optional.IsDefined(HubName)) + { + writer.WritePropertyName("hubName"u8); + writer.WriteStringValue(HubName); + } + writer.WritePropertyName("twin"u8); + writer.WriteObjectValue(Twin, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } IotHubDeviceDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDisconnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDisconnectedEventData.Serialization.cs index 2c2e9879f65f..9484146331fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDisconnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDisconnectedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class IotHubDeviceDisconnectedEventData : IUtf8JsonSerializable, 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") @@ -34,7 +25,40 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IotHubDeviceDisconnectedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(DeviceId)) + { + writer.WritePropertyName("deviceId"u8); + writer.WriteStringValue(DeviceId); + } + if (Optional.IsDefined(ModuleId)) + { + writer.WritePropertyName("moduleId"u8); + writer.WriteStringValue(ModuleId); + } + if (Optional.IsDefined(HubName)) + { + writer.WritePropertyName("hubName"u8); + writer.WriteStringValue(HubName); + } + writer.WritePropertyName("deviceConnectionStateEventInfo"u8); + writer.WriteObjectValue(DeviceConnectionStateEventInfo, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } IotHubDeviceDisconnectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceTelemetryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceTelemetryEventData.Serialization.cs index c58260903dc9..2a6a8cdd3bb3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceTelemetryEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceTelemetryEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class IotHubDeviceTelemetryEventData : IUtf8JsonSerializable, IJs 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") @@ -34,7 +25,59 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IotHubDeviceTelemetryEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("body"u8); + writer.WriteStartObject(); + foreach (var item in Body) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("systemProperties"u8); + writer.WriteStartObject(); + foreach (var item in SystemProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } IotHubDeviceTelemetryEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultAccessPolicyChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultAccessPolicyChangedEventData.Serialization.cs index 1889a7a88d95..2485a286ac6f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultAccessPolicyChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultAccessPolicyChangedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class KeyVaultAccessPolicyChangedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KeyVaultAccessPolicyChangedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("Id"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KeyVaultAccessPolicyChangedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateExpiredEventData.Serialization.cs index 97133d32eff4..f2c05e8a1af0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateExpiredEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class KeyVaultCertificateExpiredEventData : IUtf8JsonSerializable 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KeyVaultCertificateExpiredEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("Id"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KeyVaultCertificateExpiredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNearExpiryEventData.Serialization.cs index 93bdba22a7c9..2b5d865adcdc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNearExpiryEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNearExpiryEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class KeyVaultCertificateNearExpiryEventData : IUtf8JsonSerializa 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KeyVaultCertificateNearExpiryEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("Id"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KeyVaultCertificateNearExpiryEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNewVersionCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNewVersionCreatedEventData.Serialization.cs index 20a19baa3ea8..892642e4a535 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNewVersionCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNewVersionCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class KeyVaultCertificateNewVersionCreatedEventData : IUtf8JsonSe 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KeyVaultCertificateNewVersionCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("Id"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KeyVaultCertificateNewVersionCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyExpiredEventData.Serialization.cs index f3399ac7eb99..6895c8d553dd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyExpiredEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class KeyVaultKeyExpiredEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KeyVaultKeyExpiredEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("Id"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KeyVaultKeyExpiredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNearExpiryEventData.Serialization.cs index 57bfc5f4618c..6cbaa0945a58 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNearExpiryEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNearExpiryEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class KeyVaultKeyNearExpiryEventData : IUtf8JsonSerializable, IJs 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KeyVaultKeyNearExpiryEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("Id"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KeyVaultKeyNearExpiryEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNewVersionCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNewVersionCreatedEventData.Serialization.cs index ff158b77a99d..fd903c372575 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNewVersionCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNewVersionCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class KeyVaultKeyNewVersionCreatedEventData : IUtf8JsonSerializab 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KeyVaultKeyNewVersionCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("Id"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KeyVaultKeyNewVersionCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretExpiredEventData.Serialization.cs index efa809daa4ef..34283767a1b2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretExpiredEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class KeyVaultSecretExpiredEventData : IUtf8JsonSerializable, IJs 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KeyVaultSecretExpiredEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("Id"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KeyVaultSecretExpiredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNearExpiryEventData.Serialization.cs index 563a0c32ffe0..e11109f50276 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNearExpiryEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNearExpiryEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class KeyVaultSecretNearExpiryEventData : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KeyVaultSecretNearExpiryEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("Id"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KeyVaultSecretNearExpiryEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNewVersionCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNewVersionCreatedEventData.Serialization.cs index 867bf49c9495..71d7c57cb5db 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNewVersionCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNewVersionCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class KeyVaultSecretNewVersionCreatedEventData : IUtf8JsonSeriali 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KeyVaultSecretNewVersionCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("Id"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KeyVaultSecretNewVersionCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 09b738ad26da..f8fefe54abe6 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 @@ -18,15 +18,6 @@ public partial class MachineLearningServicesDatasetDriftDetectedEventData : IUtf 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesDatasetDriftDetectedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(DataDriftId)) { writer.WritePropertyName("dataDriftId"u8); @@ -64,10 +56,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("driftCoefficient"u8); writer.WriteNumberValue(DriftCoefficient.Value); } - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartTime, "O"); - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndTime, "O"); + if (Optional.IsDefined(StartTime)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime.Value, "O"); + } + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -83,6 +81,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MachineLearningServicesDatasetDriftDetectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -111,8 +110,8 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize string baseDatasetId = default; string targetDatasetId = default; double? driftCoefficient = default; - DateTimeOffset startTime = default; - DateTimeOffset endTime = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -153,11 +152,19 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize } if (property.NameEquals("startTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } startTime = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("endTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } endTime = property.Value.GetDateTimeOffset("O"); continue; } 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 9027d0c37322..f86f30e006be 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs @@ -46,12 +46,8 @@ public partial class MachineLearningServicesDatasetDriftDetectedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The start time of the target dataset time series that resulted in drift detection. - /// The end time of the target dataset time series that resulted in drift detection. - internal MachineLearningServicesDatasetDriftDetectedEventData(DateTimeOffset startTime, DateTimeOffset endTime) + internal MachineLearningServicesDatasetDriftDetectedEventData() { - StartTime = startTime; - EndTime = endTime; } /// Initializes a new instance of . @@ -64,7 +60,7 @@ internal MachineLearningServicesDatasetDriftDetectedEventData(DateTimeOffset sta /// The start time of the target dataset time series that resulted in drift detection. /// The end time of the target dataset time series that resulted in drift detection. /// Keeps track of any properties unknown to the library. - internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId, string dataDriftName, string runId, string baseDatasetId, string targetDatasetId, double? driftCoefficient, DateTimeOffset startTime, DateTimeOffset endTime, IDictionary serializedAdditionalRawData) + internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId, string dataDriftName, string runId, string baseDatasetId, string targetDatasetId, double? driftCoefficient, DateTimeOffset? startTime, DateTimeOffset? endTime, IDictionary serializedAdditionalRawData) { DataDriftId = dataDriftId; DataDriftName = dataDriftName; @@ -77,11 +73,6 @@ 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. @@ -95,8 +86,8 @@ internal MachineLearningServicesDatasetDriftDetectedEventData() /// The coefficient result that triggered the event. public double? DriftCoefficient { get; } /// The start time of the target dataset time series that resulted in drift detection. - public DateTimeOffset StartTime { get; } + public DateTimeOffset? StartTime { get; } /// The end time of the target dataset time series that resulted in drift detection. - public DateTimeOffset EndTime { get; } + public DateTimeOffset? EndTime { get; } } } 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 508c46bcc98e..cc79e72fc553 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 @@ -18,15 +18,6 @@ public partial class MachineLearningServicesModelDeployedEventData : IUtf8JsonSe 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelDeployedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -104,6 +96,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MachineLearningServicesModelDeployedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 8c623627b80b..2d07a6bacf04 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 @@ -18,15 +18,6 @@ public partial class MachineLearningServicesModelRegisteredEventData : IUtf8Json 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelRegisteredEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ModelName)) { writer.WritePropertyName("modelName"u8); @@ -99,6 +91,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MachineLearningServicesModelRegisteredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 afd9a764a504..7c80a55e1d3a 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 @@ -18,15 +18,6 @@ public partial class MachineLearningServicesRunCompletedEventData : IUtf8JsonSer 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunCompletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ExperimentId)) { writer.WritePropertyName("experimentId"u8); @@ -109,6 +101,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MachineLearningServicesRunCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 bf9acb0dc685..1b7071ae36c5 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 @@ -18,15 +18,6 @@ public partial class MachineLearningServicesRunStatusChangedEventData : IUtf8Jso 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunStatusChangedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ExperimentId)) { writer.WritePropertyName("experimentId"u8); @@ -114,6 +106,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MachineLearningServicesRunStatusChangedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.Serialization.cs index f7b0985ec757..fbf99a63583f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MapsGeofenceEnteredEventData : IUtf8JsonSerializable, IJson 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") @@ -34,7 +25,55 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MapsGeofenceEnteredEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ExpiredGeofenceGeometryId)) + { + writer.WritePropertyName("expiredGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("geometries"u8); + writer.WriteStartArray(); + foreach (var item in Geometries) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsCollectionDefined(InvalidPeriodGeofenceGeometryId)) + { + writer.WritePropertyName("invalidPeriodGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in InvalidPeriodGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(IsEventPublished)) + { + writer.WritePropertyName("isEventPublished"u8); + writer.WriteBooleanValue(IsEventPublished.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MapsGeofenceEnteredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 635983826079..5ae6c09af432 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 @@ -18,15 +18,6 @@ public partial class MapsGeofenceEventProperties : IUtf8JsonSerializable, IJsonM 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MapsGeofenceEventProperties)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsCollectionDefined(ExpiredGeofenceGeometryId)) { writer.WritePropertyName("expiredGeofenceGeometryId"u8); @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MapsGeofenceEventProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.Serialization.cs index 935bd573b2b1..955d3d51bdcd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MapsGeofenceExitedEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,7 +25,55 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MapsGeofenceExitedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ExpiredGeofenceGeometryId)) + { + writer.WritePropertyName("expiredGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("geometries"u8); + writer.WriteStartArray(); + foreach (var item in Geometries) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsCollectionDefined(InvalidPeriodGeofenceGeometryId)) + { + writer.WritePropertyName("invalidPeriodGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in InvalidPeriodGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(IsEventPublished)) + { + writer.WritePropertyName("isEventPublished"u8); + writer.WriteBooleanValue(IsEventPublished.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MapsGeofenceExitedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceGeometry.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceGeometry.Serialization.cs index b0c581705604..9bd0291d0c56 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceGeometry.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceGeometry.Serialization.cs @@ -18,15 +18,6 @@ public partial class MapsGeofenceGeometry : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MapsGeofenceGeometry)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(DeviceId)) { writer.WritePropertyName("deviceId"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MapsGeofenceGeometry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.Serialization.cs index a17622e006ac..177133ce36e3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MapsGeofenceResultEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,7 +25,55 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MapsGeofenceResultEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ExpiredGeofenceGeometryId)) + { + writer.WritePropertyName("expiredGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("geometries"u8); + writer.WriteStartArray(); + foreach (var item in Geometries) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsCollectionDefined(InvalidPeriodGeofenceGeometryId)) + { + writer.WritePropertyName("invalidPeriodGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in InvalidPeriodGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(IsEventPublished)) + { + writer.WritePropertyName("isEventPublished"u8); + writer.WriteBooleanValue(IsEventPublished.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MapsGeofenceResultEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCanceledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCanceledEventData.Serialization.cs index 1a4b66647616..9831c25118ed 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCanceledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCanceledEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobCanceledEventData : IUtf8JsonSerializable, IJsonMod 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobCanceledEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); foreach (var item in Outputs) @@ -42,6 +33,40 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + writer.WritePropertyName("correlationData"u8); + writer.WriteStartObject(); + foreach (var item in CorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobCanceledEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -65,8 +90,8 @@ internal static MediaJobCanceledEventData DeserializeMediaJobCanceledEventData(J return null; } IReadOnlyList outputs = default; - MediaJobState previousState = default; - MediaJobState state = default; + MediaJobState? previousState = default; + MediaJobState? state = default; IReadOnlyDictionary correlationData = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -84,11 +109,19 @@ internal static MediaJobCanceledEventData DeserializeMediaJobCanceledEventData(J } if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } if (property.NameEquals("state"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } state = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCanceledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCanceledEventData.cs index 953505804d20..bc8a9b88cb4f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCanceledEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCanceledEventData.cs @@ -18,8 +18,6 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobCanceledEventData : MediaJobStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. - /// The new state of the Job. /// Gets the Job correlation data. /// /// Gets the Job outputs. @@ -27,7 +25,7 @@ public partial class MediaJobCanceledEventData : MediaJobStateChangeEventData /// The available derived classes include . /// /// or is null. - internal MediaJobCanceledEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData, IEnumerable outputs) : base(previousState, state, correlationData) + internal MediaJobCanceledEventData(IReadOnlyDictionary correlationData, IEnumerable outputs) : base(correlationData) { Argument.AssertNotNull(correlationData, nameof(correlationData)); Argument.AssertNotNull(outputs, nameof(outputs)); @@ -45,7 +43,7 @@ internal MediaJobCanceledEventData(MediaJobState previousState, MediaJobState st /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include . /// - internal MediaJobCanceledEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData, IReadOnlyList outputs) : base(previousState, state, correlationData, serializedAdditionalRawData) + internal MediaJobCanceledEventData(MediaJobState? previousState, MediaJobState? state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData, IReadOnlyList outputs) : base(previousState, state, correlationData, serializedAdditionalRawData) { Outputs = outputs; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCancelingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCancelingEventData.Serialization.cs index 45fd962e0fcd..ce8ee035df9b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCancelingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCancelingEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobCancelingEventData : IUtf8JsonSerializable, IJsonMo 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") @@ -34,7 +25,41 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobCancelingEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + writer.WritePropertyName("correlationData"u8); + writer.WriteStartObject(); + foreach (var item in CorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobCancelingEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -57,8 +82,8 @@ internal static MediaJobCancelingEventData DeserializeMediaJobCancelingEventData { return null; } - MediaJobState previousState = default; - MediaJobState state = default; + MediaJobState? previousState = default; + MediaJobState? state = default; IReadOnlyDictionary correlationData = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -66,11 +91,19 @@ internal static MediaJobCancelingEventData DeserializeMediaJobCancelingEventData { if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } if (property.NameEquals("state"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } state = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCancelingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCancelingEventData.cs index c1493f0f200e..252afc4da760 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCancelingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobCancelingEventData.cs @@ -17,11 +17,9 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobCancelingEventData : MediaJobStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. - /// The new state of the Job. /// Gets the Job correlation data. /// is null. - internal MediaJobCancelingEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData) : base(previousState, state, correlationData) + internal MediaJobCancelingEventData(IReadOnlyDictionary correlationData) : base(correlationData) { Argument.AssertNotNull(correlationData, nameof(correlationData)); } @@ -31,7 +29,7 @@ internal MediaJobCancelingEventData(MediaJobState previousState, MediaJobState s /// The new state of the Job. /// Gets the Job correlation data. /// Keeps track of any properties unknown to the library. - internal MediaJobCancelingEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData) : base(previousState, state, correlationData, serializedAdditionalRawData) + internal MediaJobCancelingEventData(MediaJobState? previousState, MediaJobState? state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData) : base(previousState, state, correlationData, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobError.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobError.Serialization.cs index c3fae6ec7856..bf8f0bec583a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobError.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobError.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobError : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,17 +25,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaJobError)} does not support writing '{format}' format."); } - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToString()); + writer.WriteStartObject(); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.Value.ToString()); + } if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); } - writer.WritePropertyName("category"u8); - writer.WriteStringValue(Category.ToString()); - writer.WritePropertyName("retry"u8); - writer.WriteStringValue(Retry.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Retry)) + { + writer.WritePropertyName("retry"u8); + writer.WriteStringValue(Retry.Value.ToString()); + } writer.WritePropertyName("details"u8); writer.WriteStartArray(); foreach (var item in Details) @@ -67,6 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaJobError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -89,10 +91,10 @@ internal static MediaJobError DeserializeMediaJobError(JsonElement element, Mode { return null; } - MediaJobErrorCode code = default; + MediaJobErrorCode? code = default; string message = default; - MediaJobErrorCategory category = default; - MediaJobRetry retry = default; + MediaJobErrorCategory? category = default; + MediaJobRetry? retry = default; IReadOnlyList details = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -100,6 +102,10 @@ internal static MediaJobError DeserializeMediaJobError(JsonElement element, Mode { if (property.NameEquals("code"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } code = new MediaJobErrorCode(property.Value.GetString()); continue; } @@ -110,11 +116,19 @@ internal static MediaJobError DeserializeMediaJobError(JsonElement element, Mode } if (property.NameEquals("category"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } category = new MediaJobErrorCategory(property.Value.GetString()); continue; } if (property.NameEquals("retry"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } retry = new MediaJobRetry(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobError.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobError.cs index 751ed7d395fe..a3d57837407f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobError.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobError.cs @@ -47,18 +47,12 @@ public partial class MediaJobError private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Error code describing the error. - /// Helps with categorization of errors. - /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. /// An array of details about specific errors that led to this reported error. /// is null. - internal MediaJobError(MediaJobErrorCode code, MediaJobErrorCategory category, MediaJobRetry retry, IEnumerable details) + internal MediaJobError(IEnumerable details) { Argument.AssertNotNull(details, nameof(details)); - Code = code; - Category = category; - Retry = retry; Details = details.ToList(); } @@ -69,7 +63,7 @@ internal MediaJobError(MediaJobErrorCode code, MediaJobErrorCategory category, M /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. /// An array of details about specific errors that led to this reported error. /// Keeps track of any properties unknown to the library. - internal MediaJobError(MediaJobErrorCode code, string message, MediaJobErrorCategory category, MediaJobRetry retry, IReadOnlyList details, IDictionary serializedAdditionalRawData) + internal MediaJobError(MediaJobErrorCode? code, string message, MediaJobErrorCategory? category, MediaJobRetry? retry, IReadOnlyList details, IDictionary serializedAdditionalRawData) { Code = code; Message = message; @@ -85,13 +79,13 @@ internal MediaJobError() } /// Error code describing the error. - public MediaJobErrorCode Code { get; } + public MediaJobErrorCode? Code { get; } /// A human-readable language-dependent representation of the error. public string Message { get; } /// Helps with categorization of errors. - public MediaJobErrorCategory Category { get; } + public MediaJobErrorCategory? Category { get; } /// Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. - public MediaJobRetry Retry { get; } + public MediaJobRetry? Retry { get; } /// An array of details about specific errors that led to this reported error. public IReadOnlyList Details { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErrorDetail.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErrorDetail.Serialization.cs index 61ea5a6e9dfd..68e215dc75e2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErrorDetail.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErrorDetail.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobErrorDetail : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaJobErrorDetail)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaJobErrorDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErroredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErroredEventData.Serialization.cs index 2453e6462a1e..f42f7d1768f5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErroredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErroredEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobErroredEventData : IUtf8JsonSerializable, IJsonMode 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobErroredEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); foreach (var item in Outputs) @@ -42,6 +33,40 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + writer.WritePropertyName("correlationData"u8); + writer.WriteStartObject(); + foreach (var item in CorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobErroredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -65,8 +90,8 @@ internal static MediaJobErroredEventData DeserializeMediaJobErroredEventData(Jso return null; } IReadOnlyList outputs = default; - MediaJobState previousState = default; - MediaJobState state = default; + MediaJobState? previousState = default; + MediaJobState? state = default; IReadOnlyDictionary correlationData = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -84,11 +109,19 @@ internal static MediaJobErroredEventData DeserializeMediaJobErroredEventData(Jso } if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } if (property.NameEquals("state"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } state = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErroredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErroredEventData.cs index 0c76f70e4bc5..339ba9bdc11c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErroredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobErroredEventData.cs @@ -18,8 +18,6 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobErroredEventData : MediaJobStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. - /// The new state of the Job. /// Gets the Job correlation data. /// /// Gets the Job outputs. @@ -27,7 +25,7 @@ public partial class MediaJobErroredEventData : MediaJobStateChangeEventData /// The available derived classes include . /// /// or is null. - internal MediaJobErroredEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData, IEnumerable outputs) : base(previousState, state, correlationData) + internal MediaJobErroredEventData(IReadOnlyDictionary correlationData, IEnumerable outputs) : base(correlationData) { Argument.AssertNotNull(correlationData, nameof(correlationData)); Argument.AssertNotNull(outputs, nameof(outputs)); @@ -45,7 +43,7 @@ internal MediaJobErroredEventData(MediaJobState previousState, MediaJobState sta /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include . /// - internal MediaJobErroredEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData, IReadOnlyList outputs) : base(previousState, state, correlationData, serializedAdditionalRawData) + internal MediaJobErroredEventData(MediaJobState? previousState, MediaJobState? state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData, IReadOnlyList outputs) : base(previousState, state, correlationData, serializedAdditionalRawData) { Outputs = outputs; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobFinishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobFinishedEventData.Serialization.cs index 5c0168553591..fb0b8bb594e3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobFinishedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobFinishedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobFinishedEventData : IUtf8JsonSerializable, IJsonMod 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobFinishedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("outputs"u8); writer.WriteStartArray(); foreach (var item in Outputs) @@ -42,6 +33,40 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + writer.WritePropertyName("correlationData"u8); + writer.WriteStartObject(); + foreach (var item in CorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobFinishedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -65,8 +90,8 @@ internal static MediaJobFinishedEventData DeserializeMediaJobFinishedEventData(J return null; } IReadOnlyList outputs = default; - MediaJobState previousState = default; - MediaJobState state = default; + MediaJobState? previousState = default; + MediaJobState? state = default; IReadOnlyDictionary correlationData = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -84,11 +109,19 @@ internal static MediaJobFinishedEventData DeserializeMediaJobFinishedEventData(J } if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } if (property.NameEquals("state"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } state = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobFinishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobFinishedEventData.cs index 64a495eac9b8..595827f33d08 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobFinishedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobFinishedEventData.cs @@ -18,8 +18,6 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobFinishedEventData : MediaJobStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. - /// The new state of the Job. /// Gets the Job correlation data. /// /// Gets the Job outputs. @@ -27,7 +25,7 @@ public partial class MediaJobFinishedEventData : MediaJobStateChangeEventData /// The available derived classes include . /// /// or is null. - internal MediaJobFinishedEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData, IEnumerable outputs) : base(previousState, state, correlationData) + internal MediaJobFinishedEventData(IReadOnlyDictionary correlationData, IEnumerable outputs) : base(correlationData) { Argument.AssertNotNull(correlationData, nameof(correlationData)); Argument.AssertNotNull(outputs, nameof(outputs)); @@ -45,7 +43,7 @@ internal MediaJobFinishedEventData(MediaJobState previousState, MediaJobState st /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include . /// - internal MediaJobFinishedEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData, IReadOnlyList outputs) : base(previousState, state, correlationData, serializedAdditionalRawData) + internal MediaJobFinishedEventData(MediaJobState? previousState, MediaJobState? state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData, IReadOnlyList outputs) : base(previousState, state, correlationData, serializedAdditionalRawData) { Outputs = outputs; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutput.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutput.Serialization.cs index 0e23a14437ba..2d3d4b7a0f23 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutput.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutput.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobOutput : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaJobOutput)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("@odata.type"u8); writer.WriteStringValue(OdataType); writer.WritePropertyName("error"u8); @@ -45,8 +37,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("progress"u8); writer.WriteNumberValue(Progress); - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.ToString()); + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -62,6 +57,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaJobOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutput.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutput.cs index 2a5881ab7ec5..4a124d196d51 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutput.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutput.cs @@ -52,15 +52,13 @@ public abstract partial class MediaJobOutput /// Initializes a new instance of . /// Gets the Job output error. /// Gets the Job output progress. - /// Gets the Job output state. /// is null. - protected MediaJobOutput(MediaJobError error, long progress, MediaJobState state) + protected MediaJobOutput(MediaJobError error, long progress) { Argument.AssertNotNull(error, nameof(error)); Error = error; Progress = progress; - State = state; } /// Initializes a new instance of . @@ -70,7 +68,7 @@ protected MediaJobOutput(MediaJobError error, long progress, MediaJobState state /// Gets the Job output progress. /// Gets the Job output state. /// Keeps track of any properties unknown to the library. - internal MediaJobOutput(string odataType, MediaJobError error, string label, long progress, MediaJobState state, IDictionary serializedAdditionalRawData) + internal MediaJobOutput(string odataType, MediaJobError error, string label, long progress, MediaJobState? state, IDictionary serializedAdditionalRawData) { OdataType = odataType; Error = error; @@ -94,6 +92,6 @@ internal MediaJobOutput() /// Gets the Job output progress. public long Progress { get; } /// Gets the Job output state. - public MediaJobState State { get; } + public MediaJobState? State { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputAsset.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputAsset.Serialization.cs index b9d1022e7fc9..56e3df8b8e16 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputAsset.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputAsset.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobOutputAsset : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,12 +25,44 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobOutputAsset)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(AssetName)) { writer.WritePropertyName("assetName"u8); writer.WriteStringValue(AssetName); } + writer.WritePropertyName("@odata.type"u8); + writer.WriteStringValue(OdataType); + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + if (Optional.IsDefined(Label)) + { + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + } + writer.WritePropertyName("progress"u8); + writer.WriteNumberValue(Progress); + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobOutputAsset IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -67,7 +90,7 @@ internal static MediaJobOutputAsset DeserializeMediaJobOutputAsset(JsonElement e MediaJobError error = default; string label = default; long progress = default; - MediaJobState state = default; + MediaJobState? state = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -99,6 +122,10 @@ internal static MediaJobOutputAsset DeserializeMediaJobOutputAsset(JsonElement e } if (property.NameEquals("state"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } state = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputAsset.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputAsset.cs index b43e0081261b..52ebea802ff5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputAsset.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputAsset.cs @@ -16,9 +16,8 @@ public partial class MediaJobOutputAsset : MediaJobOutput /// Initializes a new instance of . /// Gets the Job output error. /// Gets the Job output progress. - /// Gets the Job output state. /// is null. - internal MediaJobOutputAsset(MediaJobError error, long progress, MediaJobState state) : base(error, progress, state) + internal MediaJobOutputAsset(MediaJobError error, long progress) : base(error, progress) { Argument.AssertNotNull(error, nameof(error)); @@ -33,7 +32,7 @@ internal MediaJobOutputAsset(MediaJobError error, long progress, MediaJobState s /// Gets the Job output state. /// Keeps track of any properties unknown to the library. /// Gets the Job output asset name. - internal MediaJobOutputAsset(string odataType, MediaJobError error, string label, long progress, MediaJobState state, IDictionary serializedAdditionalRawData, string assetName) : base(odataType, error, label, progress, state, serializedAdditionalRawData) + internal MediaJobOutputAsset(string odataType, MediaJobError error, string label, long progress, MediaJobState? state, IDictionary serializedAdditionalRawData, string assetName) : base(odataType, error, label, progress, state, serializedAdditionalRawData) { AssetName = assetName; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCanceledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCanceledEventData.Serialization.cs index 0ac5b829f1dc..9e852ee5bd3f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCanceledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCanceledEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobOutputCanceledEventData : IUtf8JsonSerializable, IJ 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") @@ -34,7 +25,38 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobOutputCanceledEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + writer.WritePropertyName("output"u8); + writer.WriteObjectValue(Output, options); + writer.WritePropertyName("jobCorrelationData"u8); + writer.WriteStartObject(); + foreach (var item in JobCorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobOutputCanceledEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -57,7 +79,7 @@ internal static MediaJobOutputCanceledEventData DeserializeMediaJobOutputCancele { return null; } - MediaJobState previousState = default; + MediaJobState? previousState = default; MediaJobOutput output = default; IReadOnlyDictionary jobCorrelationData = default; IDictionary serializedAdditionalRawData = default; @@ -66,6 +88,10 @@ internal static MediaJobOutputCanceledEventData DeserializeMediaJobOutputCancele { if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCanceledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCanceledEventData.cs index 55ec62b58492..9557aebd3544 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCanceledEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCanceledEventData.cs @@ -17,7 +17,6 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobOutputCanceledEventData : MediaJobOutputStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. /// /// Gets the output. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -25,7 +24,7 @@ public partial class MediaJobOutputCanceledEventData : MediaJobOutputStateChange /// /// Gets the Job correlation data. /// or is null. - internal MediaJobOutputCanceledEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(previousState, output, jobCorrelationData) + internal MediaJobOutputCanceledEventData(MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(output, jobCorrelationData) { Argument.AssertNotNull(output, nameof(output)); Argument.AssertNotNull(jobCorrelationData, nameof(jobCorrelationData)); @@ -40,7 +39,7 @@ internal MediaJobOutputCanceledEventData(MediaJobState previousState, MediaJobOu /// /// Gets the Job correlation data. /// Keeps track of any properties unknown to the library. - internal MediaJobOutputCanceledEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) + internal MediaJobOutputCanceledEventData(MediaJobState? previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCancelingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCancelingEventData.Serialization.cs index e1447404365e..9fbe333d3000 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCancelingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCancelingEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobOutputCancelingEventData : IUtf8JsonSerializable, I 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") @@ -34,7 +25,38 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobOutputCancelingEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + writer.WritePropertyName("output"u8); + writer.WriteObjectValue(Output, options); + writer.WritePropertyName("jobCorrelationData"u8); + writer.WriteStartObject(); + foreach (var item in JobCorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobOutputCancelingEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -57,7 +79,7 @@ internal static MediaJobOutputCancelingEventData DeserializeMediaJobOutputCancel { return null; } - MediaJobState previousState = default; + MediaJobState? previousState = default; MediaJobOutput output = default; IReadOnlyDictionary jobCorrelationData = default; IDictionary serializedAdditionalRawData = default; @@ -66,6 +88,10 @@ internal static MediaJobOutputCancelingEventData DeserializeMediaJobOutputCancel { if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCancelingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCancelingEventData.cs index 30e7d163aaa6..b8d656cd4e98 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCancelingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputCancelingEventData.cs @@ -17,7 +17,6 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobOutputCancelingEventData : MediaJobOutputStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. /// /// Gets the output. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -25,7 +24,7 @@ public partial class MediaJobOutputCancelingEventData : MediaJobOutputStateChang /// /// Gets the Job correlation data. /// or is null. - internal MediaJobOutputCancelingEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(previousState, output, jobCorrelationData) + internal MediaJobOutputCancelingEventData(MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(output, jobCorrelationData) { Argument.AssertNotNull(output, nameof(output)); Argument.AssertNotNull(jobCorrelationData, nameof(jobCorrelationData)); @@ -40,7 +39,7 @@ internal MediaJobOutputCancelingEventData(MediaJobState previousState, MediaJobO /// /// Gets the Job correlation data. /// Keeps track of any properties unknown to the library. - internal MediaJobOutputCancelingEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) + internal MediaJobOutputCancelingEventData(MediaJobState? previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputErroredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputErroredEventData.Serialization.cs index ee7d8c142784..f29c1646a4b7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputErroredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputErroredEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobOutputErroredEventData : IUtf8JsonSerializable, IJs 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") @@ -34,7 +25,38 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobOutputErroredEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + writer.WritePropertyName("output"u8); + writer.WriteObjectValue(Output, options); + writer.WritePropertyName("jobCorrelationData"u8); + writer.WriteStartObject(); + foreach (var item in JobCorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobOutputErroredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -57,7 +79,7 @@ internal static MediaJobOutputErroredEventData DeserializeMediaJobOutputErroredE { return null; } - MediaJobState previousState = default; + MediaJobState? previousState = default; MediaJobOutput output = default; IReadOnlyDictionary jobCorrelationData = default; IDictionary serializedAdditionalRawData = default; @@ -66,6 +88,10 @@ internal static MediaJobOutputErroredEventData DeserializeMediaJobOutputErroredE { if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputErroredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputErroredEventData.cs index 22535aa75e81..9bd7bb2d0602 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputErroredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputErroredEventData.cs @@ -17,7 +17,6 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobOutputErroredEventData : MediaJobOutputStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. /// /// Gets the output. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -25,7 +24,7 @@ public partial class MediaJobOutputErroredEventData : MediaJobOutputStateChangeE /// /// Gets the Job correlation data. /// or is null. - internal MediaJobOutputErroredEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(previousState, output, jobCorrelationData) + internal MediaJobOutputErroredEventData(MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(output, jobCorrelationData) { Argument.AssertNotNull(output, nameof(output)); Argument.AssertNotNull(jobCorrelationData, nameof(jobCorrelationData)); @@ -40,7 +39,7 @@ internal MediaJobOutputErroredEventData(MediaJobState previousState, MediaJobOut /// /// Gets the Job correlation data. /// Keeps track of any properties unknown to the library. - internal MediaJobOutputErroredEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) + internal MediaJobOutputErroredEventData(MediaJobState? previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputFinishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputFinishedEventData.Serialization.cs index 129a88fa4d80..716c50d82ef1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputFinishedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputFinishedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobOutputFinishedEventData : IUtf8JsonSerializable, IJ 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") @@ -34,7 +25,38 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobOutputFinishedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + writer.WritePropertyName("output"u8); + writer.WriteObjectValue(Output, options); + writer.WritePropertyName("jobCorrelationData"u8); + writer.WriteStartObject(); + foreach (var item in JobCorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobOutputFinishedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -57,7 +79,7 @@ internal static MediaJobOutputFinishedEventData DeserializeMediaJobOutputFinishe { return null; } - MediaJobState previousState = default; + MediaJobState? previousState = default; MediaJobOutput output = default; IReadOnlyDictionary jobCorrelationData = default; IDictionary serializedAdditionalRawData = default; @@ -66,6 +88,10 @@ internal static MediaJobOutputFinishedEventData DeserializeMediaJobOutputFinishe { if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputFinishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputFinishedEventData.cs index 701290e6f1cf..7d33358fcf91 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputFinishedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputFinishedEventData.cs @@ -17,7 +17,6 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobOutputFinishedEventData : MediaJobOutputStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. /// /// Gets the output. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -25,7 +24,7 @@ public partial class MediaJobOutputFinishedEventData : MediaJobOutputStateChange /// /// Gets the Job correlation data. /// or is null. - internal MediaJobOutputFinishedEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(previousState, output, jobCorrelationData) + internal MediaJobOutputFinishedEventData(MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(output, jobCorrelationData) { Argument.AssertNotNull(output, nameof(output)); Argument.AssertNotNull(jobCorrelationData, nameof(jobCorrelationData)); @@ -40,7 +39,7 @@ internal MediaJobOutputFinishedEventData(MediaJobState previousState, MediaJobOu /// /// Gets the Job correlation data. /// Keeps track of any properties unknown to the library. - internal MediaJobOutputFinishedEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) + internal MediaJobOutputFinishedEventData(MediaJobState? previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProcessingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProcessingEventData.Serialization.cs index c07318cc5eab..faf6cd2745db 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProcessingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProcessingEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobOutputProcessingEventData : IUtf8JsonSerializable, 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") @@ -34,7 +25,38 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobOutputProcessingEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + writer.WritePropertyName("output"u8); + writer.WriteObjectValue(Output, options); + writer.WritePropertyName("jobCorrelationData"u8); + writer.WriteStartObject(); + foreach (var item in JobCorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobOutputProcessingEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -57,7 +79,7 @@ internal static MediaJobOutputProcessingEventData DeserializeMediaJobOutputProce { return null; } - MediaJobState previousState = default; + MediaJobState? previousState = default; MediaJobOutput output = default; IReadOnlyDictionary jobCorrelationData = default; IDictionary serializedAdditionalRawData = default; @@ -66,6 +88,10 @@ internal static MediaJobOutputProcessingEventData DeserializeMediaJobOutputProce { if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProcessingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProcessingEventData.cs index 1d4c4de32283..2c0589312b25 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProcessingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProcessingEventData.cs @@ -17,7 +17,6 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobOutputProcessingEventData : MediaJobOutputStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. /// /// Gets the output. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -25,7 +24,7 @@ public partial class MediaJobOutputProcessingEventData : MediaJobOutputStateChan /// /// Gets the Job correlation data. /// or is null. - internal MediaJobOutputProcessingEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(previousState, output, jobCorrelationData) + internal MediaJobOutputProcessingEventData(MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(output, jobCorrelationData) { Argument.AssertNotNull(output, nameof(output)); Argument.AssertNotNull(jobCorrelationData, nameof(jobCorrelationData)); @@ -40,7 +39,7 @@ internal MediaJobOutputProcessingEventData(MediaJobState previousState, MediaJob /// /// Gets the Job correlation data. /// Keeps track of any properties unknown to the library. - internal MediaJobOutputProcessingEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) + internal MediaJobOutputProcessingEventData(MediaJobState? previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProgressEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProgressEventData.Serialization.cs index dce247a47310..0be6dcaabd8c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProgressEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputProgressEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobOutputProgressEventData : IUtf8JsonSerializable, IJ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaJobOutputProgressEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Label)) { writer.WritePropertyName("label"u8); @@ -67,6 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaJobOutputProgressEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputScheduledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputScheduledEventData.Serialization.cs index 46d2415e5d34..53ff7003c3dd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputScheduledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputScheduledEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobOutputScheduledEventData : IUtf8JsonSerializable, I 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") @@ -34,7 +25,38 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobOutputScheduledEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + writer.WritePropertyName("output"u8); + writer.WriteObjectValue(Output, options); + writer.WritePropertyName("jobCorrelationData"u8); + writer.WriteStartObject(); + foreach (var item in JobCorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobOutputScheduledEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -57,7 +79,7 @@ internal static MediaJobOutputScheduledEventData DeserializeMediaJobOutputSchedu { return null; } - MediaJobState previousState = default; + MediaJobState? previousState = default; MediaJobOutput output = default; IReadOnlyDictionary jobCorrelationData = default; IDictionary serializedAdditionalRawData = default; @@ -66,6 +88,10 @@ internal static MediaJobOutputScheduledEventData DeserializeMediaJobOutputSchedu { if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputScheduledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputScheduledEventData.cs index a11011667492..ec55af9cc5bc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputScheduledEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputScheduledEventData.cs @@ -17,7 +17,6 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobOutputScheduledEventData : MediaJobOutputStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. /// /// Gets the output. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -25,7 +24,7 @@ public partial class MediaJobOutputScheduledEventData : MediaJobOutputStateChang /// /// Gets the Job correlation data. /// or is null. - internal MediaJobOutputScheduledEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(previousState, output, jobCorrelationData) + internal MediaJobOutputScheduledEventData(MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) : base(output, jobCorrelationData) { Argument.AssertNotNull(output, nameof(output)); Argument.AssertNotNull(jobCorrelationData, nameof(jobCorrelationData)); @@ -40,7 +39,7 @@ internal MediaJobOutputScheduledEventData(MediaJobState previousState, MediaJobO /// /// Gets the Job correlation data. /// Keeps track of any properties unknown to the library. - internal MediaJobOutputScheduledEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) + internal MediaJobOutputScheduledEventData(MediaJobState? previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) : base(previousState, output, jobCorrelationData, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputStateChangeEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputStateChangeEventData.Serialization.cs index 7cf2827360e4..c9fdcf43a067 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputStateChangeEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputStateChangeEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobOutputStateChangeEventData : IUtf8JsonSerializable, 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaJobOutputStateChangeEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("previousState"u8); - writer.WriteStringValue(PreviousState.ToString()); + writer.WriteStartObject(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } writer.WritePropertyName("output"u8); writer.WriteObjectValue(Output, options); writer.WritePropertyName("jobCorrelationData"u8); @@ -61,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaJobOutputStateChangeEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -83,7 +79,7 @@ internal static MediaJobOutputStateChangeEventData DeserializeMediaJobOutputStat { return null; } - MediaJobState previousState = default; + MediaJobState? previousState = default; MediaJobOutput output = default; IReadOnlyDictionary jobCorrelationData = default; IDictionary serializedAdditionalRawData = default; @@ -92,6 +88,10 @@ internal static MediaJobOutputStateChangeEventData DeserializeMediaJobOutputStat { if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputStateChangeEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputStateChangeEventData.cs index d647fa5feff2..76c801b2ce24 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputStateChangeEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobOutputStateChangeEventData.cs @@ -49,7 +49,6 @@ public partial class MediaJobOutputStateChangeEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The previous state of the Job. /// /// Gets the output. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -57,12 +56,11 @@ public partial class MediaJobOutputStateChangeEventData /// /// Gets the Job correlation data. /// or is null. - internal MediaJobOutputStateChangeEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) + internal MediaJobOutputStateChangeEventData(MediaJobOutput output, IReadOnlyDictionary jobCorrelationData) { Argument.AssertNotNull(output, nameof(output)); Argument.AssertNotNull(jobCorrelationData, nameof(jobCorrelationData)); - PreviousState = previousState; Output = output; JobCorrelationData = jobCorrelationData; } @@ -76,7 +74,7 @@ internal MediaJobOutputStateChangeEventData(MediaJobState previousState, MediaJo /// /// Gets the Job correlation data. /// Keeps track of any properties unknown to the library. - internal MediaJobOutputStateChangeEventData(MediaJobState previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) + internal MediaJobOutputStateChangeEventData(MediaJobState? previousState, MediaJobOutput output, IReadOnlyDictionary jobCorrelationData, IDictionary serializedAdditionalRawData) { PreviousState = previousState; Output = output; @@ -90,7 +88,7 @@ internal MediaJobOutputStateChangeEventData() } /// The previous state of the Job. - public MediaJobState PreviousState { get; } + public MediaJobState? PreviousState { get; } /// /// Gets the output. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobProcessingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobProcessingEventData.Serialization.cs index 093588eafc6b..8761f70ddbe0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobProcessingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobProcessingEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobProcessingEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,7 +25,41 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobProcessingEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + writer.WritePropertyName("correlationData"u8); + writer.WriteStartObject(); + foreach (var item in CorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobProcessingEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -57,8 +82,8 @@ internal static MediaJobProcessingEventData DeserializeMediaJobProcessingEventDa { return null; } - MediaJobState previousState = default; - MediaJobState state = default; + MediaJobState? previousState = default; + MediaJobState? state = default; IReadOnlyDictionary correlationData = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -66,11 +91,19 @@ internal static MediaJobProcessingEventData DeserializeMediaJobProcessingEventDa { if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } if (property.NameEquals("state"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } state = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobProcessingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobProcessingEventData.cs index 1298b135d442..b2dc61de7f29 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobProcessingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobProcessingEventData.cs @@ -17,11 +17,9 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobProcessingEventData : MediaJobStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. - /// The new state of the Job. /// Gets the Job correlation data. /// is null. - internal MediaJobProcessingEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData) : base(previousState, state, correlationData) + internal MediaJobProcessingEventData(IReadOnlyDictionary correlationData) : base(correlationData) { Argument.AssertNotNull(correlationData, nameof(correlationData)); } @@ -31,7 +29,7 @@ internal MediaJobProcessingEventData(MediaJobState previousState, MediaJobState /// The new state of the Job. /// Gets the Job correlation data. /// Keeps track of any properties unknown to the library. - internal MediaJobProcessingEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData) : base(previousState, state, correlationData, serializedAdditionalRawData) + internal MediaJobProcessingEventData(MediaJobState? previousState, MediaJobState? state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData) : base(previousState, state, correlationData, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobScheduledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobScheduledEventData.Serialization.cs index 3f381fba4854..cb77a5dda9f7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobScheduledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobScheduledEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobScheduledEventData : IUtf8JsonSerializable, IJsonMo 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") @@ -34,7 +25,41 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobScheduledEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + writer.WritePropertyName("correlationData"u8); + writer.WriteStartObject(); + foreach (var item in CorrelationData) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobScheduledEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -57,8 +82,8 @@ internal static MediaJobScheduledEventData DeserializeMediaJobScheduledEventData { return null; } - MediaJobState previousState = default; - MediaJobState state = default; + MediaJobState? previousState = default; + MediaJobState? state = default; IReadOnlyDictionary correlationData = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -66,11 +91,19 @@ internal static MediaJobScheduledEventData DeserializeMediaJobScheduledEventData { if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } if (property.NameEquals("state"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } state = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobScheduledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobScheduledEventData.cs index f7f96abda48f..2df6fd8637c0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobScheduledEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobScheduledEventData.cs @@ -17,11 +17,9 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MediaJobScheduledEventData : MediaJobStateChangeEventData { /// Initializes a new instance of . - /// The previous state of the Job. - /// The new state of the Job. /// Gets the Job correlation data. /// is null. - internal MediaJobScheduledEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData) : base(previousState, state, correlationData) + internal MediaJobScheduledEventData(IReadOnlyDictionary correlationData) : base(correlationData) { Argument.AssertNotNull(correlationData, nameof(correlationData)); } @@ -31,7 +29,7 @@ internal MediaJobScheduledEventData(MediaJobState previousState, MediaJobState s /// The new state of the Job. /// Gets the Job correlation data. /// Keeps track of any properties unknown to the library. - internal MediaJobScheduledEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData) : base(previousState, state, correlationData, serializedAdditionalRawData) + internal MediaJobScheduledEventData(MediaJobState? previousState, MediaJobState? state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData) : base(previousState, state, correlationData, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobStateChangeEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobStateChangeEventData.Serialization.cs index 65b844ceb28b..469d93d70d6e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobStateChangeEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobStateChangeEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaJobStateChangeEventData : IUtf8JsonSerializable, IJson 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") @@ -34,10 +25,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaJobStateChangeEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("previousState"u8); - writer.WriteStringValue(PreviousState.ToString()); - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.ToString()); + writer.WriteStartObject(); + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } writer.WritePropertyName("correlationData"u8); writer.WriteStartObject(); foreach (var item in CorrelationData) @@ -61,6 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaJobStateChangeEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -83,8 +82,8 @@ internal static MediaJobStateChangeEventData DeserializeMediaJobStateChangeEvent { return null; } - MediaJobState previousState = default; - MediaJobState state = default; + MediaJobState? previousState = default; + MediaJobState? state = default; IReadOnlyDictionary correlationData = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -92,11 +91,19 @@ internal static MediaJobStateChangeEventData DeserializeMediaJobStateChangeEvent { if (property.NameEquals("previousState"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } previousState = new MediaJobState(property.Value.GetString()); continue; } if (property.NameEquals("state"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } state = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobStateChangeEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobStateChangeEventData.cs index ce4898df35b8..33b7707cfa81 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobStateChangeEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaJobStateChangeEventData.cs @@ -49,16 +49,12 @@ public partial class MediaJobStateChangeEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The previous state of the Job. - /// The new state of the Job. /// Gets the Job correlation data. /// is null. - internal MediaJobStateChangeEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData) + internal MediaJobStateChangeEventData(IReadOnlyDictionary correlationData) { Argument.AssertNotNull(correlationData, nameof(correlationData)); - PreviousState = previousState; - State = state; CorrelationData = correlationData; } @@ -67,7 +63,7 @@ internal MediaJobStateChangeEventData(MediaJobState previousState, MediaJobState /// The new state of the Job. /// Gets the Job correlation data. /// Keeps track of any properties unknown to the library. - internal MediaJobStateChangeEventData(MediaJobState previousState, MediaJobState state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData) + internal MediaJobStateChangeEventData(MediaJobState? previousState, MediaJobState? state, IReadOnlyDictionary correlationData, IDictionary serializedAdditionalRawData) { PreviousState = previousState; State = state; @@ -81,9 +77,9 @@ internal MediaJobStateChangeEventData() } /// The previous state of the Job. - public MediaJobState PreviousState { get; } + public MediaJobState? PreviousState { get; } /// The new state of the Job. - public MediaJobState State { get; } + public MediaJobState? State { get; } /// Gets the Job correlation data. public IReadOnlyDictionary CorrelationData { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventChannelArchiveHeartbeatEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventChannelArchiveHeartbeatEventData.Serialization.cs index 8e6b9507b93a..f55cf3eda55a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventChannelArchiveHeartbeatEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventChannelArchiveHeartbeatEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaLiveEventChannelArchiveHeartbeatEventData : IUtf8JsonS 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaLiveEventChannelArchiveHeartbeatEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("channelLatencyMs"u8); writer.WriteStringValue(ChannelLatencyMs); writer.WritePropertyName("latencyResultCode"u8); @@ -53,6 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaLiveEventChannelArchiveHeartbeatEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventConnectionRejectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventConnectionRejectedEventData.Serialization.cs index 4fb52f66dce3..600598d645d6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventConnectionRejectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventConnectionRejectedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaLiveEventConnectionRejectedEventData : IUtf8JsonSerial 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaLiveEventConnectionRejectedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(IngestUrl)) { writer.WritePropertyName("ingestUrl"u8); @@ -74,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaLiveEventConnectionRejectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventEncoderConnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventEncoderConnectedEventData.Serialization.cs index 8caba084c648..44f1b8cd0835 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventEncoderConnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventEncoderConnectedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaLiveEventEncoderConnectedEventData : IUtf8JsonSerializ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaLiveEventEncoderConnectedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(IngestUrl)) { writer.WritePropertyName("ingestUrl"u8); @@ -69,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaLiveEventEncoderConnectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventEncoderDisconnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventEncoderDisconnectedEventData.Serialization.cs index a568208756a4..53875ba940c6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventEncoderDisconnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventEncoderDisconnectedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaLiveEventEncoderDisconnectedEventData : IUtf8JsonSeria 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaLiveEventEncoderDisconnectedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(IngestUrl)) { writer.WritePropertyName("ingestUrl"u8); @@ -74,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaLiveEventEncoderDisconnectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingDataChunkDroppedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingDataChunkDroppedEventData.Serialization.cs index 25bb532b0546..d55780ab672b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingDataChunkDroppedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingDataChunkDroppedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaLiveEventIncomingDataChunkDroppedEventData : IUtf8Json 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaLiveEventIncomingDataChunkDroppedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Timestamp)) { writer.WritePropertyName("timestamp"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaLiveEventIncomingDataChunkDroppedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingStreamReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingStreamReceivedEventData.Serialization.cs index be42947c0456..a848276f1a13 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingStreamReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingStreamReceivedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaLiveEventIncomingStreamReceivedEventData : IUtf8JsonSe 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaLiveEventIncomingStreamReceivedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(IngestUrl)) { writer.WritePropertyName("ingestUrl"u8); @@ -94,6 +86,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaLiveEventIncomingStreamReceivedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingStreamsOutOfSyncEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingStreamsOutOfSyncEventData.Serialization.cs index dc5a7de96c8d..8e3da57b53d6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingStreamsOutOfSyncEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingStreamsOutOfSyncEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaLiveEventIncomingStreamsOutOfSyncEventData : IUtf8Json 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaLiveEventIncomingStreamsOutOfSyncEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(MinLastTimestamp)) { writer.WritePropertyName("minLastTimestamp"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaLiveEventIncomingStreamsOutOfSyncEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.Serialization.cs index cdf63959dbb9..71018e905563 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaLiveEventIncomingVideoStreamsOutOfSyncEventData : IUtf 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaLiveEventIncomingVideoStreamsOutOfSyncEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(FirstTimestamp)) { writer.WritePropertyName("firstTimestamp"u8); @@ -74,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaLiveEventIncomingVideoStreamsOutOfSyncEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIngestHeartbeatEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIngestHeartbeatEventData.Serialization.cs index 2e196fa43664..684753e3b76b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIngestHeartbeatEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventIngestHeartbeatEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaLiveEventIngestHeartbeatEventData : IUtf8JsonSerializa 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaLiveEventIngestHeartbeatEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TrackType)) { writer.WritePropertyName("trackType"u8); @@ -129,6 +121,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaLiveEventIngestHeartbeatEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventTrackDiscontinuityDetectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventTrackDiscontinuityDetectedEventData.Serialization.cs index 58ca54e43916..fa24fc217c1d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventTrackDiscontinuityDetectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MediaLiveEventTrackDiscontinuityDetectedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class MediaLiveEventTrackDiscontinuityDetectedEventData : IUtf8Js 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MediaLiveEventTrackDiscontinuityDetectedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TrackType)) { writer.WritePropertyName("trackType"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MediaLiveEventTrackDiscontinuityDetectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsAppIdentifierModel.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsAppIdentifierModel.Serialization.cs index 3c142425d7d9..38758c2ee828 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsAppIdentifierModel.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsAppIdentifierModel.Serialization.cs @@ -18,15 +18,6 @@ public partial class MicrosoftTeamsAppIdentifierModel : IUtf8JsonSerializable, I 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") @@ -34,10 +25,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MicrosoftTeamsAppIdentifierModel)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appId"u8); writer.WriteStringValue(AppId); - writer.WritePropertyName("cloud"u8); - writer.WriteStringValue(Cloud.ToString()); + if (Optional.IsDefined(Cloud)) + { + writer.WritePropertyName("cloud"u8); + writer.WriteStringValue(Cloud.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -53,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MicrosoftTeamsAppIdentifierModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -76,7 +72,7 @@ internal static MicrosoftTeamsAppIdentifierModel DeserializeMicrosoftTeamsAppIde return null; } string appId = default; - CommunicationCloudEnvironmentModel cloud = default; + CommunicationCloudEnvironmentModel? cloud = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -88,6 +84,10 @@ internal static MicrosoftTeamsAppIdentifierModel DeserializeMicrosoftTeamsAppIde } if (property.NameEquals("cloud"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } cloud = new CommunicationCloudEnvironmentModel(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsAppIdentifierModel.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsAppIdentifierModel.cs index 41e1a566a23f..d53a1651e7ce 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsAppIdentifierModel.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsAppIdentifierModel.cs @@ -47,21 +47,19 @@ public partial class MicrosoftTeamsAppIdentifierModel /// Initializes a new instance of . /// The Id of the Microsoft Teams application. - /// The cloud that the Microsoft Teams application belongs to. By default 'public' if missing. /// is null. - internal MicrosoftTeamsAppIdentifierModel(string appId, CommunicationCloudEnvironmentModel cloud) + internal MicrosoftTeamsAppIdentifierModel(string appId) { Argument.AssertNotNull(appId, nameof(appId)); AppId = appId; - Cloud = cloud; } /// Initializes a new instance of . /// The Id of the Microsoft Teams application. /// The cloud that the Microsoft Teams application belongs to. By default 'public' if missing. /// Keeps track of any properties unknown to the library. - internal MicrosoftTeamsAppIdentifierModel(string appId, CommunicationCloudEnvironmentModel cloud, IDictionary serializedAdditionalRawData) + internal MicrosoftTeamsAppIdentifierModel(string appId, CommunicationCloudEnvironmentModel? cloud, IDictionary serializedAdditionalRawData) { AppId = appId; Cloud = cloud; @@ -76,6 +74,6 @@ internal MicrosoftTeamsAppIdentifierModel() /// The Id of the Microsoft Teams application. public string AppId { get; } /// The cloud that the Microsoft Teams application belongs to. By default 'public' if missing. - public CommunicationCloudEnvironmentModel Cloud { get; } + public CommunicationCloudEnvironmentModel? Cloud { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.Serialization.cs index 954ae03dd03a..9b3efa1f5ae6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.Serialization.cs @@ -18,15 +18,6 @@ public partial class MicrosoftTeamsUserIdentifierModel : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MicrosoftTeamsUserIdentifierModel)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("userId"u8); writer.WriteStringValue(UserId); if (Optional.IsDefined(IsAnonymous)) @@ -41,8 +33,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("isAnonymous"u8); writer.WriteBooleanValue(IsAnonymous.Value); } - writer.WritePropertyName("cloud"u8); - writer.WriteStringValue(Cloud.ToString()); + if (Optional.IsDefined(Cloud)) + { + writer.WritePropertyName("cloud"u8); + writer.WriteStringValue(Cloud.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -58,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MicrosoftTeamsUserIdentifierModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -82,7 +78,7 @@ internal static MicrosoftTeamsUserIdentifierModel DeserializeMicrosoftTeamsUserI } string userId = default; bool? isAnonymous = default; - CommunicationCloudEnvironmentModel cloud = default; + CommunicationCloudEnvironmentModel? cloud = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -103,6 +99,10 @@ internal static MicrosoftTeamsUserIdentifierModel DeserializeMicrosoftTeamsUserI } if (property.NameEquals("cloud"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } cloud = new CommunicationCloudEnvironmentModel(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.cs index d8958e4d8035..1678ab0098cf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.cs @@ -47,14 +47,12 @@ public partial class MicrosoftTeamsUserIdentifierModel /// Initializes a new instance of . /// The Id of the Microsoft Teams user. If not anonymous, this is the AAD object Id of the user. - /// The cloud that the Microsoft Teams user belongs to. By default 'public' if missing. /// is null. - internal MicrosoftTeamsUserIdentifierModel(string userId, CommunicationCloudEnvironmentModel cloud) + internal MicrosoftTeamsUserIdentifierModel(string userId) { Argument.AssertNotNull(userId, nameof(userId)); UserId = userId; - Cloud = cloud; } /// Initializes a new instance of . @@ -62,7 +60,7 @@ internal MicrosoftTeamsUserIdentifierModel(string userId, CommunicationCloudEnvi /// True if the Microsoft Teams user is anonymous. By default false if missing. /// The cloud that the Microsoft Teams user belongs to. By default 'public' if missing. /// Keeps track of any properties unknown to the library. - internal MicrosoftTeamsUserIdentifierModel(string userId, bool? isAnonymous, CommunicationCloudEnvironmentModel cloud, IDictionary serializedAdditionalRawData) + internal MicrosoftTeamsUserIdentifierModel(string userId, bool? isAnonymous, CommunicationCloudEnvironmentModel? cloud, IDictionary serializedAdditionalRawData) { UserId = userId; IsAnonymous = isAnonymous; @@ -80,6 +78,6 @@ internal MicrosoftTeamsUserIdentifierModel() /// True if the Microsoft Teams user is anonymous. By default false if missing. public bool? IsAnonymous { get; } /// The cloud that the Microsoft Teams user belongs to. By default 'public' if missing. - public CommunicationCloudEnvironmentModel Cloud { get; } + public CommunicationCloudEnvironmentModel? Cloud { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PhoneNumberIdentifierModel.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PhoneNumberIdentifierModel.Serialization.cs index 9e5867b71f14..26127c05d1d5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PhoneNumberIdentifierModel.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PhoneNumberIdentifierModel.Serialization.cs @@ -18,15 +18,6 @@ public partial class PhoneNumberIdentifierModel : IUtf8JsonSerializable, IJsonMo 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PhoneNumberIdentifierModel)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } PhoneNumberIdentifierModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.Serialization.cs index d0a89e1b3172..613f1feeb145 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class PolicyInsightsPolicyStateChangedEventData : IUtf8JsonSerial 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PolicyInsightsPolicyStateChangedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(PolicyAssignmentId)) { writer.WritePropertyName("policyAssignmentId"u8); @@ -81,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } PolicyInsightsPolicyStateChangedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -103,7 +99,7 @@ internal static PolicyInsightsPolicyStateChangedEventData DeserializePolicyInsig { return null; } - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string policyAssignmentId = default; string policyDefinitionId = default; string policyDefinitionReferenceId = default; @@ -116,6 +112,10 @@ internal static PolicyInsightsPolicyStateChangedEventData DeserializePolicyInsig { if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.cs index 3c38df1b64d7..a8f8d505974e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.cs @@ -46,10 +46,8 @@ public partial class PolicyInsightsPolicyStateChangedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time that the resource was scanned by Azure Policy in the Universal ISO 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. - internal PolicyInsightsPolicyStateChangedEventData(DateTimeOffset timestamp) + internal PolicyInsightsPolicyStateChangedEventData() { - Timestamp = timestamp; } /// Initializes a new instance of . @@ -61,7 +59,7 @@ internal PolicyInsightsPolicyStateChangedEventData(DateTimeOffset timestamp) /// The subscription ID of the resource. /// The compliance reason code. May be empty. /// Keeps track of any properties unknown to the library. - internal PolicyInsightsPolicyStateChangedEventData(DateTimeOffset timestamp, string policyAssignmentId, string policyDefinitionId, string policyDefinitionReferenceId, string complianceState, string subscriptionId, string complianceReasonCode, IDictionary serializedAdditionalRawData) + internal PolicyInsightsPolicyStateChangedEventData(DateTimeOffset? timestamp, string policyAssignmentId, string policyDefinitionId, string policyDefinitionReferenceId, string complianceState, string subscriptionId, string complianceReasonCode, IDictionary serializedAdditionalRawData) { Timestamp = timestamp; PolicyAssignmentId = policyAssignmentId; @@ -73,13 +71,8 @@ internal PolicyInsightsPolicyStateChangedEventData(DateTimeOffset timestamp, str _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal PolicyInsightsPolicyStateChangedEventData() - { - } - /// The time that the resource was scanned by Azure Policy in the Universal ISO 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// The resource ID of the policy assignment. public string PolicyAssignmentId { get; } /// The resource ID of the policy definition. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.Serialization.cs index 7300f5a3a9cc..c51e319aa8d9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class PolicyInsightsPolicyStateCreatedEventData : IUtf8JsonSerial 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PolicyInsightsPolicyStateCreatedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(PolicyAssignmentId)) { writer.WritePropertyName("policyAssignmentId"u8); @@ -81,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } PolicyInsightsPolicyStateCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -103,7 +99,7 @@ internal static PolicyInsightsPolicyStateCreatedEventData DeserializePolicyInsig { return null; } - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string policyAssignmentId = default; string policyDefinitionId = default; string policyDefinitionReferenceId = default; @@ -116,6 +112,10 @@ internal static PolicyInsightsPolicyStateCreatedEventData DeserializePolicyInsig { if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.cs index deb18f455881..44791f5f3ca6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.cs @@ -46,10 +46,8 @@ public partial class PolicyInsightsPolicyStateCreatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time that the resource was scanned by Azure Policy in the Universal ISO 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. - internal PolicyInsightsPolicyStateCreatedEventData(DateTimeOffset timestamp) + internal PolicyInsightsPolicyStateCreatedEventData() { - Timestamp = timestamp; } /// Initializes a new instance of . @@ -61,7 +59,7 @@ internal PolicyInsightsPolicyStateCreatedEventData(DateTimeOffset timestamp) /// The subscription ID of the resource. /// The compliance reason code. May be empty. /// Keeps track of any properties unknown to the library. - internal PolicyInsightsPolicyStateCreatedEventData(DateTimeOffset timestamp, string policyAssignmentId, string policyDefinitionId, string policyDefinitionReferenceId, string complianceState, string subscriptionId, string complianceReasonCode, IDictionary serializedAdditionalRawData) + internal PolicyInsightsPolicyStateCreatedEventData(DateTimeOffset? timestamp, string policyAssignmentId, string policyDefinitionId, string policyDefinitionReferenceId, string complianceState, string subscriptionId, string complianceReasonCode, IDictionary serializedAdditionalRawData) { Timestamp = timestamp; PolicyAssignmentId = policyAssignmentId; @@ -73,13 +71,8 @@ internal PolicyInsightsPolicyStateCreatedEventData(DateTimeOffset timestamp, str _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal PolicyInsightsPolicyStateCreatedEventData() - { - } - /// The time that the resource was scanned by Azure Policy in the Universal ISO 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// The resource ID of the policy assignment. public string PolicyAssignmentId { get; } /// The resource ID of the policy definition. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.Serialization.cs index f7b41e8af79d..eecbf20cbeb5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class PolicyInsightsPolicyStateDeletedEventData : IUtf8JsonSerial 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PolicyInsightsPolicyStateDeletedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(PolicyAssignmentId)) { writer.WritePropertyName("policyAssignmentId"u8); @@ -81,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } PolicyInsightsPolicyStateDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -103,7 +99,7 @@ internal static PolicyInsightsPolicyStateDeletedEventData DeserializePolicyInsig { return null; } - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string policyAssignmentId = default; string policyDefinitionId = default; string policyDefinitionReferenceId = default; @@ -116,6 +112,10 @@ internal static PolicyInsightsPolicyStateDeletedEventData DeserializePolicyInsig { if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.cs index 412c1ba32b64..3a92458d4c13 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.cs @@ -46,10 +46,8 @@ public partial class PolicyInsightsPolicyStateDeletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time that the resource was scanned by Azure Policy in the Universal ISO 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. - internal PolicyInsightsPolicyStateDeletedEventData(DateTimeOffset timestamp) + internal PolicyInsightsPolicyStateDeletedEventData() { - Timestamp = timestamp; } /// Initializes a new instance of . @@ -61,7 +59,7 @@ internal PolicyInsightsPolicyStateDeletedEventData(DateTimeOffset timestamp) /// The subscription ID of the resource. /// The compliance reason code. May be empty. /// Keeps track of any properties unknown to the library. - internal PolicyInsightsPolicyStateDeletedEventData(DateTimeOffset timestamp, string policyAssignmentId, string policyDefinitionId, string policyDefinitionReferenceId, string complianceState, string subscriptionId, string complianceReasonCode, IDictionary serializedAdditionalRawData) + internal PolicyInsightsPolicyStateDeletedEventData(DateTimeOffset? timestamp, string policyAssignmentId, string policyDefinitionId, string policyDefinitionReferenceId, string complianceState, string subscriptionId, string complianceReasonCode, IDictionary serializedAdditionalRawData) { Timestamp = timestamp; PolicyAssignmentId = policyAssignmentId; @@ -73,13 +71,8 @@ internal PolicyInsightsPolicyStateDeletedEventData(DateTimeOffset timestamp, str _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal PolicyInsightsPolicyStateDeletedEventData() - { - } - /// The time that the resource was scanned by Azure Policy in the Universal ISO 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// The resource ID of the policy assignment. public string PolicyAssignmentId { get; } /// The resource ID of the policy definition. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRDBCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRdbCompletedEventData.Serialization.cs similarity index 71% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRDBCompletedEventData.Serialization.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRdbCompletedEventData.Serialization.cs index 371ef947d88d..fd70df1bee84 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRDBCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRdbCompletedEventData.Serialization.cs @@ -13,29 +13,24 @@ namespace Azure.Messaging.EventGrid.SystemEvents { - public partial class RedisExportRDBCompletedEventData : IUtf8JsonSerializable, IJsonModel + public partial class RedisExportRdbCompletedEventData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(RedisExportRDBCompletedEventData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(RedisExportRdbCompletedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,21 +56,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } - RedisExportRDBCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RedisExportRdbCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(RedisExportRDBCompletedEventData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(RedisExportRdbCompletedEventData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRedisExportRDBCompletedEventData(document.RootElement, options); + return DeserializeRedisExportRdbCompletedEventData(document.RootElement, options); } - internal static RedisExportRDBCompletedEventData DeserializeRedisExportRDBCompletedEventData(JsonElement element, ModelReaderWriterOptions options = null) + internal static RedisExportRdbCompletedEventData DeserializeRedisExportRdbCompletedEventData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -83,7 +79,7 @@ internal static RedisExportRDBCompletedEventData DeserializeRedisExportRDBComple { return null; } - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string name = default; string status = default; IDictionary serializedAdditionalRawData = default; @@ -92,6 +88,10 @@ internal static RedisExportRDBCompletedEventData DeserializeRedisExportRDBComple { if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } @@ -111,46 +111,46 @@ internal static RedisExportRDBCompletedEventData DeserializeRedisExportRDBComple } } serializedAdditionalRawData = rawDataDictionary; - return new RedisExportRDBCompletedEventData(timestamp, name, status, serializedAdditionalRawData); + return new RedisExportRdbCompletedEventData(timestamp, name, status, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(RedisExportRDBCompletedEventData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(RedisExportRdbCompletedEventData)} does not support writing '{options.Format}' format."); } } - RedisExportRDBCompletedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + RedisExportRdbCompletedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeRedisExportRDBCompletedEventData(document.RootElement, options); + return DeserializeRedisExportRdbCompletedEventData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(RedisExportRDBCompletedEventData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(RedisExportRdbCompletedEventData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static RedisExportRDBCompletedEventData FromResponse(Response response) + internal static RedisExportRdbCompletedEventData FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeRedisExportRDBCompletedEventData(document.RootElement); + return DeserializeRedisExportRdbCompletedEventData(document.RootElement); } /// Convert into a . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRDBCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRdbCompletedEventData.cs similarity index 78% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRDBCompletedEventData.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRdbCompletedEventData.cs index 4d02e07eeb4c..f689ff3f1242 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRDBCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRdbCompletedEventData.cs @@ -11,7 +11,7 @@ namespace Azure.Messaging.EventGrid.SystemEvents { /// Schema of the Data property of an EventGridEvent for a Microsoft.Cache.ExportRDBCompleted event. - public partial class RedisExportRDBCompletedEventData + public partial class RedisExportRdbCompletedEventData { /// /// Keeps track of any properties unknown to the library. @@ -45,19 +45,17 @@ public partial class RedisExportRDBCompletedEventData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The time at which the event occurred. - internal RedisExportRDBCompletedEventData(DateTimeOffset timestamp) + /// Initializes a new instance of . + internal RedisExportRdbCompletedEventData() { - Timestamp = timestamp; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The time at which the event occurred. /// The name of this event. /// The status of this event. Failed or succeeded. /// Keeps track of any properties unknown to the library. - internal RedisExportRDBCompletedEventData(DateTimeOffset timestamp, string name, string status, IDictionary serializedAdditionalRawData) + internal RedisExportRdbCompletedEventData(DateTimeOffset? timestamp, string name, string status, IDictionary serializedAdditionalRawData) { Timestamp = timestamp; Name = name; @@ -65,13 +63,8 @@ internal RedisExportRDBCompletedEventData(DateTimeOffset timestamp, string name, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal RedisExportRDBCompletedEventData() - { - } - /// The time at which the event occurred. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// The name of this event. public string Name { get; } /// The status of this event. Failed or succeeded. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRDBCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRdbCompletedEventData.Serialization.cs similarity index 71% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRDBCompletedEventData.Serialization.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRdbCompletedEventData.Serialization.cs index 1e4a780d09d4..00554d2343fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRDBCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRdbCompletedEventData.Serialization.cs @@ -13,29 +13,24 @@ namespace Azure.Messaging.EventGrid.SystemEvents { - public partial class RedisImportRDBCompletedEventData : IUtf8JsonSerializable, IJsonModel + public partial class RedisImportRdbCompletedEventData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(RedisImportRDBCompletedEventData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(RedisImportRdbCompletedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,21 +56,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } - RedisImportRDBCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RedisImportRdbCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(RedisImportRDBCompletedEventData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(RedisImportRdbCompletedEventData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRedisImportRDBCompletedEventData(document.RootElement, options); + return DeserializeRedisImportRdbCompletedEventData(document.RootElement, options); } - internal static RedisImportRDBCompletedEventData DeserializeRedisImportRDBCompletedEventData(JsonElement element, ModelReaderWriterOptions options = null) + internal static RedisImportRdbCompletedEventData DeserializeRedisImportRdbCompletedEventData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -83,7 +79,7 @@ internal static RedisImportRDBCompletedEventData DeserializeRedisImportRDBComple { return null; } - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string name = default; string status = default; IDictionary serializedAdditionalRawData = default; @@ -92,6 +88,10 @@ internal static RedisImportRDBCompletedEventData DeserializeRedisImportRDBComple { if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } @@ -111,46 +111,46 @@ internal static RedisImportRDBCompletedEventData DeserializeRedisImportRDBComple } } serializedAdditionalRawData = rawDataDictionary; - return new RedisImportRDBCompletedEventData(timestamp, name, status, serializedAdditionalRawData); + return new RedisImportRdbCompletedEventData(timestamp, name, status, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(RedisImportRDBCompletedEventData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(RedisImportRdbCompletedEventData)} does not support writing '{options.Format}' format."); } } - RedisImportRDBCompletedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + RedisImportRdbCompletedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeRedisImportRDBCompletedEventData(document.RootElement, options); + return DeserializeRedisImportRdbCompletedEventData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(RedisImportRDBCompletedEventData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(RedisImportRdbCompletedEventData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static RedisImportRDBCompletedEventData FromResponse(Response response) + internal static RedisImportRdbCompletedEventData FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeRedisImportRDBCompletedEventData(document.RootElement); + return DeserializeRedisImportRdbCompletedEventData(document.RootElement); } /// Convert into a . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRDBCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRdbCompletedEventData.cs similarity index 78% rename from sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRDBCompletedEventData.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRdbCompletedEventData.cs index 58ca83a77ce3..7381f6f760ab 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRDBCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRdbCompletedEventData.cs @@ -11,7 +11,7 @@ namespace Azure.Messaging.EventGrid.SystemEvents { /// Schema of the Data property of an EventGridEvent for a Microsoft.Cache.ImportRDBCompleted event. - public partial class RedisImportRDBCompletedEventData + public partial class RedisImportRdbCompletedEventData { /// /// Keeps track of any properties unknown to the library. @@ -45,19 +45,17 @@ public partial class RedisImportRDBCompletedEventData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The time at which the event occurred. - internal RedisImportRDBCompletedEventData(DateTimeOffset timestamp) + /// Initializes a new instance of . + internal RedisImportRdbCompletedEventData() { - Timestamp = timestamp; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The time at which the event occurred. /// The name of this event. /// The status of this event. Failed or succeeded. /// Keeps track of any properties unknown to the library. - internal RedisImportRDBCompletedEventData(DateTimeOffset timestamp, string name, string status, IDictionary serializedAdditionalRawData) + internal RedisImportRdbCompletedEventData(DateTimeOffset? timestamp, string name, string status, IDictionary serializedAdditionalRawData) { Timestamp = timestamp; Name = name; @@ -65,13 +63,8 @@ internal RedisImportRDBCompletedEventData(DateTimeOffset timestamp, string name, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal RedisImportRDBCompletedEventData() - { - } - /// The time at which the event occurred. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// The name of this event. public string Name { get; } /// The status of this event. Failed or succeeded. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.Serialization.cs index 345b18790fea..039cdd1ab010 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class RedisPatchingCompletedEventData : IUtf8JsonSerializable, IJ 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RedisPatchingCompletedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RedisPatchingCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -83,7 +79,7 @@ internal static RedisPatchingCompletedEventData DeserializeRedisPatchingComplete { return null; } - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string name = default; string status = default; IDictionary serializedAdditionalRawData = default; @@ -92,6 +88,10 @@ internal static RedisPatchingCompletedEventData DeserializeRedisPatchingComplete { if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.cs index 0497287ee8e2..3cc0aee40d81 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.cs @@ -46,10 +46,8 @@ public partial class RedisPatchingCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time at which the event occurred. - internal RedisPatchingCompletedEventData(DateTimeOffset timestamp) + internal RedisPatchingCompletedEventData() { - Timestamp = timestamp; } /// Initializes a new instance of . @@ -57,7 +55,7 @@ internal RedisPatchingCompletedEventData(DateTimeOffset timestamp) /// The name of this event. /// The status of this event. Failed or succeeded. /// Keeps track of any properties unknown to the library. - internal RedisPatchingCompletedEventData(DateTimeOffset timestamp, string name, string status, IDictionary serializedAdditionalRawData) + internal RedisPatchingCompletedEventData(DateTimeOffset? timestamp, string name, string status, IDictionary serializedAdditionalRawData) { Timestamp = timestamp; Name = name; @@ -65,13 +63,8 @@ internal RedisPatchingCompletedEventData(DateTimeOffset timestamp, string name, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal RedisPatchingCompletedEventData() - { - } - /// The time at which the event occurred. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// The name of this event. public string Name { get; } /// The status of this event. Failed or succeeded. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.Serialization.cs index 9fd879604e0f..73501bd4e56f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class RedisScalingCompletedEventData : IUtf8JsonSerializable, IJs 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RedisScalingCompletedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RedisScalingCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -83,7 +79,7 @@ internal static RedisScalingCompletedEventData DeserializeRedisScalingCompletedE { return null; } - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string name = default; string status = default; IDictionary serializedAdditionalRawData = default; @@ -92,6 +88,10 @@ internal static RedisScalingCompletedEventData DeserializeRedisScalingCompletedE { if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.cs index 0d7b4896c816..ac341ec49072 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.cs @@ -46,10 +46,8 @@ public partial class RedisScalingCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time at which the event occurred. - internal RedisScalingCompletedEventData(DateTimeOffset timestamp) + internal RedisScalingCompletedEventData() { - Timestamp = timestamp; } /// Initializes a new instance of . @@ -57,7 +55,7 @@ internal RedisScalingCompletedEventData(DateTimeOffset timestamp) /// The name of this event. /// The status of this event. Failed or succeeded. /// Keeps track of any properties unknown to the library. - internal RedisScalingCompletedEventData(DateTimeOffset timestamp, string name, string status, IDictionary serializedAdditionalRawData) + internal RedisScalingCompletedEventData(DateTimeOffset? timestamp, string name, string status, IDictionary serializedAdditionalRawData) { Timestamp = timestamp; Name = name; @@ -65,13 +63,8 @@ internal RedisScalingCompletedEventData(DateTimeOffset timestamp, string name, s _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal RedisScalingCompletedEventData() - { - } - /// The time at which the event occurred. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// The name of this event. public string Name { get; } /// The status of this event. Failed or succeeded. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionCancelEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionCancelEventData.Serialization.cs index 6b50c3144e5e..014532ab251a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionCancelEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionCancelEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceActionCancelEventData : IUtf8JsonSerializable, IJso 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceActionCancelEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -101,6 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceActionCancelEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionFailureEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionFailureEventData.Serialization.cs index 4b82333449f9..72b9dd0aba3c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionFailureEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionFailureEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceActionFailureEventData : IUtf8JsonSerializable, IJs 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceActionFailureEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -101,6 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceActionFailureEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionSuccessEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionSuccessEventData.Serialization.cs index c0adc937d03b..ed06f42c469c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionSuccessEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionSuccessEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceActionSuccessEventData : IUtf8JsonSerializable, IJs 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceActionSuccessEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -101,6 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceActionSuccessEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceAuthorization.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceAuthorization.Serialization.cs index 4efe91edbade..e6bc79e580b4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceAuthorization.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceAuthorization.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceAuthorization : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceAuthorization)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Scope)) { writer.WritePropertyName("scope"u8); @@ -67,6 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceAuthorization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteCancelEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteCancelEventData.Serialization.cs index 86538ec5f688..dcc63a5ebeb8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteCancelEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteCancelEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceDeleteCancelEventData : IUtf8JsonSerializable, IJso 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceDeleteCancelEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -101,6 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceDeleteCancelEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteFailureEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteFailureEventData.Serialization.cs index 802854fbfde6..31d064d6c798 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteFailureEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteFailureEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceDeleteFailureEventData : IUtf8JsonSerializable, IJs 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceDeleteFailureEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -101,6 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceDeleteFailureEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteSuccessEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteSuccessEventData.Serialization.cs index 610475ad4de2..e0499e2d937f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteSuccessEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteSuccessEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceDeleteSuccessEventData : IUtf8JsonSerializable, IJs 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceDeleteSuccessEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -101,6 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceDeleteSuccessEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceHttpRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceHttpRequest.Serialization.cs index 578c595a0979..d7ac6a33796c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceHttpRequest.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceHttpRequest.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceHttpRequest : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceHttpRequest)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ClientRequestId)) { writer.WritePropertyName("clientRequestId"u8); @@ -69,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceHttpRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.Serialization.cs new file mode 100644 index 000000000000..ebbee96e2e8b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.Serialization.cs @@ -0,0 +1,154 @@ +// 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 ResourceNotificationsContainerServiceEventResourcesScheduledEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceNotificationsContainerServiceEventResourcesScheduledEventData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("resourceInfo"u8); + writer.WriteObjectValue(ResourceDetails, options); + writer.WritePropertyName("operationalInfo"u8); + writer.WriteObjectValue(OperationalDetails, options); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResourceNotificationsContainerServiceEventResourcesScheduledEventData 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(ResourceNotificationsContainerServiceEventResourcesScheduledEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceNotificationsContainerServiceEventResourcesScheduledEventData(document.RootElement, options); + } + + internal static ResourceNotificationsContainerServiceEventResourcesScheduledEventData DeserializeResourceNotificationsContainerServiceEventResourcesScheduledEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceNotificationsResourceUpdatedDetails resourceInfo = default; + ResourceNotificationsOperationalDetails operationalInfo = default; + string apiVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceInfo"u8)) + { + resourceInfo = ResourceNotificationsResourceUpdatedDetails.DeserializeResourceNotificationsResourceUpdatedDetails(property.Value, options); + continue; + } + if (property.NameEquals("operationalInfo"u8)) + { + operationalInfo = ResourceNotificationsOperationalDetails.DeserializeResourceNotificationsOperationalDetails(property.Value, options); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceNotificationsContainerServiceEventResourcesScheduledEventData(resourceInfo, operationalInfo, apiVersion, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ResourceNotificationsContainerServiceEventResourcesScheduledEventData)} does not support writing '{options.Format}' format."); + } + } + + ResourceNotificationsContainerServiceEventResourcesScheduledEventData 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); + return DeserializeResourceNotificationsContainerServiceEventResourcesScheduledEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceNotificationsContainerServiceEventResourcesScheduledEventData)} 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 ResourceNotificationsContainerServiceEventResourcesScheduledEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeResourceNotificationsContainerServiceEventResourcesScheduledEventData(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/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs new file mode 100644 index 000000000000..6322f27edfe8 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs @@ -0,0 +1,40 @@ +// 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 event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event. + public partial class ResourceNotificationsContainerServiceEventResourcesScheduledEventData : ResourceNotificationsResourceUpdatedEventData + { + /// Initializes a new instance of . + /// resourceInfo details for update event. + /// details about operational info. + /// or is null. + internal ResourceNotificationsContainerServiceEventResourcesScheduledEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails, ResourceNotificationsOperationalDetails operationalDetails) : base(resourceDetails, operationalDetails) + { + Argument.AssertNotNull(resourceDetails, nameof(resourceDetails)); + Argument.AssertNotNull(operationalDetails, nameof(operationalDetails)); + } + + /// Initializes a new instance of . + /// resourceInfo details for update event. + /// details about operational info. + /// api version of the resource properties bag. + /// Keeps track of any properties unknown to the library. + internal ResourceNotificationsContainerServiceEventResourcesScheduledEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails, ResourceNotificationsOperationalDetails operationalDetails, string apiVersion, IDictionary serializedAdditionalRawData) : base(resourceDetails, operationalDetails, apiVersion, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal ResourceNotificationsContainerServiceEventResourcesScheduledEventData() + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAnnotatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAnnotatedEventData.Serialization.cs index dba464b1c155..3dcd5ad572ac 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAnnotatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAnnotatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceNotificationsHealthResourcesAnnotatedEventData : IU 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") @@ -34,7 +25,32 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ResourceNotificationsHealthResourcesAnnotatedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("resourceInfo"u8); + writer.WriteObjectValue(ResourceDetails, options); + writer.WritePropertyName("operationalInfo"u8); + writer.WriteObjectValue(OperationalDetails, options); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ResourceNotificationsHealthResourcesAnnotatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.Serialization.cs index 6a60d795bdde..f6831fd3cb1c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceNotificationsHealthResourcesAvailabilityStatusChang 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") @@ -34,7 +25,32 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("resourceInfo"u8); + writer.WriteObjectValue(ResourceDetails, options); + writer.WritePropertyName("operationalInfo"u8); + writer.WriteObjectValue(OperationalDetails, options); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.Serialization.cs index 3c02399992e2..33f0c3f896f8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceNotificationsOperationalDetails : IUtf8JsonSerializ 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceNotificationsOperationalDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("resourceEventTime"u8); - writer.WriteStringValue(ResourceEventTime, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceEventTime)) + { + writer.WritePropertyName("resourceEventTime"u8); + writer.WriteStringValue(ResourceEventTime.Value, "O"); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -51,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceNotificationsOperationalDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -73,13 +69,17 @@ internal static ResourceNotificationsOperationalDetails DeserializeResourceNotif { return null; } - DateTimeOffset resourceEventTime = default; + DateTimeOffset? resourceEventTime = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("resourceEventTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } resourceEventTime = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.cs index a55f436fa035..d9354209fe26 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.cs @@ -46,27 +46,20 @@ public partial class ResourceNotificationsOperationalDetails private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Date and Time when resource was updated. - internal ResourceNotificationsOperationalDetails(DateTimeOffset resourceEventTime) + internal ResourceNotificationsOperationalDetails() { - ResourceEventTime = resourceEventTime; } /// Initializes a new instance of . /// Date and Time when resource was updated. /// Keeps track of any properties unknown to the library. - internal ResourceNotificationsOperationalDetails(DateTimeOffset resourceEventTime, IDictionary serializedAdditionalRawData) + internal ResourceNotificationsOperationalDetails(DateTimeOffset? resourceEventTime, IDictionary serializedAdditionalRawData) { ResourceEventTime = resourceEventTime; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal ResourceNotificationsOperationalDetails() - { - } - /// Date and Time when resource was updated. - public DateTimeOffset ResourceEventTime { get; } + public DateTimeOffset? ResourceEventTime { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedDetails.Serialization.cs index f55a187c67ac..3d770b676641 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedDetails.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceNotificationsResourceDeletedDetails : IUtf8JsonSeri 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceNotificationsResourceDeletedDetails)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceNotificationsResourceDeletedDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedEventData.Serialization.cs index 2eb550fbc8ae..bf57a9a6e01f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceNotificationsResourceDeletedEventData : IUtf8JsonSe 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceNotificationsResourceDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("resourceInfo"u8); writer.WriteObjectValue(ResourceDetails, options); writer.WritePropertyName("operationalInfo"u8); @@ -53,6 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceNotificationsResourceDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.Serialization.cs index 403063ecdb2e..b217c560fcf0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceNotificationsResourceManagementCreatedOrUpdatedEven 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") @@ -34,7 +25,32 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ResourceNotificationsResourceManagementCreatedOrUpdatedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("resourceInfo"u8); + writer.WriteObjectValue(ResourceDetails, options); + writer.WritePropertyName("operationalInfo"u8); + writer.WriteObjectValue(OperationalDetails, options); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ResourceNotificationsResourceManagementCreatedOrUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementDeletedEventData.Serialization.cs index 3d3b7ae70567..73051beddf0f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceNotificationsResourceManagementDeletedEventData : I 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") @@ -34,7 +25,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ResourceNotificationsResourceManagementDeletedEventData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("resourceInfo"u8); + writer.WriteObjectValue(ResourceDetails, options); + writer.WritePropertyName("operationalInfo"u8); + writer.WriteObjectValue(OperationalDetails, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ResourceNotificationsResourceManagementDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedDetails.Serialization.cs index 72e405e281d4..528e33bbbd73 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedDetails.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceNotificationsResourceUpdatedDetails : IUtf8JsonSeri 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceNotificationsResourceUpdatedDetails)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -97,6 +89,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceNotificationsResourceUpdatedDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedEventData.Serialization.cs index bdbca4cbd7fe..9ebbe066f0ad 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceNotificationsResourceUpdatedEventData : IUtf8JsonSe 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceNotificationsResourceUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("resourceInfo"u8); writer.WriteObjectValue(ResourceDetails, options); writer.WritePropertyName("operationalInfo"u8); @@ -58,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceNotificationsResourceUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteCancelEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteCancelEventData.Serialization.cs index 9b08a63f70af..928c86d6967d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteCancelEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteCancelEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceWriteCancelEventData : IUtf8JsonSerializable, IJson 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceWriteCancelEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -101,6 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceWriteCancelEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteFailureEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteFailureEventData.Serialization.cs index cce0e36f154a..05639e112666 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteFailureEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteFailureEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceWriteFailureEventData : IUtf8JsonSerializable, IJso 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceWriteFailureEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -101,6 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceWriteFailureEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteSuccessEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteSuccessEventData.Serialization.cs index 442361ba1b4d..5d409d38e221 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteSuccessEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteSuccessEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResourceWriteSuccessEventData : IUtf8JsonSerializable, IJso 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceWriteSuccessEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -101,6 +93,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResourceWriteSuccessEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.Serialization.cs index 93f730db151a..097807f0caa5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ServiceBusActiveMessagesAvailablePeriodicNotificationsEvent 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(NamespaceName)) { writer.WritePropertyName("namespaceName"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailableWithNoListenersEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailableWithNoListenersEventData.Serialization.cs index 10f23c8c7709..1c786f0f8913 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailableWithNoListenersEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailableWithNoListenersEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ServiceBusActiveMessagesAvailableWithNoListenersEventData : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ServiceBusActiveMessagesAvailableWithNoListenersEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(NamespaceName)) { writer.WritePropertyName("namespaceName"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ServiceBusActiveMessagesAvailableWithNoListenersEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.Serialization.cs index 4db6bbbb3307..891e7297f677 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ServiceBusDeadletterMessagesAvailablePeriodicNotificationsE 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(NamespaceName)) { writer.WritePropertyName("namespaceName"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.Serialization.cs index 53f8605d54c4..7f09a3ef6013 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ServiceBusDeadletterMessagesAvailableWithNoListenersEventDa 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(NamespaceName)) { writer.WritePropertyName("namespaceName"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ServiceBusDeadletterMessagesAvailableWithNoListenersEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.Serialization.cs index 13dd8294ddcd..d069576b3f1d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class SignalRServiceClientConnectionConnectedEventData : IUtf8Jso 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SignalRServiceClientConnectionConnectedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(HubName)) { writer.WritePropertyName("hubName"u8); @@ -66,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } SignalRServiceClientConnectionConnectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -88,7 +84,7 @@ internal static SignalRServiceClientConnectionConnectedEventData DeserializeSign { return null; } - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string hubName = default; string connectionId = default; string userId = default; @@ -98,6 +94,10 @@ internal static SignalRServiceClientConnectionConnectedEventData DeserializeSign { if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.cs index dcb093dd889d..69adb05a2aa6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.cs @@ -46,10 +46,8 @@ public partial class SignalRServiceClientConnectionConnectedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time at which the event occurred. - internal SignalRServiceClientConnectionConnectedEventData(DateTimeOffset timestamp) + internal SignalRServiceClientConnectionConnectedEventData() { - Timestamp = timestamp; } /// Initializes a new instance of . @@ -58,7 +56,7 @@ internal SignalRServiceClientConnectionConnectedEventData(DateTimeOffset timesta /// The connection Id of connected client connection. /// The user Id of connected client connection. /// Keeps track of any properties unknown to the library. - internal SignalRServiceClientConnectionConnectedEventData(DateTimeOffset timestamp, string hubName, string connectionId, string userId, IDictionary serializedAdditionalRawData) + internal SignalRServiceClientConnectionConnectedEventData(DateTimeOffset? timestamp, string hubName, string connectionId, string userId, IDictionary serializedAdditionalRawData) { Timestamp = timestamp; HubName = hubName; @@ -67,13 +65,8 @@ internal SignalRServiceClientConnectionConnectedEventData(DateTimeOffset timesta _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SignalRServiceClientConnectionConnectedEventData() - { - } - /// The time at which the event occurred. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// The hub of connected client connection. public string HubName { get; } /// The connection Id of connected client connection. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.Serialization.cs index 33279e9b4fe6..2de3b5e4744f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class SignalRServiceClientConnectionDisconnectedEventData : IUtf8 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SignalRServiceClientConnectionDisconnectedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } if (Optional.IsDefined(HubName)) { writer.WritePropertyName("hubName"u8); @@ -71,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } SignalRServiceClientConnectionDisconnectedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -93,7 +89,7 @@ internal static SignalRServiceClientConnectionDisconnectedEventData DeserializeS { return null; } - DateTimeOffset timestamp = default; + DateTimeOffset? timestamp = default; string hubName = default; string connectionId = default; string userId = default; @@ -104,6 +100,10 @@ internal static SignalRServiceClientConnectionDisconnectedEventData DeserializeS { if (property.NameEquals("timestamp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timestamp = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.cs index 6a0f3883fc81..89f6d8099f73 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.cs @@ -46,10 +46,8 @@ public partial class SignalRServiceClientConnectionDisconnectedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time at which the event occurred. - internal SignalRServiceClientConnectionDisconnectedEventData(DateTimeOffset timestamp) + internal SignalRServiceClientConnectionDisconnectedEventData() { - Timestamp = timestamp; } /// Initializes a new instance of . @@ -59,7 +57,7 @@ internal SignalRServiceClientConnectionDisconnectedEventData(DateTimeOffset time /// The user Id of connected client connection. /// The message of error that cause the client connection disconnected. /// Keeps track of any properties unknown to the library. - internal SignalRServiceClientConnectionDisconnectedEventData(DateTimeOffset timestamp, string hubName, string connectionId, string userId, string errorMessage, IDictionary serializedAdditionalRawData) + internal SignalRServiceClientConnectionDisconnectedEventData(DateTimeOffset? timestamp, string hubName, string connectionId, string userId, string errorMessage, IDictionary serializedAdditionalRawData) { Timestamp = timestamp; HubName = hubName; @@ -69,13 +67,8 @@ internal SignalRServiceClientConnectionDisconnectedEventData(DateTimeOffset time _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SignalRServiceClientConnectionDisconnectedEventData() - { - } - /// The time at which the event occurred. - public DateTimeOffset Timestamp { get; } + public DateTimeOffset? Timestamp { get; } /// The hub of connected client connection. public string HubName { get; } /// The connection Id of connected client connection. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageAsyncOperationInitiatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageAsyncOperationInitiatedEventData.Serialization.cs index c70924f23f12..29c6ab4ae00f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageAsyncOperationInitiatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageAsyncOperationInitiatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageAsyncOperationInitiatedEventData : IUtf8JsonSerializ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageAsyncOperationInitiatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Api)) { writer.WritePropertyName("api"u8); @@ -114,6 +106,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageAsyncOperationInitiatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobAccessTier.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobAccessTier.cs new file mode 100644 index 000000000000..60a044fd8b4f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobAccessTier.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 +{ + /// The access tier of the blob. + public readonly partial struct StorageBlobAccessTier : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StorageBlobAccessTier(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HotValue = "Hot"; + private const string CoolValue = "Cool"; + private const string ColdValue = "Cold"; + private const string ArchiveValue = "Archive"; + private const string DefaultValue = "Default"; + + /// The blob is in access tier Hot. + public static StorageBlobAccessTier Hot { get; } = new StorageBlobAccessTier(HotValue); + /// The blob is in access tier Cool. + public static StorageBlobAccessTier Cool { get; } = new StorageBlobAccessTier(CoolValue); + /// The blob is in access tier Cold. + public static StorageBlobAccessTier Cold { get; } = new StorageBlobAccessTier(ColdValue); + /// The blob is in access tier Archive. + public static StorageBlobAccessTier Archive { get; } = new StorageBlobAccessTier(ArchiveValue); + /// The blob is in access tier Default(Inferred). + public static StorageBlobAccessTier Default { get; } = new StorageBlobAccessTier(DefaultValue); + /// Determines if two values are the same. + public static bool operator ==(StorageBlobAccessTier left, StorageBlobAccessTier right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StorageBlobAccessTier left, StorageBlobAccessTier right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator StorageBlobAccessTier(string value) => new StorageBlobAccessTier(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StorageBlobAccessTier other && Equals(other); + /// + public bool Equals(StorageBlobAccessTier 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/StorageBlobCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobCreatedEventData.Serialization.cs index 2612495b4542..d828cafd1d34 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageBlobCreatedEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageBlobCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Api)) { writer.WritePropertyName("api"u8); @@ -74,6 +66,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("blobType"u8); writer.WriteStringValue(BlobType); } + writer.WritePropertyName("accessTier"u8); + writer.WriteStringValue(AccessTier.ToString()); if (Optional.IsDefined(Url)) { writer.WritePropertyName("url"u8); @@ -124,6 +118,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageBlobCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -154,6 +149,7 @@ internal static StorageBlobCreatedEventData DeserializeStorageBlobCreatedEventDa long? contentLength = default; long? contentOffset = default; string blobType = default; + StorageBlobAccessTier accessTier = default; string url = default; string sequencer = default; string identity = default; @@ -210,6 +206,11 @@ internal static StorageBlobCreatedEventData DeserializeStorageBlobCreatedEventDa blobType = property.Value.GetString(); continue; } + if (property.NameEquals("accessTier"u8)) + { + accessTier = new StorageBlobAccessTier(property.Value.GetString()); + continue; + } if (property.NameEquals("url"u8)) { url = property.Value.GetString(); @@ -257,6 +258,7 @@ internal static StorageBlobCreatedEventData DeserializeStorageBlobCreatedEventDa contentLength, contentOffset, blobType, + accessTier, url, sequencer, identity, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobCreatedEventData.cs index a1799eea345a..5b97c6b1bddc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobCreatedEventData.cs @@ -46,12 +46,14 @@ public partial class StorageBlobCreatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . + /// The current tier of the blob. /// For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. /// is null. - internal StorageBlobCreatedEventData(IReadOnlyDictionary storageDiagnostics) + internal StorageBlobCreatedEventData(StorageBlobAccessTier accessTier, IReadOnlyDictionary storageDiagnostics) { Argument.AssertNotNull(storageDiagnostics, nameof(storageDiagnostics)); + AccessTier = accessTier; StorageDiagnostics = storageDiagnostics; } @@ -64,12 +66,13 @@ internal StorageBlobCreatedEventData(IReadOnlyDictionary sto /// The size of the blob in bytes. This is the same as what would be returned in the Content-Length header from the blob. /// The offset of the blob in bytes. /// The type of blob. + /// The current tier of the blob. /// The path to the blob. /// An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. /// The identity of the requester that triggered this event. /// For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. /// Keeps track of any properties unknown to the library. - internal StorageBlobCreatedEventData(string api, string clientRequestId, string requestId, string eTag, string contentType, long? contentLength, long? contentOffset, string blobType, string url, string sequencer, string identity, IReadOnlyDictionary storageDiagnostics, IDictionary serializedAdditionalRawData) + internal StorageBlobCreatedEventData(string api, string clientRequestId, string requestId, string eTag, string contentType, long? contentLength, long? contentOffset, string blobType, StorageBlobAccessTier accessTier, string url, string sequencer, string identity, IReadOnlyDictionary storageDiagnostics, IDictionary serializedAdditionalRawData) { Api = api; ClientRequestId = clientRequestId; @@ -79,6 +82,7 @@ internal StorageBlobCreatedEventData(string api, string clientRequestId, string ContentLength = contentLength; ContentOffset = contentOffset; BlobType = blobType; + AccessTier = accessTier; Url = url; Sequencer = sequencer; Identity = identity; @@ -107,6 +111,8 @@ internal StorageBlobCreatedEventData() public long? ContentOffset { get; } /// The type of blob. public string BlobType { get; } + /// The current tier of the blob. + public StorageBlobAccessTier AccessTier { get; } /// The path to the blob. public string Url { get; } /// An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobDeletedEventData.Serialization.cs index f9d3b771d7a9..a6e3b76460d1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageBlobDeletedEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageBlobDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Api)) { writer.WritePropertyName("api"u8); @@ -109,6 +101,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageBlobDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.Serialization.cs index 6471e17fc66b..03c678a53fb9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageBlobInventoryPolicyCompletedEventData : IUtf8JsonSer 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageBlobInventoryPolicyCompletedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("scheduleDateTime"u8); - writer.WriteStringValue(ScheduleDateTime, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(ScheduleDateTime)) + { + writer.WritePropertyName("scheduleDateTime"u8); + writer.WriteStringValue(ScheduleDateTime.Value, "O"); + } if (Optional.IsDefined(AccountName)) { writer.WritePropertyName("accountName"u8); @@ -81,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageBlobInventoryPolicyCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -103,7 +99,7 @@ internal static StorageBlobInventoryPolicyCompletedEventData DeserializeStorageB { return null; } - DateTimeOffset scheduleDateTime = default; + DateTimeOffset? scheduleDateTime = default; string accountName = default; string ruleName = default; string policyRunStatus = default; @@ -116,6 +112,10 @@ internal static StorageBlobInventoryPolicyCompletedEventData DeserializeStorageB { if (property.NameEquals("scheduleDateTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } scheduleDateTime = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.cs index 97097e7a9b6f..a4eabe105daf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.cs @@ -46,10 +46,8 @@ public partial class StorageBlobInventoryPolicyCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time at which inventory policy was scheduled. - internal StorageBlobInventoryPolicyCompletedEventData(DateTimeOffset scheduleDateTime) + internal StorageBlobInventoryPolicyCompletedEventData() { - ScheduleDateTime = scheduleDateTime; } /// Initializes a new instance of . @@ -61,7 +59,7 @@ internal StorageBlobInventoryPolicyCompletedEventData(DateTimeOffset scheduleDat /// The policy run id for inventory run. /// The blob URL for manifest file for inventory run. /// Keeps track of any properties unknown to the library. - internal StorageBlobInventoryPolicyCompletedEventData(DateTimeOffset scheduleDateTime, string accountName, string ruleName, string policyRunStatus, string policyRunStatusMessage, string policyRunId, string manifestBlobUrl, IDictionary serializedAdditionalRawData) + internal StorageBlobInventoryPolicyCompletedEventData(DateTimeOffset? scheduleDateTime, string accountName, string ruleName, string policyRunStatus, string policyRunStatusMessage, string policyRunId, string manifestBlobUrl, IDictionary serializedAdditionalRawData) { ScheduleDateTime = scheduleDateTime; AccountName = accountName; @@ -73,13 +71,8 @@ internal StorageBlobInventoryPolicyCompletedEventData(DateTimeOffset scheduleDat _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal StorageBlobInventoryPolicyCompletedEventData() - { - } - /// The time at which inventory policy was scheduled. - public DateTimeOffset ScheduleDateTime { get; } + public DateTimeOffset? ScheduleDateTime { get; } /// The account name for which inventory policy is registered. public string AccountName { get; } /// The rule name for inventory policy. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobRenamedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobRenamedEventData.Serialization.cs index 0cef85c3fe60..6d223ed62f9e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobRenamedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobRenamedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageBlobRenamedEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageBlobRenamedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Api)) { writer.WritePropertyName("api"u8); @@ -104,6 +96,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageBlobRenamedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.Serialization.cs index 7ecdd6aae802..8e0b0cba9a2f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageBlobTierChangedEventData : IUtf8JsonSerializable, IJ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageBlobTierChangedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Api)) { writer.WritePropertyName("api"u8); @@ -64,6 +56,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("blobType"u8); writer.WriteStringValue(BlobType); } + writer.WritePropertyName("accessTier"u8); + writer.WriteStringValue(AccessTier.ToString()); + writer.WritePropertyName("previousTier"u8); + writer.WriteStringValue(PreviousTier.ToString()); if (Optional.IsDefined(Url)) { writer.WritePropertyName("url"u8); @@ -114,6 +110,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageBlobTierChangedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -142,6 +139,8 @@ internal static StorageBlobTierChangedEventData DeserializeStorageBlobTierChange string contentType = default; long? contentLength = default; string blobType = default; + StorageBlobAccessTier accessTier = default; + StorageBlobAccessTier previousTier = default; string url = default; string sequencer = default; string identity = default; @@ -184,6 +183,16 @@ internal static StorageBlobTierChangedEventData DeserializeStorageBlobTierChange blobType = property.Value.GetString(); continue; } + if (property.NameEquals("accessTier"u8)) + { + accessTier = new StorageBlobAccessTier(property.Value.GetString()); + continue; + } + if (property.NameEquals("previousTier"u8)) + { + previousTier = new StorageBlobAccessTier(property.Value.GetString()); + continue; + } if (property.NameEquals("url"u8)) { url = property.Value.GetString(); @@ -229,6 +238,8 @@ internal static StorageBlobTierChangedEventData DeserializeStorageBlobTierChange contentType, contentLength, blobType, + accessTier, + previousTier, url, sequencer, identity, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.cs index e1f0f18db416..ae0660ee74c4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.cs @@ -46,12 +46,16 @@ public partial class StorageBlobTierChangedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . + /// The current tier of the blob. + /// The previous tier of the blob. /// For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. /// is null. - internal StorageBlobTierChangedEventData(IReadOnlyDictionary storageDiagnostics) + internal StorageBlobTierChangedEventData(StorageBlobAccessTier accessTier, StorageBlobAccessTier previousTier, IReadOnlyDictionary storageDiagnostics) { Argument.AssertNotNull(storageDiagnostics, nameof(storageDiagnostics)); + AccessTier = accessTier; + PreviousTier = previousTier; StorageDiagnostics = storageDiagnostics; } @@ -62,12 +66,14 @@ internal StorageBlobTierChangedEventData(IReadOnlyDictionary /// The content type of the blob. This is the same as what would be returned in the Content-Type header from the blob. /// The size of the blob in bytes. This is the same as what would be returned in the Content-Length header from the blob. /// The type of blob. + /// The current tier of the blob. + /// The previous tier of the blob. /// The path to the blob. /// An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. /// The identity of the requester that triggered this event. /// For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. /// Keeps track of any properties unknown to the library. - internal StorageBlobTierChangedEventData(string api, string clientRequestId, string requestId, string contentType, long? contentLength, string blobType, string url, string sequencer, string identity, IReadOnlyDictionary storageDiagnostics, IDictionary serializedAdditionalRawData) + internal StorageBlobTierChangedEventData(string api, string clientRequestId, string requestId, string contentType, long? contentLength, string blobType, StorageBlobAccessTier accessTier, StorageBlobAccessTier previousTier, string url, string sequencer, string identity, IReadOnlyDictionary storageDiagnostics, IDictionary serializedAdditionalRawData) { Api = api; ClientRequestId = clientRequestId; @@ -75,6 +81,8 @@ internal StorageBlobTierChangedEventData(string api, string clientRequestId, str ContentType = contentType; ContentLength = contentLength; BlobType = blobType; + AccessTier = accessTier; + PreviousTier = previousTier; Url = url; Sequencer = sequencer; Identity = identity; @@ -99,6 +107,10 @@ internal StorageBlobTierChangedEventData() public long? ContentLength { get; } /// The type of blob. public string BlobType { get; } + /// The current tier of the blob. + public StorageBlobAccessTier AccessTier { get; } + /// The previous tier of the blob. + public StorageBlobAccessTier PreviousTier { get; } /// The path to the blob. public string Url { get; } /// An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryCreatedEventData.Serialization.cs index 0d0d24c1033c..25cb10c0e07f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryCreatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageDirectoryCreatedEventData : IUtf8JsonSerializable, I 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageDirectoryCreatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Api)) { writer.WritePropertyName("api"u8); @@ -104,6 +96,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageDirectoryCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryDeletedEventData.Serialization.cs index 19a1ddb4c0b2..69916a84d6d3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageDirectoryDeletedEventData : IUtf8JsonSerializable, I 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageDirectoryDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Api)) { writer.WritePropertyName("api"u8); @@ -104,6 +96,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageDirectoryDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryRenamedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryRenamedEventData.Serialization.cs index 875bac47290a..88c250bc9627 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryRenamedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryRenamedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageDirectoryRenamedEventData : IUtf8JsonSerializable, I 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageDirectoryRenamedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Api)) { writer.WritePropertyName("api"u8); @@ -104,6 +96,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageDirectoryRenamedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyActionSummaryDetail.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyActionSummaryDetail.Serialization.cs index 48221ea12e3a..4e6e1d26d7cf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyActionSummaryDetail.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyActionSummaryDetail.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageLifecyclePolicyActionSummaryDetail : IUtf8JsonSerial 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageLifecyclePolicyActionSummaryDetail)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(TotalObjectsCount)) { writer.WritePropertyName("totalObjectsCount"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageLifecyclePolicyActionSummaryDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.Serialization.cs index 7101b2b07c72..f663dbf1a0e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageLifecyclePolicyCompletedEventData : IUtf8JsonSeriali 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageLifecyclePolicyCompletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ScheduleTime)) { writer.WritePropertyName("scheduleTime"u8); @@ -45,6 +37,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(TierToCoolSummary, options); writer.WritePropertyName("tierToArchiveSummary"u8); writer.WriteObjectValue(TierToArchiveSummary, options); + writer.WritePropertyName("tierToColdSummary"u8); + writer.WriteObjectValue(TierToColdSummary, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -60,6 +54,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageLifecyclePolicyCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -86,6 +81,7 @@ internal static StorageLifecyclePolicyCompletedEventData DeserializeStorageLifec StorageLifecyclePolicyActionSummaryDetail deleteSummary = default; StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary = default; StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary = default; + StorageLifecyclePolicyActionSummaryDetail tierToColdSummary = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -110,13 +106,24 @@ internal static StorageLifecyclePolicyCompletedEventData DeserializeStorageLifec tierToArchiveSummary = StorageLifecyclePolicyActionSummaryDetail.DeserializeStorageLifecyclePolicyActionSummaryDetail(property.Value, options); continue; } + if (property.NameEquals("tierToColdSummary"u8)) + { + tierToColdSummary = StorageLifecyclePolicyActionSummaryDetail.DeserializeStorageLifecyclePolicyActionSummaryDetail(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new StorageLifecyclePolicyCompletedEventData(scheduleTime, deleteSummary, tierToCoolSummary, tierToArchiveSummary, serializedAdditionalRawData); + return new StorageLifecyclePolicyCompletedEventData( + scheduleTime, + deleteSummary, + tierToCoolSummary, + tierToArchiveSummary, + tierToColdSummary, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.cs index 392cff3c1e1e..2dd93724298a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.cs @@ -49,16 +49,19 @@ public partial class StorageLifecyclePolicyCompletedEventData /// Execution statistics of a specific policy action in a Blob Management cycle. /// Execution statistics of a specific policy action in a Blob Management cycle. /// Execution statistics of a specific policy action in a Blob Management cycle. - /// , or is null. - internal StorageLifecyclePolicyCompletedEventData(StorageLifecyclePolicyActionSummaryDetail deleteSummary, StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary, StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary) + /// Execution statistics of a specific policy action in a Blob Management cycle. + /// , , or is null. + internal StorageLifecyclePolicyCompletedEventData(StorageLifecyclePolicyActionSummaryDetail deleteSummary, StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary, StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary, StorageLifecyclePolicyActionSummaryDetail tierToColdSummary) { Argument.AssertNotNull(deleteSummary, nameof(deleteSummary)); Argument.AssertNotNull(tierToCoolSummary, nameof(tierToCoolSummary)); Argument.AssertNotNull(tierToArchiveSummary, nameof(tierToArchiveSummary)); + Argument.AssertNotNull(tierToColdSummary, nameof(tierToColdSummary)); DeleteSummary = deleteSummary; TierToCoolSummary = tierToCoolSummary; TierToArchiveSummary = tierToArchiveSummary; + TierToColdSummary = tierToColdSummary; } /// Initializes a new instance of . @@ -66,13 +69,15 @@ internal StorageLifecyclePolicyCompletedEventData(StorageLifecyclePolicyActionSu /// Execution statistics of a specific policy action in a Blob Management cycle. /// Execution statistics of a specific policy action in a Blob Management cycle. /// Execution statistics of a specific policy action in a Blob Management cycle. + /// Execution statistics of a specific policy action in a Blob Management cycle. /// Keeps track of any properties unknown to the library. - internal StorageLifecyclePolicyCompletedEventData(string scheduleTime, StorageLifecyclePolicyActionSummaryDetail deleteSummary, StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary, StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary, IDictionary serializedAdditionalRawData) + internal StorageLifecyclePolicyCompletedEventData(string scheduleTime, StorageLifecyclePolicyActionSummaryDetail deleteSummary, StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary, StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary, StorageLifecyclePolicyActionSummaryDetail tierToColdSummary, IDictionary serializedAdditionalRawData) { ScheduleTime = scheduleTime; DeleteSummary = deleteSummary; TierToCoolSummary = tierToCoolSummary; TierToArchiveSummary = tierToArchiveSummary; + TierToColdSummary = tierToColdSummary; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -89,5 +94,7 @@ internal StorageLifecyclePolicyCompletedEventData() public StorageLifecyclePolicyActionSummaryDetail TierToCoolSummary { get; } /// Execution statistics of a specific policy action in a Blob Management cycle. public StorageLifecyclePolicyActionSummaryDetail TierToArchiveSummary { get; } + /// Execution statistics of a specific policy action in a Blob Management cycle. + public StorageLifecyclePolicyActionSummaryDetail TierToColdSummary { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.Serialization.cs index 2cea1ef346f1..d4cc7951c00c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageTaskAssignmentCompletedEventData : IUtf8JsonSerializ 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") @@ -34,10 +25,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageTaskAssignmentCompletedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WritePropertyName("completedDateTime"u8); - writer.WriteStringValue(CompletedOn, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(CompletedOn)) + { + writer.WritePropertyName("completedDateTime"u8); + writer.WriteStringValue(CompletedOn.Value, "O"); + } if (Optional.IsDefined(TaskExecutionId)) { writer.WritePropertyName("taskExecutionId"u8); @@ -65,6 +63,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageTaskAssignmentCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,8 +86,8 @@ internal static StorageTaskAssignmentCompletedEventData DeserializeStorageTaskAs { return null; } - StorageTaskAssignmentCompletedStatus status = default; - DateTimeOffset completedDateTime = default; + StorageTaskAssignmentCompletedStatus? status = default; + DateTimeOffset? completedDateTime = default; string taskExecutionId = default; string taskName = default; Uri summaryReportBlobUrl = default; @@ -98,11 +97,19 @@ internal static StorageTaskAssignmentCompletedEventData DeserializeStorageTaskAs { if (property.NameEquals("status"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } status = new StorageTaskAssignmentCompletedStatus(property.Value.GetString()); continue; } if (property.NameEquals("completedDateTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } completedDateTime = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.cs index acf2da3e348f..91f49d744b3d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.cs @@ -46,16 +46,12 @@ public partial class StorageTaskAssignmentCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The status for a storage task. - /// The time at which a storage task was completed. /// The summary report blob url for a storage task. /// is null. - internal StorageTaskAssignmentCompletedEventData(StorageTaskAssignmentCompletedStatus status, DateTimeOffset completedOn, Uri summaryReportBlobUri) + internal StorageTaskAssignmentCompletedEventData(Uri summaryReportBlobUri) { Argument.AssertNotNull(summaryReportBlobUri, nameof(summaryReportBlobUri)); - Status = status; - CompletedOn = completedOn; SummaryReportBlobUri = summaryReportBlobUri; } @@ -66,7 +62,7 @@ internal StorageTaskAssignmentCompletedEventData(StorageTaskAssignmentCompletedS /// The task name for a storage task. /// The summary report blob url for a storage task. /// Keeps track of any properties unknown to the library. - internal StorageTaskAssignmentCompletedEventData(StorageTaskAssignmentCompletedStatus status, DateTimeOffset completedOn, string taskExecutionId, string taskName, Uri summaryReportBlobUri, IDictionary serializedAdditionalRawData) + internal StorageTaskAssignmentCompletedEventData(StorageTaskAssignmentCompletedStatus? status, DateTimeOffset? completedOn, string taskExecutionId, string taskName, Uri summaryReportBlobUri, IDictionary serializedAdditionalRawData) { Status = status; CompletedOn = completedOn; @@ -82,9 +78,9 @@ internal StorageTaskAssignmentCompletedEventData() } /// The status for a storage task. - public StorageTaskAssignmentCompletedStatus Status { get; } + public StorageTaskAssignmentCompletedStatus? Status { get; } /// The time at which a storage task was completed. - public DateTimeOffset CompletedOn { get; } + public DateTimeOffset? CompletedOn { get; } /// The execution id for a storage task. public string TaskExecutionId { get; } /// The task name for a storage task. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.Serialization.cs index bb9d126de7c0..32854032bd7f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageTaskAssignmentQueuedEventData : IUtf8JsonSerializabl 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageTaskAssignmentQueuedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("queuedDateTime"u8); - writer.WriteStringValue(QueuedOn, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(QueuedOn)) + { + writer.WritePropertyName("queuedDateTime"u8); + writer.WriteStringValue(QueuedOn.Value, "O"); + } if (Optional.IsDefined(TaskExecutionId)) { writer.WritePropertyName("taskExecutionId"u8); @@ -56,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageTaskAssignmentQueuedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -78,7 +74,7 @@ internal static StorageTaskAssignmentQueuedEventData DeserializeStorageTaskAssig { return null; } - DateTimeOffset queuedDateTime = default; + DateTimeOffset? queuedDateTime = default; string taskExecutionId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -86,6 +82,10 @@ internal static StorageTaskAssignmentQueuedEventData DeserializeStorageTaskAssig { if (property.NameEquals("queuedDateTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } queuedDateTime = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.cs index 629cae0b0418..c03472230485 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.cs @@ -46,30 +46,23 @@ public partial class StorageTaskAssignmentQueuedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time at which a storage task was queued. - internal StorageTaskAssignmentQueuedEventData(DateTimeOffset queuedOn) + internal StorageTaskAssignmentQueuedEventData() { - QueuedOn = queuedOn; } /// Initializes a new instance of . /// The time at which a storage task was queued. /// The execution id for a storage task. /// Keeps track of any properties unknown to the library. - internal StorageTaskAssignmentQueuedEventData(DateTimeOffset queuedOn, string taskExecutionId, IDictionary serializedAdditionalRawData) + internal StorageTaskAssignmentQueuedEventData(DateTimeOffset? queuedOn, string taskExecutionId, IDictionary serializedAdditionalRawData) { QueuedOn = queuedOn; TaskExecutionId = taskExecutionId; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal StorageTaskAssignmentQueuedEventData() - { - } - /// The time at which a storage task was queued. - public DateTimeOffset QueuedOn { get; } + public DateTimeOffset? QueuedOn { get; } /// The execution id for a storage task. public string TaskExecutionId { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.Serialization.cs index 1e4db6040fab..62c9f0d7e9a8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageTaskCompletedEventData : IUtf8JsonSerializable, IJso 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") @@ -34,10 +25,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageTaskCompletedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WritePropertyName("completedDateTime"u8); - writer.WriteStringValue(CompletedDateTime, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(CompletedDateTime)) + { + writer.WritePropertyName("completedDateTime"u8); + writer.WriteStringValue(CompletedDateTime.Value, "O"); + } if (Optional.IsDefined(TaskExecutionId)) { writer.WritePropertyName("taskExecutionId"u8); @@ -65,6 +63,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageTaskCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,8 +86,8 @@ internal static StorageTaskCompletedEventData DeserializeStorageTaskCompletedEve { return null; } - StorageTaskCompletedStatus status = default; - DateTimeOffset completedDateTime = default; + StorageTaskCompletedStatus? status = default; + DateTimeOffset? completedDateTime = default; string taskExecutionId = default; string taskName = default; Uri summaryReportBlobUrl = default; @@ -98,11 +97,19 @@ internal static StorageTaskCompletedEventData DeserializeStorageTaskCompletedEve { if (property.NameEquals("status"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } status = new StorageTaskCompletedStatus(property.Value.GetString()); continue; } if (property.NameEquals("completedDateTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } completedDateTime = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.cs index a7e3b6af287d..068d575deae8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.cs @@ -46,16 +46,12 @@ public partial class StorageTaskCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The status for a storage task. - /// The time at which a storage task was completed. /// The summary report blob url for a storage task. /// is null. - internal StorageTaskCompletedEventData(StorageTaskCompletedStatus status, DateTimeOffset completedDateTime, Uri summaryReportBlobUrl) + internal StorageTaskCompletedEventData(Uri summaryReportBlobUrl) { Argument.AssertNotNull(summaryReportBlobUrl, nameof(summaryReportBlobUrl)); - Status = status; - CompletedDateTime = completedDateTime; SummaryReportBlobUrl = summaryReportBlobUrl; } @@ -66,7 +62,7 @@ internal StorageTaskCompletedEventData(StorageTaskCompletedStatus status, DateTi /// The task name for a storage task. /// The summary report blob url for a storage task. /// Keeps track of any properties unknown to the library. - internal StorageTaskCompletedEventData(StorageTaskCompletedStatus status, DateTimeOffset completedDateTime, string taskExecutionId, string taskName, Uri summaryReportBlobUrl, IDictionary serializedAdditionalRawData) + internal StorageTaskCompletedEventData(StorageTaskCompletedStatus? status, DateTimeOffset? completedDateTime, string taskExecutionId, string taskName, Uri summaryReportBlobUrl, IDictionary serializedAdditionalRawData) { Status = status; CompletedDateTime = completedDateTime; @@ -82,9 +78,9 @@ internal StorageTaskCompletedEventData() } /// The status for a storage task. - public StorageTaskCompletedStatus Status { get; } + public StorageTaskCompletedStatus? Status { get; } /// The time at which a storage task was completed. - public DateTimeOffset CompletedDateTime { get; } + public DateTimeOffset? CompletedDateTime { get; } /// The execution id for a storage task. public string TaskExecutionId { get; } /// The task name for a storage task. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.Serialization.cs index 2b6547d43360..88f1c24ab5ee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class StorageTaskQueuedEventData : IUtf8JsonSerializable, IJsonMo 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") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageTaskQueuedEventData)} does not support writing '{format}' format."); } - writer.WritePropertyName("queuedDateTime"u8); - writer.WriteStringValue(QueuedDateTime, "O"); + writer.WriteStartObject(); + if (Optional.IsDefined(QueuedDateTime)) + { + writer.WritePropertyName("queuedDateTime"u8); + writer.WriteStringValue(QueuedDateTime.Value, "O"); + } if (Optional.IsDefined(TaskExecutionId)) { writer.WritePropertyName("taskExecutionId"u8); @@ -56,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StorageTaskQueuedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -78,7 +74,7 @@ internal static StorageTaskQueuedEventData DeserializeStorageTaskQueuedEventData { return null; } - DateTimeOffset queuedDateTime = default; + DateTimeOffset? queuedDateTime = default; string taskExecutionId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -86,6 +82,10 @@ internal static StorageTaskQueuedEventData DeserializeStorageTaskQueuedEventData { if (property.NameEquals("queuedDateTime"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } queuedDateTime = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.cs index 0ad77410c7c3..79169b81a03e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.cs @@ -46,30 +46,23 @@ public partial class StorageTaskQueuedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time at which a storage task was queued. - internal StorageTaskQueuedEventData(DateTimeOffset queuedDateTime) + internal StorageTaskQueuedEventData() { - QueuedDateTime = queuedDateTime; } /// Initializes a new instance of . /// The time at which a storage task was queued. /// The execution id for a storage task. /// Keeps track of any properties unknown to the library. - internal StorageTaskQueuedEventData(DateTimeOffset queuedDateTime, string taskExecutionId, IDictionary serializedAdditionalRawData) + internal StorageTaskQueuedEventData(DateTimeOffset? queuedDateTime, string taskExecutionId, IDictionary serializedAdditionalRawData) { QueuedDateTime = queuedDateTime; TaskExecutionId = taskExecutionId; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal StorageTaskQueuedEventData() - { - } - /// The time at which a storage task was queued. - public DateTimeOffset QueuedDateTime { get; } + public DateTimeOffset? QueuedDateTime { get; } /// The execution id for a storage task. public string TaskExecutionId { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionDeletedEventData.Serialization.cs index 118af3e2917b..6d13ecb7e9a5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionDeletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class SubscriptionDeletedEventData : IUtf8JsonSerializable, IJson 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SubscriptionDeletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(EventSubscriptionId)) { writer.WritePropertyName("eventSubscriptionId"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } SubscriptionDeletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationEventData.Serialization.cs index 73797c8a2b8b..9dc775039545 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class SubscriptionValidationEventData : IUtf8JsonSerializable, IJ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SubscriptionValidationEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ValidationCode)) { writer.WritePropertyName("validationCode"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } SubscriptionValidationEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationResponse.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationResponse.Serialization.cs index 5b5ffbe5c353..fae09d4a54cb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationResponse.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationResponse.Serialization.cs @@ -18,15 +18,6 @@ public partial class SubscriptionValidationResponse : IUtf8JsonSerializable, IJs 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SubscriptionValidationResponse)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ValidationResponse)) { writer.WritePropertyName("validationResponse"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } SubscriptionValidationResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SystemEventsClientOptions.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SystemEventsClientOptions.cs index 0d99553ffa77..17e37e2f9d4b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SystemEventsClientOptions.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SystemEventsClientOptions.cs @@ -13,13 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents /// Client options for SystemEventsClient. internal partial class SystemEventsClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2024_01_01; + private const ServiceVersion LatestVersion = ServiceVersion.V2018_01_01; /// The version of the service to use. internal enum ServiceVersion { - /// Service version "2024-01-01". - V2024_01_01 = 1, + /// Service version "2018-01-01". + V2018_01_01 = 1, } internal string Version { get; } @@ -29,7 +29,7 @@ public SystemEventsClientOptions(ServiceVersion version = LatestVersion) { Version = version switch { - ServiceVersion.V2024_01_01 => "2024-01-01", + ServiceVersion.V2018_01_01 => "2018-01-01", _ => throw new NotSupportedException() }; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/UnknownMediaJobOutput.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/UnknownMediaJobOutput.Serialization.cs index 237a41a34578..9c616f4f8516 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/UnknownMediaJobOutput.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/UnknownMediaJobOutput.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownMediaJobOutput : 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") @@ -34,7 +25,39 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MediaJobOutput)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("@odata.type"u8); + writer.WriteStringValue(OdataType); + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + if (Optional.IsDefined(Label)) + { + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + } + writer.WritePropertyName("progress"u8); + writer.WriteNumberValue(Progress); + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } MediaJobOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -61,7 +84,7 @@ internal static UnknownMediaJobOutput DeserializeUnknownMediaJobOutput(JsonEleme MediaJobError error = default; string label = default; long progress = default; - MediaJobState state = default; + MediaJobState? state = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -88,6 +111,10 @@ internal static UnknownMediaJobOutput DeserializeUnknownMediaJobOutput(JsonEleme } if (property.NameEquals("state"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } state = new MediaJobState(property.Value.GetString()); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/UnknownMediaJobOutput.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/UnknownMediaJobOutput.cs index 0bfb2f76e943..1e59a62941b6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/UnknownMediaJobOutput.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/UnknownMediaJobOutput.cs @@ -20,7 +20,7 @@ internal partial class UnknownMediaJobOutput : MediaJobOutput /// Gets the Job output progress. /// Gets the Job output state. /// Keeps track of any properties unknown to the library. - internal UnknownMediaJobOutput(string odataType, MediaJobError error, string label, long progress, MediaJobState state, IDictionary serializedAdditionalRawData) : base(odataType, error, label, progress, state, serializedAdditionalRawData) + internal UnknownMediaJobOutput(string odataType, MediaJobError error, string label, long progress, MediaJobState? state, IDictionary serializedAdditionalRawData) : base(odataType, error, label, progress, state, serializedAdditionalRawData) { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventData.Serialization.cs index d080ac40d78d..a74595ca3b5a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebAppServicePlanUpdatedEventData : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebAppServicePlanUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appServicePlanEventTypeDetail"u8); writer.WriteObjectValue(AppServicePlanEventTypeDetail, options); writer.WritePropertyName("sku"u8); @@ -83,6 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebAppServicePlanUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventDataSku.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventDataSku.Serialization.cs index 6f468fc9ebf0..b8d0e9954f4a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventDataSku.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventDataSku.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebAppServicePlanUpdatedEventDataSku : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebAppServicePlanUpdatedEventDataSku)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -74,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebAppServicePlanUpdatedEventDataSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppUpdatedEventData.Serialization.cs index 1ad3d2774328..1f3c638e270d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppUpdatedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebAppUpdatedEventData : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebAppUpdatedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebAppUpdatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationCompletedEventData.Serialization.cs index 3ba9f6644c88..47a48849fdb9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebBackupOperationCompletedEventData : IUtf8JsonSerializabl 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebBackupOperationCompletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebBackupOperationCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationFailedEventData.Serialization.cs index 8747eb522d65..d04b699ff009 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationFailedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebBackupOperationFailedEventData : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebBackupOperationFailedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebBackupOperationFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationStartedEventData.Serialization.cs index aed7afbdc5b8..d57011464957 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationStartedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebBackupOperationStartedEventData : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebBackupOperationStartedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebBackupOperationStartedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationCompletedEventData.Serialization.cs index f1da68ce703e..fa034c514be3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebRestoreOperationCompletedEventData : IUtf8JsonSerializab 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebRestoreOperationCompletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebRestoreOperationCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationFailedEventData.Serialization.cs index befc7069bc90..24b802dda2ce 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationFailedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebRestoreOperationFailedEventData : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebRestoreOperationFailedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebRestoreOperationFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationStartedEventData.Serialization.cs index 736f9d2dc985..1539036b7c89 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationStartedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebRestoreOperationStartedEventData : IUtf8JsonSerializable 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebRestoreOperationStartedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebRestoreOperationStartedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapCompletedEventData.Serialization.cs index 2f3fd9f03910..d9277da67fc0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapCompletedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebSlotSwapCompletedEventData : IUtf8JsonSerializable, IJso 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebSlotSwapCompletedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebSlotSwapCompletedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapFailedEventData.Serialization.cs index cc16e789939e..1efaa736d63b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapFailedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebSlotSwapFailedEventData : IUtf8JsonSerializable, IJsonMo 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebSlotSwapFailedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebSlotSwapFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapStartedEventData.Serialization.cs index 89e6c83484ee..dfa43a0717be 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapStartedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebSlotSwapStartedEventData : IUtf8JsonSerializable, IJsonM 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebSlotSwapStartedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebSlotSwapStartedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewCancelledEventData.Serialization.cs index 448d307ecd32..0e8d6e7c02ed 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewCancelledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewCancelledEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebSlotSwapWithPreviewCancelledEventData : IUtf8JsonSeriali 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebSlotSwapWithPreviewCancelledEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebSlotSwapWithPreviewCancelledEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewStartedEventData.Serialization.cs index 445795c243b5..677ee7f8b37d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewStartedEventData.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebSlotSwapWithPreviewStartedEventData : IUtf8JsonSerializa 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WebSlotSwapWithPreviewStartedEventData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("appEventTypeDetail"u8); writer.WriteObjectValue(AppEventTypeDetail, options); if (Optional.IsDefined(Name)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WebSlotSwapWithPreviewStartedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml index e141725b6362..61e3bd9ba78a 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: c99348eee0473b8e38cf3f899b90dbc467c0d6e5 repo: Azure/azure-rest-api-specs -directory: "specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents" -commit: 170d579f704eaa201596803caba9095e393e4e6b +additionalDirectories: 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 b5a2de6e80e0..c88e5452b6d5 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 @@ -322,6 +322,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ResourceDeleteFailureEventData ResourceDeleteFailureEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, string authorization = null, string claims = null, string correlationId = null, string httpRequest = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceDeleteSuccessEventData ResourceDeleteSuccessEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, string authorization = null, string claims = null, string correlationId = null, string httpRequest = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceHttpRequest ResourceHttpRequest(string clientRequestId = null, string clientIpAddress = null, Azure.Core.RequestMethod? method = default(Azure.Core.RequestMethod?), string url = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsContainerServiceEventResourcesScheduledEventData ResourceNotificationsContainerServiceEventResourcesScheduledEventData(Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails resourceDetails = null, Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsHealthResourcesAnnotatedEventData ResourceNotificationsHealthResourcesAnnotatedEventData(Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails resourceDetails = null, Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData(Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails resourceDetails = null, Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails ResourceNotificationsOperationalDetails(System.DateTimeOffset? resourceEventTime = default(System.DateTimeOffset?)) { throw null; } @@ -606,6 +607,7 @@ public static partial class SystemEventNames public const string ResourceDeleteCancel = "Microsoft.Resources.ResourceDeleteCancel"; public const string ResourceDeleteFailure = "Microsoft.Resources.ResourceDeleteFailure"; public const string ResourceDeleteSuccess = "Microsoft.Resources.ResourceDeleteSuccess"; + public const string ResourceNotificationsContainerServiceEventResourcesScheduled = "Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted"; public const string ResourceNotificationsHealthResourcesAnnotated = "Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated"; public const string ResourceNotificationsHealthResourcesAvailabilityStatusChanged = "Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged"; public const string ResourceNotificationsResourceManagementCreatedOrUpdated = "Microsoft.ResourceNotifications.Resources.CreatedOrUpdated"; @@ -3174,6 +3176,10 @@ internal ResourceHttpRequest() { } public Azure.Core.RequestMethod Method { get { throw null; } } public string Url { get { throw null; } } } + public partial class ResourceNotificationsContainerServiceEventResourcesScheduledEventData : Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedEventData + { + internal ResourceNotificationsContainerServiceEventResourcesScheduledEventData() { } + } public partial class ResourceNotificationsHealthResourcesAnnotatedEventData : Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedEventData { internal ResourceNotificationsHealthResourcesAnnotatedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs index 36bbe3accadf..e9091d505f2d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs @@ -4059,6 +4059,16 @@ public static ResourceNotificationsResourceManagementDeletedEventData ResourceNo return new ResourceNotificationsResourceManagementDeletedEventData(resourceDetails, operationalDetails); } + /// Initializes a new instance of . + /// resourceInfo details for update event. + /// details about operational info. + /// api version of the resource properties bag. + /// A new instance for mocking. + public static ResourceNotificationsContainerServiceEventResourcesScheduledEventData ResourceNotificationsContainerServiceEventResourcesScheduledEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails = null, ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) + { + return new ResourceNotificationsContainerServiceEventResourcesScheduledEventData(resourceDetails, operationalDetails, apiVersion); + } + /// Initializes a new instance of . /// Id of the operation that caused this event. /// A new instance for mocking. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.Serialization.cs new file mode 100644 index 000000000000..ef47b6cf4a61 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.Serialization.cs @@ -0,0 +1,77 @@ +// 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(ResourceNotificationsContainerServiceEventResourcesScheduledEventDataConverter))] + public partial class ResourceNotificationsContainerServiceEventResourcesScheduledEventData + { + internal static ResourceNotificationsContainerServiceEventResourcesScheduledEventData DeserializeResourceNotificationsContainerServiceEventResourcesScheduledEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceNotificationsResourceUpdatedDetails resourceInfo = default; + ResourceNotificationsOperationalDetails operationalInfo = default; + string apiVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceInfo = ResourceNotificationsResourceUpdatedDetails.DeserializeResourceNotificationsResourceUpdatedDetails(property.Value); + continue; + } + if (property.NameEquals("operationalInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationalInfo = ResourceNotificationsOperationalDetails.DeserializeResourceNotificationsOperationalDetails(property.Value); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + } + return new ResourceNotificationsContainerServiceEventResourcesScheduledEventData(resourceInfo, operationalInfo, apiVersion); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ResourceNotificationsContainerServiceEventResourcesScheduledEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeResourceNotificationsContainerServiceEventResourcesScheduledEventData(document.RootElement); + } + + internal partial class ResourceNotificationsContainerServiceEventResourcesScheduledEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ResourceNotificationsContainerServiceEventResourcesScheduledEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ResourceNotificationsContainerServiceEventResourcesScheduledEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceNotificationsContainerServiceEventResourcesScheduledEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs new file mode 100644 index 000000000000..e3e7ad6dd304 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs @@ -0,0 +1,26 @@ +// 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 event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event. + public partial class ResourceNotificationsContainerServiceEventResourcesScheduledEventData : ResourceNotificationsResourceUpdatedEventData + { + /// Initializes a new instance of . + internal ResourceNotificationsContainerServiceEventResourcesScheduledEventData() + { + } + + /// Initializes a new instance of . + /// resourceInfo details for update event. + /// details about operational info. + /// api version of the resource properties bag. + internal ResourceNotificationsContainerServiceEventResourcesScheduledEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails, ResourceNotificationsOperationalDetails operationalDetails, string apiVersion) : base(resourceDetails, operationalDetails, apiVersion) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md index da4fb78ad757..f6a39ca3a1d3 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/012021c786c360e0c34faf7af888c7fd7dbe2df5/specification/eventgrid/data-plane/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/c99348eee0473b8e38cf3f899b90dbc467c0d6e5/specification/eventgrid/data-plane/readme.md generation1-convenience-client: true model-factory-for-hlc: - MediaJobOutputAsset