diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md index 450cd2148394..fa5086295f31 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md @@ -1,14 +1,12 @@ # Release History -## 4.22.0-beta.1 (Unreleased) +## 4.22.0 (2024-02-12) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added new Storage Task Assignment system events. +- Added new AVS system events. +- Added `Metadata` property to `AcsChatThreadCreatedEventData` system event. ## 4.21.0 (2023-11-07) @@ -50,7 +48,7 @@ ### Features Added -- Added new system events for Container Service. +- Added new system events for Container Service. ### Breaking Changes @@ -193,7 +191,7 @@ ### New Features * Added the following new system events: - StorageBlobInventoryPolicyCompletedEventData - + * Updated existing system events: - AcsRecordingChunkInfoProperties - Added `ContentLocation` and `MetadataLocation` properties. @@ -203,7 +201,7 @@ ## 4.2.0 (2021-05-10) ### New Features -* Added the following new system events: +* Added the following new system events: - PolicyInsightsPolicyStateChangedEventData - PolicyInsightsPolicyStateCreatedEventData - PolicyInsightsPolicyStateDeletedEventData diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs index 42257a8e45be..3fb66c8beaaa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs @@ -43,7 +43,9 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantAddedToThreadWithUserEventData AcsChatParticipantAddedToThreadWithUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), System.DateTimeOffset? time = default(System.DateTimeOffset?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel addedByCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties participantAdded = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRemovedFromThreadEventData(string transactionId = null, string threadId = null, System.DateTimeOffset? time = default(System.DateTimeOffset?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel removedByCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties participantRemoved = null, long? version = default(long?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatParticipantRemovedFromThreadWithUserEventData AcsChatParticipantRemovedFromThreadWithUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), System.DateTimeOffset? time = default(System.DateTimeOffset?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel removedByCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadParticipantProperties participantRemoved = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel createdByCommunicationIdentifier = null, System.Collections.Generic.IReadOnlyDictionary properties = null, System.Collections.Generic.IEnumerable participants = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel createdByCommunicationIdentifier = null, System.Collections.Generic.IReadOnlyDictionary properties = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IEnumerable participants = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId, string threadId, System.DateTimeOffset? createTime, long? version, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel createdByCommunicationIdentifier, System.Collections.Generic.IReadOnlyDictionary properties, System.Collections.Generic.IReadOnlyList participants) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -153,6 +155,21 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AppConfigurationSnapshotModifiedEventData AppConfigurationSnapshotModifiedEventData(string name = null, string eTag = null, string syncToken = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AppEventTypeDetail AppEventTypeDetail(Azure.Messaging.EventGrid.SystemEvents.AppAction? action = default(Azure.Messaging.EventGrid.SystemEvents.AppAction?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AppServicePlanEventTypeDetail AppServicePlanEventTypeDetail(Azure.Messaging.EventGrid.SystemEvents.StampKind? stampKind = default(Azure.Messaging.EventGrid.SystemEvents.StampKind?), Azure.Messaging.EventGrid.SystemEvents.AppServicePlanAction? action = default(Azure.Messaging.EventGrid.SystemEvents.AppServicePlanAction?), Azure.Messaging.EventGrid.SystemEvents.AsyncStatus? status = default(Azure.Messaging.EventGrid.SystemEvents.AsyncStatus?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsClusterCreatedEventData AvsClusterCreatedEventData(string operationId = null, System.Collections.Generic.IEnumerable addedHostNames = null, System.Collections.Generic.IEnumerable removedHostNames = null, System.Collections.Generic.IEnumerable inMaintenanceHostNames = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsClusterDeletedEventData AvsClusterDeletedEventData(string operationId = null, System.Collections.Generic.IEnumerable addedHostNames = null, System.Collections.Generic.IEnumerable removedHostNames = null, System.Collections.Generic.IEnumerable inMaintenanceHostNames = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData AvsClusterEventData(string operationId = null, System.Collections.Generic.IEnumerable addedHostNames = null, System.Collections.Generic.IEnumerable removedHostNames = null, System.Collections.Generic.IEnumerable inMaintenanceHostNames = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsClusterFailedEventData AvsClusterFailedEventData(string operationId = null, System.Collections.Generic.IEnumerable addedHostNames = null, System.Collections.Generic.IEnumerable removedHostNames = null, System.Collections.Generic.IEnumerable inMaintenanceHostNames = null, string failureMessage = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsClusterUpdatedEventData AvsClusterUpdatedEventData(string operationId = null, System.Collections.Generic.IEnumerable addedHostNames = null, System.Collections.Generic.IEnumerable removedHostNames = null, System.Collections.Generic.IEnumerable inMaintenanceHostNames = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsClusterUpdatingEventData AvsClusterUpdatingEventData(string operationId = null, System.Collections.Generic.IEnumerable addedHostNames = null, System.Collections.Generic.IEnumerable removedHostNames = null, System.Collections.Generic.IEnumerable inMaintenanceHostNames = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudEventData AvsPrivateCloudEventData(string operationId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudFailedEventData AvsPrivateCloudFailedEventData(string operationId = null, string failureMessage = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudUpdatedEventData AvsPrivateCloudUpdatedEventData(string operationId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudUpdatingEventData AvsPrivateCloudUpdatingEventData(string operationId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionCancelledEventData AvsScriptExecutionCancelledEventData(string operationId = null, string cmdletId = null, System.Collections.Generic.IEnumerable output = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionEventData AvsScriptExecutionEventData(string operationId = null, string cmdletId = null, System.Collections.Generic.IEnumerable output = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionFailedEventData AvsScriptExecutionFailedEventData(string operationId = null, string cmdletId = null, System.Collections.Generic.IEnumerable output = null, string failureMessage = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionFinishedEventData AvsScriptExecutionFinishedEventData(string operationId = null, string cmdletId = null, System.Collections.Generic.IEnumerable output = null, System.Collections.Generic.IReadOnlyDictionary namedOutputs = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionStartedEventData AvsScriptExecutionStartedEventData(string operationId = null, string cmdletId = null, System.Collections.Generic.IEnumerable output = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifierModel(string rawId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationUserIdentifierModel communicationUser = null, Azure.Messaging.EventGrid.SystemEvents.PhoneNumberIdentifierModel phoneNumber = null, Azure.Messaging.EventGrid.SystemEvents.MicrosoftTeamsUserIdentifierModel microsoftTeamsUser = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.CommunicationUserIdentifierModel CommunicationUserIdentifierModel(string id = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -321,6 +338,8 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.StorageDirectoryRenamedEventData StorageDirectoryRenamedEventData(string api = null, string clientRequestId = null, string requestId = null, string sourceUrl = null, string destinationUrl = null, string sequencer = null, string identity = null, object storageDiagnostics = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail StorageLifecyclePolicyActionSummaryDetail(long? totalObjectsCount = default(long?), long? successCount = default(long?), string errorList = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyCompletedEventData StorageLifecyclePolicyCompletedEventData(string scheduleTime = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail deleteSummary = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail tierToCoolSummary = null, Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail tierToArchiveSummary = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedEventData StorageTaskAssignmentCompletedEventData(Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus? status = default(Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), string taskExecutionId = null, string taskName = null, System.Uri summaryReportBlobUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentQueuedEventData StorageTaskAssignmentQueuedEventData(System.DateTimeOffset? queuedOn = default(System.DateTimeOffset?), string taskExecutionId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedEventData StorageTaskCompletedEventData(Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedStatus? status = default(Azure.Messaging.EventGrid.SystemEvents.StorageTaskCompletedStatus?), System.DateTimeOffset? completedDateTime = default(System.DateTimeOffset?), string taskExecutionId = null, string taskName = null, System.Uri summaryReportBlobUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskQueuedEventData StorageTaskQueuedEventData(System.DateTimeOffset? queuedDateTime = default(System.DateTimeOffset?), string taskExecutionId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.SubscriptionDeletedEventData SubscriptionDeletedEventData(string eventSubscriptionId = null) { throw null; } @@ -462,6 +481,18 @@ public static partial class SystemEventNames public const string AppConfigurationKeyValueModified = "Microsoft.AppConfiguration.KeyValueModified"; public const string AppConfigurationSnapshotCreated = "Microsoft.AppConfiguration.SnapshotCreated"; public const string AppConfigurationSnapshotModified = "Microsoft.AppConfiguration.SnapshotModified"; + public const string AvsClusterCreated = "Microsoft.AVS.ClusterCreated"; + public const string AvsClusterDeleted = "Microsoft.AVS.ClusterDeleted"; + public const string AvsClusterFailed = "Microsoft.AVS.ClusterFailed"; + public const string AvsClusterUpdated = "Microsoft.AVS.ClusterUpdated"; + public const string AvsClusterUpdating = "Microsoft.AVS.ClusterUpdating"; + public const string AvsPrivateCloudFailed = "Microsoft.AVS.PrivateCloudFailed"; + public const string AvsPrivateCloudUpdated = "Microsoft.AVS.PrivateCloudUpdated"; + public const string AvsPrivateCloudUpdating = "Microsoft.AVS.PrivateCloudUpdating"; + public const string AvsScriptExecutionCancelled = "Microsoft.AVS.ScriptExecutionCancelled"; + public const string AvsScriptExecutionFailed = "Microsoft.AVS.ScriptExecutionFailed"; + public const string AvsScriptExecutionFinished = "Microsoft.AVS.ScriptExecutionFinished"; + public const string AvsScriptExecutionStarted = "Microsoft.AVS.ScriptExecutionStarted"; public const string ContainerRegistryChartDeleted = "Microsoft.ContainerRegistry.ChartDeleted"; public const string ContainerRegistryChartPushed = "Microsoft.ContainerRegistry.ChartPushed"; public const string ContainerRegistryImageDeleted = "Microsoft.ContainerRegistry.ImageDeleted"; @@ -572,6 +603,8 @@ public static partial class SystemEventNames public const string StorageDirectoryDeleted = "Microsoft.Storage.DirectoryDeleted"; public const string StorageDirectoryRenamed = "Microsoft.Storage.DirectoryRenamed"; public const string StorageLifecyclePolicyCompleted = "Microsoft.Storage.LifecyclePolicyCompleted"; + public const string StorageTaskAssignmentCompleted = "Microsoft.Storage.StorageTaskAssignmentCompleted"; + public const string StorageTaskAssignmentQueued = "Microsoft.Storage.StorageTaskAssignmentQueued"; public const string StorageTaskCompleted = "Microsoft.Storage.StorageTaskCompleted"; public const string StorageTaskQueued = "Microsoft.Storage.StorageTaskQueued"; public const string WebAppServicePlanUpdated = "Microsoft.Web.AppServicePlanUpdated"; @@ -826,6 +859,7 @@ public partial class AcsChatThreadCreatedEventData : Azure.Messaging.EventGrid.S { internal AcsChatThreadCreatedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CreatedByCommunicationIdentifier { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public System.Collections.Generic.IReadOnlyList Participants { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } } @@ -1588,6 +1622,78 @@ internal AppServicePlanEventTypeDetail() { } public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AsyncStatus left, Azure.Messaging.EventGrid.SystemEvents.AsyncStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class AvsClusterCreatedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData + { + internal AvsClusterCreatedEventData() { } + } + public partial class AvsClusterDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData + { + internal AvsClusterDeletedEventData() { } + } + public partial class AvsClusterEventData + { + internal AvsClusterEventData() { } + public System.Collections.Generic.IReadOnlyList AddedHostNames { get { throw null; } } + public System.Collections.Generic.IReadOnlyList InMaintenanceHostNames { get { throw null; } } + public string OperationId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RemovedHostNames { get { throw null; } } + } + public partial class AvsClusterFailedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData + { + internal AvsClusterFailedEventData() { } + public string FailureMessage { get { throw null; } } + } + public partial class AvsClusterUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData + { + internal AvsClusterUpdatedEventData() { } + } + public partial class AvsClusterUpdatingEventData : Azure.Messaging.EventGrid.SystemEvents.AvsClusterEventData + { + internal AvsClusterUpdatingEventData() { } + } + public partial class AvsPrivateCloudEventData + { + internal AvsPrivateCloudEventData() { } + public string OperationId { get { throw null; } } + } + public partial class AvsPrivateCloudFailedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudEventData + { + internal AvsPrivateCloudFailedEventData() { } + public string FailureMessage { get { throw null; } } + } + public partial class AvsPrivateCloudUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudEventData + { + internal AvsPrivateCloudUpdatedEventData() { } + } + public partial class AvsPrivateCloudUpdatingEventData : Azure.Messaging.EventGrid.SystemEvents.AvsPrivateCloudEventData + { + internal AvsPrivateCloudUpdatingEventData() { } + } + public partial class AvsScriptExecutionCancelledEventData : Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionEventData + { + internal AvsScriptExecutionCancelledEventData() { } + } + public partial class AvsScriptExecutionEventData + { + internal AvsScriptExecutionEventData() { } + public string CmdletId { get { throw null; } } + public string OperationId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Output { get { throw null; } } + } + public partial class AvsScriptExecutionFailedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionEventData + { + internal AvsScriptExecutionFailedEventData() { } + public string FailureMessage { get { throw null; } } + } + public partial class AvsScriptExecutionFinishedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionEventData + { + internal AvsScriptExecutionFinishedEventData() { } + public System.Collections.Generic.IReadOnlyDictionary NamedOutputs { get { throw null; } } + } + public partial class AvsScriptExecutionStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AvsScriptExecutionEventData + { + internal AvsScriptExecutionStartedEventData() { } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CommunicationCloudEnvironmentModel : System.IEquatable { @@ -3163,6 +3269,39 @@ internal StorageLifecyclePolicyCompletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail TierToArchiveSummary { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.StorageLifecyclePolicyActionSummaryDetail TierToCoolSummary { get { throw null; } } } + public partial class StorageTaskAssignmentCompletedEventData + { + internal StorageTaskAssignmentCompletedEventData() { } + public System.DateTimeOffset? CompletedOn { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus? Status { get { throw null; } } + public System.Uri SummaryReportBlobUri { get { throw null; } } + public string TaskExecutionId { get { throw null; } } + public string TaskName { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StorageTaskAssignmentCompletedStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StorageTaskAssignmentCompletedStatus(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus Failed { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus Succeeded { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus left, Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus left, Azure.Messaging.EventGrid.SystemEvents.StorageTaskAssignmentCompletedStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class StorageTaskAssignmentQueuedEventData + { + internal StorageTaskAssignmentQueuedEventData() { } + public System.DateTimeOffset? QueuedOn { get { throw null; } } + public string TaskExecutionId { get { throw null; } } + } public partial class StorageTaskCompletedEventData { internal StorageTaskCompletedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj index d210ed763326..27bee600d7a4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj @@ -2,7 +2,7 @@ This library can be used to publish events to Azure Event Grid and to consume events delivered by EventGrid. It also defines the event schemas for the events published to EventGrid by various Azure services. Microsoft Azure.Messaging.EventGrid client library - 4.22.0-beta.1 + 4.22.0 4.21.0 Microsoft Azure EventGrid;Event Grid;Event Grid Publishing; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs index cc93b53b0579..430075a5eb5d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs @@ -107,7 +107,7 @@ public static AcsChatThreadCreatedWithUserEventData AcsChatThreadCreatedWithUser [EditorBrowsable(EditorBrowsableState.Never)] public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyList participants) { - return AcsChatThreadCreatedEventData(transactionId, threadId, createTime, version, createdByCommunicationIdentifier, properties, (IEnumerable) participants); + return AcsChatThreadCreatedEventData(transactionId, threadId, createTime, version, createdByCommunicationIdentifier, properties, new Dictionary(), (IEnumerable) participants); } /// Initializes a new instance of AcsChatThreadCreatedWithUserEventData. @@ -174,6 +174,24 @@ public static AcsChatThreadPropertiesUpdatedEventData AcsChatThreadPropertiesUpd return new AcsChatThreadPropertiesUpdatedEventData(transactionId, threadId, createTime, version, editedByCommunicationIdentifier, editTime, properties, new Dictionary()); } + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The original creation time of the thread. + /// The version of the thread. + /// The communication identifier of the user who created the thread. + /// The thread properties. + /// The list of properties of participants who are part of the thread. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel createdByCommunicationIdentifier = null, IReadOnlyDictionary properties = null, IEnumerable participants = null) + { + properties ??= new Dictionary(); + participants ??= new List(); + + return new AcsChatThreadCreatedEventData(transactionId, threadId, createTime, version, createdByCommunicationIdentifier, properties, new Dictionary(), participants?.ToList()); + } + /// Initializes new instance of AcsSmsDeliveryReportReceivedEventData class. /// The identity of the SMS message. /// The identity of SMS message sender. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs index 5a6b8be1060e..2b236509c9e4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs @@ -185,6 +185,27 @@ public static StorageTaskCompletedEventData StorageTaskCompletedEventData(Storag return new StorageTaskCompletedEventData(status, completedDateTime, taskExecutionId, taskName, summaryReportBlobUri); } + /// Initializes a new instance of . + /// The time at which a storage task was queued. + /// The execution id for a storage task. + /// A new instance for mocking. + public static StorageTaskAssignmentQueuedEventData StorageTaskAssignmentQueuedEventData(DateTimeOffset? queuedOn = null, string taskExecutionId = null) + { + return new StorageTaskAssignmentQueuedEventData(queuedOn, taskExecutionId); + } + + /// Initializes a new instance of . + /// The status for a storage task. + /// The time at which a storage task was completed. + /// The execution id for a storage task. + /// The task name for a storage task. + /// The summary report blob url for a storage task. + /// A new instance for mocking. + public static StorageTaskAssignmentCompletedEventData StorageTaskAssignmentCompletedEventData(StorageTaskAssignmentCompletedStatus? status = null, DateTimeOffset? completedOn = null, string taskExecutionId = null, string taskName = null, Uri summaryReportBlobUri = null) + { + return new StorageTaskAssignmentCompletedEventData(status, completedOn, taskExecutionId, taskName, summaryReportBlobUri); + } + /// Initializes a new instance of . /// The path to the capture file. /// The file type of the capture file. @@ -2377,14 +2398,16 @@ public static AcsChatThreadEventBaseProperties AcsChatThreadEventBaseProperties( /// The version of the thread. /// The communication identifier of the user who created the thread. /// The thread properties. + /// The chat thread created metadata. /// The list of properties of participants who are part of the thread. /// A new instance for mocking. - public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel createdByCommunicationIdentifier = null, IReadOnlyDictionary properties = null, IEnumerable participants = null) + public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel createdByCommunicationIdentifier = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null, IEnumerable participants = null) { properties ??= new Dictionary(); + metadata ??= new Dictionary(); participants ??= new List(); - return new AcsChatThreadCreatedEventData(transactionId, threadId, createTime, version, createdByCommunicationIdentifier, properties, participants?.ToList()); + return new AcsChatThreadCreatedEventData(transactionId, threadId, createTime, version, createdByCommunicationIdentifier, properties, metadata, participants?.ToList()); } /// Initializes a new instance of . @@ -3109,5 +3132,192 @@ public static ResourceNotificationsResourceManagementDeletedEventData ResourceNo { return new ResourceNotificationsResourceManagementDeletedEventData(resourceDetails, operationalDetails); } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// A new instance for mocking. + public static AvsPrivateCloudUpdatingEventData AvsPrivateCloudUpdatingEventData(string operationId = null) + { + return new AvsPrivateCloudUpdatingEventData(operationId); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// A new instance for mocking. + public static AvsPrivateCloudEventData AvsPrivateCloudEventData(string operationId = null) + { + return new AvsPrivateCloudEventData(operationId); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// A new instance for mocking. + public static AvsPrivateCloudUpdatedEventData AvsPrivateCloudUpdatedEventData(string operationId = null) + { + return new AvsPrivateCloudUpdatedEventData(operationId); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Failure reason of an event. + /// A new instance for mocking. + public static AvsPrivateCloudFailedEventData AvsPrivateCloudFailedEventData(string operationId = null, string failureMessage = null) + { + return new AvsPrivateCloudFailedEventData(operationId, failureMessage); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + /// A new instance for mocking. + public static AvsClusterCreatedEventData AvsClusterCreatedEventData(string operationId = null, IEnumerable addedHostNames = null, IEnumerable removedHostNames = null, IEnumerable inMaintenanceHostNames = null) + { + addedHostNames ??= new List(); + removedHostNames ??= new List(); + inMaintenanceHostNames ??= new List(); + + return new AvsClusterCreatedEventData(operationId, addedHostNames?.ToList(), removedHostNames?.ToList(), inMaintenanceHostNames?.ToList()); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + /// A new instance for mocking. + public static AvsClusterEventData AvsClusterEventData(string operationId = null, IEnumerable addedHostNames = null, IEnumerable removedHostNames = null, IEnumerable inMaintenanceHostNames = null) + { + addedHostNames ??= new List(); + removedHostNames ??= new List(); + inMaintenanceHostNames ??= new List(); + + return new AvsClusterEventData(operationId, addedHostNames?.ToList(), removedHostNames?.ToList(), inMaintenanceHostNames?.ToList()); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + /// A new instance for mocking. + public static AvsClusterDeletedEventData AvsClusterDeletedEventData(string operationId = null, IEnumerable addedHostNames = null, IEnumerable removedHostNames = null, IEnumerable inMaintenanceHostNames = null) + { + addedHostNames ??= new List(); + removedHostNames ??= new List(); + inMaintenanceHostNames ??= new List(); + + return new AvsClusterDeletedEventData(operationId, addedHostNames?.ToList(), removedHostNames?.ToList(), inMaintenanceHostNames?.ToList()); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + /// A new instance for mocking. + public static AvsClusterUpdatingEventData AvsClusterUpdatingEventData(string operationId = null, IEnumerable addedHostNames = null, IEnumerable removedHostNames = null, IEnumerable inMaintenanceHostNames = null) + { + addedHostNames ??= new List(); + removedHostNames ??= new List(); + inMaintenanceHostNames ??= new List(); + + return new AvsClusterUpdatingEventData(operationId, addedHostNames?.ToList(), removedHostNames?.ToList(), inMaintenanceHostNames?.ToList()); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + /// A new instance for mocking. + public static AvsClusterUpdatedEventData AvsClusterUpdatedEventData(string operationId = null, IEnumerable addedHostNames = null, IEnumerable removedHostNames = null, IEnumerable inMaintenanceHostNames = null) + { + addedHostNames ??= new List(); + removedHostNames ??= new List(); + inMaintenanceHostNames ??= new List(); + + return new AvsClusterUpdatedEventData(operationId, addedHostNames?.ToList(), removedHostNames?.ToList(), inMaintenanceHostNames?.ToList()); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + /// Failure reason of an event. + /// A new instance for mocking. + public static AvsClusterFailedEventData AvsClusterFailedEventData(string operationId = null, IEnumerable addedHostNames = null, IEnumerable removedHostNames = null, IEnumerable inMaintenanceHostNames = null, string failureMessage = null) + { + addedHostNames ??= new List(); + removedHostNames ??= new List(); + inMaintenanceHostNames ??= new List(); + + return new AvsClusterFailedEventData(operationId, addedHostNames?.ToList(), removedHostNames?.ToList(), inMaintenanceHostNames?.ToList(), failureMessage); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// Stdout outputs from the execution, if any. + /// A new instance for mocking. + public static AvsScriptExecutionStartedEventData AvsScriptExecutionStartedEventData(string operationId = null, string cmdletId = null, IEnumerable output = null) + { + output ??= new List(); + + return new AvsScriptExecutionStartedEventData(operationId, cmdletId, output?.ToList()); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// Stdout outputs from the execution, if any. + /// A new instance for mocking. + public static AvsScriptExecutionEventData AvsScriptExecutionEventData(string operationId = null, string cmdletId = null, IEnumerable output = null) + { + output ??= new List(); + + return new AvsScriptExecutionEventData(operationId, cmdletId, output?.ToList()); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// Stdout outputs from the execution, if any. + /// Named outputs of completed execution, if any. + /// A new instance for mocking. + public static AvsScriptExecutionFinishedEventData AvsScriptExecutionFinishedEventData(string operationId = null, string cmdletId = null, IEnumerable output = null, IReadOnlyDictionary namedOutputs = null) + { + output ??= new List(); + namedOutputs ??= new Dictionary(); + + return new AvsScriptExecutionFinishedEventData(operationId, cmdletId, output?.ToList(), namedOutputs); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// Stdout outputs from the execution, if any. + /// A new instance for mocking. + public static AvsScriptExecutionCancelledEventData AvsScriptExecutionCancelledEventData(string operationId = null, string cmdletId = null, IEnumerable output = null) + { + output ??= new List(); + + return new AvsScriptExecutionCancelledEventData(operationId, cmdletId, output?.ToList()); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// Stdout outputs from the execution, if any. + /// Failure reason of an event. + /// A new instance for mocking. + public static AvsScriptExecutionFailedEventData AvsScriptExecutionFailedEventData(string operationId = null, string cmdletId = null, IEnumerable output = null, string failureMessage = null) + { + output ??= new List(); + + return new AvsScriptExecutionFailedEventData(operationId, cmdletId, output?.ToList(), failureMessage); + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs index b8695290d772..cbcc660350d9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs @@ -24,6 +24,7 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve } Optional createdByCommunicationIdentifier = default; Optional> properties = default; + Optional> metadata = default; Optional> participants = default; Optional createTime = default; Optional version = default; @@ -61,6 +62,20 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve properties = dictionary; continue; } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + metadata = dictionary; + continue; + } if (property.NameEquals("participants"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,7 +119,7 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve continue; } } - return new AcsChatThreadCreatedEventData(transactionId.Value, threadId.Value, Optional.ToNullable(createTime), Optional.ToNullable(version), createdByCommunicationIdentifier.Value, Optional.ToDictionary(properties), Optional.ToList(participants)); + return new AcsChatThreadCreatedEventData(transactionId.Value, threadId.Value, Optional.ToNullable(createTime), Optional.ToNullable(version), createdByCommunicationIdentifier.Value, Optional.ToDictionary(properties), Optional.ToDictionary(metadata), Optional.ToList(participants)); } internal partial class AcsChatThreadCreatedEventDataConverter : JsonConverter diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs index a2a980ef1a7e..5b4318030fc9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs @@ -18,6 +18,7 @@ public partial class AcsChatThreadCreatedEventData : AcsChatThreadEventInThreadB internal AcsChatThreadCreatedEventData() { Properties = new ChangeTrackingDictionary(); + Metadata = new ChangeTrackingDictionary(); Participants = new ChangeTrackingList(); } @@ -28,11 +29,13 @@ internal AcsChatThreadCreatedEventData() /// The version of the thread. /// The communication identifier of the user who created the thread. /// The thread properties. + /// The chat thread created metadata. /// The list of properties of participants who are part of the thread. - internal AcsChatThreadCreatedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyList participants) : base(transactionId, threadId, createTime, version) + internal AcsChatThreadCreatedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IReadOnlyList participants) : base(transactionId, threadId, createTime, version) { CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; + Metadata = metadata; Participants = participants; } @@ -40,6 +43,8 @@ internal AcsChatThreadCreatedEventData(string transactionId, string threadId, Da public CommunicationIdentifierModel CreatedByCommunicationIdentifier { get; } /// The thread properties. public IReadOnlyDictionary Properties { get; } + /// The chat thread created metadata. + public IReadOnlyDictionary Metadata { get; } /// The list of properties of participants who are part of the thread. public IReadOnlyList Participants { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterCreatedEventData.Serialization.cs new file mode 100644 index 000000000000..93e5341efd77 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterCreatedEventData.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsClusterCreatedEventDataConverter))] + public partial class AvsClusterCreatedEventData + { + internal static AvsClusterCreatedEventData DeserializeAvsClusterCreatedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional operationId = default; + Optional> addedHostNames = default; + Optional> removedHostNames = default; + Optional> inMaintenanceHostNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("addedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + addedHostNames = array; + continue; + } + if (property.NameEquals("removedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + removedHostNames = array; + continue; + } + if (property.NameEquals("inMaintenanceHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + inMaintenanceHostNames = array; + continue; + } + } + return new AvsClusterCreatedEventData(operationId.Value, Optional.ToList(addedHostNames), Optional.ToList(removedHostNames), Optional.ToList(inMaintenanceHostNames)); + } + + internal partial class AvsClusterCreatedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsClusterCreatedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsClusterCreatedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsClusterCreatedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterCreatedEventData.cs new file mode 100644 index 000000000000..209dc05ef259 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterCreatedEventData.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterCreated event. + public partial class AvsClusterCreatedEventData : AvsClusterEventData + { + /// Initializes a new instance of . + internal AvsClusterCreatedEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + internal AvsClusterCreatedEventData(string operationId, IReadOnlyList addedHostNames, IReadOnlyList removedHostNames, IReadOnlyList inMaintenanceHostNames) : base(operationId, addedHostNames, removedHostNames, inMaintenanceHostNames) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterDeletedEventData.Serialization.cs new file mode 100644 index 000000000000..d4db926ce032 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterDeletedEventData.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsClusterDeletedEventDataConverter))] + public partial class AvsClusterDeletedEventData + { + internal static AvsClusterDeletedEventData DeserializeAvsClusterDeletedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional operationId = default; + Optional> addedHostNames = default; + Optional> removedHostNames = default; + Optional> inMaintenanceHostNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("addedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + addedHostNames = array; + continue; + } + if (property.NameEquals("removedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + removedHostNames = array; + continue; + } + if (property.NameEquals("inMaintenanceHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + inMaintenanceHostNames = array; + continue; + } + } + return new AvsClusterDeletedEventData(operationId.Value, Optional.ToList(addedHostNames), Optional.ToList(removedHostNames), Optional.ToList(inMaintenanceHostNames)); + } + + internal partial class AvsClusterDeletedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsClusterDeletedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsClusterDeletedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsClusterDeletedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterDeletedEventData.cs new file mode 100644 index 000000000000..959e14b8d856 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterDeletedEventData.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterDeleted event. + public partial class AvsClusterDeletedEventData : AvsClusterEventData + { + /// Initializes a new instance of . + internal AvsClusterDeletedEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + internal AvsClusterDeletedEventData(string operationId, IReadOnlyList addedHostNames, IReadOnlyList removedHostNames, IReadOnlyList inMaintenanceHostNames) : base(operationId, addedHostNames, removedHostNames, inMaintenanceHostNames) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterEventData.Serialization.cs new file mode 100644 index 000000000000..4f1b3602cb7d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterEventData.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsClusterEventDataConverter))] + public partial class AvsClusterEventData + { + internal static AvsClusterEventData DeserializeAvsClusterEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional operationId = default; + Optional> addedHostNames = default; + Optional> removedHostNames = default; + Optional> inMaintenanceHostNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("addedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + addedHostNames = array; + continue; + } + if (property.NameEquals("removedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + removedHostNames = array; + continue; + } + if (property.NameEquals("inMaintenanceHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + inMaintenanceHostNames = array; + continue; + } + } + return new AvsClusterEventData(operationId.Value, Optional.ToList(addedHostNames), Optional.ToList(removedHostNames), Optional.ToList(inMaintenanceHostNames)); + } + + internal partial class AvsClusterEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsClusterEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsClusterEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsClusterEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterEventData.cs new file mode 100644 index 000000000000..0b9af56e0709 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterEventData.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for Microsoft.AVS/clusters events. + public partial class AvsClusterEventData + { + /// Initializes a new instance of . + internal AvsClusterEventData() + { + AddedHostNames = new ChangeTrackingList(); + RemovedHostNames = new ChangeTrackingList(); + InMaintenanceHostNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + internal AvsClusterEventData(string operationId, IReadOnlyList addedHostNames, IReadOnlyList removedHostNames, IReadOnlyList inMaintenanceHostNames) + { + OperationId = operationId; + AddedHostNames = addedHostNames; + RemovedHostNames = removedHostNames; + InMaintenanceHostNames = inMaintenanceHostNames; + } + + /// Id of the operation that caused this event. + public string OperationId { get; } + /// Hosts added to the cluster in this event, if any. + public IReadOnlyList AddedHostNames { get; } + /// Hosts removed to the cluster in this event, if any. + public IReadOnlyList RemovedHostNames { get; } + /// Hosts in Maintenance mode in the cluster, if any. + public IReadOnlyList InMaintenanceHostNames { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterFailedEventData.Serialization.cs new file mode 100644 index 000000000000..b3c5715e4991 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterFailedEventData.Serialization.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsClusterFailedEventDataConverter))] + public partial class AvsClusterFailedEventData + { + internal static AvsClusterFailedEventData DeserializeAvsClusterFailedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional failureMessage = default; + Optional operationId = default; + Optional> addedHostNames = default; + Optional> removedHostNames = default; + Optional> inMaintenanceHostNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failureMessage"u8)) + { + failureMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("addedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + addedHostNames = array; + continue; + } + if (property.NameEquals("removedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + removedHostNames = array; + continue; + } + if (property.NameEquals("inMaintenanceHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + inMaintenanceHostNames = array; + continue; + } + } + return new AvsClusterFailedEventData(operationId.Value, Optional.ToList(addedHostNames), Optional.ToList(removedHostNames), Optional.ToList(inMaintenanceHostNames), failureMessage.Value); + } + + internal partial class AvsClusterFailedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsClusterFailedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsClusterFailedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsClusterFailedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterFailedEventData.cs new file mode 100644 index 000000000000..1a6d7245b140 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterFailedEventData.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterFailed event. + public partial class AvsClusterFailedEventData : AvsClusterEventData + { + /// Initializes a new instance of . + internal AvsClusterFailedEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + /// Failure reason of an event. + internal AvsClusterFailedEventData(string operationId, IReadOnlyList addedHostNames, IReadOnlyList removedHostNames, IReadOnlyList inMaintenanceHostNames, string failureMessage) : base(operationId, addedHostNames, removedHostNames, inMaintenanceHostNames) + { + FailureMessage = failureMessage; + } + + /// Failure reason of an event. + public string FailureMessage { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatedEventData.Serialization.cs new file mode 100644 index 000000000000..35dfe1a7832a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatedEventData.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsClusterUpdatedEventDataConverter))] + public partial class AvsClusterUpdatedEventData + { + internal static AvsClusterUpdatedEventData DeserializeAvsClusterUpdatedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional operationId = default; + Optional> addedHostNames = default; + Optional> removedHostNames = default; + Optional> inMaintenanceHostNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("addedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + addedHostNames = array; + continue; + } + if (property.NameEquals("removedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + removedHostNames = array; + continue; + } + if (property.NameEquals("inMaintenanceHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + inMaintenanceHostNames = array; + continue; + } + } + return new AvsClusterUpdatedEventData(operationId.Value, Optional.ToList(addedHostNames), Optional.ToList(removedHostNames), Optional.ToList(inMaintenanceHostNames)); + } + + internal partial class AvsClusterUpdatedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsClusterUpdatedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsClusterUpdatedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsClusterUpdatedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatedEventData.cs new file mode 100644 index 000000000000..1ce4e41e0a38 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatedEventData.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterUpdated event. + public partial class AvsClusterUpdatedEventData : AvsClusterEventData + { + /// Initializes a new instance of . + internal AvsClusterUpdatedEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + internal AvsClusterUpdatedEventData(string operationId, IReadOnlyList addedHostNames, IReadOnlyList removedHostNames, IReadOnlyList inMaintenanceHostNames) : base(operationId, addedHostNames, removedHostNames, inMaintenanceHostNames) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatingEventData.Serialization.cs new file mode 100644 index 000000000000..45ece5daa2ab --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatingEventData.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsClusterUpdatingEventDataConverter))] + public partial class AvsClusterUpdatingEventData + { + internal static AvsClusterUpdatingEventData DeserializeAvsClusterUpdatingEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional operationId = default; + Optional> addedHostNames = default; + Optional> removedHostNames = default; + Optional> inMaintenanceHostNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("addedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + addedHostNames = array; + continue; + } + if (property.NameEquals("removedHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + removedHostNames = array; + continue; + } + if (property.NameEquals("inMaintenanceHostNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + inMaintenanceHostNames = array; + continue; + } + } + return new AvsClusterUpdatingEventData(operationId.Value, Optional.ToList(addedHostNames), Optional.ToList(removedHostNames), Optional.ToList(inMaintenanceHostNames)); + } + + internal partial class AvsClusterUpdatingEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsClusterUpdatingEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsClusterUpdatingEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsClusterUpdatingEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatingEventData.cs new file mode 100644 index 000000000000..35f88cb313b2 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsClusterUpdatingEventData.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterUpdating event. + public partial class AvsClusterUpdatingEventData : AvsClusterEventData + { + /// Initializes a new instance of . + internal AvsClusterUpdatingEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Hosts added to the cluster in this event, if any. + /// Hosts removed to the cluster in this event, if any. + /// Hosts in Maintenance mode in the cluster, if any. + internal AvsClusterUpdatingEventData(string operationId, IReadOnlyList addedHostNames, IReadOnlyList removedHostNames, IReadOnlyList inMaintenanceHostNames) : base(operationId, addedHostNames, removedHostNames, inMaintenanceHostNames) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudEventData.Serialization.cs new file mode 100644 index 000000000000..7703e543391d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudEventData.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsPrivateCloudEventDataConverter))] + public partial class AvsPrivateCloudEventData + { + internal static AvsPrivateCloudEventData DeserializeAvsPrivateCloudEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional operationId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + } + return new AvsPrivateCloudEventData(operationId.Value); + } + + internal partial class AvsPrivateCloudEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsPrivateCloudEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsPrivateCloudEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsPrivateCloudEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudEventData.cs new file mode 100644 index 000000000000..9c97c6049edd --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudEventData.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for Microsoft.AVS/privateClouds events. + public partial class AvsPrivateCloudEventData + { + /// Initializes a new instance of . + internal AvsPrivateCloudEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + internal AvsPrivateCloudEventData(string operationId) + { + OperationId = operationId; + } + + /// Id of the operation that caused this event. + public string OperationId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudFailedEventData.Serialization.cs new file mode 100644 index 000000000000..75af95d7fcd3 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudFailedEventData.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsPrivateCloudFailedEventDataConverter))] + public partial class AvsPrivateCloudFailedEventData + { + internal static AvsPrivateCloudFailedEventData DeserializeAvsPrivateCloudFailedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional failureMessage = default; + Optional operationId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failureMessage"u8)) + { + failureMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + } + return new AvsPrivateCloudFailedEventData(operationId.Value, failureMessage.Value); + } + + internal partial class AvsPrivateCloudFailedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsPrivateCloudFailedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsPrivateCloudFailedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsPrivateCloudFailedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudFailedEventData.cs new file mode 100644 index 000000000000..bc1195460678 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudFailedEventData.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.PrivateCloudFailed event. + public partial class AvsPrivateCloudFailedEventData : AvsPrivateCloudEventData + { + /// Initializes a new instance of . + internal AvsPrivateCloudFailedEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Failure reason of an event. + internal AvsPrivateCloudFailedEventData(string operationId, string failureMessage) : base(operationId) + { + FailureMessage = failureMessage; + } + + /// Failure reason of an event. + public string FailureMessage { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatedEventData.Serialization.cs new file mode 100644 index 000000000000..f4af0ede2ea6 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatedEventData.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsPrivateCloudUpdatedEventDataConverter))] + public partial class AvsPrivateCloudUpdatedEventData + { + internal static AvsPrivateCloudUpdatedEventData DeserializeAvsPrivateCloudUpdatedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional operationId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + } + return new AvsPrivateCloudUpdatedEventData(operationId.Value); + } + + internal partial class AvsPrivateCloudUpdatedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsPrivateCloudUpdatedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsPrivateCloudUpdatedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsPrivateCloudUpdatedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatedEventData.cs new file mode 100644 index 000000000000..73df92a3fec2 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatedEventData.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.PrivateCloudUpdated event. + public partial class AvsPrivateCloudUpdatedEventData : AvsPrivateCloudEventData + { + /// Initializes a new instance of . + internal AvsPrivateCloudUpdatedEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + internal AvsPrivateCloudUpdatedEventData(string operationId) : base(operationId) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatingEventData.Serialization.cs new file mode 100644 index 000000000000..3c248d0d7f26 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatingEventData.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsPrivateCloudUpdatingEventDataConverter))] + public partial class AvsPrivateCloudUpdatingEventData + { + internal static AvsPrivateCloudUpdatingEventData DeserializeAvsPrivateCloudUpdatingEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional operationId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + } + return new AvsPrivateCloudUpdatingEventData(operationId.Value); + } + + internal partial class AvsPrivateCloudUpdatingEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsPrivateCloudUpdatingEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsPrivateCloudUpdatingEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsPrivateCloudUpdatingEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatingEventData.cs new file mode 100644 index 000000000000..2d28159e830a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsPrivateCloudUpdatingEventData.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.PrivateCloudUpdating event. + public partial class AvsPrivateCloudUpdatingEventData : AvsPrivateCloudEventData + { + /// Initializes a new instance of . + internal AvsPrivateCloudUpdatingEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + internal AvsPrivateCloudUpdatingEventData(string operationId) : base(operationId) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionCancelledEventData.Serialization.cs new file mode 100644 index 000000000000..baed52ad1c5d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionCancelledEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsScriptExecutionCancelledEventDataConverter))] + public partial class AvsScriptExecutionCancelledEventData + { + internal static AvsScriptExecutionCancelledEventData DeserializeAvsScriptExecutionCancelledEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional operationId = default; + Optional cmdletId = default; + Optional> output = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("cmdletId"u8)) + { + cmdletId = property.Value.GetString(); + continue; + } + if (property.NameEquals("output"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + output = array; + continue; + } + } + return new AvsScriptExecutionCancelledEventData(operationId.Value, cmdletId.Value, Optional.ToList(output)); + } + + internal partial class AvsScriptExecutionCancelledEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsScriptExecutionCancelledEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsScriptExecutionCancelledEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsScriptExecutionCancelledEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionCancelledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionCancelledEventData.cs new file mode 100644 index 000000000000..2dbdcc3c6e6c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionCancelledEventData.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ScriptExecutionCancelled event. + public partial class AvsScriptExecutionCancelledEventData : AvsScriptExecutionEventData + { + /// Initializes a new instance of . + internal AvsScriptExecutionCancelledEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// Stdout outputs from the execution, if any. + internal AvsScriptExecutionCancelledEventData(string operationId, string cmdletId, IReadOnlyList output) : base(operationId, cmdletId, output) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionEventData.Serialization.cs new file mode 100644 index 000000000000..7427f3f0579e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsScriptExecutionEventDataConverter))] + public partial class AvsScriptExecutionEventData + { + internal static AvsScriptExecutionEventData DeserializeAvsScriptExecutionEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional operationId = default; + Optional cmdletId = default; + Optional> output = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("cmdletId"u8)) + { + cmdletId = property.Value.GetString(); + continue; + } + if (property.NameEquals("output"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + output = array; + continue; + } + } + return new AvsScriptExecutionEventData(operationId.Value, cmdletId.Value, Optional.ToList(output)); + } + + internal partial class AvsScriptExecutionEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsScriptExecutionEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsScriptExecutionEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsScriptExecutionEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionEventData.cs new file mode 100644 index 000000000000..28538891d34c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionEventData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for Microsoft.AVS/scriptExecutions events. + public partial class AvsScriptExecutionEventData + { + /// Initializes a new instance of . + internal AvsScriptExecutionEventData() + { + Output = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// Stdout outputs from the execution, if any. + internal AvsScriptExecutionEventData(string operationId, string cmdletId, IReadOnlyList output) + { + OperationId = operationId; + CmdletId = cmdletId; + Output = output; + } + + /// Id of the operation that caused this event. + public string OperationId { get; } + /// Cmdlet referenced in the execution that caused this event. + public string CmdletId { get; } + /// Stdout outputs from the execution, if any. + public IReadOnlyList Output { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFailedEventData.Serialization.cs new file mode 100644 index 000000000000..4240e2c2c2cb --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFailedEventData.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsScriptExecutionFailedEventDataConverter))] + public partial class AvsScriptExecutionFailedEventData + { + internal static AvsScriptExecutionFailedEventData DeserializeAvsScriptExecutionFailedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional failureMessage = default; + Optional operationId = default; + Optional cmdletId = default; + Optional> output = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failureMessage"u8)) + { + failureMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("cmdletId"u8)) + { + cmdletId = property.Value.GetString(); + continue; + } + if (property.NameEquals("output"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + output = array; + continue; + } + } + return new AvsScriptExecutionFailedEventData(operationId.Value, cmdletId.Value, Optional.ToList(output), failureMessage.Value); + } + + internal partial class AvsScriptExecutionFailedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsScriptExecutionFailedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsScriptExecutionFailedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsScriptExecutionFailedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFailedEventData.cs new file mode 100644 index 000000000000..5ed8b3608be8 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFailedEventData.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ScriptExecutionFailed event. + public partial class AvsScriptExecutionFailedEventData : AvsScriptExecutionEventData + { + /// Initializes a new instance of . + internal AvsScriptExecutionFailedEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// Stdout outputs from the execution, if any. + /// Failure reason of an event. + internal AvsScriptExecutionFailedEventData(string operationId, string cmdletId, IReadOnlyList output, string failureMessage) : base(operationId, cmdletId, output) + { + FailureMessage = failureMessage; + } + + /// Failure reason of an event. + public string FailureMessage { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFinishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFinishedEventData.Serialization.cs new file mode 100644 index 000000000000..05ac9c2937dc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFinishedEventData.Serialization.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsScriptExecutionFinishedEventDataConverter))] + public partial class AvsScriptExecutionFinishedEventData + { + internal static AvsScriptExecutionFinishedEventData DeserializeAvsScriptExecutionFinishedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> namedOutputs = default; + Optional operationId = default; + Optional cmdletId = default; + Optional> output = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namedOutputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + namedOutputs = dictionary; + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("cmdletId"u8)) + { + cmdletId = property.Value.GetString(); + continue; + } + if (property.NameEquals("output"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + output = array; + continue; + } + } + return new AvsScriptExecutionFinishedEventData(operationId.Value, cmdletId.Value, Optional.ToList(output), Optional.ToDictionary(namedOutputs)); + } + + internal partial class AvsScriptExecutionFinishedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsScriptExecutionFinishedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsScriptExecutionFinishedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsScriptExecutionFinishedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFinishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFinishedEventData.cs new file mode 100644 index 000000000000..805ff30bb2df --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionFinishedEventData.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ScriptExecutionFinished event. + public partial class AvsScriptExecutionFinishedEventData : AvsScriptExecutionEventData + { + /// Initializes a new instance of . + internal AvsScriptExecutionFinishedEventData() + { + NamedOutputs = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// Stdout outputs from the execution, if any. + /// Named outputs of completed execution, if any. + internal AvsScriptExecutionFinishedEventData(string operationId, string cmdletId, IReadOnlyList output, IReadOnlyDictionary namedOutputs) : base(operationId, cmdletId, output) + { + NamedOutputs = namedOutputs; + } + + /// Named outputs of completed execution, if any. + public IReadOnlyDictionary NamedOutputs { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionStartedEventData.Serialization.cs new file mode 100644 index 000000000000..51636860cb99 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionStartedEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AvsScriptExecutionStartedEventDataConverter))] + public partial class AvsScriptExecutionStartedEventData + { + internal static AvsScriptExecutionStartedEventData DeserializeAvsScriptExecutionStartedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional operationId = default; + Optional cmdletId = default; + Optional> output = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("cmdletId"u8)) + { + cmdletId = property.Value.GetString(); + continue; + } + if (property.NameEquals("output"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + output = array; + continue; + } + } + return new AvsScriptExecutionStartedEventData(operationId.Value, cmdletId.Value, Optional.ToList(output)); + } + + internal partial class AvsScriptExecutionStartedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AvsScriptExecutionStartedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AvsScriptExecutionStartedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsScriptExecutionStartedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionStartedEventData.cs new file mode 100644 index 000000000000..55e14df18b9d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AvsScriptExecutionStartedEventData.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ScriptExecutionStarted event. + public partial class AvsScriptExecutionStartedEventData : AvsScriptExecutionEventData + { + /// Initializes a new instance of . + internal AvsScriptExecutionStartedEventData() + { + } + + /// Initializes a new instance of . + /// Id of the operation that caused this event. + /// Cmdlet referenced in the execution that caused this event. + /// Stdout outputs from the execution, if any. + internal AvsScriptExecutionStartedEventData(string operationId, string cmdletId, IReadOnlyList output) : base(operationId, cmdletId, output) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentCompletedEventData.Serialization.cs new file mode 100644 index 000000000000..03f30439f514 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentCompletedEventData.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(StorageTaskAssignmentCompletedEventDataConverter))] + public partial class StorageTaskAssignmentCompletedEventData + { + internal static StorageTaskAssignmentCompletedEventData DeserializeStorageTaskAssignmentCompletedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional status = default; + Optional completedDateTime = default; + Optional taskExecutionId = default; + Optional taskName = default; + Optional summaryReportBlobUrl = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new StorageTaskAssignmentCompletedStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("completedDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + completedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("taskExecutionId"u8)) + { + taskExecutionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("taskName"u8)) + { + taskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("summaryReportBlobUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + summaryReportBlobUrl = new Uri(property.Value.GetString()); + continue; + } + } + return new StorageTaskAssignmentCompletedEventData(Optional.ToNullable(status), Optional.ToNullable(completedDateTime), taskExecutionId.Value, taskName.Value, summaryReportBlobUrl.Value); + } + + internal partial class StorageTaskAssignmentCompletedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, StorageTaskAssignmentCompletedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override StorageTaskAssignmentCompletedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageTaskAssignmentCompletedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentCompletedEventData.cs new file mode 100644 index 000000000000..f145b2527c7c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentCompletedEventData.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for an Microsoft.Storage.StorageTaskAssignmentCompleted event. + public partial class StorageTaskAssignmentCompletedEventData + { + /// Initializes a new instance of . + internal StorageTaskAssignmentCompletedEventData() + { + } + + /// Initializes a new instance of . + /// The status for a storage task. + /// The time at which a storage task was completed. + /// The execution id for a storage task. + /// The task name for a storage task. + /// The summary report blob url for a storage task. + internal StorageTaskAssignmentCompletedEventData(StorageTaskAssignmentCompletedStatus? status, DateTimeOffset? completedOn, string taskExecutionId, string taskName, Uri summaryReportBlobUri) + { + Status = status; + CompletedOn = completedOn; + TaskExecutionId = taskExecutionId; + TaskName = taskName; + SummaryReportBlobUri = summaryReportBlobUri; + } + + /// The status for a storage task. + public StorageTaskAssignmentCompletedStatus? Status { get; } + /// The time at which a storage task was completed. + public DateTimeOffset? CompletedOn { get; } + /// The execution id for a storage task. + public string TaskExecutionId { get; } + /// The task name for a storage task. + public string TaskName { get; } + /// The summary report blob url for a storage task. + public Uri SummaryReportBlobUri { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentCompletedStatus.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentCompletedStatus.cs new file mode 100644 index 000000000000..951b0e07278e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentCompletedStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// The status for a storage task. + public readonly partial struct StorageTaskAssignmentCompletedStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StorageTaskAssignmentCompletedStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + + /// Succeeded. + public static StorageTaskAssignmentCompletedStatus Succeeded { get; } = new StorageTaskAssignmentCompletedStatus(SucceededValue); + /// Failed. + public static StorageTaskAssignmentCompletedStatus Failed { get; } = new StorageTaskAssignmentCompletedStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(StorageTaskAssignmentCompletedStatus left, StorageTaskAssignmentCompletedStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StorageTaskAssignmentCompletedStatus left, StorageTaskAssignmentCompletedStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator StorageTaskAssignmentCompletedStatus(string value) => new StorageTaskAssignmentCompletedStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StorageTaskAssignmentCompletedStatus other && Equals(other); + /// + public bool Equals(StorageTaskAssignmentCompletedStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentQueuedEventData.Serialization.cs new file mode 100644 index 000000000000..756d58c26b30 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentQueuedEventData.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(StorageTaskAssignmentQueuedEventDataConverter))] + public partial class StorageTaskAssignmentQueuedEventData + { + internal static StorageTaskAssignmentQueuedEventData DeserializeStorageTaskAssignmentQueuedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional queuedDateTime = default; + Optional taskExecutionId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("queuedDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + queuedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("taskExecutionId"u8)) + { + taskExecutionId = property.Value.GetString(); + continue; + } + } + return new StorageTaskAssignmentQueuedEventData(Optional.ToNullable(queuedDateTime), taskExecutionId.Value); + } + + internal partial class StorageTaskAssignmentQueuedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, StorageTaskAssignmentQueuedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override StorageTaskAssignmentQueuedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageTaskAssignmentQueuedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentQueuedEventData.cs new file mode 100644 index 000000000000..38afd97551f4 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageTaskAssignmentQueuedEventData.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for an Microsoft.Storage.StorageTaskAssignmentQueued event. + public partial class StorageTaskAssignmentQueuedEventData + { + /// Initializes a new instance of . + internal StorageTaskAssignmentQueuedEventData() + { + } + + /// Initializes a new instance of . + /// The time at which a storage task was queued. + /// The execution id for a storage task. + internal StorageTaskAssignmentQueuedEventData(DateTimeOffset? queuedOn, string taskExecutionId) + { + QueuedOn = queuedOn; + TaskExecutionId = taskExecutionId; + } + + /// The time at which a storage task was queued. + public DateTimeOffset? QueuedOn { get; } + /// The execution id for a storage task. + public string TaskExecutionId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md index 3d4f92fa1dd9..161161776280 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml title: EventGridClient -require: https://github.com/Azure/azure-rest-api-specs/blob/11bbc2b1df2e915a2227a6a1a48a27b9e67c3311/specification/eventgrid/data-plane/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/46e9f311c397352c1f9b60c5277bf6f982c3c172/specification/eventgrid/data-plane/readme.md generation1-convenience-client: true model-factory-for-hlc: - MediaJobOutputAsset @@ -95,7 +95,7 @@ directive: const namespace = "Azure.Messaging.EventGrid.SystemEvents"; for (var path in $) { - if (!path.includes("CloudEvent") && !path.includes("EventGridEvent")) + if (!path.includes("CloudEventEvent") && !path.includes("EventGridEvent")) { $[path]["x-namespace"] = namespace; } @@ -147,6 +147,10 @@ directive: $[path]["properties"]["status"]["x-namespace"] = namespace; $[path]["properties"]["summaryReportBlobUrl"]["x-ms-client-name"] = "SummaryReportBlobUri"; } + if (path.includes("StorageTaskAssignmentCompletedEventData")) + { + $[path]["properties"]["status"]["x-namespace"] = namespace; + } if (path.includes("EventGridMQTTClientCreatedOrUpdatedEventData")) { $[path]["properties"]["state"]["x-namespace"] = namespace;