diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..4e749e6b85b1 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -12,6 +12,8 @@ trigger: - sdk/storage/Azure.Storage.DataMovement/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/ diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.net8.0.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.net8.0.cs index b7f0f4a25c61..fcd4b8fc266a 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.net8.0.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.net8.0.cs @@ -14,14 +14,14 @@ public static partial class StorageActionsExtensions public static Azure.ResourceManager.StorageActions.StorageTaskCollection GetStorageTasks(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetStorageTasks(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetStorageTasksAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response PreviewActions(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> PreviewActionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response PreviewActions(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> PreviewActionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class StorageTaskCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected StorageTaskCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string storageTaskName, Azure.ResourceManager.StorageActions.StorageTaskData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string storageTaskName, Azure.ResourceManager.StorageActions.StorageTaskData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string storageTaskName, Azure.ResourceManager.StorageActions.StorageTaskData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string storageTaskName, Azure.ResourceManager.StorageActions.StorageTaskData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string storageTaskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string storageTaskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string storageTaskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -36,9 +36,14 @@ protected StorageTaskCollection() { } } public partial class StorageTaskData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public StorageTaskData(Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.StorageActions.Models.StorageTaskProperties properties) { } + public StorageTaskData(Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, bool enabled, string description, Azure.ResourceManager.StorageActions.Models.StorageTaskAction action) { } + public Azure.ResourceManager.StorageActions.Models.StorageTaskAction Action { get { throw null; } set { } } + public System.DateTimeOffset? CreationTimeInUtc { get { throw null; } } + public string Description { get { throw null; } set { } } + public bool Enabled { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.StorageActions.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public long? TaskVersion { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.StorageTaskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -58,15 +63,15 @@ protected StorageTaskResource() { } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? maxpagesize = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? maxpagesize = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetStorageTaskAssignments(int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetStorageTaskAssignmentsAsync(int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetStorageTasksReports(int? maxpagesize = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetStorageTasksReportsAsync(int? maxpagesize = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable StorageTaskAssignmentList(int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable StorageTaskAssignmentListAsync(int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.StorageActions.StorageTaskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.StorageTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -95,19 +100,31 @@ public partial class MockableStorageActionsSubscriptionResource : Azure.Resource protected MockableStorageActionsSubscriptionResource() { } public virtual Azure.Pageable GetStorageTasks(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetStorageTasksAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response PreviewActions(Azure.Core.AzureLocation location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> PreviewActionsAsync(Azure.Core.AzureLocation location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response PreviewActions(string location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PreviewActionsAsync(string location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.StorageActions.Models { public static partial class ArmStorageActionsModelFactory { - public static Azure.ResourceManager.StorageActions.StorageTaskData StorageTaskData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.StorageActions.Models.StorageTaskProperties properties = null) { throw null; } + public static Azure.ResourceManager.StorageActions.StorageTaskData StorageTaskData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, long? taskVersion = default(long?), bool enabled = false, string description = null, Azure.ResourceManager.StorageActions.Models.StorageTaskAction action = null, Azure.ResourceManager.StorageActions.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.StorageActions.Models.ProvisioningState?), System.DateTimeOffset? creationTimeInUtc = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.StorageActions.Models.StorageTaskPatch StorageTaskPatch(Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, long? taskVersion = default(long?), bool? enabled = default(bool?), string description = null, Azure.ResourceManager.StorageActions.Models.StorageTaskAction action = null, Azure.ResourceManager.StorageActions.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.StorageActions.Models.ProvisioningState?), System.DateTimeOffset? creationTimeInUtc = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewBlobProperties StorageTaskPreviewBlobProperties(string name = null, System.Collections.Generic.IEnumerable properties = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable tags = null, Azure.ResourceManager.StorageActions.Models.MatchedBlockName? matchedBlock = default(Azure.ResourceManager.StorageActions.Models.MatchedBlockName?)) { throw null; } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProperties StorageTaskProperties(long? taskVersion = default(long?), bool isEnabled = false, string description = null, Azure.ResourceManager.StorageActions.Models.StorageTaskAction action = null, Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState? provisioningState = default(Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState?), System.DateTimeOffset? creationTimeInUtc = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.StorageActions.Models.StorageTaskReportInstance StorageTaskReportInstance(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.StorageActions.Models.StorageTaskReportProperties properties = null) { throw null; } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskReportProperties StorageTaskReportProperties(Azure.Core.ResourceIdentifier taskAssignmentId = null, Azure.Core.ResourceIdentifier storageAccountId = null, string startTime = null, string finishTime = null, string objectsTargetedCount = null, string objectsOperatedOnCount = null, string objectFailedCount = null, string objectsSucceededCount = null, string runStatusError = null, Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus? runStatusEnum = default(Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus?), string summaryReportPath = null, Azure.Core.ResourceIdentifier taskId = null, string taskVersion = null, Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult? runResult = default(Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult?)) { throw null; } + public static Azure.ResourceManager.StorageActions.Models.StorageTaskReportProperties StorageTaskReportProperties(Azure.Core.ResourceIdentifier taskAssignmentId = null, Azure.Core.ResourceIdentifier storageAccountId = null, string startTime = null, string finishTime = null, string objectsTargetedCount = null, string objectsOperatedOnCount = null, string objectFailedCount = null, string objectsSucceededCount = null, string runStatusError = null, Azure.ResourceManager.StorageActions.Models.RunStatusEnum? runStatusEnum = default(Azure.ResourceManager.StorageActions.Models.RunStatusEnum?), string summaryReportPath = null, Azure.Core.ResourceIdentifier taskId = null, string taskVersion = null, Azure.ResourceManager.StorageActions.Models.RunResult? runResult = default(Azure.ResourceManager.StorageActions.Models.RunResult?)) { throw null; } + } + public partial class IfCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public IfCondition(string condition, System.Collections.Generic.IEnumerable operations) { } + public string Condition { get { throw null; } set { } } + public System.Collections.Generic.IList Operations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageActions.Models.IfCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageActions.Models.IfCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MatchedBlockName : System.IEquatable @@ -162,11 +179,71 @@ public static partial class ArmStorageActionsModelFactory public static bool operator !=(Azure.ResourceManager.StorageActions.Models.OnSuccessAction left, Azure.ResourceManager.StorageActions.Models.OnSuccessAction right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState ValidateSubscriptionQuotaBegin { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState ValidateSubscriptionQuotaEnd { get { throw null; } } + public bool Equals(Azure.ResourceManager.StorageActions.Models.ProvisioningState 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.ResourceManager.StorageActions.Models.ProvisioningState left, Azure.ResourceManager.StorageActions.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.StorageActions.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.StorageActions.Models.ProvisioningState left, Azure.ResourceManager.StorageActions.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RunResult : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RunResult(string value) { throw null; } + public static Azure.ResourceManager.StorageActions.Models.RunResult Failed { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.RunResult Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.StorageActions.Models.RunResult 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.ResourceManager.StorageActions.Models.RunResult left, Azure.ResourceManager.StorageActions.Models.RunResult right) { throw null; } + public static implicit operator Azure.ResourceManager.StorageActions.Models.RunResult (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.StorageActions.Models.RunResult left, Azure.ResourceManager.StorageActions.Models.RunResult right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RunStatusEnum : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RunStatusEnum(string value) { throw null; } + public static Azure.ResourceManager.StorageActions.Models.RunStatusEnum Finished { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.RunStatusEnum InProgress { get { throw null; } } + public bool Equals(Azure.ResourceManager.StorageActions.Models.RunStatusEnum 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.ResourceManager.StorageActions.Models.RunStatusEnum left, Azure.ResourceManager.StorageActions.Models.RunStatusEnum right) { throw null; } + public static implicit operator Azure.ResourceManager.StorageActions.Models.RunStatusEnum (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.StorageActions.Models.RunStatusEnum left, Azure.ResourceManager.StorageActions.Models.RunStatusEnum right) { throw null; } + public override string ToString() { throw null; } + } public partial class StorageTaskAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public StorageTaskAction(Azure.ResourceManager.StorageActions.Models.StorageTaskIfCondition @if) { } + public StorageTaskAction(Azure.ResourceManager.StorageActions.Models.IfCondition @if) { } public System.Collections.Generic.IList ElseOperations { get { throw null; } set { } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskIfCondition If { get { throw null; } set { } } + public Azure.ResourceManager.StorageActions.Models.IfCondition If { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.Models.StorageTaskAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -174,18 +251,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class StorageTaskIfCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public StorageTaskIfCondition(string condition, System.Collections.Generic.IEnumerable operations) { } - public string Condition { get { throw null; } set { } } - public System.Collections.Generic.IList Operations { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskIfCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskIfCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class StorageTaskOperationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageTaskOperationInfo(Azure.ResourceManager.StorageActions.Models.StorageTaskOperationName name) { } @@ -226,9 +291,14 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class StorageTaskPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageTaskPatch() { } + public Azure.ResourceManager.StorageActions.Models.StorageTaskAction Action { get { throw null; } set { } } + public System.DateTimeOffset? CreationTimeInUtc { get { throw null; } } + public string Description { get { throw null; } set { } } + public bool? Enabled { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.StorageActions.Models.ProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public long? TaskVersion { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.Models.StorageTaskPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -238,8 +308,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class StorageTaskPreviewAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public StorageTaskPreviewAction(Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionProperties properties) { } - public Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionProperties Properties { get { throw null; } set { } } + public StorageTaskPreviewAction(Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewContainerProperties container, System.Collections.Generic.IEnumerable blobs, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionCondition action) { } + public Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionCondition Action { get { throw null; } set { } } + public System.Collections.Generic.IList Blobs { get { throw null; } } + public Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewContainerProperties Container { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -270,19 +342,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class StorageTaskPreviewActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public StorageTaskPreviewActionProperties(Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewContainerProperties container, System.Collections.Generic.IEnumerable blobs, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionCondition action) { } - public Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionCondition Action { get { throw null; } set { } } - public System.Collections.Generic.IList Blobs { get { throw null; } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewContainerProperties Container { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class StorageTaskPreviewBlobProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageTaskPreviewBlobProperties() { } @@ -322,50 +381,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class StorageTaskProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public StorageTaskProperties(bool isEnabled, string description, Azure.ResourceManager.StorageActions.Models.StorageTaskAction action) { } - public Azure.ResourceManager.StorageActions.Models.StorageTaskAction Action { get { throw null; } set { } } - public System.DateTimeOffset? CreationTimeInUtc { get { throw null; } } - public string Description { get { throw null; } set { } } - public bool IsEnabled { get { throw null; } set { } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState? ProvisioningState { get { throw null; } } - public long? TaskVersion { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct StorageTaskProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public StorageTaskProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState ValidateSubscriptionQuotaBegin { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState ValidateSubscriptionQuotaEnd { get { throw null; } } - public bool Equals(Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState 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.ResourceManager.StorageActions.Models.StorageTaskProvisioningState left, Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState left, Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } public partial class StorageTaskReportInstance : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public StorageTaskReportInstance() { } - public Azure.ResourceManager.StorageActions.Models.StorageTaskReportProperties Properties { get { throw null; } set { } } + internal StorageTaskReportInstance() { } + public Azure.ResourceManager.StorageActions.Models.StorageTaskReportProperties Properties { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.Models.StorageTaskReportInstance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -375,14 +394,14 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write } public partial class StorageTaskReportProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public StorageTaskReportProperties() { } + internal StorageTaskReportProperties() { } public string FinishTime { get { throw null; } } public string ObjectFailedCount { get { throw null; } } public string ObjectsOperatedOnCount { get { throw null; } } public string ObjectsSucceededCount { get { throw null; } } public string ObjectsTargetedCount { get { throw null; } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult? RunResult { get { throw null; } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus? RunStatusEnum { get { throw null; } } + public Azure.ResourceManager.StorageActions.Models.RunResult? RunResult { get { throw null; } } + public Azure.ResourceManager.StorageActions.Models.RunStatusEnum? RunStatusEnum { get { throw null; } } public string RunStatusError { get { throw null; } } public string StartTime { get { throw null; } } public Azure.Core.ResourceIdentifier StorageAccountId { get { throw null; } } @@ -397,40 +416,4 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct StorageTaskRunResult : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public StorageTaskRunResult(string value) { throw null; } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult Failed { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult 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.ResourceManager.StorageActions.Models.StorageTaskRunResult left, Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult right) { throw null; } - public static implicit operator Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult left, Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct StorageTaskRunStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public StorageTaskRunStatus(string value) { throw null; } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus Finished { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus InProgress { get { throw null; } } - public bool Equals(Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus 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.ResourceManager.StorageActions.Models.StorageTaskRunStatus left, Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus left, Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus right) { throw null; } - public override string ToString() { throw null; } - } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.netstandard2.0.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.netstandard2.0.cs index b7f0f4a25c61..fcd4b8fc266a 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.netstandard2.0.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.netstandard2.0.cs @@ -14,14 +14,14 @@ public static partial class StorageActionsExtensions public static Azure.ResourceManager.StorageActions.StorageTaskCollection GetStorageTasks(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetStorageTasks(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetStorageTasksAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response PreviewActions(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> PreviewActionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response PreviewActions(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> PreviewActionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class StorageTaskCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected StorageTaskCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string storageTaskName, Azure.ResourceManager.StorageActions.StorageTaskData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string storageTaskName, Azure.ResourceManager.StorageActions.StorageTaskData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string storageTaskName, Azure.ResourceManager.StorageActions.StorageTaskData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string storageTaskName, Azure.ResourceManager.StorageActions.StorageTaskData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string storageTaskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string storageTaskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string storageTaskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -36,9 +36,14 @@ protected StorageTaskCollection() { } } public partial class StorageTaskData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public StorageTaskData(Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.StorageActions.Models.StorageTaskProperties properties) { } + public StorageTaskData(Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, bool enabled, string description, Azure.ResourceManager.StorageActions.Models.StorageTaskAction action) { } + public Azure.ResourceManager.StorageActions.Models.StorageTaskAction Action { get { throw null; } set { } } + public System.DateTimeOffset? CreationTimeInUtc { get { throw null; } } + public string Description { get { throw null; } set { } } + public bool Enabled { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.StorageActions.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public long? TaskVersion { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.StorageTaskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -58,15 +63,15 @@ protected StorageTaskResource() { } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? maxpagesize = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? maxpagesize = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetStorageTaskAssignments(int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetStorageTaskAssignmentsAsync(int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetStorageTasksReports(int? maxpagesize = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetStorageTasksReportsAsync(int? maxpagesize = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable StorageTaskAssignmentList(int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable StorageTaskAssignmentListAsync(int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.StorageActions.StorageTaskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.StorageTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -95,19 +100,31 @@ public partial class MockableStorageActionsSubscriptionResource : Azure.Resource protected MockableStorageActionsSubscriptionResource() { } public virtual Azure.Pageable GetStorageTasks(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetStorageTasksAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response PreviewActions(Azure.Core.AzureLocation location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> PreviewActionsAsync(Azure.Core.AzureLocation location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response PreviewActions(string location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PreviewActionsAsync(string location, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction storageTaskPreviewAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.StorageActions.Models { public static partial class ArmStorageActionsModelFactory { - public static Azure.ResourceManager.StorageActions.StorageTaskData StorageTaskData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.StorageActions.Models.StorageTaskProperties properties = null) { throw null; } + public static Azure.ResourceManager.StorageActions.StorageTaskData StorageTaskData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, long? taskVersion = default(long?), bool enabled = false, string description = null, Azure.ResourceManager.StorageActions.Models.StorageTaskAction action = null, Azure.ResourceManager.StorageActions.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.StorageActions.Models.ProvisioningState?), System.DateTimeOffset? creationTimeInUtc = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.StorageActions.Models.StorageTaskPatch StorageTaskPatch(Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, long? taskVersion = default(long?), bool? enabled = default(bool?), string description = null, Azure.ResourceManager.StorageActions.Models.StorageTaskAction action = null, Azure.ResourceManager.StorageActions.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.StorageActions.Models.ProvisioningState?), System.DateTimeOffset? creationTimeInUtc = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewBlobProperties StorageTaskPreviewBlobProperties(string name = null, System.Collections.Generic.IEnumerable properties = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable tags = null, Azure.ResourceManager.StorageActions.Models.MatchedBlockName? matchedBlock = default(Azure.ResourceManager.StorageActions.Models.MatchedBlockName?)) { throw null; } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProperties StorageTaskProperties(long? taskVersion = default(long?), bool isEnabled = false, string description = null, Azure.ResourceManager.StorageActions.Models.StorageTaskAction action = null, Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState? provisioningState = default(Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState?), System.DateTimeOffset? creationTimeInUtc = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.StorageActions.Models.StorageTaskReportInstance StorageTaskReportInstance(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.StorageActions.Models.StorageTaskReportProperties properties = null) { throw null; } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskReportProperties StorageTaskReportProperties(Azure.Core.ResourceIdentifier taskAssignmentId = null, Azure.Core.ResourceIdentifier storageAccountId = null, string startTime = null, string finishTime = null, string objectsTargetedCount = null, string objectsOperatedOnCount = null, string objectFailedCount = null, string objectsSucceededCount = null, string runStatusError = null, Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus? runStatusEnum = default(Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus?), string summaryReportPath = null, Azure.Core.ResourceIdentifier taskId = null, string taskVersion = null, Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult? runResult = default(Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult?)) { throw null; } + public static Azure.ResourceManager.StorageActions.Models.StorageTaskReportProperties StorageTaskReportProperties(Azure.Core.ResourceIdentifier taskAssignmentId = null, Azure.Core.ResourceIdentifier storageAccountId = null, string startTime = null, string finishTime = null, string objectsTargetedCount = null, string objectsOperatedOnCount = null, string objectFailedCount = null, string objectsSucceededCount = null, string runStatusError = null, Azure.ResourceManager.StorageActions.Models.RunStatusEnum? runStatusEnum = default(Azure.ResourceManager.StorageActions.Models.RunStatusEnum?), string summaryReportPath = null, Azure.Core.ResourceIdentifier taskId = null, string taskVersion = null, Azure.ResourceManager.StorageActions.Models.RunResult? runResult = default(Azure.ResourceManager.StorageActions.Models.RunResult?)) { throw null; } + } + public partial class IfCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public IfCondition(string condition, System.Collections.Generic.IEnumerable operations) { } + public string Condition { get { throw null; } set { } } + public System.Collections.Generic.IList Operations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageActions.Models.IfCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageActions.Models.IfCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MatchedBlockName : System.IEquatable @@ -162,11 +179,71 @@ public static partial class ArmStorageActionsModelFactory public static bool operator !=(Azure.ResourceManager.StorageActions.Models.OnSuccessAction left, Azure.ResourceManager.StorageActions.Models.OnSuccessAction right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState ValidateSubscriptionQuotaBegin { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.ProvisioningState ValidateSubscriptionQuotaEnd { get { throw null; } } + public bool Equals(Azure.ResourceManager.StorageActions.Models.ProvisioningState 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.ResourceManager.StorageActions.Models.ProvisioningState left, Azure.ResourceManager.StorageActions.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.StorageActions.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.StorageActions.Models.ProvisioningState left, Azure.ResourceManager.StorageActions.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RunResult : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RunResult(string value) { throw null; } + public static Azure.ResourceManager.StorageActions.Models.RunResult Failed { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.RunResult Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.StorageActions.Models.RunResult 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.ResourceManager.StorageActions.Models.RunResult left, Azure.ResourceManager.StorageActions.Models.RunResult right) { throw null; } + public static implicit operator Azure.ResourceManager.StorageActions.Models.RunResult (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.StorageActions.Models.RunResult left, Azure.ResourceManager.StorageActions.Models.RunResult right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RunStatusEnum : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RunStatusEnum(string value) { throw null; } + public static Azure.ResourceManager.StorageActions.Models.RunStatusEnum Finished { get { throw null; } } + public static Azure.ResourceManager.StorageActions.Models.RunStatusEnum InProgress { get { throw null; } } + public bool Equals(Azure.ResourceManager.StorageActions.Models.RunStatusEnum 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.ResourceManager.StorageActions.Models.RunStatusEnum left, Azure.ResourceManager.StorageActions.Models.RunStatusEnum right) { throw null; } + public static implicit operator Azure.ResourceManager.StorageActions.Models.RunStatusEnum (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.StorageActions.Models.RunStatusEnum left, Azure.ResourceManager.StorageActions.Models.RunStatusEnum right) { throw null; } + public override string ToString() { throw null; } + } public partial class StorageTaskAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public StorageTaskAction(Azure.ResourceManager.StorageActions.Models.StorageTaskIfCondition @if) { } + public StorageTaskAction(Azure.ResourceManager.StorageActions.Models.IfCondition @if) { } public System.Collections.Generic.IList ElseOperations { get { throw null; } set { } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskIfCondition If { get { throw null; } set { } } + public Azure.ResourceManager.StorageActions.Models.IfCondition If { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.Models.StorageTaskAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -174,18 +251,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class StorageTaskIfCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public StorageTaskIfCondition(string condition, System.Collections.Generic.IEnumerable operations) { } - public string Condition { get { throw null; } set { } } - public System.Collections.Generic.IList Operations { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskIfCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskIfCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class StorageTaskOperationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageTaskOperationInfo(Azure.ResourceManager.StorageActions.Models.StorageTaskOperationName name) { } @@ -226,9 +291,14 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class StorageTaskPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageTaskPatch() { } + public Azure.ResourceManager.StorageActions.Models.StorageTaskAction Action { get { throw null; } set { } } + public System.DateTimeOffset? CreationTimeInUtc { get { throw null; } } + public string Description { get { throw null; } set { } } + public bool? Enabled { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.StorageActions.Models.ProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public long? TaskVersion { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.Models.StorageTaskPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -238,8 +308,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class StorageTaskPreviewAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public StorageTaskPreviewAction(Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionProperties properties) { } - public Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionProperties Properties { get { throw null; } set { } } + public StorageTaskPreviewAction(Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewContainerProperties container, System.Collections.Generic.IEnumerable blobs, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionCondition action) { } + public Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionCondition Action { get { throw null; } set { } } + public System.Collections.Generic.IList Blobs { get { throw null; } } + public Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewContainerProperties Container { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -270,19 +342,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class StorageTaskPreviewActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public StorageTaskPreviewActionProperties(Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewContainerProperties container, System.Collections.Generic.IEnumerable blobs, Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionCondition action) { } - public Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionCondition Action { get { throw null; } set { } } - public System.Collections.Generic.IList Blobs { get { throw null; } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewContainerProperties Container { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskPreviewActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class StorageTaskPreviewBlobProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageTaskPreviewBlobProperties() { } @@ -322,50 +381,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class StorageTaskProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public StorageTaskProperties(bool isEnabled, string description, Azure.ResourceManager.StorageActions.Models.StorageTaskAction action) { } - public Azure.ResourceManager.StorageActions.Models.StorageTaskAction Action { get { throw null; } set { } } - public System.DateTimeOffset? CreationTimeInUtc { get { throw null; } } - public string Description { get { throw null; } set { } } - public bool IsEnabled { get { throw null; } set { } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState? ProvisioningState { get { throw null; } } - public long? TaskVersion { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.StorageActions.Models.StorageTaskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct StorageTaskProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public StorageTaskProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState ValidateSubscriptionQuotaBegin { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState ValidateSubscriptionQuotaEnd { get { throw null; } } - public bool Equals(Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState 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.ResourceManager.StorageActions.Models.StorageTaskProvisioningState left, Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState left, Azure.ResourceManager.StorageActions.Models.StorageTaskProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } public partial class StorageTaskReportInstance : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public StorageTaskReportInstance() { } - public Azure.ResourceManager.StorageActions.Models.StorageTaskReportProperties Properties { get { throw null; } set { } } + internal StorageTaskReportInstance() { } + public Azure.ResourceManager.StorageActions.Models.StorageTaskReportProperties Properties { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageActions.Models.StorageTaskReportInstance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -375,14 +394,14 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write } public partial class StorageTaskReportProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public StorageTaskReportProperties() { } + internal StorageTaskReportProperties() { } public string FinishTime { get { throw null; } } public string ObjectFailedCount { get { throw null; } } public string ObjectsOperatedOnCount { get { throw null; } } public string ObjectsSucceededCount { get { throw null; } } public string ObjectsTargetedCount { get { throw null; } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult? RunResult { get { throw null; } } - public Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus? RunStatusEnum { get { throw null; } } + public Azure.ResourceManager.StorageActions.Models.RunResult? RunResult { get { throw null; } } + public Azure.ResourceManager.StorageActions.Models.RunStatusEnum? RunStatusEnum { get { throw null; } } public string RunStatusError { get { throw null; } } public string StartTime { get { throw null; } } public Azure.Core.ResourceIdentifier StorageAccountId { get { throw null; } } @@ -397,40 +416,4 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct StorageTaskRunResult : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public StorageTaskRunResult(string value) { throw null; } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult Failed { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult 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.ResourceManager.StorageActions.Models.StorageTaskRunResult left, Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult right) { throw null; } - public static implicit operator Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult left, Azure.ResourceManager.StorageActions.Models.StorageTaskRunResult right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct StorageTaskRunStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public StorageTaskRunStatus(string value) { throw null; } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus Finished { get { throw null; } } - public static Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus InProgress { get { throw null; } } - public bool Equals(Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus 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.ResourceManager.StorageActions.Models.StorageTaskRunStatus left, Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus left, Azure.ResourceManager.StorageActions.Models.StorageTaskRunStatus right) { throw null; } - public override string ToString() { throw null; } - } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/ArmStorageActionsModelFactory.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/ArmStorageActionsModelFactory.cs index 9c4f63cd75be..604ba9a9bb53 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/ArmStorageActionsModelFactory.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/ArmStorageActionsModelFactory.cs @@ -10,6 +10,7 @@ using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.StorageActions.Models { @@ -24,9 +25,14 @@ public static partial class ArmStorageActionsModelFactory /// The tags. /// The location. /// The managed service identity of the resource. - /// Properties of the storage task. + /// Storage task version. + /// Storage Task is enabled when set to true and disabled when set to false. + /// Text that describes the purpose of the storage task. + /// The storage task action that is executed. + /// Represents the provisioning state of the storage task. + /// The creation date and time of the storage task in UTC. /// A new instance for mocking. - public static StorageTaskData StorageTaskData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, StorageTaskProperties properties = null) + public static StorageTaskData StorageTaskData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, long? taskVersion = null, bool enabled = default, string description = null, StorageTaskAction action = null, ProvisioningState? provisioningState = null, DateTimeOffset? creationTimeInUtc = null) { tags ??= new Dictionary(); @@ -38,23 +44,34 @@ public static StorageTaskData StorageTaskData(ResourceIdentifier id = null, stri tags, location, identity, - properties, + taskVersion, + enabled, + description, + action, + provisioningState, + creationTimeInUtc, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// The identity of the resource. + /// Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. /// Storage task version. - /// Storage Task is enabled when set to true and disabled when set to false. + /// Storage Task is enabled when set to true and disabled when set to false. /// Text that describes the purpose of the storage task. /// The storage task action that is executed. /// Represents the provisioning state of the storage task. /// The creation date and time of the storage task in UTC. - /// A new instance for mocking. - public static StorageTaskProperties StorageTaskProperties(long? taskVersion = null, bool isEnabled = default, string description = null, StorageTaskAction action = null, StorageTaskProvisioningState? provisioningState = null, DateTimeOffset? creationTimeInUtc = null) + /// A new instance for mocking. + public static StorageTaskPatch StorageTaskPatch(ManagedServiceIdentity identity = null, IDictionary tags = null, long? taskVersion = null, bool? enabled = null, string description = null, StorageTaskAction action = null, ProvisioningState? provisioningState = null, DateTimeOffset? creationTimeInUtc = null) { - return new StorageTaskProperties( + tags ??= new Dictionary(); + + return new StorageTaskPatch( + identity, + tags, taskVersion, - isEnabled, + enabled, description, action, provisioningState, @@ -96,7 +113,7 @@ public static StorageTaskReportInstance StorageTaskReportInstance(ResourceIdenti /// Storage Task Version. /// Represents the overall result of the execution for the run instance. /// A new instance for mocking. - public static StorageTaskReportProperties StorageTaskReportProperties(ResourceIdentifier taskAssignmentId = null, ResourceIdentifier storageAccountId = null, string startTime = null, string finishTime = null, string objectsTargetedCount = null, string objectsOperatedOnCount = null, string objectFailedCount = null, string objectsSucceededCount = null, string runStatusError = null, StorageTaskRunStatus? runStatusEnum = null, string summaryReportPath = null, ResourceIdentifier taskId = null, string taskVersion = null, StorageTaskRunResult? runResult = null) + public static StorageTaskReportProperties StorageTaskReportProperties(ResourceIdentifier taskAssignmentId = null, ResourceIdentifier storageAccountId = null, string startTime = null, string finishTime = null, string objectsTargetedCount = null, string objectsOperatedOnCount = null, string objectFailedCount = null, string objectsSucceededCount = null, string runStatusError = null, RunStatusEnum? runStatusEnum = null, string summaryReportPath = null, ResourceIdentifier taskId = null, string taskVersion = null, RunResult? runResult = null) { return new StorageTaskReportProperties( taskAssignmentId, diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsResourceGroupResource.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsResourceGroupResource.cs index 590799762f75..bc815e1083a9 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsResourceGroupResource.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsResourceGroupResource.cs @@ -49,7 +49,7 @@ public virtual StorageTaskCollection GetStorageTasks() /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -80,7 +80,7 @@ public virtual async Task> GetStorageTaskAsync(str /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsSubscriptionResource.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsSubscriptionResource.cs index b0dcbf9ccb2f..1aa27180e486 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsSubscriptionResource.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsSubscriptionResource.cs @@ -20,6 +20,8 @@ public partial class MockableStorageActionsSubscriptionResource : ArmResource { private ClientDiagnostics _storageTaskClientDiagnostics; private StorageTasksRestOperations _storageTaskRestClient; + private ClientDiagnostics _storageTasksOperationGroupClientDiagnostics; + private StorageTasksOperationGroupRestOperations _storageTasksOperationGroupRestClient; /// Initializes a new instance of the class for mocking. protected MockableStorageActionsSubscriptionResource() @@ -35,6 +37,8 @@ internal MockableStorageActionsSubscriptionResource(ArmClient client, ResourceId private ClientDiagnostics StorageTaskClientDiagnostics => _storageTaskClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.StorageActions", StorageTaskResource.ResourceType.Namespace, Diagnostics); private StorageTasksRestOperations StorageTaskRestClient => _storageTaskRestClient ??= new StorageTasksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(StorageTaskResource.ResourceType)); + private ClientDiagnostics StorageTasksOperationGroupClientDiagnostics => _storageTasksOperationGroupClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.StorageActions", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private StorageTasksOperationGroupRestOperations StorageTasksOperationGroupRestClient => _storageTasksOperationGroupRestClient ??= new StorageTasksOperationGroupRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -51,7 +55,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Operation Id - /// StorageTasks_ListBySubscription + /// StorageTask_ListBySubscription /// /// /// Default Api Version @@ -81,7 +85,7 @@ public virtual AsyncPageable GetStorageTasksAsync(Cancellat /// /// /// Operation Id - /// StorageTasks_ListBySubscription + /// StorageTask_ListBySubscription /// /// /// Default Api Version @@ -111,31 +115,29 @@ public virtual Pageable GetStorageTasks(CancellationToken c /// /// /// Operation Id - /// StorageTasks_PreviewActions + /// StorageTasksOperationGroup_PreviewActions /// /// /// Default Api Version /// 2023-01-01 /// - /// - /// Resource - /// - /// /// /// - /// The location to perform preview of the actions. + /// The to use. /// The parameters to preview action condition. /// The cancellation token to use. - /// is null. - public virtual async Task> PreviewActionsAsync(AzureLocation location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> PreviewActionsAsync(string location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) { + Argument.AssertNotNullOrEmpty(location, nameof(location)); Argument.AssertNotNull(storageTaskPreviewAction, nameof(storageTaskPreviewAction)); - using var scope = StorageTaskClientDiagnostics.CreateScope("MockableStorageActionsSubscriptionResource.PreviewActions"); + using var scope = StorageTasksOperationGroupClientDiagnostics.CreateScope("MockableStorageActionsSubscriptionResource.PreviewActions"); scope.Start(); try { - var response = await StorageTaskRestClient.PreviewActionsAsync(Id.SubscriptionId, location, storageTaskPreviewAction, cancellationToken).ConfigureAwait(false); + var response = await StorageTasksOperationGroupRestClient.PreviewActionsAsync(Id.SubscriptionId, location, storageTaskPreviewAction, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -154,31 +156,29 @@ public virtual async Task> PreviewActionsAsyn /// /// /// Operation Id - /// StorageTasks_PreviewActions + /// StorageTasksOperationGroup_PreviewActions /// /// /// Default Api Version /// 2023-01-01 /// - /// - /// Resource - /// - /// /// /// - /// The location to perform preview of the actions. + /// The to use. /// The parameters to preview action condition. /// The cancellation token to use. - /// is null. - public virtual Response PreviewActions(AzureLocation location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response PreviewActions(string location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) { + Argument.AssertNotNullOrEmpty(location, nameof(location)); Argument.AssertNotNull(storageTaskPreviewAction, nameof(storageTaskPreviewAction)); - using var scope = StorageTaskClientDiagnostics.CreateScope("MockableStorageActionsSubscriptionResource.PreviewActions"); + using var scope = StorageTasksOperationGroupClientDiagnostics.CreateScope("MockableStorageActionsSubscriptionResource.PreviewActions"); scope.Start(); try { - var response = StorageTaskRestClient.PreviewActions(Id.SubscriptionId, location, storageTaskPreviewAction, cancellationToken); + var response = StorageTasksOperationGroupRestClient.PreviewActions(Id.SubscriptionId, location, storageTaskPreviewAction, cancellationToken); return response; } catch (Exception e) diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/StorageActionsExtensions.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/StorageActionsExtensions.cs index 0ee458efbbe2..e3f39dcce65c 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/StorageActionsExtensions.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/StorageActionsExtensions.cs @@ -78,7 +78,7 @@ public static StorageTaskCollection GetStorageTasks(this ResourceGroupResource r /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -116,7 +116,7 @@ public static async Task> GetStorageTaskAsync(this /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -154,7 +154,7 @@ public static Response GetStorageTask(this ResourceGroupRes /// /// /// Operation Id - /// StorageTasks_ListBySubscription + /// StorageTask_ListBySubscription /// /// /// Default Api Version @@ -190,7 +190,7 @@ public static AsyncPageable GetStorageTasksAsync(this Subsc /// /// /// Operation Id - /// StorageTasks_ListBySubscription + /// StorageTask_ListBySubscription /// /// /// Default Api Version @@ -226,28 +226,25 @@ public static Pageable GetStorageTasks(this SubscriptionRes /// /// /// Operation Id - /// StorageTasks_PreviewActions + /// StorageTasksOperationGroup_PreviewActions /// /// /// Default Api Version /// 2023-01-01 /// - /// - /// Resource - /// - /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location to perform preview of the actions. + /// The to use. /// The parameters to preview action condition. /// The cancellation token to use. - /// or is null. - public static async Task> PreviewActionsAsync(this SubscriptionResource subscriptionResource, AzureLocation location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// , or is null. + public static async Task> PreviewActionsAsync(this SubscriptionResource subscriptionResource, string location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -263,28 +260,25 @@ public static async Task> PreviewActionsAsync /// /// /// Operation Id - /// StorageTasks_PreviewActions + /// StorageTasksOperationGroup_PreviewActions /// /// /// Default Api Version /// 2023-01-01 /// - /// - /// Resource - /// - /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location to perform preview of the actions. + /// The to use. /// The parameters to preview action condition. /// The cancellation token to use. - /// or is null. - public static Response PreviewActions(this SubscriptionResource subscriptionResource, AzureLocation location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// , or is null. + public static Response PreviewActions(this SubscriptionResource subscriptionResource, string location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskElseCondition.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/ElseCondition.Serialization.cs similarity index 66% rename from sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskElseCondition.Serialization.cs rename to sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/ElseCondition.Serialization.cs index 40c72e53cf74..11f39c9bec52 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskElseCondition.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/ElseCondition.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.StorageActions.Models { - internal partial class StorageTaskElseCondition : IUtf8JsonSerializable, IJsonModel + internal partial class ElseCondition : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(StorageTaskElseCondition)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ElseCondition)} does not support writing '{format}' format."); } writer.WritePropertyName("operations"u8); @@ -58,19 +58,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - StorageTaskElseCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ElseCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(StorageTaskElseCondition)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ElseCondition)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeStorageTaskElseCondition(document.RootElement, options); + return DeserializeElseCondition(document.RootElement, options); } - internal static StorageTaskElseCondition DeserializeStorageTaskElseCondition(JsonElement element, ModelReaderWriterOptions options = null) + internal static ElseCondition DeserializeElseCondition(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -99,38 +99,38 @@ internal static StorageTaskElseCondition DeserializeStorageTaskElseCondition(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new StorageTaskElseCondition(operations, serializedAdditionalRawData); + return new ElseCondition(operations, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerStorageActionsContext.Default); default: - throw new FormatException($"The model {nameof(StorageTaskElseCondition)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ElseCondition)} does not support writing '{options.Format}' format."); } } - StorageTaskElseCondition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ElseCondition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeStorageTaskElseCondition(document.RootElement, options); + return DeserializeElseCondition(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(StorageTaskElseCondition)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ElseCondition)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskElseCondition.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/ElseCondition.cs similarity index 79% rename from sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskElseCondition.cs rename to sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/ElseCondition.cs index 1fb5c4b70f89..7cf3f1037929 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskElseCondition.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/ElseCondition.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.StorageActions.Models { /// The else block of storage task operation. - internal partial class StorageTaskElseCondition + internal partial class ElseCondition { /// /// Keeps track of any properties unknown to the library. @@ -46,27 +46,27 @@ internal partial class StorageTaskElseCondition /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// List of operations to execute in the else block. /// is null. - public StorageTaskElseCondition(IEnumerable operations) + public ElseCondition(IEnumerable operations) { Argument.AssertNotNull(operations, nameof(operations)); Operations = operations.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// List of operations to execute in the else block. /// Keeps track of any properties unknown to the library. - internal StorageTaskElseCondition(IList operations, IDictionary serializedAdditionalRawData) + internal ElseCondition(IList operations, IDictionary serializedAdditionalRawData) { Operations = operations; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal StorageTaskElseCondition() + /// Initializes a new instance of for deserialization. + internal ElseCondition() { } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskIfCondition.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/IfCondition.Serialization.cs similarity index 69% rename from sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskIfCondition.Serialization.cs rename to sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/IfCondition.Serialization.cs index df6a3e674c18..e976b14082b3 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskIfCondition.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/IfCondition.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.StorageActions.Models { - public partial class StorageTaskIfCondition : IUtf8JsonSerializable, IJsonModel + public partial class IfCondition : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(StorageTaskIfCondition)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(IfCondition)} does not support writing '{format}' format."); } writer.WritePropertyName("condition"u8); @@ -60,19 +60,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - StorageTaskIfCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + IfCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(StorageTaskIfCondition)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(IfCondition)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeStorageTaskIfCondition(document.RootElement, options); + return DeserializeIfCondition(document.RootElement, options); } - internal static StorageTaskIfCondition DeserializeStorageTaskIfCondition(JsonElement element, ModelReaderWriterOptions options = null) + internal static IfCondition DeserializeIfCondition(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -107,38 +107,38 @@ internal static StorageTaskIfCondition DeserializeStorageTaskIfCondition(JsonEle } } serializedAdditionalRawData = rawDataDictionary; - return new StorageTaskIfCondition(condition, operations, serializedAdditionalRawData); + return new IfCondition(condition, operations, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerStorageActionsContext.Default); default: - throw new FormatException($"The model {nameof(StorageTaskIfCondition)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(IfCondition)} does not support writing '{options.Format}' format."); } } - StorageTaskIfCondition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + IfCondition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeStorageTaskIfCondition(document.RootElement, options); + return DeserializeIfCondition(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(StorageTaskIfCondition)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(IfCondition)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskIfCondition.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/IfCondition.cs similarity index 83% rename from sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskIfCondition.cs rename to sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/IfCondition.cs index f02bc63905b8..191c922471e7 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskIfCondition.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/IfCondition.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.StorageActions.Models { /// The if block of storage task operation. - public partial class StorageTaskIfCondition + public partial class IfCondition { /// /// Keeps track of any properties unknown to the library. @@ -46,11 +46,11 @@ public partial class StorageTaskIfCondition /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Condition predicate to evaluate each object. See https://aka.ms/storagetaskconditions for valid properties and operators. /// List of operations to execute when the condition predicate satisfies. /// or is null. - public StorageTaskIfCondition(string condition, IEnumerable operations) + public IfCondition(string condition, IEnumerable operations) { Argument.AssertNotNull(condition, nameof(condition)); Argument.AssertNotNull(operations, nameof(operations)); @@ -59,19 +59,19 @@ public StorageTaskIfCondition(string condition, IEnumerable Initializes a new instance of . + /// Initializes a new instance of . /// Condition predicate to evaluate each object. See https://aka.ms/storagetaskconditions for valid properties and operators. /// List of operations to execute when the condition predicate satisfies. /// Keeps track of any properties unknown to the library. - internal StorageTaskIfCondition(string condition, IList operations, IDictionary serializedAdditionalRawData) + internal IfCondition(string condition, IList operations, IDictionary serializedAdditionalRawData) { Condition = condition; Operations = operations; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal StorageTaskIfCondition() + /// Initializes a new instance of for deserialization. + internal IfCondition() { } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/ProvisioningState.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..680f66b3da92 --- /dev/null +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.StorageActions.Models +{ + /// Represents the provisioning state of the storage task. + public readonly partial struct ProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ValidateSubscriptionQuotaBeginValue = "ValidateSubscriptionQuotaBegin"; + private const string ValidateSubscriptionQuotaEndValue = "ValidateSubscriptionQuotaEnd"; + private const string AcceptedValue = "Accepted"; + private const string CreatingValue = "Creating"; + private const string SucceededValue = "Succeeded"; + private const string DeletingValue = "Deleting"; + private const string CanceledValue = "Canceled"; + private const string FailedValue = "Failed"; + + /// ValidateSubscriptionQuotaBegin. + public static ProvisioningState ValidateSubscriptionQuotaBegin { get; } = new ProvisioningState(ValidateSubscriptionQuotaBeginValue); + /// ValidateSubscriptionQuotaEnd. + public static ProvisioningState ValidateSubscriptionQuotaEnd { get; } = new ProvisioningState(ValidateSubscriptionQuotaEndValue); + /// Accepted. + public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); + /// Creating. + public static ProvisioningState Creating { get; } = new ProvisioningState(CreatingValue); + /// Succeeded. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Deleting. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// Canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// Failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); + /// + public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/RunResult.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/RunResult.cs new file mode 100644 index 000000000000..f52e833d9585 --- /dev/null +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/RunResult.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.ResourceManager.StorageActions.Models +{ + /// Represents the overall result of the execution for the run instance. + public readonly partial struct RunResult : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RunResult(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + + /// Succeeded. + public static RunResult Succeeded { get; } = new RunResult(SucceededValue); + /// Failed. + public static RunResult Failed { get; } = new RunResult(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(RunResult left, RunResult right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RunResult left, RunResult right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RunResult(string value) => new RunResult(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RunResult other && Equals(other); + /// + public bool Equals(RunResult other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/RunStatusEnum.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/RunStatusEnum.cs new file mode 100644 index 000000000000..e6b52f7406ab --- /dev/null +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/RunStatusEnum.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.ResourceManager.StorageActions.Models +{ + /// Represents the status of the execution. + public readonly partial struct RunStatusEnum : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RunStatusEnum(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InProgressValue = "InProgress"; + private const string FinishedValue = "Finished"; + + /// InProgress. + public static RunStatusEnum InProgress { get; } = new RunStatusEnum(InProgressValue); + /// Finished. + public static RunStatusEnum Finished { get; } = new RunStatusEnum(FinishedValue); + /// Determines if two values are the same. + public static bool operator ==(RunStatusEnum left, RunStatusEnum right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RunStatusEnum left, RunStatusEnum right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RunStatusEnum(string value) => new RunStatusEnum(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RunStatusEnum other && Equals(other); + /// + public bool Equals(RunStatusEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAction.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAction.Serialization.cs index a3f80bd2b124..26773b711448 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAction.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAction.Serialization.cs @@ -78,15 +78,15 @@ internal static StorageTaskAction DeserializeStorageTaskAction(JsonElement eleme { return null; } - StorageTaskIfCondition @if = default; - StorageTaskElseCondition @else = default; + IfCondition @if = default; + ElseCondition @else = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("if"u8)) { - @if = StorageTaskIfCondition.DeserializeStorageTaskIfCondition(property.Value, options); + @if = IfCondition.DeserializeIfCondition(property.Value, options); continue; } if (property.NameEquals("else"u8)) @@ -95,7 +95,7 @@ internal static StorageTaskAction DeserializeStorageTaskAction(JsonElement eleme { continue; } - @else = StorageTaskElseCondition.DeserializeStorageTaskElseCondition(property.Value, options); + @else = ElseCondition.DeserializeElseCondition(property.Value, options); continue; } if (options.Format != "W") diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAction.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAction.cs index 30fa69a10885..669f08746ba9 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAction.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAction.cs @@ -48,7 +48,7 @@ public partial class StorageTaskAction /// Initializes a new instance of . /// The if block of storage task operation. /// is null. - public StorageTaskAction(StorageTaskIfCondition @if) + public StorageTaskAction(IfCondition @if) { Argument.AssertNotNull(@if, nameof(@if)); @@ -59,7 +59,7 @@ public StorageTaskAction(StorageTaskIfCondition @if) /// The if block of storage task operation. /// The else block of storage task operation. /// Keeps track of any properties unknown to the library. - internal StorageTaskAction(StorageTaskIfCondition @if, StorageTaskElseCondition @else, IDictionary serializedAdditionalRawData) + internal StorageTaskAction(IfCondition @if, ElseCondition @else, IDictionary serializedAdditionalRawData) { If = @if; Else = @else; @@ -72,14 +72,14 @@ internal StorageTaskAction() } /// The if block of storage task operation. - public StorageTaskIfCondition If { get; set; } + public IfCondition If { get; set; } /// The else block of storage task operation. - internal StorageTaskElseCondition Else { get; set; } + internal ElseCondition Else { get; set; } /// List of operations to execute in the else block. public IList ElseOperations { get => Else is null ? default : Else.Operations; - set => Else = new StorageTaskElseCondition(value); + set => Else = new ElseCondition(value); } } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAssignmentsListResult.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAssignmentsListResult.Serialization.cs index b2876ef9fc72..e9efd45e929d 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAssignmentsListResult.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAssignmentsListResult.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageTaskAssignmentsListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -48,7 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -88,17 +88,13 @@ internal static StorageTaskAssignmentsListResult DeserializeStorageTaskAssignmen return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -109,7 +105,11 @@ internal static StorageTaskAssignmentsListResult DeserializeStorageTaskAssignmen } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -118,7 +118,7 @@ internal static StorageTaskAssignmentsListResult DeserializeStorageTaskAssignmen } } serializedAdditionalRawData = rawDataDictionary; - return new StorageTaskAssignmentsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new StorageTaskAssignmentsListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAssignmentsListResult.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAssignmentsListResult.cs index 19e1be903a3f..35f72c2ba4e6 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAssignmentsListResult.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskAssignmentsListResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.StorageActions.Models @@ -47,25 +48,31 @@ internal partial class StorageTaskAssignmentsListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal StorageTaskAssignmentsListResult() + /// List of Storage Task Assignment Resource IDs associated with this Storage Task. + internal StorageTaskAssignmentsListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . /// List of Storage Task Assignment Resource IDs associated with this Storage Task. - /// Request URL that can be used to query next page of Resource IDs. Returned when total number of requested Resource IDs exceed maximum page size. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal StorageTaskAssignmentsListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal StorageTaskAssignmentsListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal StorageTaskAssignmentsListResult() + { + } + /// List of Storage Task Assignment Resource IDs associated with this Storage Task. public IReadOnlyList Value { get; } - /// Request URL that can be used to query next page of Resource IDs. Returned when total number of requested Resource IDs exceed maximum page size. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.Serialization.cs index b64d5c59c9ad..413ed0a8842b 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.Serialization.cs @@ -52,11 +52,39 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } - if (Optional.IsDefined(Properties)) + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(TaskVersion)) + { + writer.WritePropertyName("taskVersion"u8); + writer.WriteNumberValue(TaskVersion.Value); + } + if (Optional.IsDefined(Enabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Action)) { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); + writer.WritePropertyName("action"u8); + writer.WriteObjectValue(Action, options); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CreationTimeInUtc)) + { + writer.WritePropertyName("creationTimeInUtc"u8); + writer.WriteStringValue(CreationTimeInUtc.Value, "O"); + } + writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -96,7 +124,12 @@ internal static StorageTaskPatch DeserializeStorageTaskPatch(JsonElement element } ManagedServiceIdentity identity = default; IDictionary tags = default; - StorageTaskProperties properties = default; + long? taskVersion = default; + bool? enabled = default; + string description = default; + StorageTaskAction action = default; + ProvisioningState? provisioningState = default; + DateTimeOffset? creationTimeInUtc = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -129,9 +162,62 @@ internal static StorageTaskPatch DeserializeStorageTaskPatch(JsonElement element { if (property.Value.ValueKind == JsonValueKind.Null) { + property.ThrowNonNullablePropertyIsNull(); continue; } - properties = StorageTaskProperties.DeserializeStorageTaskProperties(property.Value, options); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("taskVersion"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taskVersion = property0.Value.GetInt64(); + continue; + } + if (property0.NameEquals("enabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("action"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + action = StorageTaskAction.DeserializeStorageTaskAction(property0.Value, options); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("creationTimeInUtc"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTimeInUtc = property0.Value.GetDateTimeOffset("O"); + continue; + } + } continue; } if (options.Format != "W") @@ -140,7 +226,16 @@ internal static StorageTaskPatch DeserializeStorageTaskPatch(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new StorageTaskPatch(identity, tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + return new StorageTaskPatch( + identity, + tags ?? new ChangeTrackingDictionary(), + taskVersion, + enabled, + description, + action, + provisioningState, + creationTimeInUtc, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.cs index 0e23ddec4990..e9c27fe66aba 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.cs @@ -55,13 +55,23 @@ public StorageTaskPatch() /// Initializes a new instance of . /// The identity of the resource. /// Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. - /// Properties of the storage task. + /// Storage task version. + /// Storage Task is enabled when set to true and disabled when set to false. + /// Text that describes the purpose of the storage task. + /// The storage task action that is executed. + /// Represents the provisioning state of the storage task. + /// The creation date and time of the storage task in UTC. /// Keeps track of any properties unknown to the library. - internal StorageTaskPatch(ManagedServiceIdentity identity, IDictionary tags, StorageTaskProperties properties, IDictionary serializedAdditionalRawData) + internal StorageTaskPatch(ManagedServiceIdentity identity, IDictionary tags, long? taskVersion, bool? enabled, string description, StorageTaskAction action, ProvisioningState? provisioningState, DateTimeOffset? creationTimeInUtc, IDictionary serializedAdditionalRawData) { Identity = identity; Tags = tags; - Properties = properties; + TaskVersion = taskVersion; + Enabled = enabled; + Description = description; + Action = action; + ProvisioningState = provisioningState; + CreationTimeInUtc = creationTimeInUtc; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -69,7 +79,17 @@ internal StorageTaskPatch(ManagedServiceIdentity identity, IDictionary Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. public IDictionary Tags { get; } - /// Properties of the storage task. - public StorageTaskProperties Properties { get; set; } + /// Storage task version. + public long? TaskVersion { get; } + /// Storage Task is enabled when set to true and disabled when set to false. + public bool? Enabled { get; set; } + /// Text that describes the purpose of the storage task. + public string Description { get; set; } + /// The storage task action that is executed. + public StorageTaskAction Action { get; set; } + /// Represents the provisioning state of the storage task. + public ProvisioningState? ProvisioningState { get; } + /// The creation date and time of the storage task in UTC. + public DateTimeOffset? CreationTimeInUtc { get; } } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewAction.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewAction.Serialization.cs index 6da821169631..1861123ad36c 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewAction.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewAction.Serialization.cs @@ -35,7 +35,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); + writer.WriteStartObject(); + writer.WritePropertyName("container"u8); + writer.WriteObjectValue(Container, options); + writer.WritePropertyName("blobs"u8); + writer.WriteStartArray(); + foreach (var item in Blobs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("action"u8); + writer.WriteObjectValue(Action, options); + writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -73,14 +85,43 @@ internal static StorageTaskPreviewAction DeserializeStorageTaskPreviewAction(Jso { return null; } - StorageTaskPreviewActionProperties properties = default; + StorageTaskPreviewContainerProperties container = default; + IList blobs = default; + StorageTaskPreviewActionCondition action = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("properties"u8)) { - properties = StorageTaskPreviewActionProperties.DeserializeStorageTaskPreviewActionProperties(property.Value, options); + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("container"u8)) + { + container = StorageTaskPreviewContainerProperties.DeserializeStorageTaskPreviewContainerProperties(property0.Value, options); + continue; + } + if (property0.NameEquals("blobs"u8)) + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StorageTaskPreviewBlobProperties.DeserializeStorageTaskPreviewBlobProperties(item, options)); + } + blobs = array; + continue; + } + if (property0.NameEquals("action"u8)) + { + action = StorageTaskPreviewActionCondition.DeserializeStorageTaskPreviewActionCondition(property0.Value, options); + continue; + } + } continue; } if (options.Format != "W") @@ -89,7 +130,7 @@ internal static StorageTaskPreviewAction DeserializeStorageTaskPreviewAction(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new StorageTaskPreviewAction(properties, serializedAdditionalRawData); + return new StorageTaskPreviewAction(container, blobs, action, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewAction.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewAction.cs index 4ff2bad67360..79f94071489f 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewAction.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewAction.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.StorageActions.Models { @@ -46,21 +47,31 @@ public partial class StorageTaskPreviewAction private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Properties of the storage task preview. - /// is null. - public StorageTaskPreviewAction(StorageTaskPreviewActionProperties properties) + /// Properties of a sample container to test for a match with the preview action. + /// Properties of some sample blobs in the container to test for matches with the preview action. + /// Preview action to test. + /// , or is null. + public StorageTaskPreviewAction(StorageTaskPreviewContainerProperties container, IEnumerable blobs, StorageTaskPreviewActionCondition action) { - Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(container, nameof(container)); + Argument.AssertNotNull(blobs, nameof(blobs)); + Argument.AssertNotNull(action, nameof(action)); - Properties = properties; + Container = container; + Blobs = blobs.ToList(); + Action = action; } /// Initializes a new instance of . - /// Properties of the storage task preview. + /// Properties of a sample container to test for a match with the preview action. + /// Properties of some sample blobs in the container to test for matches with the preview action. + /// Preview action to test. /// Keeps track of any properties unknown to the library. - internal StorageTaskPreviewAction(StorageTaskPreviewActionProperties properties, IDictionary serializedAdditionalRawData) + internal StorageTaskPreviewAction(StorageTaskPreviewContainerProperties container, IList blobs, StorageTaskPreviewActionCondition action, IDictionary serializedAdditionalRawData) { - Properties = properties; + Container = container; + Blobs = blobs; + Action = action; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -69,7 +80,11 @@ internal StorageTaskPreviewAction() { } - /// Properties of the storage task preview. - public StorageTaskPreviewActionProperties Properties { get; set; } + /// Properties of a sample container to test for a match with the preview action. + public StorageTaskPreviewContainerProperties Container { get; set; } + /// Properties of some sample blobs in the container to test for matches with the preview action. + public IList Blobs { get; } + /// Preview action to test. + public StorageTaskPreviewActionCondition Action { get; set; } } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewActionProperties.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewActionProperties.Serialization.cs deleted file mode 100644 index 8cecac3f5474..000000000000 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewActionProperties.Serialization.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.StorageActions.Models -{ - public partial class StorageTaskPreviewActionProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(StorageTaskPreviewActionProperties)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("container"u8); - writer.WriteObjectValue(Container, options); - writer.WritePropertyName("blobs"u8); - writer.WriteStartArray(); - foreach (var item in Blobs) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("action"u8); - writer.WriteObjectValue(Action, options); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - StorageTaskPreviewActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(StorageTaskPreviewActionProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeStorageTaskPreviewActionProperties(document.RootElement, options); - } - - internal static StorageTaskPreviewActionProperties DeserializeStorageTaskPreviewActionProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - StorageTaskPreviewContainerProperties container = default; - IList blobs = default; - StorageTaskPreviewActionCondition action = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("container"u8)) - { - container = StorageTaskPreviewContainerProperties.DeserializeStorageTaskPreviewContainerProperties(property.Value, options); - continue; - } - if (property.NameEquals("blobs"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(StorageTaskPreviewBlobProperties.DeserializeStorageTaskPreviewBlobProperties(item, options)); - } - blobs = array; - continue; - } - if (property.NameEquals("action"u8)) - { - action = StorageTaskPreviewActionCondition.DeserializeStorageTaskPreviewActionCondition(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new StorageTaskPreviewActionProperties(container, blobs, action, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerStorageActionsContext.Default); - default: - throw new FormatException($"The model {nameof(StorageTaskPreviewActionProperties)} does not support writing '{options.Format}' format."); - } - } - - StorageTaskPreviewActionProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeStorageTaskPreviewActionProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(StorageTaskPreviewActionProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewActionProperties.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewActionProperties.cs deleted file mode 100644 index 2d6544b4ca75..000000000000 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPreviewActionProperties.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.ResourceManager.StorageActions.Models -{ - /// Storage task preview action properties. - public partial class StorageTaskPreviewActionProperties - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// Properties of a sample container to test for a match with the preview action. - /// Properties of some sample blobs in the container to test for matches with the preview action. - /// Preview action to test. - /// , or is null. - public StorageTaskPreviewActionProperties(StorageTaskPreviewContainerProperties container, IEnumerable blobs, StorageTaskPreviewActionCondition action) - { - Argument.AssertNotNull(container, nameof(container)); - Argument.AssertNotNull(blobs, nameof(blobs)); - Argument.AssertNotNull(action, nameof(action)); - - Container = container; - Blobs = blobs.ToList(); - Action = action; - } - - /// Initializes a new instance of . - /// Properties of a sample container to test for a match with the preview action. - /// Properties of some sample blobs in the container to test for matches with the preview action. - /// Preview action to test. - /// Keeps track of any properties unknown to the library. - internal StorageTaskPreviewActionProperties(StorageTaskPreviewContainerProperties container, IList blobs, StorageTaskPreviewActionCondition action, IDictionary serializedAdditionalRawData) - { - Container = container; - Blobs = blobs; - Action = action; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal StorageTaskPreviewActionProperties() - { - } - - /// Properties of a sample container to test for a match with the preview action. - public StorageTaskPreviewContainerProperties Container { get; set; } - /// Properties of some sample blobs in the container to test for matches with the preview action. - public IList Blobs { get; } - /// Preview action to test. - public StorageTaskPreviewActionCondition Action { get; set; } - } -} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskProperties.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskProperties.Serialization.cs deleted file mode 100644 index f4e4174a9553..000000000000 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskProperties.Serialization.cs +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.StorageActions.Models -{ - public partial class StorageTaskProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(StorageTaskProperties)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsDefined(TaskVersion)) - { - writer.WritePropertyName("taskVersion"u8); - writer.WriteNumberValue(TaskVersion.Value); - } - writer.WritePropertyName("enabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - writer.WritePropertyName("action"u8); - writer.WriteObjectValue(Action, options); - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(CreationTimeInUtc)) - { - writer.WritePropertyName("creationTimeInUtc"u8); - writer.WriteStringValue(CreationTimeInUtc.Value, "O"); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - StorageTaskProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(StorageTaskProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeStorageTaskProperties(document.RootElement, options); - } - - internal static StorageTaskProperties DeserializeStorageTaskProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - long? taskVersion = default; - bool enabled = default; - string description = default; - StorageTaskAction action = default; - StorageTaskProvisioningState? provisioningState = default; - DateTimeOffset? creationTimeInUtc = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("taskVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - taskVersion = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("enabled"u8)) - { - enabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("action"u8)) - { - action = StorageTaskAction.DeserializeStorageTaskAction(property.Value, options); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new StorageTaskProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("creationTimeInUtc"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - creationTimeInUtc = property.Value.GetDateTimeOffset("O"); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new StorageTaskProperties( - taskVersion, - enabled, - description, - action, - provisioningState, - creationTimeInUtc, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerStorageActionsContext.Default); - default: - throw new FormatException($"The model {nameof(StorageTaskProperties)} does not support writing '{options.Format}' format."); - } - } - - StorageTaskProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeStorageTaskProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(StorageTaskProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskProperties.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskProperties.cs deleted file mode 100644 index e84b28b7ef9a..000000000000 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskProperties.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.StorageActions.Models -{ - /// Properties of the storage task. - public partial class StorageTaskProperties - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// Storage Task is enabled when set to true and disabled when set to false. - /// Text that describes the purpose of the storage task. - /// The storage task action that is executed. - /// or is null. - public StorageTaskProperties(bool isEnabled, string description, StorageTaskAction action) - { - Argument.AssertNotNull(description, nameof(description)); - Argument.AssertNotNull(action, nameof(action)); - - IsEnabled = isEnabled; - Description = description; - Action = action; - } - - /// Initializes a new instance of . - /// Storage task version. - /// Storage Task is enabled when set to true and disabled when set to false. - /// Text that describes the purpose of the storage task. - /// The storage task action that is executed. - /// Represents the provisioning state of the storage task. - /// The creation date and time of the storage task in UTC. - /// Keeps track of any properties unknown to the library. - internal StorageTaskProperties(long? taskVersion, bool isEnabled, string description, StorageTaskAction action, StorageTaskProvisioningState? provisioningState, DateTimeOffset? creationTimeInUtc, IDictionary serializedAdditionalRawData) - { - TaskVersion = taskVersion; - IsEnabled = isEnabled; - Description = description; - Action = action; - ProvisioningState = provisioningState; - CreationTimeInUtc = creationTimeInUtc; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal StorageTaskProperties() - { - } - - /// Storage task version. - public long? TaskVersion { get; } - /// Storage Task is enabled when set to true and disabled when set to false. - public bool IsEnabled { get; set; } - /// Text that describes the purpose of the storage task. - public string Description { get; set; } - /// The storage task action that is executed. - public StorageTaskAction Action { get; set; } - /// Represents the provisioning state of the storage task. - public StorageTaskProvisioningState? ProvisioningState { get; } - /// The creation date and time of the storage task in UTC. - public DateTimeOffset? CreationTimeInUtc { get; } - } -} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskProvisioningState.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskProvisioningState.cs deleted file mode 100644 index 7fa402fe971c..000000000000 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskProvisioningState.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.StorageActions.Models -{ - /// Represents the provisioning state of the storage task. - public readonly partial struct StorageTaskProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public StorageTaskProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ValidateSubscriptionQuotaBeginValue = "ValidateSubscriptionQuotaBegin"; - private const string ValidateSubscriptionQuotaEndValue = "ValidateSubscriptionQuotaEnd"; - private const string AcceptedValue = "Accepted"; - private const string CreatingValue = "Creating"; - private const string SucceededValue = "Succeeded"; - private const string DeletingValue = "Deleting"; - private const string CanceledValue = "Canceled"; - private const string FailedValue = "Failed"; - - /// ValidateSubscriptionQuotaBegin. - public static StorageTaskProvisioningState ValidateSubscriptionQuotaBegin { get; } = new StorageTaskProvisioningState(ValidateSubscriptionQuotaBeginValue); - /// ValidateSubscriptionQuotaEnd. - public static StorageTaskProvisioningState ValidateSubscriptionQuotaEnd { get; } = new StorageTaskProvisioningState(ValidateSubscriptionQuotaEndValue); - /// Accepted. - public static StorageTaskProvisioningState Accepted { get; } = new StorageTaskProvisioningState(AcceptedValue); - /// Creating. - public static StorageTaskProvisioningState Creating { get; } = new StorageTaskProvisioningState(CreatingValue); - /// Succeeded. - public static StorageTaskProvisioningState Succeeded { get; } = new StorageTaskProvisioningState(SucceededValue); - /// Deleting. - public static StorageTaskProvisioningState Deleting { get; } = new StorageTaskProvisioningState(DeletingValue); - /// Canceled. - public static StorageTaskProvisioningState Canceled { get; } = new StorageTaskProvisioningState(CanceledValue); - /// Failed. - public static StorageTaskProvisioningState Failed { get; } = new StorageTaskProvisioningState(FailedValue); - /// Determines if two values are the same. - public static bool operator ==(StorageTaskProvisioningState left, StorageTaskProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(StorageTaskProvisioningState left, StorageTaskProvisioningState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator StorageTaskProvisioningState(string value) => new StorageTaskProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is StorageTaskProvisioningState other && Equals(other); - /// - public bool Equals(StorageTaskProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportInstance.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportInstance.cs index 6817e678791e..f0afcab47570 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportInstance.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportInstance.cs @@ -48,7 +48,7 @@ public partial class StorageTaskReportInstance : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public StorageTaskReportInstance() + internal StorageTaskReportInstance() { } @@ -66,6 +66,6 @@ internal StorageTaskReportInstance(ResourceIdentifier id, string name, ResourceT } /// Storage task execution report for a run instance. - public StorageTaskReportProperties Properties { get; set; } + public StorageTaskReportProperties Properties { get; } } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportProperties.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportProperties.Serialization.cs index f35d3429dd5e..a2b41f9cc6d4 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportProperties.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportProperties.Serialization.cs @@ -150,11 +150,11 @@ internal static StorageTaskReportProperties DeserializeStorageTaskReportProperti string objectFailedCount = default; string objectsSucceededCount = default; string runStatusError = default; - StorageTaskRunStatus? runStatusEnum = default; + RunStatusEnum? runStatusEnum = default; string summaryReportPath = default; ResourceIdentifier taskId = default; string taskVersion = default; - StorageTaskRunResult? runResult = default; + RunResult? runResult = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -218,7 +218,7 @@ internal static StorageTaskReportProperties DeserializeStorageTaskReportProperti { continue; } - runStatusEnum = new StorageTaskRunStatus(property.Value.GetString()); + runStatusEnum = new RunStatusEnum(property.Value.GetString()); continue; } if (property.NameEquals("summaryReportPath"u8)) @@ -246,7 +246,7 @@ internal static StorageTaskReportProperties DeserializeStorageTaskReportProperti { continue; } - runResult = new StorageTaskRunResult(property.Value.GetString()); + runResult = new RunResult(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportProperties.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportProperties.cs index 5bd3f83048e3..7e63f3d49d43 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportProperties.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportProperties.cs @@ -47,7 +47,7 @@ public partial class StorageTaskReportProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public StorageTaskReportProperties() + internal StorageTaskReportProperties() { } @@ -67,7 +67,7 @@ public StorageTaskReportProperties() /// Storage Task Version. /// Represents the overall result of the execution for the run instance. /// Keeps track of any properties unknown to the library. - internal StorageTaskReportProperties(ResourceIdentifier taskAssignmentId, ResourceIdentifier storageAccountId, string startTime, string finishTime, string objectsTargetedCount, string objectsOperatedOnCount, string objectFailedCount, string objectsSucceededCount, string runStatusError, StorageTaskRunStatus? runStatusEnum, string summaryReportPath, ResourceIdentifier taskId, string taskVersion, StorageTaskRunResult? runResult, IDictionary serializedAdditionalRawData) + internal StorageTaskReportProperties(ResourceIdentifier taskAssignmentId, ResourceIdentifier storageAccountId, string startTime, string finishTime, string objectsTargetedCount, string objectsOperatedOnCount, string objectFailedCount, string objectsSucceededCount, string runStatusError, RunStatusEnum? runStatusEnum, string summaryReportPath, ResourceIdentifier taskId, string taskVersion, RunResult? runResult, IDictionary serializedAdditionalRawData) { TaskAssignmentId = taskAssignmentId; StorageAccountId = storageAccountId; @@ -105,7 +105,7 @@ internal StorageTaskReportProperties(ResourceIdentifier taskAssignmentId, Resour /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. public string RunStatusError { get; } /// Represents the status of the execution. - public StorageTaskRunStatus? RunStatusEnum { get; } + public RunStatusEnum? RunStatusEnum { get; } /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for the storage account. public string SummaryReportPath { get; } /// Resource ID of the Storage Task applied during this run. @@ -113,6 +113,6 @@ internal StorageTaskReportProperties(ResourceIdentifier taskAssignmentId, Resour /// Storage Task Version. public string TaskVersion { get; } /// Represents the overall result of the execution for the run instance. - public StorageTaskRunResult? RunResult { get; } + public RunResult? RunResult { get; } } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportSummary.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportSummary.Serialization.cs index e18adc84d2f9..02fac16bfd0e 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportSummary.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportSummary.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageTaskReportSummary)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static StorageTaskReportSummary DeserializeStorageTaskReportSummary(Jso return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static StorageTaskReportSummary DeserializeStorageTaskReportSummary(Jso } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static StorageTaskReportSummary DeserializeStorageTaskReportSummary(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new StorageTaskReportSummary(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new StorageTaskReportSummary(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportSummary.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportSummary.cs index 1178abb5d99c..dd1662e7b698 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportSummary.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskReportSummary.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.StorageActions.Models { @@ -46,25 +47,31 @@ internal partial class StorageTaskReportSummary private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal StorageTaskReportSummary() + /// Gets storage tasks run result summary. + internal StorageTaskReportSummary(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . /// Gets storage tasks run result summary. - /// Request URL that can be used to query next page of storage task run results summary. Returned when the number of run instances and summary reports exceed maximum page size. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal StorageTaskReportSummary(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal StorageTaskReportSummary(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal StorageTaskReportSummary() + { + } + /// Gets storage tasks run result summary. public IReadOnlyList Value { get; } - /// Request URL that can be used to query next page of storage task run results summary. Returned when the number of run instances and summary reports exceed maximum page size. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskRunResult.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskRunResult.cs deleted file mode 100644 index c3597a1a3a40..000000000000 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskRunResult.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.StorageActions.Models -{ - /// Represents the overall result of the execution for the run instance. - public readonly partial struct StorageTaskRunResult : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public StorageTaskRunResult(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - - /// Succeeded. - public static StorageTaskRunResult Succeeded { get; } = new StorageTaskRunResult(SucceededValue); - /// Failed. - public static StorageTaskRunResult Failed { get; } = new StorageTaskRunResult(FailedValue); - /// Determines if two values are the same. - public static bool operator ==(StorageTaskRunResult left, StorageTaskRunResult right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(StorageTaskRunResult left, StorageTaskRunResult right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator StorageTaskRunResult(string value) => new StorageTaskRunResult(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is StorageTaskRunResult other && Equals(other); - /// - public bool Equals(StorageTaskRunResult other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskRunStatus.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskRunStatus.cs deleted file mode 100644 index bff60364d04f..000000000000 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskRunStatus.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.StorageActions.Models -{ - /// Represents the status of the execution. - public readonly partial struct StorageTaskRunStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public StorageTaskRunStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "InProgress"; - private const string FinishedValue = "Finished"; - - /// InProgress. - public static StorageTaskRunStatus InProgress { get; } = new StorageTaskRunStatus(InProgressValue); - /// Finished. - public static StorageTaskRunStatus Finished { get; } = new StorageTaskRunStatus(FinishedValue); - /// Determines if two values are the same. - public static bool operator ==(StorageTaskRunStatus left, StorageTaskRunStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(StorageTaskRunStatus left, StorageTaskRunStatus right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator StorageTaskRunStatus(string value) => new StorageTaskRunStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is StorageTaskRunStatus other && Equals(other); - /// - public bool Equals(StorageTaskRunStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTasksListResult.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTasksListResult.Serialization.cs index 16590b02784f..d047513885ff 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTasksListResult.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTasksListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageTasksListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static StorageTasksListResult DeserializeStorageTasksListResult(JsonEle return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static StorageTasksListResult DeserializeStorageTasksListResult(JsonEle } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static StorageTasksListResult DeserializeStorageTasksListResult(JsonEle } } serializedAdditionalRawData = rawDataDictionary; - return new StorageTasksListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new StorageTasksListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTasksListResult.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTasksListResult.cs index 7c2703a29464..2d5b31665a71 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTasksListResult.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTasksListResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.StorageActions.Models { @@ -46,25 +47,31 @@ internal partial class StorageTasksListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal StorageTasksListResult() + /// Gets the list of storage tasks and their properties. + internal StorageTasksListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . /// Gets the list of storage tasks and their properties. - /// Request URL that can be used to query next page of storage tasks. Returned when total number of requested storage tasks exceed maximum page size. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal StorageTasksListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal StorageTasksListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal StorageTasksListResult() + { + } + /// Gets the list of storage tasks and their properties. public IReadOnlyList Value { get; } - /// Request URL that can be used to query next page of storage tasks. Returned when total number of requested storage tasks exceed maximum page size. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTaskAssignmentRestOperations.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTaskAssignmentRestOperations.cs deleted file mode 100644 index fcf0dd60f326..000000000000 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTaskAssignmentRestOperations.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.StorageActions.Models; - -namespace Azure.ResourceManager.StorageActions -{ - internal partial class StorageTaskAssignmentRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of StorageTaskAssignmentRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public StorageTaskAssignmentRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-01-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); - uri.AppendPath(storageTaskName, true); - uri.AppendPath("/storageTaskAssignments", false); - if (maxpagesize != null) - { - uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); - uri.AppendPath(storageTaskName, true); - uri.AppendPath("/storageTaskAssignments", false); - if (maxpagesize != null) - { - uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. - /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, storageTaskName, maxpagesize); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - StorageTaskAssignmentsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = StorageTaskAssignmentsListResult.DeserializeStorageTaskAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. - /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, storageTaskName, maxpagesize); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - StorageTaskAssignmentsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = StorageTaskAssignmentsListResult.DeserializeStorageTaskAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. - /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, storageTaskName, maxpagesize); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - StorageTaskAssignmentsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = StorageTaskAssignmentsListResult.DeserializeStorageTaskAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. - /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, storageTaskName, maxpagesize); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - StorageTaskAssignmentsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = StorageTaskAssignmentsListResult.DeserializeStorageTaskAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksOperationGroupRestOperations.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksOperationGroupRestOperations.cs new file mode 100644 index 000000000000..9b389d2bb596 --- /dev/null +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksOperationGroupRestOperations.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.StorageActions.Models; + +namespace Azure.ResourceManager.StorageActions +{ + internal partial class StorageTasksOperationGroupRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of StorageTasksOperationGroupRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public StorageTasksOperationGroupRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-01-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreatePreviewActionsRequestUri(string subscriptionId, string location, StorageTaskPreviewAction storageTaskPreviewAction) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.StorageActions/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/previewActions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePreviewActionsRequest(string subscriptionId, string location, StorageTaskPreviewAction storageTaskPreviewAction) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.StorageActions/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/previewActions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(storageTaskPreviewAction, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Runs the input conditions against input object metadata properties and designates matched objects in response. + /// The ID of the target subscription. The value must be an UUID. + /// The to use. + /// The parameters to preview action condition. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> PreviewActionsAsync(string subscriptionId, string location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + Argument.AssertNotNull(storageTaskPreviewAction, nameof(storageTaskPreviewAction)); + + using var message = CreatePreviewActionsRequest(subscriptionId, location, storageTaskPreviewAction); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StorageTaskPreviewAction value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = StorageTaskPreviewAction.DeserializeStorageTaskPreviewAction(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Runs the input conditions against input object metadata properties and designates matched objects in response. + /// The ID of the target subscription. The value must be an UUID. + /// The to use. + /// The parameters to preview action condition. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response PreviewActions(string subscriptionId, string location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + Argument.AssertNotNull(storageTaskPreviewAction, nameof(storageTaskPreviewAction)); + + using var message = CreatePreviewActionsRequest(subscriptionId, location, storageTaskPreviewAction); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StorageTaskPreviewAction value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = StorageTaskPreviewAction.DeserializeStorageTaskPreviewAction(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksReportRestOperations.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksReportRestOperations.cs deleted file mode 100644 index 3476ce108595..000000000000 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksReportRestOperations.cs +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.StorageActions.Models; - -namespace Azure.ResourceManager.StorageActions -{ - internal partial class StorageTasksReportRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of StorageTasksReportRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public StorageTasksReportRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-01-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, string filter) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); - uri.AppendPath(storageTaskName, true); - uri.AppendPath("/reports", false); - if (maxpagesize != null) - { - uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); - } - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, string filter) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); - uri.AppendPath(storageTaskName, true); - uri.AppendPath("/reports", false); - if (maxpagesize != null) - { - uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); - } - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Fetch the storage tasks run report summary for each assignment. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. - /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. - /// Optional. When specified, it can be used to query using reporting properties. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, storageTaskName, maxpagesize, filter); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - StorageTaskReportSummary value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = StorageTaskReportSummary.DeserializeStorageTaskReportSummary(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Fetch the storage tasks run report summary for each assignment. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. - /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. - /// Optional. When specified, it can be used to query using reporting properties. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, storageTaskName, maxpagesize, filter); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - StorageTaskReportSummary value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = StorageTaskReportSummary.DeserializeStorageTaskReportSummary(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, string filter) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, string filter) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Fetch the storage tasks run report summary for each assignment. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. - /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. - /// Optional. When specified, it can be used to query using reporting properties. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, storageTaskName, maxpagesize, filter); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - StorageTaskReportSummary value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = StorageTaskReportSummary.DeserializeStorageTaskReportSummary(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Fetch the storage tasks run report summary for each assignment. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. - /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. - /// Optional. When specified, it can be used to query using reporting properties. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, storageTaskName, maxpagesize, filter); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - StorageTaskReportSummary value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = StorageTaskReportSummary.DeserializeStorageTaskReportSummary(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksRestOperations.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksRestOperations.cs index f3369c6b8251..bce7ca4cfc1e 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksRestOperations.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksRestOperations.cs @@ -25,8 +25,8 @@ internal partial class StorageTasksRestOperations /// Initializes a new instance of StorageTasksRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public StorageTasksRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { @@ -36,6 +36,102 @@ public StorageTasksRestOperations(HttpPipeline pipeline, string applicationId, U _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string storageTaskName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); + uri.AppendPath(storageTaskName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string storageTaskName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); + uri.AppendPath(storageTaskName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the storage task properties. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string storageTaskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storageTaskName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StorageTaskData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = StorageTaskData.DeserializeStorageTaskData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StorageTaskData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the storage task properties. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string storageTaskName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storageTaskName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StorageTaskData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = StorageTaskData.DeserializeStorageTaskData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StorageTaskData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string storageTaskName, StorageTaskData data) { var uri = new RawRequestUriBuilder(); @@ -130,7 +226,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string s } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string storageTaskName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string storageTaskName, StorageTaskPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -144,11 +240,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string storageTaskName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string storageTaskName, StorageTaskPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -160,61 +256,69 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Delete the storage task resource. + /// Update storage task properties. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// The parameters to provide to update the storage task resource. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string storageTaskName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string storageTaskName, StorageTaskPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storageTaskName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storageTaskName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Delete the storage task resource. + /// Update storage task properties. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// The parameters to provide to update the storage task resource. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string storageTaskName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string storageTaskName, StorageTaskPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storageTaskName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storageTaskName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string storageTaskName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string storageTaskName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -228,11 +332,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string storageTaskName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string storageTaskName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -248,69 +352,57 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get the storage task properties. + /// Delete the storage task resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string storageTaskName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string storageTaskName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, storageTaskName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storageTaskName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - StorageTaskData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = StorageTaskData.DeserializeStorageTaskData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StorageTaskData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get the storage task properties. + /// Delete the storage task resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string storageTaskName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string storageTaskName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, storageTaskName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storageTaskName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - StorageTaskData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = StorageTaskData.DeserializeStorageTaskData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StorageTaskData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string storageTaskName, StorageTaskPatch patch) + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -318,85 +410,79 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); - uri.AppendPath(storageTaskName, true); + uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string storageTaskName, StorageTaskPatch patch) + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); - uri.AppendPath(storageTaskName, true); + uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Update storage task properties. + /// Lists all the storage tasks available under the given resource group. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. - /// The parameters to provide to update the storage task resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string storageTaskName, StorageTaskPatch patch, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storageTaskName, patch); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StorageTasksListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = StorageTasksListResult.DeserializeStorageTasksListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Update storage task properties. + /// Lists all the storage tasks available under the given resource group. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. - /// The parameters to provide to update the storage task resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string storageTaskName, StorageTaskPatch patch, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storageTaskName, patch); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StorageTasksListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = StorageTasksListResult.DeserializeStorageTasksListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -480,7 +566,7 @@ public Response ListBySubscription(string subscriptionId } } - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, string filter) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -488,12 +574,22 @@ internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscripti uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks", false); + uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); + uri.AppendPath(storageTaskName, true); + uri.AppendPath("/reports", false); uri.AppendQuery("api-version", _apiVersion, true); + if (maxpagesize != null) + { + uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } return uri; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, string filter) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -504,34 +600,48 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks", false); + uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); + uri.AppendPath(storageTaskName, true); + uri.AppendPath("/reports", false); uri.AppendQuery("api-version", _apiVersion, true); + if (maxpagesize != null) + { + uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Lists all the storage tasks available under the given resource group. + /// Fetch the storage tasks run report summary for each assignment. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. + /// Optional. When specified, it can be used to query using reporting properties. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, storageTaskName, maxpagesize, filter); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StorageTasksListResult value = default; + StorageTaskReportSummary value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = StorageTasksListResult.DeserializeStorageTasksListResult(document.RootElement); + value = StorageTaskReportSummary.DeserializeStorageTaskReportSummary(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -539,26 +649,30 @@ public async Task> ListByResourceGroupAsync(str } } - /// Lists all the storage tasks available under the given resource group. + /// Fetch the storage tasks run report summary for each assignment. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. + /// Optional. When specified, it can be used to query using reporting properties. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, storageTaskName, maxpagesize, filter); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StorageTasksListResult value = default; + StorageTaskReportSummary value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = StorageTasksListResult.DeserializeStorageTasksListResult(document.RootElement); + value = StorageTaskReportSummary.DeserializeStorageTaskReportSummary(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -566,63 +680,103 @@ public Response ListByResourceGroup(string subscriptionI } } - internal RequestUriBuilder CreatePreviewActionsRequestUri(string subscriptionId, AzureLocation location, StorageTaskPreviewAction storageTaskPreviewAction) + internal RequestUriBuilder CreateStorageTaskAssignmentListRequestUri(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.StorageActions/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/previewActions", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); + uri.AppendPath(storageTaskName, true); + uri.AppendPath("/storageTaskAssignments", false); uri.AppendQuery("api-version", _apiVersion, true); + if (maxpagesize != null) + { + uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); + } return uri; } - internal HttpMessage CreatePreviewActionsRequest(string subscriptionId, AzureLocation location, StorageTaskPreviewAction storageTaskPreviewAction) + internal HttpMessage CreateStorageTaskAssignmentListRequest(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.StorageActions/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/previewActions", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); + uri.AppendPath(storageTaskName, true); + uri.AppendPath("/storageTaskAssignments", false); uri.AppendQuery("api-version", _apiVersion, true); + if (maxpagesize != null) + { + uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(storageTaskPreviewAction, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Runs the input conditions against input object metadata properties and designates matched objects in response. + /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. /// The ID of the target subscription. The value must be an UUID. - /// The location to perform preview of the actions. - /// The parameters to preview action condition. + /// The name of the resource group. The name is case insensitive. + /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> PreviewActionsAsync(string subscriptionId, AzureLocation location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> StorageTaskAssignmentListAsync(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(storageTaskPreviewAction, nameof(storageTaskPreviewAction)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - using var message = CreatePreviewActionsRequest(subscriptionId, location, storageTaskPreviewAction); + using var message = CreateStorageTaskAssignmentListRequest(subscriptionId, resourceGroupName, storageTaskName, maxpagesize); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StorageTaskPreviewAction value = default; + StorageTaskAssignmentsListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = StorageTaskPreviewAction.DeserializeStorageTaskPreviewAction(document.RootElement); + value = StorageTaskAssignmentsListResult.DeserializeStorageTaskAssignmentsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response StorageTaskAssignmentList(string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); + + using var message = CreateStorageTaskAssignmentListRequest(subscriptionId, resourceGroupName, storageTaskName, maxpagesize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StorageTaskAssignmentsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = StorageTaskAssignmentsListResult.DeserializeStorageTaskAssignmentsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -630,27 +784,79 @@ public async Task> PreviewActionsAsync(string } } - /// Runs the input conditions against input object metadata properties and designates matched objects in response. + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the storage tasks available under the given resource group. + /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The location to perform preview of the actions. - /// The parameters to preview action condition. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response PreviewActions(string subscriptionId, AzureLocation location, StorageTaskPreviewAction storageTaskPreviewAction, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StorageTasksListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = StorageTasksListResult.DeserializeStorageTasksListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the storage tasks available under the given resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(storageTaskPreviewAction, nameof(storageTaskPreviewAction)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreatePreviewActionsRequest(subscriptionId, location, storageTaskPreviewAction); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StorageTaskPreviewAction value = default; + StorageTasksListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = StorageTaskPreviewAction.DeserializeStorageTaskPreviewAction(document.RootElement); + value = StorageTasksListResult.DeserializeStorageTasksListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -734,7 +940,7 @@ public Response ListBySubscriptionNextPage(string nextLi } } - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, string filter) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -742,7 +948,7 @@ internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, string filter) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -756,28 +962,32 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// Lists all the storage tasks available under the given resource group. + /// Fetch the storage tasks run report summary for each assignment. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. + /// Optional. When specified, it can be used to query using reporting properties. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, storageTaskName, maxpagesize, filter); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StorageTasksListResult value = default; + StorageTaskReportSummary value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = StorageTasksListResult.DeserializeStorageTasksListResult(document.RootElement); + value = StorageTaskReportSummary.DeserializeStorageTaskReportSummary(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -785,28 +995,118 @@ public async Task> ListByResourceGroupNextPageA } } - /// Lists all the storage tasks available under the given resource group. + /// Fetch the storage tasks run report summary for each assignment. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. + /// Optional. When specified, it can be used to query using reporting properties. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, storageTaskName, maxpagesize, filter); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StorageTasksListResult value = default; + StorageTaskReportSummary value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = StorageTasksListResult.DeserializeStorageTasksListResult(document.RootElement); + value = StorageTaskReportSummary.DeserializeStorageTaskReportSummary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStorageTaskAssignmentListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateStorageTaskAssignmentListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> StorageTaskAssignmentListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); + + using var message = CreateStorageTaskAssignmentListNextPageRequest(nextLink, subscriptionId, resourceGroupName, storageTaskName, maxpagesize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StorageTaskAssignmentsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = StorageTaskAssignmentsListResult.DeserializeStorageTaskAssignmentsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. + /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response StorageTaskAssignmentListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); + + using var message = CreateStorageTaskAssignmentListNextPageRequest(nextLink, subscriptionId, resourceGroupName, storageTaskName, maxpagesize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StorageTaskAssignmentsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = StorageTaskAssignmentsListResult.DeserializeStorageTaskAssignmentsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskCollection.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskCollection.cs index 284d3d94470b..81ab29f812b3 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskCollection.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// StorageTasks_Create + /// StorageTask_Create /// /// /// Default Api Version @@ -79,7 +79,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string storageTaskName, StorageTaskData data, CancellationToken cancellationToken = default) + public virtual async Task CreateOrUpdateAsync(WaitUntil waitUntil, string storageTaskName, StorageTaskData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); Argument.AssertNotNull(data, nameof(data)); @@ -89,9 +89,9 @@ public virtual async Task> CreateOrUpdateAsync try { var response = await _storageTaskRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, storageTaskName, data, cancellationToken).ConfigureAwait(false); - var operation = new StorageActionsArmOperation(new StorageTaskOperationSource(Client), _storageTaskClientDiagnostics, Pipeline, _storageTaskRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, storageTaskName, data).Request, response, OperationFinalStateVia.Location); + var operation = new StorageActionsArmOperation(_storageTaskClientDiagnostics, Pipeline, _storageTaskRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, storageTaskName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -110,7 +110,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Operation Id - /// StorageTasks_Create + /// StorageTask_Create /// /// /// Default Api Version @@ -128,7 +128,7 @@ public virtual async Task> CreateOrUpdateAsync /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string storageTaskName, StorageTaskData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string storageTaskName, StorageTaskData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(storageTaskName, nameof(storageTaskName)); Argument.AssertNotNull(data, nameof(data)); @@ -138,9 +138,9 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn try { var response = _storageTaskRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, storageTaskName, data, cancellationToken); - var operation = new StorageActionsArmOperation(new StorageTaskOperationSource(Client), _storageTaskClientDiagnostics, Pipeline, _storageTaskRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, storageTaskName, data).Request, response, OperationFinalStateVia.Location); + var operation = new StorageActionsArmOperation(_storageTaskClientDiagnostics, Pipeline, _storageTaskRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, storageTaskName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); + operation.WaitForCompletionResponse(cancellationToken); return operation; } catch (Exception e) @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(string storage /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -249,7 +249,7 @@ public virtual Response Get(string storageTaskName, Cancell /// /// /// Operation Id - /// StorageTasks_ListByResourceGroup + /// StorageTask_ListByResourceGroup /// /// /// Default Api Version @@ -279,7 +279,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Operation Id - /// StorageTasks_ListByResourceGroup + /// StorageTask_ListByResourceGroup /// /// /// Default Api Version @@ -309,7 +309,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -352,7 +352,7 @@ public virtual async Task> ExistsAsync(string storageTaskName, Ca /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -395,7 +395,7 @@ public virtual Response Exists(string storageTaskName, CancellationToken c /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -440,7 +440,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskData.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskData.Serialization.cs index a03d8742ffca..535857900c7d 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskData.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskData.Serialization.cs @@ -41,7 +41,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(TaskVersion)) + { + writer.WritePropertyName("taskVersion"u8); + writer.WriteNumberValue(TaskVersion.Value); + } + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("action"u8); + writer.WriteObjectValue(Action, options); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CreationTimeInUtc)) + { + writer.WritePropertyName("creationTimeInUtc"u8); + writer.WriteStringValue(CreationTimeInUtc.Value, "O"); + } + writer.WriteEndObject(); } StorageTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -65,13 +87,18 @@ internal static StorageTaskData DeserializeStorageTaskData(JsonElement element, return null; } ManagedServiceIdentity identity = default; - StorageTaskProperties properties = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; + long? taskVersion = default; + bool enabled = default; + string description = default; + StorageTaskAction action = default; + ProvisioningState? provisioningState = default; + DateTimeOffset? creationTimeInUtc = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -82,11 +109,6 @@ internal static StorageTaskData DeserializeStorageTaskData(JsonElement element, identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); continue; } - if (property.NameEquals("properties"u8)) - { - properties = StorageTaskProperties.DeserializeStorageTaskProperties(property.Value, options); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -130,6 +152,60 @@ internal static StorageTaskData DeserializeStorageTaskData(JsonElement element, systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("taskVersion"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taskVersion = property0.Value.GetInt64(); + continue; + } + if (property0.NameEquals("enabled"u8)) + { + enabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("action"u8)) + { + action = StorageTaskAction.DeserializeStorageTaskAction(property0.Value, options); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("creationTimeInUtc"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTimeInUtc = property0.Value.GetDateTimeOffset("O"); + continue; + } + } + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -144,7 +220,12 @@ internal static StorageTaskData DeserializeStorageTaskData(JsonElement element, tags ?? new ChangeTrackingDictionary(), location, identity, - properties, + taskVersion, + enabled, + description, + action, + provisioningState, + creationTimeInUtc, serializedAdditionalRawData); } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskData.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskData.cs index f34b7d71e033..0b4ab3111b25 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskData.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskData.cs @@ -54,15 +54,20 @@ public partial class StorageTaskData : TrackedResourceData /// Initializes a new instance of . /// The location. /// The managed service identity of the resource. - /// Properties of the storage task. - /// or is null. - public StorageTaskData(AzureLocation location, ManagedServiceIdentity identity, StorageTaskProperties properties) : base(location) + /// Storage Task is enabled when set to true and disabled when set to false. + /// Text that describes the purpose of the storage task. + /// The storage task action that is executed. + /// , or is null. + public StorageTaskData(AzureLocation location, ManagedServiceIdentity identity, bool enabled, string description, StorageTaskAction action) : base(location) { Argument.AssertNotNull(identity, nameof(identity)); - Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(action, nameof(action)); Identity = identity; - Properties = properties; + Enabled = enabled; + Description = description; + Action = action; } /// Initializes a new instance of . @@ -73,12 +78,22 @@ public StorageTaskData(AzureLocation location, ManagedServiceIdentity identity, /// The tags. /// The location. /// The managed service identity of the resource. - /// Properties of the storage task. + /// Storage task version. + /// Storage Task is enabled when set to true and disabled when set to false. + /// Text that describes the purpose of the storage task. + /// The storage task action that is executed. + /// Represents the provisioning state of the storage task. + /// The creation date and time of the storage task in UTC. /// Keeps track of any properties unknown to the library. - internal StorageTaskData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, StorageTaskProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal StorageTaskData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, long? taskVersion, bool enabled, string description, StorageTaskAction action, ProvisioningState? provisioningState, DateTimeOffset? creationTimeInUtc, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; - Properties = properties; + TaskVersion = taskVersion; + Enabled = enabled; + Description = description; + Action = action; + ProvisioningState = provisioningState; + CreationTimeInUtc = creationTimeInUtc; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -89,7 +104,17 @@ internal StorageTaskData() /// The managed service identity of the resource. public ManagedServiceIdentity Identity { get; set; } - /// Properties of the storage task. - public StorageTaskProperties Properties { get; set; } + /// Storage task version. + public long? TaskVersion { get; } + /// Storage Task is enabled when set to true and disabled when set to false. + public bool Enabled { get; set; } + /// Text that describes the purpose of the storage task. + public string Description { get; set; } + /// The storage task action that is executed. + public StorageTaskAction Action { get; set; } + /// Represents the provisioning state of the storage task. + public ProvisioningState? ProvisioningState { get; } + /// The creation date and time of the storage task in UTC. + public DateTimeOffset? CreationTimeInUtc { get; } } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.cs index 75eb0394280a..e8513c54a893 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.cs @@ -40,10 +40,6 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _storageTaskClientDiagnostics; private readonly StorageTasksRestOperations _storageTaskRestClient; - private readonly ClientDiagnostics _storageTaskAssignmentClientDiagnostics; - private readonly StorageTaskAssignmentRestOperations _storageTaskAssignmentRestClient; - private readonly ClientDiagnostics _storageTasksReportClientDiagnostics; - private readonly StorageTasksReportRestOperations _storageTasksReportRestClient; private readonly StorageTaskData _data; /// Gets the resource type for the operations. @@ -71,10 +67,6 @@ internal StorageTaskResource(ArmClient client, ResourceIdentifier id) : base(cli _storageTaskClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.StorageActions", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string storageTaskApiVersion); _storageTaskRestClient = new StorageTasksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, storageTaskApiVersion); - _storageTaskAssignmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.StorageActions", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _storageTaskAssignmentRestClient = new StorageTaskAssignmentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _storageTasksReportClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.StorageActions", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _storageTasksReportRestClient = new StorageTasksReportRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -110,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -150,7 +142,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -190,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Operation Id - /// StorageTasks_Delete + /// StorageTask_Delete /// /// /// Default Api Version @@ -232,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// StorageTasks_Delete + /// StorageTask_Delete /// /// /// Default Api Version @@ -274,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// StorageTasks_Update + /// StorageTask_Update /// /// /// Default Api Version @@ -320,7 +312,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Operation Id - /// StorageTasks_Update + /// StorageTask_Update /// /// /// Default Api Version @@ -358,113 +350,129 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Sto } /// - /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. + /// Fetch the storage tasks run report summary for each assignment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/storageTaskAssignments + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/reports /// /// /// Operation Id - /// StorageTaskAssignment_List + /// StorageTasks_List /// /// /// Default Api Version /// 2023-01-01 /// + /// + /// Resource + /// + /// /// /// /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. + /// Optional. When specified, it can be used to query using reporting properties. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetStorageTaskAssignmentsAsync(int? maxpagesize = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _storageTaskAssignmentRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _storageTaskAssignmentRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _storageTaskAssignmentClientDiagnostics, Pipeline, "StorageTaskResource.GetStorageTaskAssignments", "value", "nextLink", maxpagesize, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _storageTaskRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _storageTaskRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => StorageTaskReportInstance.DeserializeStorageTaskReportInstance(e), _storageTaskClientDiagnostics, Pipeline, "StorageTaskResource.GetAll", "value", "nextLink", maxpagesize, cancellationToken); } /// - /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. + /// Fetch the storage tasks run report summary for each assignment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/storageTaskAssignments + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/reports /// /// /// Operation Id - /// StorageTaskAssignment_List + /// StorageTasks_List /// /// /// Default Api Version /// 2023-01-01 /// + /// + /// Resource + /// + /// /// /// /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. + /// Optional. When specified, it can be used to query using reporting properties. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetStorageTaskAssignments(int? maxpagesize = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _storageTaskAssignmentRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _storageTaskAssignmentRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _storageTaskAssignmentClientDiagnostics, Pipeline, "StorageTaskResource.GetStorageTaskAssignments", "value", "nextLink", maxpagesize, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _storageTaskRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _storageTaskRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => StorageTaskReportInstance.DeserializeStorageTaskReportInstance(e), _storageTaskClientDiagnostics, Pipeline, "StorageTaskResource.GetAll", "value", "nextLink", maxpagesize, cancellationToken); } /// - /// Fetch the storage tasks run report summary for each assignment. + /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/reports + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/storageTaskAssignments /// /// /// Operation Id - /// StorageTasksReport_List + /// StorageTasks_StorageTaskAssignmentList /// /// /// Default Api Version /// 2023-01-01 /// + /// + /// Resource + /// + /// /// /// /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. - /// Optional. When specified, it can be used to query using reporting properties. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetStorageTasksReportsAsync(int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable StorageTaskAssignmentListAsync(int? maxpagesize = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _storageTasksReportRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, filter); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _storageTasksReportRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, filter); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => StorageTaskReportInstance.DeserializeStorageTaskReportInstance(e), _storageTasksReportClientDiagnostics, Pipeline, "StorageTaskResource.GetStorageTasksReports", "value", "nextLink", maxpagesize, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _storageTaskRestClient.CreateStorageTaskAssignmentListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _storageTaskRestClient.CreateStorageTaskAssignmentListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _storageTaskClientDiagnostics, Pipeline, "StorageTaskResource.StorageTaskAssignmentList", "value", "nextLink", maxpagesize, cancellationToken); } /// - /// Fetch the storage tasks run report summary for each assignment. + /// Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/reports + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/storageTaskAssignments /// /// /// Operation Id - /// StorageTasksReport_List + /// StorageTasks_StorageTaskAssignmentList /// /// /// Default Api Version /// 2023-01-01 /// + /// + /// Resource + /// + /// /// /// /// Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. - /// Optional. When specified, it can be used to query using reporting properties. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetStorageTasksReports(int? maxpagesize = null, string filter = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable StorageTaskAssignmentList(int? maxpagesize = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _storageTasksReportRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, filter); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _storageTasksReportRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, filter); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => StorageTaskReportInstance.DeserializeStorageTaskReportInstance(e), _storageTasksReportClientDiagnostics, Pipeline, "StorageTaskResource.GetStorageTasksReports", "value", "nextLink", maxpagesize, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _storageTaskRestClient.CreateStorageTaskAssignmentListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _storageTaskRestClient.CreateStorageTaskAssignmentListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _storageTaskClientDiagnostics, Pipeline, "StorageTaskResource.StorageTaskAssignmentList", "value", "nextLink", maxpagesize, cancellationToken); } /// @@ -476,7 +484,7 @@ public virtual Pageable GetStorageTasksReports(int? m /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -538,7 +546,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -600,7 +608,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -657,7 +665,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -714,7 +722,7 @@ public virtual Response SetTags(IDictionary /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version @@ -774,7 +782,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Operation Id - /// StorageTasks_Get + /// StorageTask_Get /// /// /// Default Api Version diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/autorest.md b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/autorest.md deleted file mode 100644 index 8b43b578109c..000000000000 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/autorest.md +++ /dev/null @@ -1,68 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml -azure-arm: true -csharp: true -library-name: StorageActions -namespace: Azure.ResourceManager.StorageActions -require: https://github.com/Azure/azure-rest-api-specs/blob/c3a3fd40087fde8e462a210bc086f26877aa1a78/specification/storageactions/resource-manager/readme.md -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -#mgmt-debug: -# show-serialized-names: true - -rename-mapping: - StorageTaskOperation: StorageTaskOperationInfo - ElseCondition: StorageTaskElseCondition - IfCondition: StorageTaskIfCondition - OnFailure: OnFailureAction - OnSuccess: OnSuccessAction - ProvisioningState: StorageTaskProvisioningState - RunResult: StorageTaskRunResult - RunStatusEnum: StorageTaskRunStatus - StorageTaskProperties.enabled: IsEnabled - -override-operation-name: - StorageTasks_PreviewActions: PreviewActions - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - -``` diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/tsp-location.yaml b/sdk/storageactions/Azure.ResourceManager.StorageActions/tsp-location.yaml new file mode 100644 index 000000000000..b1c6551ec97e --- /dev/null +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/storageactions/StorageAction.Management +commit: b3cda8e13ff3d36e63ea936afa4b6d7fa2cd731f +repo: Azure/azure-rest-api-specs +additionalDirectories: