diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs index 7f23a6930a0e..48f3599663a0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs @@ -671,7 +671,7 @@ public partial class AcsRouterCommunicationError : System.ClientModel.Primitives { internal AcsRouterCommunicationError() { } public string Code { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError Innererror { get { throw null; } } public string Message { get { throw null; } } public string Target { get { throw null; } } @@ -1232,9 +1232,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ApiCenterApiDefinitionUpdatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiCenterApiDefinitionUpdatedEventData() { } - public string Description { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification Specification { get { throw null; } } public string Title { get { throw null; } } + public object Word { 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) { } @@ -1245,8 +1245,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ApiCenterApiSpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiCenterApiSpecification() { } - public string Name { get { throw null; } } public string Version { get { throw null; } } + public string Word { 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) { } @@ -1320,6 +1320,62 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ApiManagementCircuitBreakerClosedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerOpenedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerPropertiesRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerPropertiesRule() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerPropertiesRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerPropertiesRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementExpiredGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayApiAddedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayApiAddedEventData() { } @@ -1430,6 +1486,42 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ApiManagementGatewayProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenExpiredEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayUpdatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayUpdatedEventData() { } @@ -1441,6 +1533,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ApiManagementNearExpiryGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementNearExpiryGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementProductCreatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementProductCreatedEventData() { } @@ -2332,6 +2435,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EdgeSolutionVersionPublishedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EventGridMqttClientCreatedOrUpdatedEventData() { } @@ -2484,7 +2604,7 @@ public static partial class EventGridSystemEventsModelFactory 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; } + 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 errors = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterEventData AcsRouterEventData(string jobId = null, string channelReference = null, string channelId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobCancelledEventData AcsRouterJobCancelledEventData(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 note = null, string dispositionCode = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobClassificationFailedEventData AcsRouterJobClassificationFailedEventData(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 classificationPolicyId = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } @@ -2518,14 +2638,18 @@ public static partial class EventGridSystemEventsModelFactory 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?), int segmentCount = 0) { 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; } - public static Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification ApiCenterApiSpecification(string name = null, string version = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiDefinitionUpdatedEventData ApiCenterApiDefinitionUpdatedEventData(string title = null, object word = null, Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification specification = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification ApiCenterApiSpecification(string word = null, string version = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiCreatedEventData ApiManagementApiCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiDeletedEventData ApiManagementApiDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseCreatedEventData ApiManagementApiReleaseCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -2536,7 +2660,11 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties tokenInfo = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductUpdatedEventData ApiManagementProductUpdatedEventData(string resourceUri = null) { throw null; } @@ -2602,6 +2730,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -4427,6 +4556,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -4437,6 +4568,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -4476,6 +4609,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs index 7f23a6930a0e..48f3599663a0 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 @@ -671,7 +671,7 @@ public partial class AcsRouterCommunicationError : System.ClientModel.Primitives { internal AcsRouterCommunicationError() { } public string Code { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.AcsRouterCommunicationError Innererror { get { throw null; } } public string Message { get { throw null; } } public string Target { get { throw null; } } @@ -1232,9 +1232,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ApiCenterApiDefinitionUpdatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiCenterApiDefinitionUpdatedEventData() { } - public string Description { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification Specification { get { throw null; } } public string Title { get { throw null; } } + public object Word { 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) { } @@ -1245,8 +1245,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ApiCenterApiSpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiCenterApiSpecification() { } - public string Name { get { throw null; } } public string Version { get { throw null; } } + public string Word { 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) { } @@ -1320,6 +1320,62 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ApiManagementCircuitBreakerClosedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerOpenedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerPropertiesRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerPropertiesRule() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerPropertiesRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerPropertiesRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementExpiredGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayApiAddedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayApiAddedEventData() { } @@ -1430,6 +1486,42 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ApiManagementGatewayProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenExpiredEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayUpdatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayUpdatedEventData() { } @@ -1441,6 +1533,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ApiManagementNearExpiryGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementNearExpiryGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementProductCreatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementProductCreatedEventData() { } @@ -2332,6 +2435,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EdgeSolutionVersionPublishedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EventGridMqttClientCreatedOrUpdatedEventData() { } @@ -2484,7 +2604,7 @@ public static partial class EventGridSystemEventsModelFactory 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; } + 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 errors = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterEventData AcsRouterEventData(string jobId = null, string channelReference = null, string channelId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobCancelledEventData AcsRouterJobCancelledEventData(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 note = null, string dispositionCode = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobClassificationFailedEventData AcsRouterJobClassificationFailedEventData(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 classificationPolicyId = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } @@ -2518,14 +2638,18 @@ public static partial class EventGridSystemEventsModelFactory 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?), int segmentCount = 0) { 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; } - public static Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification ApiCenterApiSpecification(string name = null, string version = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiDefinitionUpdatedEventData ApiCenterApiDefinitionUpdatedEventData(string title = null, object word = null, Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification specification = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiCenterApiSpecification ApiCenterApiSpecification(string word = null, string version = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiCreatedEventData ApiManagementApiCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiDeletedEventData ApiManagementApiDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseCreatedEventData ApiManagementApiReleaseCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -2536,7 +2660,11 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties tokenInfo = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductUpdatedEventData ApiManagementProductUpdatedEventData(string resourceUri = null) { throw null; } @@ -2602,6 +2730,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -4427,6 +4556,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -4437,6 +4568,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -4476,6 +4609,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs index 1d2f41eccb9d..bee320c9cb18 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 @@ -65,13 +65,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); - writer.WritePropertyName("participants"u8); - writer.WriteStartArray(); - foreach (var item in Participants) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("participants"u8); + writer.WriteStartArray(); + foreach (var item in Participants) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsChatThreadCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs index dd366f600f08..b90aee3ecdf0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -18,19 +17,17 @@ public partial class AcsChatThreadCreatedEventData : AcsChatThreadEventInThreadB /// The communication identifier of the user who created the thread. /// The thread properties. /// The thread metadata. - /// The list of properties of participants who are part of the thread. - /// , , or is null. - internal AcsChatThreadCreatedEventData(CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) + /// , or is null. + internal AcsChatThreadCreatedEventData(CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) { Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); Argument.AssertNotNull(metadata, nameof(metadata)); - Argument.AssertNotNull(participants, nameof(participants)); CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; Metadata = metadata; - Participants = participants.ToList(); + Participants = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs index 16c92dd38cd7..9bb3973a81ae 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 @@ -65,13 +65,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(item.Value); } writer.WriteEndObject(); - writer.WritePropertyName("participants"u8); - writer.WriteStartArray(); - foreach (var item in Participants) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("participants"u8); + writer.WriteStartArray(); + foreach (var item in Participants) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsChatThreadCreatedWithUserEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs index 428a332bf9a3..547fa1fee167 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -19,20 +18,18 @@ public partial class AcsChatThreadCreatedWithUserEventData : AcsChatThreadEventB /// The communication identifier of the user who created the thread. /// The thread properties. /// The thread metadata. - /// The list of properties of participants who are part of the thread. - /// , , , or is null. - internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) : base(recipientCommunicationIdentifier) + /// , , or is null. + internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(recipientCommunicationIdentifier) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); Argument.AssertNotNull(metadata, nameof(metadata)); - Argument.AssertNotNull(participants, nameof(participants)); CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; Metadata = metadata; - Participants = participants.ToList(); + Participants = new ChangeTrackingList(); } /// Initializes a new instance of . 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 5e37e1e382e7..0978d7eee5ff 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs @@ -34,13 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRecordingStorageInfoProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("recordingChunks"u8); - writer.WriteStartArray(); - foreach (var item in RecordingChunks) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("recordingChunks"u8); + writer.WriteStartArray(); + foreach (var item in RecordingChunks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs index bc7b2ef0b31b..44b951440b82 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,13 +46,9 @@ public partial class AcsRecordingStorageInfoProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// List of details of recording chunks information. - /// is null. - internal AcsRecordingStorageInfoProperties(IEnumerable recordingChunks) + internal AcsRecordingStorageInfoProperties() { - Argument.AssertNotNull(recordingChunks, nameof(recordingChunks)); - - RecordingChunks = recordingChunks.ToList(); + RecordingChunks = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -65,11 +60,6 @@ internal AcsRecordingStorageInfoProperties(IReadOnlyList Initializes a new instance of for deserialization. - internal AcsRecordingStorageInfoProperties() - { - } - /// List of details of recording chunks information. public IReadOnlyList RecordingChunks { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs index c93ea165e906..339c86dd1bc2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs @@ -51,13 +51,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("innererror"u8); writer.WriteObjectValue(Innererror, options); - writer.WritePropertyName("details"u8); - writer.WriteStartArray(); - foreach (var item in Details) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -99,7 +102,7 @@ internal static AcsRouterCommunicationError DeserializeAcsRouterCommunicationErr string message = default; string target = default; AcsRouterCommunicationError innererror = default; - IReadOnlyList details = default; + IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -124,14 +127,14 @@ internal static AcsRouterCommunicationError DeserializeAcsRouterCommunicationErr innererror = DeserializeAcsRouterCommunicationError(property.Value, options); continue; } - if (property.NameEquals("details"u8)) + if (property.NameEquals("errors"u8)) { List array = new List(); foreach (var item in property.Value.EnumerateArray()) { array.Add(DeserializeAcsRouterCommunicationError(item, options)); } - details = array; + errors = array; continue; } if (options.Format != "W") @@ -145,7 +148,7 @@ internal static AcsRouterCommunicationError DeserializeAcsRouterCommunicationErr message, target, innererror, - details, + errors, serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs index 35ae98ef1222..2da16727de35 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -48,15 +47,13 @@ public partial class AcsRouterCommunicationError /// Initializes a new instance of . /// Router Communication Inner Error. - /// List of Router Communication Errors. - /// or is null. - internal AcsRouterCommunicationError(AcsRouterCommunicationError innererror, IEnumerable details) + /// is null. + internal AcsRouterCommunicationError(AcsRouterCommunicationError innererror) { Argument.AssertNotNull(innererror, nameof(innererror)); - Argument.AssertNotNull(details, nameof(details)); Innererror = innererror; - Details = details.ToList(); + Errors = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -64,15 +61,15 @@ internal AcsRouterCommunicationError(AcsRouterCommunicationError innererror, IEn /// Router Communication Error Message. /// Router Communication Error Target. /// Router Communication Inner Error. - /// List of Router Communication Errors. + /// List of Router Communication Errors. /// Keeps track of any properties unknown to the library. - internal AcsRouterCommunicationError(string code, string message, string target, AcsRouterCommunicationError innererror, IReadOnlyList details, IDictionary serializedAdditionalRawData) + internal AcsRouterCommunicationError(string code, string message, string target, AcsRouterCommunicationError innererror, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { Code = code; Message = message; Target = target; Innererror = innererror; - Details = details; + Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -90,6 +87,6 @@ internal AcsRouterCommunicationError() /// Router Communication Inner Error. public AcsRouterCommunicationError Innererror { get; } /// List of Router Communication Errors. - public IReadOnlyList Details { get; } + public IReadOnlyList Errors { get; } } } 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 746dd05809bb..d7404d16d811 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs @@ -40,13 +40,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("classificationPolicyId"u8); writer.WriteStringValue(ClassificationPolicyId); } - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobClassificationFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs index 0dde294286a4..abb7f6850287 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,15 +16,13 @@ public partial class AcsRouterJobClassificationFailedEventData : AcsRouterJobEve /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Classification Failed Errors. - /// , or is null. - internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable errors) : base(labels, tags) + /// or is null. + internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(errors, nameof(errors)); - Errors = errors.ToList(); + Errors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs index 23af6c30876d..2270f32db013 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs @@ -47,13 +47,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("attachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in AttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("attachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in AttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobClassifiedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs index db2dbdd50165..6c87513cd751 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -18,17 +17,15 @@ public partial class AcsRouterJobClassifiedEventData : AcsRouterJobEventData /// Router Job events Labels. /// Router Jobs events Tags. /// Router Job Queue Info. - /// Router Job Attached Worker Selector. - /// , , or is null. - internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterQueueDetails queueDetails, IEnumerable attachedWorkerSelectors) : base(labels, tags) + /// , or is null. + internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterQueueDetails queueDetails) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); Argument.AssertNotNull(queueDetails, nameof(queueDetails)); - Argument.AssertNotNull(attachedWorkerSelectors, nameof(attachedWorkerSelectors)); QueueDetails = queueDetails; - AttachedWorkerSelectors = attachedWorkerSelectors.ToList(); + AttachedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs index c4c0b804fa00..5ea1915b1378 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("attachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in AttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("attachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in AttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("requestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in RequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("requestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in RequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobQueuedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs index ac701da4ca38..6d1a918f7236 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobQueuedEventData : AcsRouterJobEventData /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Queued Attached Worker Selector. - /// Router Job Queued Requested Worker Selector. - /// , , or is null. - internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable attachedWorkerSelectors, IEnumerable requestedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(attachedWorkerSelectors, nameof(attachedWorkerSelectors)); - Argument.AssertNotNull(requestedWorkerSelectors, nameof(requestedWorkerSelectors)); - AttachedWorkerSelectors = attachedWorkerSelectors.ToList(); - RequestedWorkerSelectors = requestedWorkerSelectors.ToList(); + AttachedWorkerSelectors = new ChangeTrackingList(); + RequestedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs index c55280894954..02fb499b8d0b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs @@ -50,13 +50,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("requestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in RequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("requestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in RequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs index e13d3fb3647b..6df1c998602d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,16 +16,14 @@ public partial class AcsRouterJobReceivedEventData : AcsRouterJobEventData /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Received Requested Worker Selectors. /// Unavailable For Matching for Router Job Received. - /// , or is null. - internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable requestedWorkerSelectors, bool unavailableForMatching) : base(labels, tags) + /// or is null. + internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(requestedWorkerSelectors, nameof(requestedWorkerSelectors)); - RequestedWorkerSelectors = requestedWorkerSelectors.ToList(); + RequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs index 12a1e2bced8c..8cbf47d749ce 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs index 2f38f8a6466d..603602f62c5b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobSchedulingFailedEventData : AcsRouterJobEventDa /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Scheduling Failed Attached Worker Selector Expired. - /// Router Job Scheduling Failed Requested Worker Selector Expired. - /// , , or is null. - internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs index 09049dea8fe9..9a2453e91bc1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs index df1a3085421f..8c6ba6351ed6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,19 +16,15 @@ public partial class AcsRouterJobWaitingForActivationEventData : AcsRouterJobEve /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Waiting For Activation Worker Selector Expired. - /// Router Job Waiting For Activation Requested Worker Selector Expired. /// Router Job Waiting For Activation Unavailable For Matching. - /// , , or is null. - internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors, bool unavailableForMatching) : base(labels, tags) + /// or is null. + internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs index 8979776c9f62..6daf98b196d6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs @@ -35,20 +35,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobWorkerSelectorsExpiredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs index 28655f6d0119..b9195fb5eec0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobWorkerSelectorsExpiredEventData : AcsRouterJobE /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Worker Selectors Expired Requested Worker Selectors. - /// Router Job Worker Selectors Expired Attached Worker Selectors. - /// , , or is null. - internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredRequestedWorkerSelectors, IEnumerable expiredAttachedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs index 82e41db035f3..47327b7f9fe1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs @@ -39,20 +39,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("workerId"u8); writer.WriteStringValue(WorkerId); } - writer.WritePropertyName("queueAssignments"u8); - writer.WriteStartArray(); - foreach (var item in QueueAssignments) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("queueAssignments"u8); + writer.WriteStartArray(); + foreach (var item in QueueAssignments) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("channelConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in ChannelConfigurations) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("channelConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in ChannelConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(TotalCapacity)) { writer.WritePropertyName("totalCapacity"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs index e5b8ab2dc682..3f3cc4465551 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,20 +46,16 @@ public partial class AcsRouterWorkerRegisteredEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Router Worker Registered Queue Info. - /// Router Worker Registered Channel Configuration. /// Router Worker Registered Labels. /// Router Worker Registered Tags. - /// , , or is null. - internal AcsRouterWorkerRegisteredEventData(IEnumerable queueAssignments, IEnumerable channelConfigurations, IReadOnlyDictionary labels, IReadOnlyDictionary tags) + /// or is null. + internal AcsRouterWorkerRegisteredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Argument.AssertNotNull(queueAssignments, nameof(queueAssignments)); - Argument.AssertNotNull(channelConfigurations, nameof(channelConfigurations)); Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - QueueAssignments = queueAssignments.ToList(); - ChannelConfigurations = channelConfigurations.ToList(); + QueueAssignments = new ChangeTrackingList(); + ChannelConfigurations = new ChangeTrackingList(); Labels = labels; Tags = tags; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs index d9b391c48c55..36c48ed7c239 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs @@ -39,20 +39,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("workerId"u8); writer.WriteStringValue(WorkerId); } - writer.WritePropertyName("queueAssignments"u8); - writer.WriteStartArray(); - foreach (var item in QueueAssignments) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("queueAssignments"u8); + writer.WriteStartArray(); + foreach (var item in QueueAssignments) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("channelConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in ChannelConfigurations) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("channelConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in ChannelConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(TotalCapacity)) { writer.WritePropertyName("totalCapacity"u8); @@ -74,13 +80,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(item.Value); } writer.WriteEndObject(); - writer.WritePropertyName("updatedWorkerProperties"u8); - writer.WriteStartArray(); - foreach (var item in UpdatedWorkerProperties) + if (options.Format != "W") { - writer.WriteStringValue(item.ToString()); + writer.WritePropertyName("updatedWorkerProperties"u8); + writer.WriteStartArray(); + foreach (var item in UpdatedWorkerProperties) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs index 3d1b2b1ca992..c5ff3fea7cb4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,25 +46,19 @@ public partial class AcsRouterWorkerUpdatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Router Worker Updated Queue Info. - /// Router Worker Updated Channel Configuration. /// Router Worker Updated Labels. /// Router Worker Updated Tags. - /// Router Worker Properties Updated. - /// , , , or is null. - internal AcsRouterWorkerUpdatedEventData(IEnumerable queueAssignments, IEnumerable channelConfigurations, IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable updatedWorkerProperties) + /// or is null. + internal AcsRouterWorkerUpdatedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Argument.AssertNotNull(queueAssignments, nameof(queueAssignments)); - Argument.AssertNotNull(channelConfigurations, nameof(channelConfigurations)); Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(updatedWorkerProperties, nameof(updatedWorkerProperties)); - QueueAssignments = queueAssignments.ToList(); - ChannelConfigurations = channelConfigurations.ToList(); + QueueAssignments = new ChangeTrackingList(); + ChannelConfigurations = new ChangeTrackingList(); Labels = labels; Tags = tags; - UpdatedWorkerProperties = updatedWorkerProperties.ToList(); + UpdatedWorkerProperties = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs index 329e178fb9a3..123baf85e29e 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 @@ -45,13 +45,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("deliveryStatusDetails"u8); writer.WriteStringValue(DeliveryStatusDetails); } - writer.WritePropertyName("deliveryAttempts"u8); - writer.WriteStartArray(); - foreach (var item in DeliveryAttempts) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("deliveryAttempts"u8); + writer.WriteStartArray(); + foreach (var item in DeliveryAttempts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ReceivedTimestamp)) { writer.WritePropertyName("receivedTimestamp"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs index 3e3649e9affe..37017ca60862 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -15,13 +14,9 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsDeliveryReportReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . - /// List of details of delivery attempts made. - /// is null. - internal AcsSmsDeliveryReportReceivedEventData(IEnumerable deliveryAttempts) + internal AcsSmsDeliveryReportReceivedEventData() { - Argument.AssertNotNull(deliveryAttempts, nameof(deliveryAttempts)); - - DeliveryAttempts = deliveryAttempts.ToList(); + DeliveryAttempts = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -43,11 +38,6 @@ internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, s Tag = tag; } - /// Initializes a new instance of for deserialization. - internal AcsSmsDeliveryReportReceivedEventData() - { - } - /// Status of Delivery. public string DeliveryStatus { get; } /// Details about Delivery Status. 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 8a7ea9648848..ebee4c91f025 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 @@ -36,10 +36,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("title"u8); writer.WriteStringValue(Title); - if (Optional.IsDefined(Description)) + if (Optional.IsDefined(Word)) { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); + writer.WritePropertyName("word"u8); + writer.WriteObjectValue(Word, options); } if (Optional.IsDefined(Specification)) { @@ -84,7 +84,7 @@ internal static ApiCenterApiDefinitionUpdatedEventData DeserializeApiCenterApiDe return null; } string title = default; - string description = default; + object word = default; ApiCenterApiSpecification specification = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -95,9 +95,13 @@ internal static ApiCenterApiDefinitionUpdatedEventData DeserializeApiCenterApiDe title = property.Value.GetString(); continue; } - if (property.NameEquals("description"u8)) + if (property.NameEquals("word"u8)) { - description = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + word = property.Value.GetObject(); continue; } if (property.NameEquals("specification"u8)) @@ -115,7 +119,7 @@ internal static ApiCenterApiDefinitionUpdatedEventData DeserializeApiCenterApiDe } } serializedAdditionalRawData = rawDataDictionary; - return new ApiCenterApiDefinitionUpdatedEventData(title, description, specification, serializedAdditionalRawData); + return new ApiCenterApiDefinitionUpdatedEventData(title, word, specification, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.cs index 86329b11c419..a055777fafb2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.cs @@ -57,13 +57,13 @@ internal ApiCenterApiDefinitionUpdatedEventData(string title) /// Initializes a new instance of . /// API definition title. - /// API definition description. + /// API definition description. /// API definition specification. /// Keeps track of any properties unknown to the library. - internal ApiCenterApiDefinitionUpdatedEventData(string title, string description, ApiCenterApiSpecification specification, IDictionary serializedAdditionalRawData) + internal ApiCenterApiDefinitionUpdatedEventData(string title, object word, ApiCenterApiSpecification specification, IDictionary serializedAdditionalRawData) { Title = title; - Description = description; + Word = word; Specification = specification; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -76,7 +76,7 @@ internal ApiCenterApiDefinitionUpdatedEventData() /// API definition title. public string Title { get; } /// API definition description. - public string Description { get; } + public object Word { get; } /// API definition specification. public ApiCenterApiSpecification Specification { get; } } 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 73e614041c79..aed868c7fe8b 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 @@ -34,8 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApiCenterApiSpecification)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WritePropertyName("word"u8); + writer.WriteStringValue(Word); if (Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); @@ -78,15 +78,15 @@ internal static ApiCenterApiSpecification DeserializeApiCenterApiSpecification(J { return null; } - string name = default; + string word = default; string version = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (property.NameEquals("word"u8)) { - name = property.Value.GetString(); + word = property.Value.GetString(); continue; } if (property.NameEquals("version"u8)) @@ -100,7 +100,7 @@ internal static ApiCenterApiSpecification DeserializeApiCenterApiSpecification(J } } serializedAdditionalRawData = rawDataDictionary; - return new ApiCenterApiSpecification(name, version, serializedAdditionalRawData); + return new ApiCenterApiSpecification(word, version, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.cs index 3e357444901a..34f89a351551 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.cs @@ -46,22 +46,22 @@ public partial class ApiCenterApiSpecification private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Specification name. - /// is null. - internal ApiCenterApiSpecification(string name) + /// Specification name. + /// is null. + internal ApiCenterApiSpecification(string word) { - Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(word, nameof(word)); - Name = name; + Word = word; } /// Initializes a new instance of . - /// Specification name. + /// Specification name. /// Specification version. /// Keeps track of any properties unknown to the library. - internal ApiCenterApiSpecification(string name, string version, IDictionary serializedAdditionalRawData) + internal ApiCenterApiSpecification(string word, string version, IDictionary serializedAdditionalRawData) { - Name = name; + Word = word; Version = version; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,7 +72,7 @@ internal ApiCenterApiSpecification() } /// Specification name. - public string Name { get; } + public string Word { get; } /// Specification version. public string Version { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs new file mode 100644 index 000000000000..5c34182f08e9 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerClosedEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("backendName"u8); + writer.WriteStringValue(BackendName); + writer.WritePropertyName("circuitBreaker"u8); + writer.WriteObjectValue(CircuitBreaker, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementCircuitBreakerClosedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerClosedEventData DeserializeApiManagementCircuitBreakerClosedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerClosedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerClosedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.cs new file mode 100644 index 000000000000..7b883eb64505 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Closed event. + public partial class ApiManagementCircuitBreakerClosedEventData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// or is null. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + Argument.AssertNotNull(backendName, nameof(backendName)); + Argument.AssertNotNull(circuitBreaker, nameof(circuitBreaker)); + + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker, IDictionary serializedAdditionalRawData) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerClosedEventData() + { + } + + /// Name of the backend for which the circuit has closed. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs new file mode 100644 index 000000000000..75dbb3911807 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerOpenedEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("backendName"u8); + writer.WriteStringValue(BackendName); + writer.WritePropertyName("circuitBreaker"u8); + writer.WriteObjectValue(CircuitBreaker, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementCircuitBreakerOpenedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerOpenedEventData DeserializeApiManagementCircuitBreakerOpenedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerOpenedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerOpenedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.cs new file mode 100644 index 000000000000..d739428a4a42 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Opened event. + public partial class ApiManagementCircuitBreakerOpenedEventData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// or is null. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + Argument.AssertNotNull(backendName, nameof(backendName)); + Argument.AssertNotNull(circuitBreaker, nameof(circuitBreaker)); + + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker, IDictionary serializedAdditionalRawData) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerOpenedEventData() + { + } + + /// Name of the backend for which the circuit has opened. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs new file mode 100644 index 000000000000..7c86dd2a8678 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("rules"u8); + writer.WriteStartObject(); + foreach (var item in Rules) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementCircuitBreakerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerProperties DeserializeApiManagementCircuitBreakerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary rules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, ApiManagementCircuitBreakerPropertiesRule.DeserializeApiManagementCircuitBreakerPropertiesRule(property0.Value, options)); + } + rules = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerProperties(rules, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.cs new file mode 100644 index 000000000000..3efa24aa9c88 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to the circuit breaker configured on the backend. + public partial class ApiManagementCircuitBreakerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// is null. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules) + { + Argument.AssertNotNull(rules, nameof(rules)); + + Rules = rules; + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules, IDictionary serializedAdditionalRawData) + { + Rules = rules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerProperties() + { + } + + /// Overview of all configured rules and respective details. + public IReadOnlyDictionary Rules { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.Serialization.cs new file mode 100644 index 000000000000..e307d6e6171e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.Serialization.cs @@ -0,0 +1,134 @@ +// 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 ApiManagementCircuitBreakerPropertiesRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerPropertiesRule)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementCircuitBreakerPropertiesRule 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(ApiManagementCircuitBreakerPropertiesRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerPropertiesRule(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerPropertiesRule DeserializeApiManagementCircuitBreakerPropertiesRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerPropertiesRule(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(ApiManagementCircuitBreakerPropertiesRule)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerPropertiesRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerPropertiesRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerPropertiesRule)} 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 ApiManagementCircuitBreakerPropertiesRule FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerPropertiesRule(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.cs new file mode 100644 index 000000000000..14499deaf551 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerPropertiesRule.cs @@ -0,0 +1,60 @@ +// 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 +{ + /// The ApiManagementCircuitBreakerPropertiesRule. + public partial class ApiManagementCircuitBreakerPropertiesRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerPropertiesRule() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerPropertiesRule(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..69b90b02e987 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementExpiredGatewayTokenProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expiredAtUtc"u8); + writer.WriteStringValue(ExpiredAtUtc, "O"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementExpiredGatewayTokenProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement, options); + } + + internal static ApiManagementExpiredGatewayTokenProperties DeserializeApiManagementExpiredGatewayTokenProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset expiredAtUtc = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementExpiredGatewayTokenProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementExpiredGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.cs new file mode 100644 index 000000000000..dadba25ed570 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a gateway token that has expired for a self-hosted gateway deployment. + public partial class ApiManagementExpiredGatewayTokenProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc) + { + ExpiredAtUtc = expiredAtUtc; + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// Keeps track of any properties unknown to the library. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc, IDictionary serializedAdditionalRawData) + { + ExpiredAtUtc = expiredAtUtc; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementExpiredGatewayTokenProperties() + { + } + + /// Timestamp when the gateway token has expired. + public DateTimeOffset ExpiredAtUtc { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs new file mode 100644 index 000000000000..e0167b9d5545 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayId"u8); + writer.WriteStringValue(GatewayId); + writer.WritePropertyName("instanceId"u8); + writer.WriteStringValue(InstanceId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementGatewayProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayProperties(document.RootElement, options); + } + + internal static ApiManagementGatewayProperties DeserializeApiManagementGatewayProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string gatewayId = default; + string instanceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayId"u8)) + { + gatewayId = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceId"u8)) + { + instanceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayProperties(gatewayId, instanceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.cs new file mode 100644 index 000000000000..56075c0a60ee --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a given self-hosted gateway deployment. + public partial class ApiManagementGatewayProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// Unique instance ID of the deployed gateway. + /// or is null. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId) + { + Argument.AssertNotNull(gatewayId, nameof(gatewayId)); + Argument.AssertNotNull(instanceId, nameof(instanceId)); + + GatewayId = gatewayId; + InstanceId = instanceId; + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// Unique instance ID of the deployed gateway. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId, IDictionary serializedAdditionalRawData) + { + GatewayId = gatewayId; + InstanceId = instanceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayProperties() + { + } + + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + public string GatewayId { get; } + /// Unique instance ID of the deployed gateway. + public string InstanceId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs new file mode 100644 index 000000000000..2811368eb1a6 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayTokenExpiredEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayInfo"u8); + writer.WriteObjectValue(GatewayInfo, options); + writer.WritePropertyName("tokenInfo"u8); + writer.WriteObjectValue(TokenInfo, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementGatewayTokenExpiredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement, options); + } + + internal static ApiManagementGatewayTokenExpiredEventData DeserializeApiManagementGatewayTokenExpiredEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementExpiredGatewayTokenProperties tokenInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value, options); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + tokenInfo = ApiManagementExpiredGatewayTokenProperties.DeserializeApiManagementExpiredGatewayTokenProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayTokenExpiredEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenExpiredEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.cs new file mode 100644 index 000000000000..a7acbceff381 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenExpired event. + public partial class ApiManagementGatewayTokenExpiredEventData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// or is null. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementExpiredGatewayTokenProperties tokenInfo) + { + Argument.AssertNotNull(gatewayInfo, nameof(gatewayInfo)); + Argument.AssertNotNull(tokenInfo, nameof(tokenInfo)); + + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementExpiredGatewayTokenProperties tokenInfo, IDictionary serializedAdditionalRawData) + { + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayTokenExpiredEventData() + { + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties GatewayInfo { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementExpiredGatewayTokenProperties TokenInfo { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs new file mode 100644 index 000000000000..d4e36c0ca59e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayTokenNearExpiryEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayInfo"u8); + writer.WriteObjectValue(GatewayInfo, options); + writer.WritePropertyName("tokenInfo"u8); + writer.WriteObjectValue(TokenInfo, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementGatewayTokenNearExpiryEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement, options); + } + + internal static ApiManagementGatewayTokenNearExpiryEventData DeserializeApiManagementGatewayTokenNearExpiryEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementNearExpiryGatewayTokenProperties tokenInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value, options); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + tokenInfo = ApiManagementNearExpiryGatewayTokenProperties.DeserializeApiManagementNearExpiryGatewayTokenProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayTokenNearExpiryEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.cs new file mode 100644 index 000000000000..a66436311c5e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenNearExpiry event. + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// or is null. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementNearExpiryGatewayTokenProperties tokenInfo) + { + Argument.AssertNotNull(gatewayInfo, nameof(gatewayInfo)); + Argument.AssertNotNull(tokenInfo, nameof(tokenInfo)); + + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementNearExpiryGatewayTokenProperties tokenInfo, IDictionary serializedAdditionalRawData) + { + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayTokenNearExpiryEventData() + { + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties GatewayInfo { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..5788be10e46e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementNearExpiryGatewayTokenProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expiredAtUtc"u8); + writer.WriteStringValue(ExpiredAtUtc, "O"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApiManagementNearExpiryGatewayTokenProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementNearExpiryGatewayTokenProperties(document.RootElement, options); + } + + internal static ApiManagementNearExpiryGatewayTokenProperties DeserializeApiManagementNearExpiryGatewayTokenProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset expiredAtUtc = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementNearExpiryGatewayTokenProperties(expiredAtUtc, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementNearExpiryGatewayTokenProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementNearExpiryGatewayTokenProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementNearExpiryGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementNearExpiryGatewayTokenProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.cs new file mode 100644 index 000000000000..fcc22492a89d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public partial class ApiManagementNearExpiryGatewayTokenProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + internal ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc) + { + ExpiredAtUtc = expiredAtUtc; + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// Keeps track of any properties unknown to the library. + internal ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc, IDictionary serializedAdditionalRawData) + { + ExpiredAtUtc = expiredAtUtc; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementNearExpiryGatewayTokenProperties() + { + } + + /// Timestamp when the gateway token will expire. + public DateTimeOffset ExpiredAtUtc { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs index 3d95b902797b..8348d264b024 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs @@ -34,26 +34,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueDeletedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsDefined(Label)) - { - writer.WritePropertyName("label"u8); - writer.WriteStringValue(Label); - } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) - { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); - } + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs index b920a0b33dd2..7a4cf1ce7212 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs @@ -46,8 +46,22 @@ public partial class AppConfigurationKeyValueDeletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationKeyValueDeletedEventData() + /// The key used to identify the key-value that was deleted. + /// The label, if any, used to identify the key-value that was deleted. + /// The etag representing the key-value that was deleted. + /// The sync token representing the server state after the event. + /// , , or is null. + internal AppConfigurationKeyValueDeletedEventData(string key, string label, string etag, string syncToken) { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(label, nameof(label)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Key = key; + Label = label; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -65,6 +79,11 @@ internal AppConfigurationKeyValueDeletedEventData(string key, string label, stri _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationKeyValueDeletedEventData() + { + } + /// The key used to identify the key-value that was deleted. public string Key { get; } /// The label, if any, used to identify the key-value that was deleted. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs index e33caff65a77..86478e6dd36d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs @@ -34,26 +34,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueModifiedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsDefined(Label)) + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + if (Label != null) { writer.WritePropertyName("label"u8); writer.WriteStringValue(Label); } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) + else { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); + writer.WriteNull("label"); } + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -106,6 +101,11 @@ internal static AppConfigurationKeyValueModifiedEventData DeserializeAppConfigur } if (property.NameEquals("label"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + label = null; + continue; + } label = property.Value.GetString(); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs index e03cb8ded63b..1dcc27c11d46 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs @@ -46,8 +46,21 @@ public partial class AppConfigurationKeyValueModifiedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationKeyValueModifiedEventData() + /// The key used to identify the key-value that was modified. + /// The label, if any, used to identify the key-value that was modified. + /// The etag representing the new state of the key-value. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationKeyValueModifiedEventData(string key, string label, string etag, string syncToken) { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Key = key; + Label = label; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -65,6 +78,11 @@ internal AppConfigurationKeyValueModifiedEventData(string key, string label, str _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationKeyValueModifiedEventData() + { + } + /// The key used to identify the key-value that was modified. public string Key { get; } /// The label, if any, used to identify the key-value that was modified. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs index 319beef466ce..d5d7832fa69b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs @@ -14,8 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AppConfigurationSnapshotCreatedEventData : AppConfigurationSnapshotEventData { /// Initializes a new instance of . - internal AppConfigurationSnapshotCreatedEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotCreatedEventData(string name, string etag, string syncToken) : base(name, etag, syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); } /// Initializes a new instance of . @@ -26,5 +33,10 @@ internal AppConfigurationSnapshotCreatedEventData() internal AppConfigurationSnapshotCreatedEventData(string name, string etag, string syncToken, IDictionary serializedAdditionalRawData) : base(name, etag, syncToken, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotCreatedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs index 3d5566107a39..672a2002ad54 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationSnapshotEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) - { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); - } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs index a64d0e66a4fc..43c5283bd828 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs @@ -46,8 +46,19 @@ public partial class AppConfigurationSnapshotEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationSnapshotEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotEventData(string name, string etag, string syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Name = name; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -63,6 +74,11 @@ internal AppConfigurationSnapshotEventData(string name, string etag, string sync _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotEventData() + { + } + /// The name of the snapshot. public string Name { get; } /// The etag representing the new state of the snapshot. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs index cd89dfdb11d1..b2164f525aa9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs @@ -14,8 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AppConfigurationSnapshotModifiedEventData : AppConfigurationSnapshotEventData { /// Initializes a new instance of . - internal AppConfigurationSnapshotModifiedEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotModifiedEventData(string name, string etag, string syncToken) : base(name, etag, syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); } /// Initializes a new instance of . @@ -26,5 +33,10 @@ internal AppConfigurationSnapshotModifiedEventData() internal AppConfigurationSnapshotModifiedEventData(string name, string etag, string syncToken, IDictionary serializedAdditionalRawData) : base(name, etag, syncToken, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotModifiedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs index d2a7cbd25dcd..ec71ee3ce2f5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("operationId"u8); writer.WriteStringValue(OperationId); - if (Optional.IsCollectionDefined(AddedHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(AddedHostNames)) { writer.WritePropertyName("addedHostNames"u8); writer.WriteStartArray(); @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(RemovedHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(RemovedHostNames)) { writer.WritePropertyName("removedHostNames"u8); writer.WriteStartArray(); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(InMaintenanceHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(InMaintenanceHostNames)) { writer.WritePropertyName("inMaintenanceHostNames"u8); writer.WriteStartArray(); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs index 0280febef8ca..9b80e18d25aa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs @@ -38,7 +38,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(OperationId); writer.WritePropertyName("cmdletId"u8); writer.WriteStringValue(CmdletId); - if (Optional.IsCollectionDefined(Output)) + if (options.Format != "W" && Optional.IsCollectionDefined(Output)) { writer.WritePropertyName("output"u8); writer.WriteStartArray(); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs index 66ed2b8c4b62..ef80f3e0864a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceClusterSupportEndedEventData : ContainerServiceClusterSupportEventData { /// Initializes a new instance of . - internal ContainerServiceClusterSupportEndedEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEndedEventData(string kubernetesVersion) : base(kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceClusterSupportEndedEventData() internal ContainerServiceClusterSupportEndedEventData(string kubernetesVersion, IDictionary serializedAdditionalRawData) : base(kubernetesVersion, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEndedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs index 0a3fa362492c..ea696b7348fe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceClusterSupportEndingEventData : ContainerServiceClusterSupportEventData { /// Initializes a new instance of . - internal ContainerServiceClusterSupportEndingEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEndingEventData(string kubernetesVersion) : base(kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceClusterSupportEndingEventData() internal ContainerServiceClusterSupportEndingEventData(string kubernetesVersion, IDictionary serializedAdditionalRawData) : base(kubernetesVersion, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEndingEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs index e69c3cab6fd7..2bda65aa23a3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceClusterSupportEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(KubernetesVersion)) - { - writer.WritePropertyName("kubernetesVersion"u8); - writer.WriteStringValue(KubernetesVersion); - } + writer.WritePropertyName("kubernetesVersion"u8); + writer.WriteStringValue(KubernetesVersion); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs index 3ad05c8cb79b..d6720cabcd35 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs @@ -46,8 +46,13 @@ public partial class ContainerServiceClusterSupportEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceClusterSupportEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEventData(string kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); + + KubernetesVersion = kubernetesVersion; } /// Initializes a new instance of . @@ -59,6 +64,11 @@ internal ContainerServiceClusterSupportEventData(string kubernetesVersion, IDict _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEventData() + { + } + /// The Kubernetes version of the ManagedCluster resource. public string KubernetesVersion { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs index 0e51cceccbfc..3f166a5de8e3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNewKubernetesVersionAvailableEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(LatestSupportedKubernetesVersion)) - { - writer.WritePropertyName("latestSupportedKubernetesVersion"u8); - writer.WriteStringValue(LatestSupportedKubernetesVersion); - } - if (Optional.IsDefined(LatestStableKubernetesVersion)) - { - writer.WritePropertyName("latestStableKubernetesVersion"u8); - writer.WriteStringValue(LatestStableKubernetesVersion); - } - if (Optional.IsDefined(LowestMinorKubernetesVersion)) - { - writer.WritePropertyName("lowestMinorKubernetesVersion"u8); - writer.WriteStringValue(LowestMinorKubernetesVersion); - } + writer.WritePropertyName("latestSupportedKubernetesVersion"u8); + writer.WriteStringValue(LatestSupportedKubernetesVersion); + writer.WritePropertyName("latestStableKubernetesVersion"u8); + writer.WriteStringValue(LatestStableKubernetesVersion); + writer.WritePropertyName("lowestMinorKubernetesVersion"u8); + writer.WriteStringValue(LowestMinorKubernetesVersion); if (Optional.IsDefined(LatestPreviewKubernetesVersion)) { writer.WritePropertyName("latestPreviewKubernetesVersion"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs index a220ba99996e..c27879af09ee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs @@ -46,8 +46,19 @@ public partial class ContainerServiceNewKubernetesVersionAvailableEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceNewKubernetesVersionAvailableEventData() + /// The highest PATCH Kubernetes version for the highest MINOR version supported by ManagedCluster resource. + /// The highest PATCH Kubernetes version for the MINOR version considered stable for the ManagedCluster resource. + /// The highest PATCH Kubernetes version for the lowest applicable MINOR version available for the ManagedCluster resource. + /// , or is null. + internal ContainerServiceNewKubernetesVersionAvailableEventData(string latestSupportedKubernetesVersion, string latestStableKubernetesVersion, string lowestMinorKubernetesVersion) { + Argument.AssertNotNull(latestSupportedKubernetesVersion, nameof(latestSupportedKubernetesVersion)); + Argument.AssertNotNull(latestStableKubernetesVersion, nameof(latestStableKubernetesVersion)); + Argument.AssertNotNull(lowestMinorKubernetesVersion, nameof(lowestMinorKubernetesVersion)); + + LatestSupportedKubernetesVersion = latestSupportedKubernetesVersion; + LatestStableKubernetesVersion = latestStableKubernetesVersion; + LowestMinorKubernetesVersion = lowestMinorKubernetesVersion; } /// Initializes a new instance of . @@ -65,6 +76,11 @@ internal ContainerServiceNewKubernetesVersionAvailableEventData(string latestSup _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceNewKubernetesVersionAvailableEventData() + { + } + /// The highest PATCH Kubernetes version for the highest MINOR version supported by ManagedCluster resource. public string LatestSupportedKubernetesVersion { get; } /// The highest PATCH Kubernetes version for the MINOR version considered stable for the ManagedCluster resource. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs index b8c25b055989..cae02d7a7392 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNodePoolRollingEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(NodePoolName)) - { - writer.WritePropertyName("nodePoolName"u8); - writer.WriteStringValue(NodePoolName); - } + writer.WritePropertyName("nodePoolName"u8); + writer.WriteStringValue(NodePoolName); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs index 3b5580803572..65ffdb4776f8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs @@ -46,8 +46,13 @@ public partial class ContainerServiceNodePoolRollingEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingEventData(string nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); + + NodePoolName = nodePoolName; } /// Initializes a new instance of . @@ -59,6 +64,11 @@ internal ContainerServiceNodePoolRollingEventData(string nodePoolName, IDictiona _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingEventData() + { + } + /// The name of the node pool in the ManagedCluster resource. public string NodePoolName { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs index 0bf9331c72ca..e2889e098f99 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingFailedEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingFailedEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingFailedEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingFailedEventData() internal ContainerServiceNodePoolRollingFailedEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingFailedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs index 88958ee63eef..89edc1138e28 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingStartedEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingStartedEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingStartedEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingStartedEventData() internal ContainerServiceNodePoolRollingStartedEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingStartedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs index 18c9e4ada789..6209fe995bdb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingSucceededEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingSucceededEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingSucceededEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingSucceededEventData() internal ContainerServiceNodePoolRollingSucceededEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingSucceededEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs new file mode 100644 index 000000000000..eedd981062bf --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class EdgeSolutionVersionPublishedEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("externalValidationId"u8); + writer.WriteStringValue(ExternalValidationId); + writer.WritePropertyName("targetId"u8); + writer.WriteStringValue(TargetId); + writer.WritePropertyName("solutionTemplateId"u8); + writer.WriteStringValue(SolutionTemplateId); + writer.WritePropertyName("solutionTemplateVersionId"u8); + writer.WriteStringValue(SolutionTemplateVersionId); + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + writer.WritePropertyName("callbackUrl"u8); + writer.WriteStringValue(CallbackUrl.AbsoluteUri); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EdgeSolutionVersionPublishedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement, options); + } + + internal static EdgeSolutionVersionPublishedEventData DeserializeEdgeSolutionVersionPublishedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string externalValidationId = default; + string targetId = default; + string solutionTemplateId = default; + string solutionTemplateVersionId = default; + string solutionVersionId = default; + string apiVersion = default; + Uri callbackUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("externalValidationId"u8)) + { + externalValidationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetId"u8)) + { + targetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateId"u8)) + { + solutionTemplateId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateVersionId"u8)) + { + solutionTemplateVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("callbackUrl"u8)) + { + callbackUrl = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionVersionPublishedEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EdgeSolutionVersionPublishedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs new file mode 100644 index 000000000000..219c36f6fa89 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Edge.SolutionVersionPublished event. + public partial class EdgeSolutionVersionPublishedEventData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl) + { + Argument.AssertNotNull(externalValidationId, nameof(externalValidationId)); + Argument.AssertNotNull(targetId, nameof(targetId)); + Argument.AssertNotNull(solutionTemplateId, nameof(solutionTemplateId)); + Argument.AssertNotNull(solutionTemplateVersionId, nameof(solutionTemplateVersionId)); + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(callbackUrl, nameof(callbackUrl)); + + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + } + + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl, IDictionary serializedAdditionalRawData) + { + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionVersionPublishedEventData() + { + } + + /// A GUID to uniquely track External Solution Validation. + public string ExternalValidationId { get; } + /// ARM ID of the Target resource. + public string TargetId { get; } + /// ARM ID of the Solution Template resource. + public string SolutionTemplateId { get; } + /// ARM ID of the Solution Template Version resource. + public string SolutionTemplateVersionId { get; } + /// ARM ID of the Solution Version resource. + public string SolutionVersionId { get; } + /// API Version supported for the resources. + public string ApiVersion { get; } + /// Direct URL to callback for updating validation status. + public Uri CallbackUrl { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs index c32e1356b70a..4ada3fea4e8c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs @@ -25,22 +25,22 @@ public static ApiCenterApiDefinitionAddedEventData ApiCenterApiDefinitionAddedEv } /// Initializes a new instance of . - /// Specification name. + /// Specification name. /// Specification version. /// A new instance for mocking. - public static ApiCenterApiSpecification ApiCenterApiSpecification(string name = null, string version = null) + public static ApiCenterApiSpecification ApiCenterApiSpecification(string word = null, string version = null) { - return new ApiCenterApiSpecification(name, version, serializedAdditionalRawData: null); + return new ApiCenterApiSpecification(word, version, serializedAdditionalRawData: null); } /// Initializes a new instance of . /// API definition title. - /// API definition description. + /// API definition description. /// API definition specification. /// A new instance for mocking. - public static ApiCenterApiDefinitionUpdatedEventData ApiCenterApiDefinitionUpdatedEventData(string title = null, string description = null, ApiCenterApiSpecification specification = null) + public static ApiCenterApiDefinitionUpdatedEventData ApiCenterApiDefinitionUpdatedEventData(string title = null, object word = null, ApiCenterApiSpecification specification = null) { - return new ApiCenterApiDefinitionUpdatedEventData(title, description, specification, serializedAdditionalRawData: null); + return new ApiCenterApiDefinitionUpdatedEventData(title, word, specification, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -251,6 +251,77 @@ public static ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRem return new ApiManagementGatewayApiRemovedEventData(resourceUri, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules = null) + { + rules ??= new Dictionary(); + + return new ApiManagementCircuitBreakerProperties(rules, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo = null, ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) + { + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// Unique instance ID of the deployed gateway. + /// A new instance for mocking. + public static ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) + { + return new ApiManagementGatewayProperties(gatewayId, instanceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// A new instance for mocking. + public static ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc = default) + { + return new ApiManagementNearExpiryGatewayTokenProperties(expiredAtUtc, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gatewayInfo = null, ApiManagementExpiredGatewayTokenProperties tokenInfo = null) + { + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// A new instance for mocking. + public static ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc = default) + { + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The key used to identify the key-value that was modified. /// The label, if any, used to identify the key-value that was modified. @@ -1395,18 +1466,18 @@ public static AcsRouterJobClassificationFailedEventData AcsRouterJobClassificati /// Router Communication Error Message. /// Router Communication Error Target. /// Router Communication Inner Error. - /// List of Router Communication Errors. + /// List of Router Communication Errors. /// A new instance for mocking. - public static AcsRouterCommunicationError AcsRouterCommunicationError(string code = null, string message = null, string target = null, AcsRouterCommunicationError innererror = null, IEnumerable details = null) + public static AcsRouterCommunicationError AcsRouterCommunicationError(string code = null, string message = null, string target = null, AcsRouterCommunicationError innererror = null, IEnumerable errors = null) { - details ??= new List(); + errors ??= new List(); return new AcsRouterCommunicationError( code, message, target, innererror, - details?.ToList(), + errors?.ToList(), serializedAdditionalRawData: null); } @@ -2474,6 +2545,28 @@ public static DataBoxOrderCompletedEventData DataBoxOrderCompletedEventData(stri return new DataBoxOrderCompletedEventData(serialNumber, stageName, stageTime, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// A new instance for mocking. + public static EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, Uri callbackUrl = null) + { + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The path to the capture file. /// The file type of the capture file. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs index 19dde868710b..e7187c3cd8f2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EventHubCaptureFileCreatedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Fileurl)) - { - writer.WritePropertyName("fileUrl"u8); - writer.WriteStringValue(Fileurl); - } - if (Optional.IsDefined(FileType)) - { - writer.WritePropertyName("fileType"u8); - writer.WriteStringValue(FileType); - } - if (Optional.IsDefined(PartitionId)) - { - writer.WritePropertyName("partitionId"u8); - writer.WriteStringValue(PartitionId); - } + writer.WritePropertyName("fileUrl"u8); + writer.WriteStringValue(Fileurl); + writer.WritePropertyName("fileType"u8); + writer.WriteStringValue(FileType); + writer.WritePropertyName("partitionId"u8); + writer.WriteStringValue(PartitionId); if (Optional.IsDefined(SizeInBytes)) { writer.WritePropertyName("sizeInBytes"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs index ff8f7f2a0e35..5f9b01e7d9f9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs @@ -46,8 +46,19 @@ public partial class EventHubCaptureFileCreatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal EventHubCaptureFileCreatedEventData() + /// The path to the capture file. + /// The file type of the capture file. + /// The shard ID. + /// , or is null. + internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, string partitionId) { + Argument.AssertNotNull(fileurl, nameof(fileurl)); + Argument.AssertNotNull(fileType, nameof(fileType)); + Argument.AssertNotNull(partitionId, nameof(partitionId)); + + Fileurl = fileurl; + FileType = fileType; + PartitionId = partitionId; } /// Initializes a new instance of . @@ -75,6 +86,11 @@ internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, st _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal EventHubCaptureFileCreatedEventData() + { + } + /// The path to the capture file. public string Fileurl { get; } /// The file type of the capture file. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs index ddbbe5a5defc..4ed4a9962eaf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs @@ -34,31 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesDatasetDriftDetectedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(DataDriftId)) - { - writer.WritePropertyName("dataDriftId"u8); - writer.WriteStringValue(DataDriftId); - } - if (Optional.IsDefined(DataDriftName)) - { - writer.WritePropertyName("dataDriftName"u8); - writer.WriteStringValue(DataDriftName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(BaseDatasetId)) - { - writer.WritePropertyName("baseDatasetId"u8); - writer.WriteStringValue(BaseDatasetId); - } - if (Optional.IsDefined(TargetDatasetId)) - { - writer.WritePropertyName("targetDatasetId"u8); - writer.WriteStringValue(TargetDatasetId); - } + writer.WritePropertyName("dataDriftId"u8); + writer.WriteStringValue(DataDriftId); + writer.WritePropertyName("dataDriftName"u8); + writer.WriteStringValue(DataDriftName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("baseDatasetId"u8); + writer.WriteStringValue(BaseDatasetId); + writer.WritePropertyName("targetDatasetId"u8); + writer.WriteStringValue(TargetDatasetId); if (Optional.IsDefined(DriftCoefficient)) { writer.WritePropertyName("driftCoefficient"u8); @@ -66,13 +51,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } if (Optional.IsDefined(StartTime)) { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartTime.Value, "O"); + if (StartTime != null) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime.Value, "O"); + } + else + { + writer.WriteNull("startTime"); + } } if (Optional.IsDefined(EndTime)) { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndTime.Value, "O"); + if (EndTime != null) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + else + { + writer.WriteNull("endTime"); + } } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -161,6 +160,7 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize { if (property.Value.ValueKind == JsonValueKind.Null) { + startTime = null; continue; } startTime = property.Value.GetDateTimeOffset("O"); @@ -170,6 +170,7 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize { if (property.Value.ValueKind == JsonValueKind.Null) { + endTime = null; continue; } endTime = property.Value.GetDateTimeOffset("O"); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs index f86f30e006be..66d7e5943085 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs @@ -46,8 +46,25 @@ public partial class MachineLearningServicesDatasetDriftDetectedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal MachineLearningServicesDatasetDriftDetectedEventData() + /// The ID of the data drift monitor that triggered the event. + /// The name of the data drift monitor that triggered the event. + /// The ID of the Run that detected data drift. + /// The ID of the base Dataset used to detect drift. + /// The ID of the target Dataset used to detect drift. + /// , , , or is null. + internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId, string dataDriftName, string runId, string baseDatasetId, string targetDatasetId) { + Argument.AssertNotNull(dataDriftId, nameof(dataDriftId)); + Argument.AssertNotNull(dataDriftName, nameof(dataDriftName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(baseDatasetId, nameof(baseDatasetId)); + Argument.AssertNotNull(targetDatasetId, nameof(targetDatasetId)); + + DataDriftId = dataDriftId; + DataDriftName = dataDriftName; + RunId = runId; + BaseDatasetId = baseDatasetId; + TargetDatasetId = targetDatasetId; } /// Initializes a new instance of . @@ -73,6 +90,11 @@ internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal MachineLearningServicesDatasetDriftDetectedEventData() + { + } + /// The ID of the data drift monitor that triggered the event. public string DataDriftId { get; } /// The name of the data drift monitor that triggered the event. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs index bc2c9c9fb87b..4e8e161a8da2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs @@ -34,61 +34,58 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelDeployedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ServiceName)) + writer.WritePropertyName("serviceName"u8); + writer.WriteStringValue(ServiceName); + writer.WritePropertyName("serviceComputeType"u8); + writer.WriteStringValue(ServiceComputeType); + writer.WritePropertyName("modelIds"u8); + writer.WriteStringValue(ModelIds); + if (Optional.IsCollectionDefined(ServiceTags)) { - writer.WritePropertyName("serviceName"u8); - writer.WriteStringValue(ServiceName); - } - if (Optional.IsDefined(ServiceComputeType)) - { - writer.WritePropertyName("serviceComputeType"u8); - writer.WriteStringValue(ServiceComputeType); - } - if (Optional.IsDefined(ModelIds)) - { - writer.WritePropertyName("modelIds"u8); - writer.WriteStringValue(ModelIds); - } - writer.WritePropertyName("serviceTags"u8); - writer.WriteStartObject(); - foreach (var item in ServiceTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("serviceTags"u8); + writer.WriteStartObject(); + foreach (var item in ServiceTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("serviceProperties"u8); - writer.WriteStartObject(); - foreach (var item in ServiceProperties) + if (Optional.IsCollectionDefined(ServiceProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("serviceProperties"u8); + writer.WriteStartObject(); + foreach (var item in ServiceProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -152,6 +149,10 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine } if (property.NameEquals("serviceTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -169,6 +170,10 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine } if (property.NameEquals("serviceProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -194,8 +199,8 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine serviceName, serviceComputeType, modelIds, - serviceTags, - serviceProperties, + serviceTags ?? new ChangeTrackingDictionary(), + serviceProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs index 8d759992c57d..86cce0670b04 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs @@ -46,16 +46,21 @@ public partial class MachineLearningServicesModelDeployedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the deployed service. - /// The properties of the deployed service. - /// or is null. - internal MachineLearningServicesModelDeployedEventData(IReadOnlyDictionary serviceTags, IReadOnlyDictionary serviceProperties) + /// The name of the deployed service. + /// The compute type (e.g. ACI, AKS) of the deployed service. + /// A common separated list of model IDs. The IDs of the models deployed in the service. + /// , or is null. + internal MachineLearningServicesModelDeployedEventData(string serviceName, string serviceComputeType, string modelIds) { - Argument.AssertNotNull(serviceTags, nameof(serviceTags)); - Argument.AssertNotNull(serviceProperties, nameof(serviceProperties)); + Argument.AssertNotNull(serviceName, nameof(serviceName)); + Argument.AssertNotNull(serviceComputeType, nameof(serviceComputeType)); + Argument.AssertNotNull(modelIds, nameof(modelIds)); - ServiceTags = serviceTags; - ServiceProperties = serviceProperties; + ServiceName = serviceName; + ServiceComputeType = serviceComputeType; + ModelIds = modelIds; + ServiceTags = new ChangeTrackingDictionary(); + ServiceProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs index 6e6446370ca4..f51226031422 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs @@ -34,56 +34,56 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelRegisteredEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ModelName)) + writer.WritePropertyName("modelName"u8); + writer.WriteStringValue(ModelName); + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + if (Optional.IsCollectionDefined(ModelTags)) { - writer.WritePropertyName("modelName"u8); - writer.WriteStringValue(ModelName); - } - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - writer.WritePropertyName("modelTags"u8); - writer.WriteStartObject(); - foreach (var item in ModelTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("modelTags"u8); + writer.WriteStartObject(); + foreach (var item in ModelTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("modelProperties"u8); - writer.WriteStartObject(); - foreach (var item in ModelProperties) + if (Optional.IsCollectionDefined(ModelProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("modelProperties"u8); + writer.WriteStartObject(); + foreach (var item in ModelProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -141,6 +141,10 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } if (property.NameEquals("modelTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -158,6 +162,10 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } if (property.NameEquals("modelProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -179,7 +187,7 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningServicesModelRegisteredEventData(modelName, modelVersion, modelTags, modelProperties, serializedAdditionalRawData); + return new MachineLearningServicesModelRegisteredEventData(modelName, modelVersion, modelTags ?? new ChangeTrackingDictionary(), modelProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs index 66af5a595773..e844c536e50b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs @@ -46,16 +46,18 @@ public partial class MachineLearningServicesModelRegisteredEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the model that was registered. - /// The properties of the model that was registered. - /// or is null. - internal MachineLearningServicesModelRegisteredEventData(IReadOnlyDictionary modelTags, IReadOnlyDictionary modelProperties) + /// The name of the model that was registered. + /// The version of the model that was registered. + /// or is null. + internal MachineLearningServicesModelRegisteredEventData(string modelName, string modelVersion) { - Argument.AssertNotNull(modelTags, nameof(modelTags)); - Argument.AssertNotNull(modelProperties, nameof(modelProperties)); + Argument.AssertNotNull(modelName, nameof(modelName)); + Argument.AssertNotNull(modelVersion, nameof(modelVersion)); - ModelTags = modelTags; - ModelProperties = modelProperties; + ModelName = modelName; + ModelVersion = modelVersion; + ModelTags = new ChangeTrackingDictionary(); + ModelProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs index 218cd1801335..62dd83415d96 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs @@ -34,66 +34,60 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunCompletedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExperimentId)) + writer.WritePropertyName("experimentId"u8); + writer.WriteStringValue(ExperimentId); + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("runType"u8); + writer.WriteStringValue(RunType); + if (Optional.IsCollectionDefined(RunTags)) { - writer.WritePropertyName("experimentId"u8); - writer.WriteStringValue(ExperimentId); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(RunType)) - { - writer.WritePropertyName("runType"u8); - writer.WriteStringValue(RunType); - } - writer.WritePropertyName("runTags"u8); - writer.WriteStartObject(); - foreach (var item in RunTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runTags"u8); + writer.WriteStartObject(); + foreach (var item in RunTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("runProperties"u8); - writer.WriteStartObject(); - foreach (var item in RunProperties) + if (Optional.IsCollectionDefined(RunProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runProperties"u8); + writer.WriteStartObject(); + foreach (var item in RunProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -163,6 +157,10 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL } if (property.NameEquals("runTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -180,6 +178,10 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL } if (property.NameEquals("runProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -206,8 +208,8 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL experimentName, runId, runType, - runTags, - runProperties, + runTags ?? new ChangeTrackingDictionary(), + runProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs index e8c1fb9d4264..bbfe86bdb3e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs @@ -46,16 +46,24 @@ public partial class MachineLearningServicesRunCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the completed Run. - /// The properties of the completed Run. - /// or is null. - internal MachineLearningServicesRunCompletedEventData(IReadOnlyDictionary runTags, IReadOnlyDictionary runProperties) + /// The ID of the experiment that the run belongs to. + /// The name of the experiment that the run belongs to. + /// The ID of the Run that was completed. + /// The Run Type of the completed Run. + /// , , or is null. + internal MachineLearningServicesRunCompletedEventData(string experimentId, string experimentName, string runId, string runType) { - Argument.AssertNotNull(runTags, nameof(runTags)); - Argument.AssertNotNull(runProperties, nameof(runProperties)); + Argument.AssertNotNull(experimentId, nameof(experimentId)); + Argument.AssertNotNull(experimentName, nameof(experimentName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(runType, nameof(runType)); - RunTags = runTags; - RunProperties = runProperties; + ExperimentId = experimentId; + ExperimentName = experimentName; + RunId = runId; + RunType = runType; + RunTags = new ChangeTrackingDictionary(); + RunProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs index 520679135bb8..1efc53ac3c3b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs @@ -34,71 +34,62 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunStatusChangedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExperimentId)) + writer.WritePropertyName("experimentId"u8); + writer.WriteStringValue(ExperimentId); + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("runType"u8); + writer.WriteStringValue(RunType); + if (Optional.IsCollectionDefined(RunTags)) { - writer.WritePropertyName("experimentId"u8); - writer.WriteStringValue(ExperimentId); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(RunType)) - { - writer.WritePropertyName("runType"u8); - writer.WriteStringValue(RunType); - } - writer.WritePropertyName("runTags"u8); - writer.WriteStartObject(); - foreach (var item in RunTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runTags"u8); + writer.WriteStartObject(); + foreach (var item in RunTags) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("runProperties"u8); - writer.WriteStartObject(); - foreach (var item in RunProperties) + if (Optional.IsCollectionDefined(RunProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runProperties"u8); + writer.WriteStartObject(); + foreach (var item in RunProperties) { - writer.WriteNullValue(); - continue; - } + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - if (Optional.IsDefined(RunStatus)) - { - writer.WritePropertyName("runStatus"u8); - writer.WriteStringValue(RunStatus); - } + writer.WritePropertyName("runStatus"u8); + writer.WriteStringValue(RunStatus); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -169,6 +160,10 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach } if (property.NameEquals("runTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -186,6 +181,10 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach } if (property.NameEquals("runProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -217,8 +216,8 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach experimentName, runId, runType, - runTags, - runProperties, + runTags ?? new ChangeTrackingDictionary(), + runProperties ?? new ChangeTrackingDictionary(), runStatus, serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs index 8af67e302b82..c7c35d6ed14e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs @@ -46,16 +46,27 @@ public partial class MachineLearningServicesRunStatusChangedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the Machine Learning Run. - /// The properties of the Machine Learning Run. - /// or is null. - internal MachineLearningServicesRunStatusChangedEventData(IReadOnlyDictionary runTags, IReadOnlyDictionary runProperties) + /// The ID of the experiment that the Machine Learning Run belongs to. + /// The name of the experiment that the Machine Learning Run belongs to. + /// The ID of the Machine Learning Run. + /// The Run Type of the Machine Learning Run. + /// The status of the Machine Learning Run. + /// , , , or is null. + internal MachineLearningServicesRunStatusChangedEventData(string experimentId, string experimentName, string runId, string runType, string runStatus) { - Argument.AssertNotNull(runTags, nameof(runTags)); - Argument.AssertNotNull(runProperties, nameof(runProperties)); + Argument.AssertNotNull(experimentId, nameof(experimentId)); + Argument.AssertNotNull(experimentName, nameof(experimentName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(runType, nameof(runType)); + Argument.AssertNotNull(runStatus, nameof(runStatus)); - RunTags = runTags; - RunProperties = runProperties; + ExperimentId = experimentId; + ExperimentName = experimentName; + RunId = runId; + RunType = runType; + RunTags = new ChangeTrackingDictionary(); + RunProperties = new ChangeTrackingDictionary(); + RunStatus = runStatus; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs index 51ab73b06dc2..917a81f6db1a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceEnteredEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceEnteredEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceEnteredEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceEnteredEventData(IEnumerable expiredGeofenceGeometr internal MapsGeofenceEnteredEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceEnteredEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs index 7e144514b942..ce2204e4876e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs @@ -34,27 +34,36 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MapsGeofenceEventProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("expiredGeofenceGeometryId"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredGeofenceGeometryId) + if (options.Format != "W") { - writer.WriteStringValue(item); + writer.WritePropertyName("expiredGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("geometries"u8); - writer.WriteStartArray(); - foreach (var item in Geometries) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("geometries"u8); + writer.WriteStartArray(); + foreach (var item in Geometries) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("invalidPeriodGeofenceGeometryId"u8); - writer.WriteStartArray(); - foreach (var item in InvalidPeriodGeofenceGeometryId) + if (options.Format != "W") { - writer.WriteStringValue(item); + writer.WritePropertyName("invalidPeriodGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in InvalidPeriodGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(IsEventPublished)) { writer.WritePropertyName("isEventPublished"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs index 291c97afaace..6535b899695a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,19 +46,11 @@ public partial class MapsGeofenceEventProperties private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceEventProperties(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) + internal MapsGeofenceEventProperties() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); - - ExpiredGeofenceGeometryId = expiredGeofenceGeometryId.ToList(); - Geometries = geometries.ToList(); - InvalidPeriodGeofenceGeometryId = invalidPeriodGeofenceGeometryId.ToList(); + ExpiredGeofenceGeometryId = new ChangeTrackingList(); + Geometries = new ChangeTrackingList(); + InvalidPeriodGeofenceGeometryId = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -77,11 +68,6 @@ internal MapsGeofenceEventProperties(IReadOnlyList expiredGeofenceGeomet _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal MapsGeofenceEventProperties() - { - } - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. public IReadOnlyList ExpiredGeofenceGeometryId { get; } /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs index 29a1bc6813bd..ea1b7a3f4635 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceExitedEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceExitedEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceExitedEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceExitedEventData(IEnumerable expiredGeofenceGeometry internal MapsGeofenceExitedEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceExitedEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs index ba7fd1dfd496..b8a9abb6001c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceResultEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceResultEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceResultEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceResultEventData(IEnumerable expiredGeofenceGeometry internal MapsGeofenceResultEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceResultEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml index f6874a4d67e5..1b3edc7d69e8 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: dc933a4229fbba738762613c58773db6c08d8357 repo: Azure/azure-rest-api-specs -directory: "specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents" -commit: 5f079f3d5e4ec9d1e10bafbd58844fdb4977e338 +additionalDirectories: