diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md b/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md index 232aa9265464..669c6feb119e 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md @@ -1,9 +1,14 @@ # Release History -## 1.0.0 (2025-10-10) +## 1.0.0 (2025-10-13) First GA release of the Durable Task Scheduler management SDK +### Breaking Changes + +- All classes have dropped the `DurableTask` name prefix. +- `DurableTaskHub` classes have been renamed to `SchedulerTaskHub` + ### Other Changes - Now uses API version `2025-11-01` for all resource manager calls. diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs index d7aad97c764c..acb254710ab2 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs @@ -8,150 +8,150 @@ internal AzureResourceManagerDurableTaskContext() { } } public static partial class DurableTaskExtensions { - public static Azure.ResourceManager.DurableTask.DurableTaskHubResource GetDurableTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetDurableTaskScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetDurableTaskSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerTaskHubResource GetSchedulerTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } - public partial class DurableTaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class RetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - protected DurableTaskHubCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class DurableTaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DurableTaskHubData() { } - public Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties Properties { get { throw null; } set { } } + public RetentionPolicyData() { } + public Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.RetentionPolicyData 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 DurableTaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected DurableTaskHubResource() { } - public virtual Azure.ResourceManager.DurableTask.DurableTaskHubData Data { get { throw null; } } + protected RetentionPolicyResource() { } + public virtual Azure.ResourceManager.DurableTask.RetentionPolicyData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskHubData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskHubData data, 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.RetentionPolicyData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class DurableTaskRetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - public DurableTaskRetentionPolicyData() { } - public Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties Properties { get { throw null; } set { } } + protected SchedulerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class SchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DurableTask.Models.SchedulerProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.SchedulerData 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 DurableTaskRetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected DurableTaskRetentionPolicyResource() { } - public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData Data { get { throw null; } } + protected SchedulerResource() { } + public virtual Azure.ResourceManager.DurableTask.SchedulerData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskRetentionPolicyData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicy() { throw null; } + public virtual Azure.Response GetSchedulerTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSchedulerTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubCollection GetSchedulerTaskHubs() { 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; } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.SchedulerData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class DurableTaskSchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class SchedulerTaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected DurableTaskSchedulerCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.DurableTaskSchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.DurableTaskSchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + protected SchedulerTaskHubCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class DurableTaskSchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerTaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskSchedulerData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties Properties { get { throw null; } set { } } + public SchedulerTaskHubData() { } + public Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.SchedulerTaskHubData 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 DurableTaskSchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerTaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected DurableTaskSchedulerResource() { } - public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerData Data { get { throw null; } } + protected SchedulerTaskHubResource() { } + public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { throw null; } 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDurableTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDurableTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DurableTask.DurableTaskHubCollection GetDurableTaskHubs() { throw null; } - public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicy() { 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; } - Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskSchedulerData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch patch, 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.SchedulerTaskHubData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.DurableTask.Mocking @@ -159,72 +159,37 @@ namespace Azure.ResourceManager.DurableTask.Mocking public partial class MockableDurableTaskArmClient : Azure.ResourceManager.ArmResource { protected MockableDurableTaskArmClient() { } - public virtual Azure.ResourceManager.DurableTask.DurableTaskHubResource GetDurableTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubResource GetSchedulerTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableDurableTaskResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableDurableTaskResourceGroupResource() { } - public virtual Azure.Response GetDurableTaskScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers() { throw null; } + public virtual Azure.Response GetScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers() { throw null; } } public partial class MockableDurableTaskSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableDurableTaskSubscriptionResource() { } - public virtual Azure.Pageable GetDurableTaskSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDurableTaskSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.DurableTask.Models { public static partial class ArmDurableTaskModelFactory { - public static Azure.ResourceManager.DurableTask.DurableTaskHubData DurableTaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties DurableTaskHubProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Uri dashboardUri = null) { throw null; } - public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData DurableTaskRetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties DurableTaskRetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } - public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerData DurableTaskSchedulerData(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.DurableTask.Models.DurableTaskSchedulerProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties DurableTaskSchedulerPatchProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate sku = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties DurableTaskSchedulerProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku DurableTaskSchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate DurableTaskSchedulerSkuUpdate(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName?), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } - } - public partial class DurableTaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DurableTaskHubProperties() { } - public System.Uri DashboardUri { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskHubProperties 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 DurableTaskProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DurableTaskProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Provisioning { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState 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.DurableTask.Models.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } - public override string ToString() { throw null; } + public static Azure.ResourceManager.DurableTask.RetentionPolicyData RetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties RetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerData SchedulerData(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.DurableTask.Models.SchedulerProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties SchedulerPatchProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerProperties SchedulerProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerSku SchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate SchedulerSkuUpdate(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName?), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerTaskHubData SchedulerTaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties SchedulerTaskHubProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Uri dashboardUri = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DurableTaskPurgeableOrchestrationState : System.IEquatable @@ -264,95 +229,105 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState right) { throw null; } public override string ToString() { throw null; } } - public partial class DurableTaskRetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable { - public DurableTaskRetentionPolicyDetails(int retentionPeriodInDays) { } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.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.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RetentionPolicyDetails(int retentionPeriodInDays) { } public Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState? OrchestrationState { get { throw null; } set { } } public int RetentionPeriodInDays { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.RetentionPolicyDetails 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 DurableTaskRetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskRetentionPolicyProperties() { } - public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } - public System.Collections.Generic.IList RetentionPolicies { get { throw null; } } + public RetentionPolicyProperties() { } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList RetentionPolicies { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.RetentionPolicyProperties 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 DurableTaskSchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskSchedulerPatch() { } - public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties Properties { get { throw null; } set { } } + public SchedulerPatch() { } + public Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskSchedulerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.SchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerPatch 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 DurableTaskSchedulerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskSchedulerPatchProperties() { } + public SchedulerPatchProperties() { } public string Endpoint { get { throw null; } } public System.Collections.Generic.IList IPAllowlist { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate Sku { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate Sku { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerPatchProperties 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 DurableTaskSchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskSchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku) { } + public SchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku) { } public string Endpoint { get { throw null; } } public System.Collections.Generic.IList IPAllowlist { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku Sku { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSku Sku { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskSchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerProperties 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 DurableTaskSchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskSchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name) { } + public SchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name) { } public int? Capacity { get { throw null; } set { } } public Azure.ResourceManager.DurableTask.Models.SchedulerSkuName Name { get { throw null; } set { } } public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskSchedulerSku 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 DurableTaskSchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DurableTaskSchedulerSkuUpdate() { } - public int? Capacity { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? Name { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerSku 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 SchedulerSkuName : System.IEquatable @@ -372,4 +347,29 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName left, Azure.ResourceManager.DurableTask.Models.SchedulerSkuName right) { throw null; } public override string ToString() { throw null; } } + public partial class SchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerSkuUpdate() { } + public int? Capacity { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerSkuUpdate 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 SchedulerTaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerTaskHubProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerTaskHubProperties 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; } + } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs index d7aad97c764c..acb254710ab2 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs @@ -8,150 +8,150 @@ internal AzureResourceManagerDurableTaskContext() { } } public static partial class DurableTaskExtensions { - public static Azure.ResourceManager.DurableTask.DurableTaskHubResource GetDurableTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetDurableTaskScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetDurableTaskSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerTaskHubResource GetSchedulerTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } - public partial class DurableTaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class RetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - protected DurableTaskHubCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class DurableTaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DurableTaskHubData() { } - public Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties Properties { get { throw null; } set { } } + public RetentionPolicyData() { } + public Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.RetentionPolicyData 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 DurableTaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected DurableTaskHubResource() { } - public virtual Azure.ResourceManager.DurableTask.DurableTaskHubData Data { get { throw null; } } + protected RetentionPolicyResource() { } + public virtual Azure.ResourceManager.DurableTask.RetentionPolicyData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskHubData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskHubData data, 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.RetentionPolicyData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class DurableTaskRetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - public DurableTaskRetentionPolicyData() { } - public Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties Properties { get { throw null; } set { } } + protected SchedulerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class SchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DurableTask.Models.SchedulerProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.SchedulerData 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 DurableTaskRetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected DurableTaskRetentionPolicyResource() { } - public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData Data { get { throw null; } } + protected SchedulerResource() { } + public virtual Azure.ResourceManager.DurableTask.SchedulerData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskRetentionPolicyData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicy() { throw null; } + public virtual Azure.Response GetSchedulerTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSchedulerTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubCollection GetSchedulerTaskHubs() { 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; } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.SchedulerData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class DurableTaskSchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class SchedulerTaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected DurableTaskSchedulerCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.DurableTaskSchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.DurableTaskSchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + protected SchedulerTaskHubCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class DurableTaskSchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerTaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskSchedulerData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties Properties { get { throw null; } set { } } + public SchedulerTaskHubData() { } + public Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.SchedulerTaskHubData 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 DurableTaskSchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerTaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected DurableTaskSchedulerResource() { } - public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerData Data { get { throw null; } } + protected SchedulerTaskHubResource() { } + public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { throw null; } 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDurableTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDurableTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DurableTask.DurableTaskHubCollection GetDurableTaskHubs() { throw null; } - public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicy() { 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; } - Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.DurableTaskSchedulerData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch patch, 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 System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.SchedulerTaskHubData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.DurableTask.Mocking @@ -159,72 +159,37 @@ namespace Azure.ResourceManager.DurableTask.Mocking public partial class MockableDurableTaskArmClient : Azure.ResourceManager.ArmResource { protected MockableDurableTaskArmClient() { } - public virtual Azure.ResourceManager.DurableTask.DurableTaskHubResource GetDurableTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubResource GetSchedulerTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableDurableTaskResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableDurableTaskResourceGroupResource() { } - public virtual Azure.Response GetDurableTaskScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers() { throw null; } + public virtual Azure.Response GetScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers() { throw null; } } public partial class MockableDurableTaskSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableDurableTaskSubscriptionResource() { } - public virtual Azure.Pageable GetDurableTaskSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDurableTaskSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.DurableTask.Models { public static partial class ArmDurableTaskModelFactory { - public static Azure.ResourceManager.DurableTask.DurableTaskHubData DurableTaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties DurableTaskHubProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Uri dashboardUri = null) { throw null; } - public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData DurableTaskRetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties DurableTaskRetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } - public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerData DurableTaskSchedulerData(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.DurableTask.Models.DurableTaskSchedulerProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties DurableTaskSchedulerPatchProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate sku = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties DurableTaskSchedulerProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku DurableTaskSchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate DurableTaskSchedulerSkuUpdate(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName?), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } - } - public partial class DurableTaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DurableTaskHubProperties() { } - public System.Uri DashboardUri { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskHubProperties 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 DurableTaskProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DurableTaskProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Provisioning { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState 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.DurableTask.Models.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } - public override string ToString() { throw null; } + public static Azure.ResourceManager.DurableTask.RetentionPolicyData RetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties RetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerData SchedulerData(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.DurableTask.Models.SchedulerProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties SchedulerPatchProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerProperties SchedulerProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerSku SchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate SchedulerSkuUpdate(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName?), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerTaskHubData SchedulerTaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties SchedulerTaskHubProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Uri dashboardUri = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DurableTaskPurgeableOrchestrationState : System.IEquatable @@ -264,95 +229,105 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState right) { throw null; } public override string ToString() { throw null; } } - public partial class DurableTaskRetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable { - public DurableTaskRetentionPolicyDetails(int retentionPeriodInDays) { } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.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.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RetentionPolicyDetails(int retentionPeriodInDays) { } public Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState? OrchestrationState { get { throw null; } set { } } public int RetentionPeriodInDays { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.RetentionPolicyDetails 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 DurableTaskRetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskRetentionPolicyProperties() { } - public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } - public System.Collections.Generic.IList RetentionPolicies { get { throw null; } } + public RetentionPolicyProperties() { } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList RetentionPolicies { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.RetentionPolicyProperties 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 DurableTaskSchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskSchedulerPatch() { } - public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties Properties { get { throw null; } set { } } + public SchedulerPatch() { } + public Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskSchedulerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.SchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerPatch 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 DurableTaskSchedulerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskSchedulerPatchProperties() { } + public SchedulerPatchProperties() { } public string Endpoint { get { throw null; } } public System.Collections.Generic.IList IPAllowlist { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate Sku { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate Sku { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerPatchProperties 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 DurableTaskSchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskSchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku) { } + public SchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku) { } public string Endpoint { get { throw null; } } public System.Collections.Generic.IList IPAllowlist { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku Sku { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSku Sku { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskSchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerProperties 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 DurableTaskSchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DurableTaskSchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name) { } + public SchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name) { } public int? Capacity { get { throw null; } set { } } public Azure.ResourceManager.DurableTask.Models.SchedulerSkuName Name { get { throw null; } set { } } public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskSchedulerSku 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 DurableTaskSchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DurableTaskSchedulerSkuUpdate() { } - public int? Capacity { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? Name { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerSku 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 SchedulerSkuName : System.IEquatable @@ -372,4 +347,29 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName left, Azure.ResourceManager.DurableTask.Models.SchedulerSkuName right) { throw null; } public override string ToString() { throw null; } } + public partial class SchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerSkuUpdate() { } + public int? Capacity { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerSkuUpdate 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 SchedulerTaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerTaskHubProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DurableTask.Models.SchedulerTaskHubProperties 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; } + } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs index 1d53ce110cf3..63c14280a7af 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.DurableTask.Models /// Model factory for models. public static partial class ArmDurableTaskModelFactory { - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -24,12 +24,12 @@ public static partial class ArmDurableTaskModelFactory /// The tags. /// The location. /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static DurableTaskSchedulerData DurableTaskSchedulerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DurableTaskSchedulerProperties properties = null) + /// A new instance for mocking. + public static SchedulerData SchedulerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SchedulerProperties properties = null) { tags ??= new Dictionary(); - return new DurableTaskSchedulerData( + return new SchedulerData( id, name, resourceType, @@ -40,62 +40,62 @@ public static DurableTaskSchedulerData DurableTaskSchedulerData(ResourceIdentifi serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The status of the last operation. /// URL of the durable task scheduler. /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. /// SKU of the durable task scheduler. - /// A new instance for mocking. - public static DurableTaskSchedulerProperties DurableTaskSchedulerProperties(DurableTaskProvisioningState? provisioningState = null, string endpoint = null, IEnumerable ipAllowlist = null, DurableTaskSchedulerSku sku = null) + /// A new instance for mocking. + public static SchedulerProperties SchedulerProperties(ProvisioningState? provisioningState = null, string endpoint = null, IEnumerable ipAllowlist = null, SchedulerSku sku = null) { ipAllowlist ??= new List(); - return new DurableTaskSchedulerProperties(provisioningState, endpoint, ipAllowlist?.ToList(), sku, serializedAdditionalRawData: null); + return new SchedulerProperties(provisioningState, endpoint, ipAllowlist?.ToList(), sku, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the SKU. /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. /// Indicates whether the current SKU configuration is zone redundant. - /// A new instance for mocking. - public static DurableTaskSchedulerSku DurableTaskSchedulerSku(SchedulerSkuName name = default, int? capacity = null, DurableTaskResourceRedundancyState? redundancyState = null) + /// A new instance for mocking. + public static SchedulerSku SchedulerSku(SchedulerSkuName name = default, int? capacity = null, DurableTaskResourceRedundancyState? redundancyState = null) { - return new DurableTaskSchedulerSku(name, capacity, redundancyState, serializedAdditionalRawData: null); + return new SchedulerSku(name, capacity, redundancyState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The status of the last operation. /// URL of the durable task scheduler. /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. /// SKU of the durable task scheduler. - /// A new instance for mocking. - public static DurableTaskSchedulerPatchProperties DurableTaskSchedulerPatchProperties(DurableTaskProvisioningState? provisioningState = null, string endpoint = null, IEnumerable ipAllowlist = null, DurableTaskSchedulerSkuUpdate sku = null) + /// A new instance for mocking. + public static SchedulerPatchProperties SchedulerPatchProperties(ProvisioningState? provisioningState = null, string endpoint = null, IEnumerable ipAllowlist = null, SchedulerSkuUpdate sku = null) { ipAllowlist ??= new List(); - return new DurableTaskSchedulerPatchProperties(provisioningState, endpoint, ipAllowlist?.ToList(), sku, serializedAdditionalRawData: null); + return new SchedulerPatchProperties(provisioningState, endpoint, ipAllowlist?.ToList(), sku, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the SKU. /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. /// Indicates whether the current SKU configuration is zone redundant. - /// A new instance for mocking. - public static DurableTaskSchedulerSkuUpdate DurableTaskSchedulerSkuUpdate(SchedulerSkuName? name = null, int? capacity = null, DurableTaskResourceRedundancyState? redundancyState = null) + /// A new instance for mocking. + public static SchedulerSkuUpdate SchedulerSkuUpdate(SchedulerSkuName? name = null, int? capacity = null, DurableTaskResourceRedundancyState? redundancyState = null) { - return new DurableTaskSchedulerSkuUpdate(name, capacity, redundancyState, serializedAdditionalRawData: null); + return new SchedulerSkuUpdate(name, capacity, redundancyState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static DurableTaskHubData DurableTaskHubData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DurableTaskHubProperties properties = null) + /// A new instance for mocking. + public static SchedulerTaskHubData SchedulerTaskHubData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SchedulerTaskHubProperties properties = null) { - return new DurableTaskHubData( + return new SchedulerTaskHubData( id, name, resourceType, @@ -104,25 +104,25 @@ public static DurableTaskHubData DurableTaskHubData(ResourceIdentifier id = null serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The status of the last operation. /// URL of the durable task scheduler dashboard. - /// A new instance for mocking. - public static DurableTaskHubProperties DurableTaskHubProperties(DurableTaskProvisioningState? provisioningState = null, Uri dashboardUri = null) + /// A new instance for mocking. + public static SchedulerTaskHubProperties SchedulerTaskHubProperties(ProvisioningState? provisioningState = null, Uri dashboardUri = null) { - return new DurableTaskHubProperties(provisioningState, dashboardUri, serializedAdditionalRawData: null); + return new SchedulerTaskHubProperties(provisioningState, dashboardUri, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static DurableTaskRetentionPolicyData DurableTaskRetentionPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DurableTaskRetentionPolicyProperties properties = null) + /// A new instance for mocking. + public static RetentionPolicyData RetentionPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RetentionPolicyProperties properties = null) { - return new DurableTaskRetentionPolicyData( + return new RetentionPolicyData( id, name, resourceType, @@ -131,15 +131,15 @@ public static DurableTaskRetentionPolicyData DurableTaskRetentionPolicyData(Reso serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The status of the last operation. /// The orchestration retention policies. - /// A new instance for mocking. - public static DurableTaskRetentionPolicyProperties DurableTaskRetentionPolicyProperties(DurableTaskProvisioningState? provisioningState = null, IEnumerable retentionPolicies = null) + /// A new instance for mocking. + public static RetentionPolicyProperties RetentionPolicyProperties(ProvisioningState? provisioningState = null, IEnumerable retentionPolicies = null) { - retentionPolicies ??= new List(); + retentionPolicies ??= new List(); - return new DurableTaskRetentionPolicyProperties(provisioningState, retentionPolicies?.ToList(), serializedAdditionalRawData: null); + return new RetentionPolicyProperties(provisioningState, retentionPolicies?.ToList(), serializedAdditionalRawData: null); } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs deleted file mode 100644 index edac77bb9cf7..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.DurableTask -{ - public partial class DurableTaskHubResource : IJsonModel - { - private static DurableTaskHubData s_dataDeserializationInstance; - private static DurableTaskHubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - DurableTaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); - - DurableTaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs deleted file mode 100644 index fcbcb0d3d77b..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.DurableTask -{ - public partial class DurableTaskRetentionPolicyResource : IJsonModel - { - private static DurableTaskRetentionPolicyData s_dataDeserializationInstance; - private static DurableTaskRetentionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - DurableTaskRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); - - DurableTaskRetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs deleted file mode 100644 index 607be6ddee64..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.DurableTask -{ - public partial class DurableTaskSchedulerResource : IJsonModel - { - private static DurableTaskSchedulerData s_dataDeserializationInstance; - private static DurableTaskSchedulerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - DurableTaskSchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); - - DurableTaskSchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs index 5b8c887f2773..e7063af1920f 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs @@ -33,77 +33,77 @@ private static MockableDurableTaskSubscriptionResource GetMockableDurableTaskSub } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static DurableTaskSchedulerResource GetDurableTaskSchedulerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SchedulerResource GetSchedulerResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDurableTaskArmClient(client).GetDurableTaskSchedulerResource(id); + return GetMockableDurableTaskArmClient(client).GetSchedulerResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static DurableTaskHubResource GetDurableTaskHubResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SchedulerTaskHubResource GetSchedulerTaskHubResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDurableTaskArmClient(client).GetDurableTaskHubResource(id); + return GetMockableDurableTaskArmClient(client).GetSchedulerTaskHubResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static RetentionPolicyResource GetRetentionPolicyResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDurableTaskArmClient(client).GetDurableTaskRetentionPolicyResource(id); + return GetMockableDurableTaskArmClient(client).GetRetentionPolicyResource(id); } /// - /// Gets a collection of DurableTaskSchedulerResources in the ResourceGroupResource. + /// Gets a collection of SchedulerResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// is null. - /// An object representing collection of DurableTaskSchedulerResources and their operations over a DurableTaskSchedulerResource. - public static DurableTaskSchedulerCollection GetDurableTaskSchedulers(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of SchedulerResources and their operations over a SchedulerResource. + public static SchedulerCollection GetSchedulers(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetDurableTaskSchedulers(); + return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetSchedulers(); } /// @@ -123,12 +123,12 @@ public static DurableTaskSchedulerCollection GetDurableTaskSchedulers(this Resou /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -137,11 +137,11 @@ public static DurableTaskSchedulerCollection GetDurableTaskSchedulers(this Resou /// or is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetDurableTaskSchedulerAsync(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) + public static async Task> GetSchedulerAsync(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetDurableTaskSchedulerAsync(schedulerName, cancellationToken).ConfigureAwait(false); + return await GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetSchedulerAsync(schedulerName, cancellationToken).ConfigureAwait(false); } /// @@ -161,12 +161,12 @@ public static async Task> GetDurableTaskS /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -175,11 +175,11 @@ public static async Task> GetDurableTaskS /// or is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetDurableTaskScheduler(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) + public static Response GetScheduler(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetDurableTaskScheduler(schedulerName, cancellationToken); + return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetScheduler(schedulerName, cancellationToken); } /// @@ -199,23 +199,23 @@ public static Response GetDurableTaskScheduler(thi /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDurableTaskSchedulersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSchedulersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetDurableTaskSchedulersAsync(cancellationToken); + return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetSchedulersAsync(cancellationToken); } /// @@ -235,23 +235,23 @@ public static AsyncPageable GetDurableTaskSchedule /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDurableTaskSchedulers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSchedulers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetDurableTaskSchedulers(cancellationToken); + return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetSchedulers(cancellationToken); } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs index ed805b0a46bf..316171154272 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs @@ -35,39 +35,39 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual DurableTaskSchedulerResource GetDurableTaskSchedulerResource(ResourceIdentifier id) + /// Returns a object. + public virtual SchedulerResource GetSchedulerResource(ResourceIdentifier id) { - DurableTaskSchedulerResource.ValidateResourceId(id); - return new DurableTaskSchedulerResource(Client, id); + SchedulerResource.ValidateResourceId(id); + return new SchedulerResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual DurableTaskHubResource GetDurableTaskHubResource(ResourceIdentifier id) + /// Returns a object. + public virtual SchedulerTaskHubResource GetSchedulerTaskHubResource(ResourceIdentifier id) { - DurableTaskHubResource.ValidateResourceId(id); - return new DurableTaskHubResource(Client, id); + SchedulerTaskHubResource.ValidateResourceId(id); + return new SchedulerTaskHubResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(ResourceIdentifier id) + /// Returns a object. + public virtual RetentionPolicyResource GetRetentionPolicyResource(ResourceIdentifier id) { - DurableTaskRetentionPolicyResource.ValidateResourceId(id); - return new DurableTaskRetentionPolicyResource(Client, id); + RetentionPolicyResource.ValidateResourceId(id); + return new RetentionPolicyResource(Client, id); } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs index 5fbc5e167a7d..ffe0d4838367 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs @@ -33,11 +33,11 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of DurableTaskSchedulerResources in the ResourceGroupResource. - /// An object representing collection of DurableTaskSchedulerResources and their operations over a DurableTaskSchedulerResource. - public virtual DurableTaskSchedulerCollection GetDurableTaskSchedulers() + /// Gets a collection of SchedulerResources in the ResourceGroupResource. + /// An object representing collection of SchedulerResources and their operations over a SchedulerResource. + public virtual SchedulerCollection GetSchedulers() { - return GetCachedClient(client => new DurableTaskSchedulerCollection(client, Id)); + return GetCachedClient(client => new SchedulerCollection(client, Id)); } /// @@ -57,7 +57,7 @@ public virtual DurableTaskSchedulerCollection GetDurableTaskSchedulers() /// /// /// Resource - /// + /// /// /// /// @@ -66,9 +66,9 @@ public virtual DurableTaskSchedulerCollection GetDurableTaskSchedulers() /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDurableTaskSchedulerAsync(string schedulerName, CancellationToken cancellationToken = default) + public virtual async Task> GetSchedulerAsync(string schedulerName, CancellationToken cancellationToken = default) { - return await GetDurableTaskSchedulers().GetAsync(schedulerName, cancellationToken).ConfigureAwait(false); + return await GetSchedulers().GetAsync(schedulerName, cancellationToken).ConfigureAwait(false); } /// @@ -88,7 +88,7 @@ public virtual async Task> GetDurableTask /// /// /// Resource - /// + /// /// /// /// @@ -97,9 +97,9 @@ public virtual async Task> GetDurableTask /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDurableTaskScheduler(string schedulerName, CancellationToken cancellationToken = default) + public virtual Response GetScheduler(string schedulerName, CancellationToken cancellationToken = default) { - return GetDurableTaskSchedulers().Get(schedulerName, cancellationToken); + return GetSchedulers().Get(schedulerName, cancellationToken); } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs index 1678602bae50..1ca9d2309320 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs @@ -15,8 +15,8 @@ namespace Azure.ResourceManager.DurableTask.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableDurableTaskSubscriptionResource : ArmResource { - private ClientDiagnostics _durableTaskSchedulerSchedulersClientDiagnostics; - private SchedulersRestOperations _durableTaskSchedulerSchedulersRestClient; + private ClientDiagnostics _schedulerClientDiagnostics; + private SchedulersRestOperations _schedulerRestClient; /// Initializes a new instance of the class for mocking. protected MockableDurableTaskSubscriptionResource() @@ -30,8 +30,8 @@ internal MockableDurableTaskSubscriptionResource(ArmClient client, ResourceIdent { } - private ClientDiagnostics DurableTaskSchedulerSchedulersClientDiagnostics => _durableTaskSchedulerSchedulersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DurableTask", DurableTaskSchedulerResource.ResourceType.Namespace, Diagnostics); - private SchedulersRestOperations DurableTaskSchedulerSchedulersRestClient => _durableTaskSchedulerSchedulersRestClient ??= new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DurableTaskSchedulerResource.ResourceType)); + private ClientDiagnostics SchedulerClientDiagnostics => _schedulerClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DurableTask", SchedulerResource.ResourceType.Namespace, Diagnostics); + private SchedulersRestOperations SchedulerRestClient => _schedulerRestClient ??= new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SchedulerResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -56,17 +56,17 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDurableTaskSchedulersAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSchedulersAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DurableTaskSchedulerSchedulersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DurableTaskSchedulerSchedulersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DurableTaskSchedulerResource(Client, DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(e)), DurableTaskSchedulerSchedulersClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetDurableTaskSchedulers", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => SchedulerRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SchedulerRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), SchedulerClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetSchedulers", "value", "nextLink", cancellationToken); } /// @@ -86,17 +86,17 @@ public virtual AsyncPageable GetDurableTaskSchedul /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDurableTaskSchedulers(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSchedulers(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DurableTaskSchedulerSchedulersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DurableTaskSchedulerSchedulersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DurableTaskSchedulerResource(Client, DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(e)), DurableTaskSchedulerSchedulersClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetDurableTaskSchedulers", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => SchedulerRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SchedulerRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), SchedulerClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetSchedulers", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskHubOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskHubOperationSource.cs deleted file mode 100644 index 35941e73c799..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskHubOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask -{ - internal class DurableTaskHubOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal DurableTaskHubOperationSource(ArmClient client) - { - _client = client; - } - - DurableTaskHubResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return new DurableTaskHubResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return await Task.FromResult(new DurableTaskHubResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskRetentionPolicyOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskRetentionPolicyOperationSource.cs deleted file mode 100644 index f65c086c97ec..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskRetentionPolicyOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask -{ - internal class DurableTaskRetentionPolicyOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal DurableTaskRetentionPolicyOperationSource(ArmClient client) - { - _client = client; - } - - DurableTaskRetentionPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return new DurableTaskRetentionPolicyResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return await Task.FromResult(new DurableTaskRetentionPolicyResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskSchedulerOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskSchedulerOperationSource.cs deleted file mode 100644 index dfc20e33f2d5..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskSchedulerOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask -{ - internal class DurableTaskSchedulerOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal DurableTaskSchedulerOperationSource(ArmClient client) - { - _client = client; - } - - DurableTaskSchedulerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return new DurableTaskSchedulerResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return await Task.FromResult(new DurableTaskSchedulerResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/RetentionPolicyOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/RetentionPolicyOperationSource.cs new file mode 100644 index 000000000000..a64f6c90cf32 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/RetentionPolicyOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask +{ + internal class RetentionPolicyOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal RetentionPolicyOperationSource(ArmClient client) + { + _client = client; + } + + RetentionPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); + return new RetentionPolicyResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); + return await Task.FromResult(new RetentionPolicyResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs new file mode 100644 index 000000000000..2f0bd9c8aca9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask +{ + internal class SchedulerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SchedulerOperationSource(ArmClient client) + { + _client = client; + } + + SchedulerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); + return new SchedulerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); + return await Task.FromResult(new SchedulerResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerTaskHubOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerTaskHubOperationSource.cs new file mode 100644 index 000000000000..1acd73ebcc93 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerTaskHubOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask +{ + internal class SchedulerTaskHubOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SchedulerTaskHubOperationSource(ArmClient client) + { + _client = client; + } + + SchedulerTaskHubResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); + return new SchedulerTaskHubResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); + return await Task.FromResult(new SchedulerTaskHubResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/AzureResourceManagerDurableTaskContext.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/AzureResourceManagerDurableTaskContext.cs index 4a5cfc1190c0..b075c519ae09 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/AzureResourceManagerDurableTaskContext.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/AzureResourceManagerDurableTaskContext.cs @@ -15,23 +15,23 @@ namespace Azure.ResourceManager.DurableTask /// Context class which will be filled in by the System.ClientModel.SourceGeneration. /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' /// - [ModelReaderWriterBuildable(typeof(DurableTaskHubData))] - [ModelReaderWriterBuildable(typeof(DurableTaskHubProperties))] - [ModelReaderWriterBuildable(typeof(DurableTaskHubResource))] - [ModelReaderWriterBuildable(typeof(DurableTaskRetentionPolicyData))] - [ModelReaderWriterBuildable(typeof(DurableTaskRetentionPolicyDetails))] - [ModelReaderWriterBuildable(typeof(DurableTaskRetentionPolicyProperties))] - [ModelReaderWriterBuildable(typeof(DurableTaskRetentionPolicyResource))] - [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerData))] - [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerPatch))] - [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerPatchProperties))] - [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerProperties))] - [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerResource))] - [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerSku))] - [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerSkuUpdate))] [ModelReaderWriterBuildable(typeof(ResponseError))] + [ModelReaderWriterBuildable(typeof(RetentionPolicyData))] + [ModelReaderWriterBuildable(typeof(RetentionPolicyDetails))] [ModelReaderWriterBuildable(typeof(RetentionPolicyListResult))] + [ModelReaderWriterBuildable(typeof(RetentionPolicyProperties))] + [ModelReaderWriterBuildable(typeof(RetentionPolicyResource))] + [ModelReaderWriterBuildable(typeof(SchedulerData))] [ModelReaderWriterBuildable(typeof(SchedulerListResult))] + [ModelReaderWriterBuildable(typeof(SchedulerPatch))] + [ModelReaderWriterBuildable(typeof(SchedulerPatchProperties))] + [ModelReaderWriterBuildable(typeof(SchedulerProperties))] + [ModelReaderWriterBuildable(typeof(SchedulerResource))] + [ModelReaderWriterBuildable(typeof(SchedulerSku))] + [ModelReaderWriterBuildable(typeof(SchedulerSkuUpdate))] + [ModelReaderWriterBuildable(typeof(SchedulerTaskHubData))] + [ModelReaderWriterBuildable(typeof(SchedulerTaskHubProperties))] + [ModelReaderWriterBuildable(typeof(SchedulerTaskHubResource))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(TaskHubListResult))] public partial class AzureResourceManagerDurableTaskContext : ModelReaderWriterContext diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskProvisioningState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskProvisioningState.cs deleted file mode 100644 index 52575cfb66b9..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskProvisioningState.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// The status of the current operation. - public readonly partial struct DurableTaskProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DurableTaskProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - private const string ProvisioningValue = "Provisioning"; - private const string UpdatingValue = "Updating"; - private const string DeletingValue = "Deleting"; - private const string AcceptedValue = "Accepted"; - - /// Resource has been created. - public static DurableTaskProvisioningState Succeeded { get; } = new DurableTaskProvisioningState(SucceededValue); - /// Resource creation failed. - public static DurableTaskProvisioningState Failed { get; } = new DurableTaskProvisioningState(FailedValue); - /// Resource creation was canceled. - public static DurableTaskProvisioningState Canceled { get; } = new DurableTaskProvisioningState(CanceledValue); - /// The resource is being provisioned. - public static DurableTaskProvisioningState Provisioning { get; } = new DurableTaskProvisioningState(ProvisioningValue); - /// The resource is updating. - public static DurableTaskProvisioningState Updating { get; } = new DurableTaskProvisioningState(UpdatingValue); - /// The resource is being deleted. - public static DurableTaskProvisioningState Deleting { get; } = new DurableTaskProvisioningState(DeletingValue); - /// The resource create request has been accepted. - public static DurableTaskProvisioningState Accepted { get; } = new DurableTaskProvisioningState(AcceptedValue); - /// Determines if two values are the same. - public static bool operator ==(DurableTaskProvisioningState left, DurableTaskProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DurableTaskProvisioningState left, DurableTaskProvisioningState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator DurableTaskProvisioningState(string value) => new DurableTaskProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DurableTaskProvisioningState other && Equals(other); - /// - public bool Equals(DurableTaskProvisioningState 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..2705a701b11f --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The status of the current operation. + 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 SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string ProvisioningValue = "Provisioning"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string AcceptedValue = "Accepted"; + + /// Resource has been created. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Resource creation failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// The resource is being provisioned. + public static ProvisioningState Provisioning { get; } = new ProvisioningState(ProvisioningValue); + /// The resource is updating. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// The resource is being deleted. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// The resource create request has been accepted. + public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); + /// 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.Serialization.cs similarity index 65% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.Serialization.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.Serialization.cs index 976dbb952c9b..e0f5ee8fc64b 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.DurableTask.Models { - public partial class DurableTaskRetentionPolicyDetails : IUtf8JsonSerializable, IJsonModel + public partial class RetentionPolicyDetails : 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, /// 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(DurableTaskRetentionPolicyDetails)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support writing '{format}' format."); } writer.WritePropertyName("retentionPeriodInDays"u8); @@ -58,19 +58,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DurableTaskRetentionPolicyDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RetentionPolicyDetails 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(DurableTaskRetentionPolicyDetails)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDurableTaskRetentionPolicyDetails(document.RootElement, options); + return DeserializeRetentionPolicyDetails(document.RootElement, options); } - internal static DurableTaskRetentionPolicyDetails DeserializeDurableTaskRetentionPolicyDetails(JsonElement element, ModelReaderWriterOptions options = null) + internal static RetentionPolicyDetails DeserializeRetentionPolicyDetails(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -104,38 +104,38 @@ internal static DurableTaskRetentionPolicyDetails DeserializeDurableTaskRetentio } } serializedAdditionalRawData = rawDataDictionary; - return new DurableTaskRetentionPolicyDetails(retentionPeriodInDays, orchestrationState, serializedAdditionalRawData); + return new RetentionPolicyDetails(retentionPeriodInDays, orchestrationState, 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, AzureResourceManagerDurableTaskContext.Default); default: - throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyDetails)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support writing '{options.Format}' format."); } } - DurableTaskRetentionPolicyDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + RetentionPolicyDetails 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 DeserializeDurableTaskRetentionPolicyDetails(document.RootElement, options); + return DeserializeRetentionPolicyDetails(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyDetails)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.cs similarity index 80% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.cs index 2c8911afc3b9..8e2ee57d1235 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.DurableTask.Models { /// The properties of a retention policy. - public partial class DurableTaskRetentionPolicyDetails + public partial class RetentionPolicyDetails { /// /// Keeps track of any properties unknown to the library. @@ -45,26 +45,26 @@ public partial class DurableTaskRetentionPolicyDetails /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The retention period in days after which the orchestration will be purged automatically. - public DurableTaskRetentionPolicyDetails(int retentionPeriodInDays) + public RetentionPolicyDetails(int retentionPeriodInDays) { RetentionPeriodInDays = retentionPeriodInDays; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The retention period in days after which the orchestration will be purged automatically. /// The orchestration state to which this policy applies. If omitted, the policy applies to all purgeable orchestration states. /// Keeps track of any properties unknown to the library. - internal DurableTaskRetentionPolicyDetails(int retentionPeriodInDays, DurableTaskPurgeableOrchestrationState? orchestrationState, IDictionary serializedAdditionalRawData) + internal RetentionPolicyDetails(int retentionPeriodInDays, DurableTaskPurgeableOrchestrationState? orchestrationState, IDictionary serializedAdditionalRawData) { RetentionPeriodInDays = retentionPeriodInDays; OrchestrationState = orchestrationState; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DurableTaskRetentionPolicyDetails() + /// Initializes a new instance of for deserialization. + internal RetentionPolicyDetails() { } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.Serialization.cs index 643c53b9af9f..15ce767ee69a 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.Serialization.cs @@ -83,7 +83,7 @@ internal static RetentionPolicyListResult DeserializeRetentionPolicyListResult(J { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -91,10 +91,10 @@ internal static RetentionPolicyListResult DeserializeRetentionPolicyListResult(J { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DurableTaskRetentionPolicyData.DeserializeDurableTaskRetentionPolicyData(item, options)); + array.Add(RetentionPolicyData.DeserializeRetentionPolicyData(item, options)); } value = array; continue; diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.cs index 0e0e715a10f2..f5c9bc5b5ac5 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.cs @@ -49,7 +49,7 @@ internal partial class RetentionPolicyListResult /// Initializes a new instance of . /// The RetentionPolicy items on this page. /// is null. - internal RetentionPolicyListResult(IEnumerable value) + internal RetentionPolicyListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); @@ -60,7 +60,7 @@ internal RetentionPolicyListResult(IEnumerable v /// The RetentionPolicy items on this page. /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal RetentionPolicyListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + internal RetentionPolicyListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; @@ -73,7 +73,7 @@ internal RetentionPolicyListResult() } /// The RetentionPolicy items on this page. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.Serialization.cs similarity index 61% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.Serialization.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.Serialization.cs index 6d8dc8b737bc..b8a6ff25947c 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.DurableTask.Models { - public partial class DurableTaskRetentionPolicyProperties : IUtf8JsonSerializable, IJsonModel + public partial class RetentionPolicyProperties : 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 write /// 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(DurableTaskRetentionPolicyProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyProperties)} does not support writing '{format}' format."); } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DurableTaskRetentionPolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RetentionPolicyProperties 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(DurableTaskRetentionPolicyProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDurableTaskRetentionPolicyProperties(document.RootElement, options); + return DeserializeRetentionPolicyProperties(document.RootElement, options); } - internal static DurableTaskRetentionPolicyProperties DeserializeDurableTaskRetentionPolicyProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static RetentionPolicyProperties DeserializeRetentionPolicyProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -86,8 +86,8 @@ internal static DurableTaskRetentionPolicyProperties DeserializeDurableTaskReten { return null; } - DurableTaskProvisioningState? provisioningState = default; - IList retentionPolicies = default; + ProvisioningState? provisioningState = default; + IList retentionPolicies = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -98,7 +98,7 @@ internal static DurableTaskRetentionPolicyProperties DeserializeDurableTaskReten { continue; } - provisioningState = new DurableTaskProvisioningState(property.Value.GetString()); + provisioningState = new ProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("retentionPolicies"u8)) @@ -107,10 +107,10 @@ internal static DurableTaskRetentionPolicyProperties DeserializeDurableTaskReten { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DurableTaskRetentionPolicyDetails.DeserializeDurableTaskRetentionPolicyDetails(item, options)); + array.Add(RetentionPolicyDetails.DeserializeRetentionPolicyDetails(item, options)); } retentionPolicies = array; continue; @@ -121,38 +121,38 @@ internal static DurableTaskRetentionPolicyProperties DeserializeDurableTaskReten } } serializedAdditionalRawData = rawDataDictionary; - return new DurableTaskRetentionPolicyProperties(provisioningState, retentionPolicies ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new RetentionPolicyProperties(provisioningState, retentionPolicies ?? new ChangeTrackingList(), 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, AzureResourceManagerDurableTaskContext.Default); default: - throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyProperties)} does not support writing '{options.Format}' format."); } } - DurableTaskRetentionPolicyProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + RetentionPolicyProperties 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 DeserializeDurableTaskRetentionPolicyProperties(document.RootElement, options); + return DeserializeRetentionPolicyProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.cs similarity index 74% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.cs index e00e7fdae962..3346103fedc2 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.DurableTask.Models { /// The retention policy settings for the resource. - public partial class DurableTaskRetentionPolicyProperties + public partial class RetentionPolicyProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,17 +45,17 @@ public partial class DurableTaskRetentionPolicyProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public DurableTaskRetentionPolicyProperties() + /// Initializes a new instance of . + public RetentionPolicyProperties() { - RetentionPolicies = new ChangeTrackingList(); + RetentionPolicies = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The status of the last operation. /// The orchestration retention policies. /// Keeps track of any properties unknown to the library. - internal DurableTaskRetentionPolicyProperties(DurableTaskProvisioningState? provisioningState, IList retentionPolicies, IDictionary serializedAdditionalRawData) + internal RetentionPolicyProperties(ProvisioningState? provisioningState, IList retentionPolicies, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; RetentionPolicies = retentionPolicies; @@ -63,8 +63,8 @@ internal DurableTaskRetentionPolicyProperties(DurableTaskProvisioningState? prov } /// The status of the last operation. - public DurableTaskProvisioningState? ProvisioningState { get; } + public ProvisioningState? ProvisioningState { get; } /// The orchestration retention policies. - public IList RetentionPolicies { get; } + public IList RetentionPolicies { get; } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs index 5ac029862733..02e1b98e00d5 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs @@ -83,7 +83,7 @@ internal static SchedulerListResult DeserializeSchedulerListResult(JsonElement e { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -91,10 +91,10 @@ internal static SchedulerListResult DeserializeSchedulerListResult(JsonElement e { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(item, options)); + array.Add(SchedulerData.DeserializeSchedulerData(item, options)); } value = array; continue; diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs index 4ea2059af1c8..85a9ef186815 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs @@ -49,7 +49,7 @@ internal partial class SchedulerListResult /// Initializes a new instance of . /// The Scheduler items on this page. /// is null. - internal SchedulerListResult(IEnumerable value) + internal SchedulerListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); @@ -60,7 +60,7 @@ internal SchedulerListResult(IEnumerable value) /// The Scheduler items on this page. /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal SchedulerListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + internal SchedulerListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; @@ -73,7 +73,7 @@ internal SchedulerListResult() } /// The Scheduler items on this page. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.Serialization.cs similarity index 67% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.Serialization.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.Serialization.cs index 890ae87d7129..74fee46924ee 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.DurableTask.Models { - public partial class DurableTaskSchedulerPatch : IUtf8JsonSerializable, IJsonModel + public partial class SchedulerPatch : 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, ModelRea /// 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(DurableTaskSchedulerPatch)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerPatch)} does not support writing '{format}' format."); } if (Optional.IsDefined(Properties)) @@ -67,19 +67,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DurableTaskSchedulerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SchedulerPatch 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(DurableTaskSchedulerPatch)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerPatch)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDurableTaskSchedulerPatch(document.RootElement, options); + return DeserializeSchedulerPatch(document.RootElement, options); } - internal static DurableTaskSchedulerPatch DeserializeDurableTaskSchedulerPatch(JsonElement element, ModelReaderWriterOptions options = null) + internal static SchedulerPatch DeserializeSchedulerPatch(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -87,7 +87,7 @@ internal static DurableTaskSchedulerPatch DeserializeDurableTaskSchedulerPatch(J { return null; } - DurableTaskSchedulerPatchProperties properties = default; + SchedulerPatchProperties properties = default; IDictionary tags = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -99,7 +99,7 @@ internal static DurableTaskSchedulerPatch DeserializeDurableTaskSchedulerPatch(J { continue; } - properties = DurableTaskSchedulerPatchProperties.DeserializeDurableTaskSchedulerPatchProperties(property.Value, options); + properties = SchedulerPatchProperties.DeserializeSchedulerPatchProperties(property.Value, options); continue; } if (property.NameEquals("tags"u8)) @@ -122,38 +122,38 @@ internal static DurableTaskSchedulerPatch DeserializeDurableTaskSchedulerPatch(J } } serializedAdditionalRawData = rawDataDictionary; - return new DurableTaskSchedulerPatch(properties, tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new SchedulerPatch(properties, tags ?? new ChangeTrackingDictionary(), 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, AzureResourceManagerDurableTaskContext.Default); default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerPatch)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerPatch)} does not support writing '{options.Format}' format."); } } - DurableTaskSchedulerPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SchedulerPatch 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 DeserializeDurableTaskSchedulerPatch(document.RootElement, options); + return DeserializeSchedulerPatch(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerPatch)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerPatch)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.cs similarity index 81% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.cs index 3c2834be281b..2cff6c2172b3 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.DurableTask.Models { /// The update request model for the Scheduler resource. - public partial class DurableTaskSchedulerPatch + public partial class SchedulerPatch { /// /// Keeps track of any properties unknown to the library. @@ -45,17 +45,17 @@ public partial class DurableTaskSchedulerPatch /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public DurableTaskSchedulerPatch() + /// Initializes a new instance of . + public SchedulerPatch() { Tags = new ChangeTrackingDictionary(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The resource-specific properties for this resource. /// Resource tags. /// Keeps track of any properties unknown to the library. - internal DurableTaskSchedulerPatch(DurableTaskSchedulerPatchProperties properties, IDictionary tags, IDictionary serializedAdditionalRawData) + internal SchedulerPatch(SchedulerPatchProperties properties, IDictionary tags, IDictionary serializedAdditionalRawData) { Properties = properties; Tags = tags; @@ -63,7 +63,7 @@ internal DurableTaskSchedulerPatch(DurableTaskSchedulerPatchProperties propertie } /// The resource-specific properties for this resource. - public DurableTaskSchedulerPatchProperties Properties { get; set; } + public SchedulerPatchProperties Properties { get; set; } /// Resource tags. public IDictionary Tags { get; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.Serialization.cs similarity index 67% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.Serialization.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.Serialization.cs index 3a7099d89746..d587ea0cfb18 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.DurableTask.Models { - public partial class DurableTaskSchedulerPatchProperties : IUtf8JsonSerializable, IJsonModel + public partial class SchedulerPatchProperties : 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 /// 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(DurableTaskSchedulerPatchProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerPatchProperties)} does not support writing '{format}' format."); } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -76,19 +76,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DurableTaskSchedulerPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SchedulerPatchProperties 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(DurableTaskSchedulerPatchProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerPatchProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDurableTaskSchedulerPatchProperties(document.RootElement, options); + return DeserializeSchedulerPatchProperties(document.RootElement, options); } - internal static DurableTaskSchedulerPatchProperties DeserializeDurableTaskSchedulerPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static SchedulerPatchProperties DeserializeSchedulerPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -96,10 +96,10 @@ internal static DurableTaskSchedulerPatchProperties DeserializeDurableTaskSchedu { return null; } - DurableTaskProvisioningState? provisioningState = default; + ProvisioningState? provisioningState = default; string endpoint = default; IList ipAllowlist = default; - DurableTaskSchedulerSkuUpdate sku = default; + SchedulerSkuUpdate sku = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -110,7 +110,7 @@ internal static DurableTaskSchedulerPatchProperties DeserializeDurableTaskSchedu { continue; } - provisioningState = new DurableTaskProvisioningState(property.Value.GetString()); + provisioningState = new ProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("endpoint"u8)) @@ -138,7 +138,7 @@ internal static DurableTaskSchedulerPatchProperties DeserializeDurableTaskSchedu { continue; } - sku = DurableTaskSchedulerSkuUpdate.DeserializeDurableTaskSchedulerSkuUpdate(property.Value, options); + sku = SchedulerSkuUpdate.DeserializeSchedulerSkuUpdate(property.Value, options); continue; } if (options.Format != "W") @@ -147,38 +147,38 @@ internal static DurableTaskSchedulerPatchProperties DeserializeDurableTaskSchedu } } serializedAdditionalRawData = rawDataDictionary; - return new DurableTaskSchedulerPatchProperties(provisioningState, endpoint, ipAllowlist ?? new ChangeTrackingList(), sku, serializedAdditionalRawData); + return new SchedulerPatchProperties(provisioningState, endpoint, ipAllowlist ?? new ChangeTrackingList(), sku, 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, AzureResourceManagerDurableTaskContext.Default); default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerPatchProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerPatchProperties)} does not support writing '{options.Format}' format."); } } - DurableTaskSchedulerPatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SchedulerPatchProperties 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 DeserializeDurableTaskSchedulerPatchProperties(document.RootElement, options); + return DeserializeSchedulerPatchProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerPatchProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerPatchProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.cs similarity index 80% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.cs index 1efba5f90048..e82ead0fcfed 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.DurableTask.Models { /// The Scheduler resource properties to be updated. - public partial class DurableTaskSchedulerPatchProperties + public partial class SchedulerPatchProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,19 +45,19 @@ public partial class DurableTaskSchedulerPatchProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public DurableTaskSchedulerPatchProperties() + /// Initializes a new instance of . + public SchedulerPatchProperties() { IPAllowlist = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The status of the last operation. /// URL of the durable task scheduler. /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. /// SKU of the durable task scheduler. /// Keeps track of any properties unknown to the library. - internal DurableTaskSchedulerPatchProperties(DurableTaskProvisioningState? provisioningState, string endpoint, IList ipAllowlist, DurableTaskSchedulerSkuUpdate sku, IDictionary serializedAdditionalRawData) + internal SchedulerPatchProperties(ProvisioningState? provisioningState, string endpoint, IList ipAllowlist, SchedulerSkuUpdate sku, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; Endpoint = endpoint; @@ -67,12 +67,12 @@ internal DurableTaskSchedulerPatchProperties(DurableTaskProvisioningState? provi } /// The status of the last operation. - public DurableTaskProvisioningState? ProvisioningState { get; } + public ProvisioningState? ProvisioningState { get; } /// URL of the durable task scheduler. public string Endpoint { get; } /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. public IList IPAllowlist { get; } /// SKU of the durable task scheduler. - public DurableTaskSchedulerSkuUpdate Sku { get; set; } + public SchedulerSkuUpdate Sku { get; set; } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs similarity index 67% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.Serialization.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs index e3064e350ab5..582e1ab18dba 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.DurableTask.Models { - public partial class DurableTaskSchedulerProperties : IUtf8JsonSerializable, IJsonModel + public partial class SchedulerProperties : 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, Mod /// 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(DurableTaskSchedulerProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerProperties)} does not support writing '{format}' format."); } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -70,19 +70,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DurableTaskSchedulerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SchedulerProperties 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(DurableTaskSchedulerProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDurableTaskSchedulerProperties(document.RootElement, options); + return DeserializeSchedulerProperties(document.RootElement, options); } - internal static DurableTaskSchedulerProperties DeserializeDurableTaskSchedulerProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static SchedulerProperties DeserializeSchedulerProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -90,10 +90,10 @@ internal static DurableTaskSchedulerProperties DeserializeDurableTaskSchedulerPr { return null; } - DurableTaskProvisioningState? provisioningState = default; + ProvisioningState? provisioningState = default; string endpoint = default; IList ipAllowlist = default; - DurableTaskSchedulerSku sku = default; + SchedulerSku sku = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -104,7 +104,7 @@ internal static DurableTaskSchedulerProperties DeserializeDurableTaskSchedulerPr { continue; } - provisioningState = new DurableTaskProvisioningState(property.Value.GetString()); + provisioningState = new ProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("endpoint"u8)) @@ -124,7 +124,7 @@ internal static DurableTaskSchedulerProperties DeserializeDurableTaskSchedulerPr } if (property.NameEquals("sku"u8)) { - sku = DurableTaskSchedulerSku.DeserializeDurableTaskSchedulerSku(property.Value, options); + sku = SchedulerSku.DeserializeSchedulerSku(property.Value, options); continue; } if (options.Format != "W") @@ -133,38 +133,38 @@ internal static DurableTaskSchedulerProperties DeserializeDurableTaskSchedulerPr } } serializedAdditionalRawData = rawDataDictionary; - return new DurableTaskSchedulerProperties(provisioningState, endpoint, ipAllowlist, sku, serializedAdditionalRawData); + return new SchedulerProperties(provisioningState, endpoint, ipAllowlist, sku, 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, AzureResourceManagerDurableTaskContext.Default); default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerProperties)} does not support writing '{options.Format}' format."); } } - DurableTaskSchedulerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SchedulerProperties 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 DeserializeDurableTaskSchedulerProperties(document.RootElement, options); + return DeserializeSchedulerProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs similarity index 78% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs index 21c64a6f06c7..622f09dfc0bb 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.DurableTask.Models { /// Details of the Scheduler. - public partial class DurableTaskSchedulerProperties + public partial class SchedulerProperties { /// /// Keeps track of any properties unknown to the library. @@ -46,11 +46,11 @@ public partial class DurableTaskSchedulerProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. /// SKU of the durable task scheduler. /// or is null. - public DurableTaskSchedulerProperties(IEnumerable ipAllowlist, DurableTaskSchedulerSku sku) + public SchedulerProperties(IEnumerable ipAllowlist, SchedulerSku sku) { Argument.AssertNotNull(ipAllowlist, nameof(ipAllowlist)); Argument.AssertNotNull(sku, nameof(sku)); @@ -59,13 +59,13 @@ public DurableTaskSchedulerProperties(IEnumerable ipAllowlist, DurableTa Sku = sku; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The status of the last operation. /// URL of the durable task scheduler. /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. /// SKU of the durable task scheduler. /// Keeps track of any properties unknown to the library. - internal DurableTaskSchedulerProperties(DurableTaskProvisioningState? provisioningState, string endpoint, IList ipAllowlist, DurableTaskSchedulerSku sku, IDictionary serializedAdditionalRawData) + internal SchedulerProperties(ProvisioningState? provisioningState, string endpoint, IList ipAllowlist, SchedulerSku sku, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; Endpoint = endpoint; @@ -74,18 +74,18 @@ internal DurableTaskSchedulerProperties(DurableTaskProvisioningState? provisioni _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DurableTaskSchedulerProperties() + /// Initializes a new instance of for deserialization. + internal SchedulerProperties() { } /// The status of the last operation. - public DurableTaskProvisioningState? ProvisioningState { get; } + public ProvisioningState? ProvisioningState { get; } /// URL of the durable task scheduler. public string Endpoint { get; } /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. public IList IPAllowlist { get; } /// SKU of the durable task scheduler. - public DurableTaskSchedulerSku Sku { get; set; } + public SchedulerSku Sku { get; set; } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs similarity index 70% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.Serialization.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs index f4eafd93f6f6..9d40e891b60d 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.DurableTask.Models { - public partial class DurableTaskSchedulerSku : IUtf8JsonSerializable, IJsonModel + public partial class SchedulerSku : 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, ModelReade /// 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(DurableTaskSchedulerSku)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerSku)} does not support writing '{format}' format."); } writer.WritePropertyName("name"u8); @@ -63,19 +63,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DurableTaskSchedulerSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SchedulerSku 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(DurableTaskSchedulerSku)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerSku)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDurableTaskSchedulerSku(document.RootElement, options); + return DeserializeSchedulerSku(document.RootElement, options); } - internal static DurableTaskSchedulerSku DeserializeDurableTaskSchedulerSku(JsonElement element, ModelReaderWriterOptions options = null) + internal static SchedulerSku DeserializeSchedulerSku(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -119,38 +119,38 @@ internal static DurableTaskSchedulerSku DeserializeDurableTaskSchedulerSku(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new DurableTaskSchedulerSku(name, capacity, redundancyState, serializedAdditionalRawData); + return new SchedulerSku(name, capacity, redundancyState, 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, AzureResourceManagerDurableTaskContext.Default); default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerSku)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerSku)} does not support writing '{options.Format}' format."); } } - DurableTaskSchedulerSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SchedulerSku 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 DeserializeDurableTaskSchedulerSku(document.RootElement, options); + return DeserializeSchedulerSku(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerSku)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerSku)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs similarity index 81% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs index 07e7f49689ae..e9a2d0837719 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.DurableTask.Models { /// The SKU (Stock Keeping Unit) assigned to this durable task scheduler. - public partial class DurableTaskSchedulerSku + public partial class SchedulerSku { /// /// Keeps track of any properties unknown to the library. @@ -45,19 +45,19 @@ public partial class DurableTaskSchedulerSku /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the SKU. - public DurableTaskSchedulerSku(SchedulerSkuName name) + public SchedulerSku(SchedulerSkuName name) { Name = name; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the SKU. /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. /// Indicates whether the current SKU configuration is zone redundant. /// Keeps track of any properties unknown to the library. - internal DurableTaskSchedulerSku(SchedulerSkuName name, int? capacity, DurableTaskResourceRedundancyState? redundancyState, IDictionary serializedAdditionalRawData) + internal SchedulerSku(SchedulerSkuName name, int? capacity, DurableTaskResourceRedundancyState? redundancyState, IDictionary serializedAdditionalRawData) { Name = name; Capacity = capacity; @@ -65,8 +65,8 @@ internal DurableTaskSchedulerSku(SchedulerSkuName name, int? capacity, DurableTa _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DurableTaskSchedulerSku() + /// Initializes a new instance of for deserialization. + internal SchedulerSku() { } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.Serialization.cs similarity index 70% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.Serialization.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.Serialization.cs index 724ee95b94a6..077790d76d65 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.DurableTask.Models { - public partial class DurableTaskSchedulerSkuUpdate : IUtf8JsonSerializable, IJsonModel + public partial class SchedulerSkuUpdate : 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, Mode /// 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(DurableTaskSchedulerSkuUpdate)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support writing '{format}' format."); } if (Optional.IsDefined(Name)) @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DurableTaskSchedulerSkuUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SchedulerSkuUpdate 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(DurableTaskSchedulerSkuUpdate)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDurableTaskSchedulerSkuUpdate(document.RootElement, options); + return DeserializeSchedulerSkuUpdate(document.RootElement, options); } - internal static DurableTaskSchedulerSkuUpdate DeserializeDurableTaskSchedulerSkuUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static SchedulerSkuUpdate DeserializeSchedulerSkuUpdate(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -126,38 +126,38 @@ internal static DurableTaskSchedulerSkuUpdate DeserializeDurableTaskSchedulerSku } } serializedAdditionalRawData = rawDataDictionary; - return new DurableTaskSchedulerSkuUpdate(name, capacity, redundancyState, serializedAdditionalRawData); + return new SchedulerSkuUpdate(name, capacity, redundancyState, 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, AzureResourceManagerDurableTaskContext.Default); default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerSkuUpdate)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support writing '{options.Format}' format."); } } - DurableTaskSchedulerSkuUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SchedulerSkuUpdate 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 DeserializeDurableTaskSchedulerSkuUpdate(document.RootElement, options); + return DeserializeSchedulerSkuUpdate(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerSkuUpdate)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.cs similarity index 84% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.cs index f691f7e0cc52..91104963174a 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.DurableTask.Models { /// The SKU (Stock Keeping Unit) properties to be updated. - public partial class DurableTaskSchedulerSkuUpdate + public partial class SchedulerSkuUpdate { /// /// Keeps track of any properties unknown to the library. @@ -45,17 +45,17 @@ public partial class DurableTaskSchedulerSkuUpdate /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public DurableTaskSchedulerSkuUpdate() + /// Initializes a new instance of . + public SchedulerSkuUpdate() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name of the SKU. /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. /// Indicates whether the current SKU configuration is zone redundant. /// Keeps track of any properties unknown to the library. - internal DurableTaskSchedulerSkuUpdate(SchedulerSkuName? name, int? capacity, DurableTaskResourceRedundancyState? redundancyState, IDictionary serializedAdditionalRawData) + internal SchedulerSkuUpdate(SchedulerSkuName? name, int? capacity, DurableTaskResourceRedundancyState? redundancyState, IDictionary serializedAdditionalRawData) { Name = name; Capacity = capacity; diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.Serialization.cs similarity index 66% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.Serialization.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.Serialization.cs index f8826866930f..aaaaa2214f59 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.DurableTask.Models { - public partial class DurableTaskHubProperties : IUtf8JsonSerializable, IJsonModel + public partial class SchedulerTaskHubProperties : 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(DurableTaskHubProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerTaskHubProperties)} does not support writing '{format}' format."); } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -61,19 +61,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DurableTaskHubProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SchedulerTaskHubProperties 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(DurableTaskHubProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerTaskHubProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDurableTaskHubProperties(document.RootElement, options); + return DeserializeSchedulerTaskHubProperties(document.RootElement, options); } - internal static DurableTaskHubProperties DeserializeDurableTaskHubProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static SchedulerTaskHubProperties DeserializeSchedulerTaskHubProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -81,7 +81,7 @@ internal static DurableTaskHubProperties DeserializeDurableTaskHubProperties(Jso { return null; } - DurableTaskProvisioningState? provisioningState = default; + ProvisioningState? provisioningState = default; Uri dashboardUrl = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -93,7 +93,7 @@ internal static DurableTaskHubProperties DeserializeDurableTaskHubProperties(Jso { continue; } - provisioningState = new DurableTaskProvisioningState(property.Value.GetString()); + provisioningState = new ProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("dashboardUrl"u8)) @@ -111,38 +111,38 @@ internal static DurableTaskHubProperties DeserializeDurableTaskHubProperties(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new DurableTaskHubProperties(provisioningState, dashboardUrl, serializedAdditionalRawData); + return new SchedulerTaskHubProperties(provisioningState, dashboardUrl, 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, AzureResourceManagerDurableTaskContext.Default); default: - throw new FormatException($"The model {nameof(DurableTaskHubProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerTaskHubProperties)} does not support writing '{options.Format}' format."); } } - DurableTaskHubProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SchedulerTaskHubProperties 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 DeserializeDurableTaskHubProperties(document.RootElement, options); + return DeserializeSchedulerTaskHubProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DurableTaskHubProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerTaskHubProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.cs similarity index 81% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.cs index 259880513675..c1b638e25a16 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.DurableTask.Models { /// The properties of Task Hub. - public partial class DurableTaskHubProperties + public partial class SchedulerTaskHubProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,16 +45,16 @@ public partial class DurableTaskHubProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public DurableTaskHubProperties() + /// Initializes a new instance of . + public SchedulerTaskHubProperties() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The status of the last operation. /// URL of the durable task scheduler dashboard. /// Keeps track of any properties unknown to the library. - internal DurableTaskHubProperties(DurableTaskProvisioningState? provisioningState, Uri dashboardUri, IDictionary serializedAdditionalRawData) + internal SchedulerTaskHubProperties(ProvisioningState? provisioningState, Uri dashboardUri, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; DashboardUri = dashboardUri; @@ -62,7 +62,7 @@ internal DurableTaskHubProperties(DurableTaskProvisioningState? provisioningStat } /// The status of the last operation. - public DurableTaskProvisioningState? ProvisioningState { get; } + public ProvisioningState? ProvisioningState { get; } /// URL of the durable task scheduler dashboard. public Uri DashboardUri { get; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs index 7f5a8e20662b..d6df645cf30f 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs @@ -83,7 +83,7 @@ internal static TaskHubListResult DeserializeTaskHubListResult(JsonElement eleme { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -91,10 +91,10 @@ internal static TaskHubListResult DeserializeTaskHubListResult(JsonElement eleme { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DurableTaskHubData.DeserializeDurableTaskHubData(item, options)); + array.Add(SchedulerTaskHubData.DeserializeSchedulerTaskHubData(item, options)); } value = array; continue; diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs index 90efc14564b4..55f6a022eaca 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs @@ -49,7 +49,7 @@ internal partial class TaskHubListResult /// Initializes a new instance of . /// The TaskHub items on this page. /// is null. - internal TaskHubListResult(IEnumerable value) + internal TaskHubListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); @@ -60,7 +60,7 @@ internal TaskHubListResult(IEnumerable value) /// The TaskHub items on this page. /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal TaskHubListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + internal TaskHubListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; @@ -73,7 +73,7 @@ internal TaskHubListResult() } /// The TaskHub items on this page. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/RetentionPoliciesRestOperations.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/RetentionPoliciesRestOperations.cs index ab38f2bafcf5..f063d6f222c6 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/RetentionPoliciesRestOperations.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/RetentionPoliciesRestOperations.cs @@ -79,7 +79,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 schedulerName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -91,13 +91,13 @@ public async Task> GetAsync(string subs { case 200: { - DurableTaskRetentionPolicyData value = default; + RetentionPolicyData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DurableTaskRetentionPolicyData.DeserializeDurableTaskRetentionPolicyData(document.RootElement); + value = RetentionPolicyData.DeserializeRetentionPolicyData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DurableTaskRetentionPolicyData)null, message.Response); + return Response.FromValue((RetentionPolicyData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -110,7 +110,7 @@ public async Task> GetAsync(string subs /// 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 schedulerName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -122,19 +122,19 @@ public Response Get(string subscriptionId, strin { case 200: { - DurableTaskRetentionPolicyData value = default; + RetentionPolicyData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DurableTaskRetentionPolicyData.DeserializeDurableTaskRetentionPolicyData(document.RootElement); + value = RetentionPolicyData.DeserializeRetentionPolicyData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DurableTaskRetentionPolicyData)null, message.Response); + return Response.FromValue((RetentionPolicyData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrReplaceRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskRetentionPolicyData data) + internal RequestUriBuilder CreateCreateOrReplaceRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -149,7 +149,7 @@ internal RequestUriBuilder CreateCreateOrReplaceRequestUri(string subscriptionId return uri; } - internal HttpMessage CreateCreateOrReplaceRequest(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskRetentionPolicyData data) + internal HttpMessage CreateCreateOrReplaceRequest(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -182,7 +182,7 @@ internal HttpMessage CreateCreateOrReplaceRequest(string subscriptionId, string /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrReplaceAsync(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + public async Task CreateOrReplaceAsync(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -209,7 +209,7 @@ public async Task CreateOrReplaceAsync(string subscriptionId, string r /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrReplace(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + public Response CreateOrReplace(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -228,7 +228,7 @@ public Response CreateOrReplace(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskRetentionPolicyData data) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -243,7 +243,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskRetentionPolicyData data) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -276,7 +276,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// 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 schedulerName, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -303,7 +303,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// 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 schedulerName, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs index ae96e709031f..5575f7d1a879 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs @@ -77,7 +77,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 schedulerName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -89,13 +89,13 @@ public async Task> GetAsync(string subscripti { case 200: { - DurableTaskSchedulerData value = default; + SchedulerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(document.RootElement); + value = SchedulerData.DeserializeSchedulerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DurableTaskSchedulerData)null, message.Response); + return Response.FromValue((SchedulerData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -108,7 +108,7 @@ public async Task> GetAsync(string subscripti /// 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 schedulerName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -120,19 +120,19 @@ public Response Get(string subscriptionId, string reso { case 200: { - DurableTaskSchedulerData value = default; + SchedulerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(document.RootElement); + value = SchedulerData.DeserializeSchedulerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DurableTaskSchedulerData)null, message.Response); + return Response.FromValue((SchedulerData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskSchedulerData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,7 +146,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskSchedulerData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -178,7 +178,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskSchedulerData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -205,7 +205,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskSchedulerData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -224,7 +224,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskSchedulerPatch patch) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -238,7 +238,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, DurableTaskSchedulerPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -270,7 +270,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// 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 schedulerName, DurableTaskSchedulerPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -297,7 +297,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// 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 schedulerName, DurableTaskSchedulerPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs index 8e1f310217f3..a962e56343ad 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs @@ -82,7 +82,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 schedulerName, string taskHubName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -95,13 +95,13 @@ public async Task> GetAsync(string subscriptionId, { case 200: { - DurableTaskHubData value = default; + SchedulerTaskHubData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DurableTaskHubData.DeserializeDurableTaskHubData(document.RootElement); + value = SchedulerTaskHubData.DeserializeSchedulerTaskHubData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DurableTaskHubData)null, message.Response); + return Response.FromValue((SchedulerTaskHubData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -115,7 +115,7 @@ public async Task> GetAsync(string subscriptionId, /// 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 schedulerName, string taskHubName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -128,19 +128,19 @@ public Response Get(string subscriptionId, string resourceGr { case 200: { - DurableTaskHubData value = default; + SchedulerTaskHubData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DurableTaskHubData.DeserializeDurableTaskHubData(document.RootElement); + value = SchedulerTaskHubData.DeserializeSchedulerTaskHubData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DurableTaskHubData)null, message.Response); + return Response.FromValue((SchedulerTaskHubData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, DurableTaskHubData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, SchedulerTaskHubData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -156,7 +156,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, DurableTaskHubData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, SchedulerTaskHubData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -191,7 +191,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, DurableTaskHubData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, SchedulerTaskHubData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -220,7 +220,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, DurableTaskHubData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, SchedulerTaskHubData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.Serialization.cs similarity index 69% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.Serialization.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.Serialization.cs index ce1105294bbe..1f03e2f61306 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.Serialization.cs @@ -16,11 +16,11 @@ namespace Azure.ResourceManager.DurableTask { - public partial class DurableTaskHubData : IUtf8JsonSerializable, IJsonModel + public partial class RetentionPolicyData : 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); @@ -31,10 +31,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DurableTaskHubData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyData)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -45,19 +45,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - DurableTaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + RetentionPolicyData 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(DurableTaskHubData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDurableTaskHubData(document.RootElement, options); + return DeserializeRetentionPolicyData(document.RootElement, options); } - internal static DurableTaskHubData DeserializeDurableTaskHubData(JsonElement element, ModelReaderWriterOptions options = null) + internal static RetentionPolicyData DeserializeRetentionPolicyData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -65,7 +65,7 @@ internal static DurableTaskHubData DeserializeDurableTaskHubData(JsonElement ele { return null; } - DurableTaskHubProperties properties = default; + RetentionPolicyProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -80,7 +80,7 @@ internal static DurableTaskHubData DeserializeDurableTaskHubData(JsonElement ele { continue; } - properties = DurableTaskHubProperties.DeserializeDurableTaskHubProperties(property.Value, options); + properties = RetentionPolicyProperties.DeserializeRetentionPolicyProperties(property.Value, options); continue; } if (property.NameEquals("id"u8)) @@ -113,7 +113,7 @@ internal static DurableTaskHubData DeserializeDurableTaskHubData(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new DurableTaskHubData( + return new RetentionPolicyData( id, name, type, @@ -122,35 +122,35 @@ internal static DurableTaskHubData DeserializeDurableTaskHubData(JsonElement ele 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, AzureResourceManagerDurableTaskContext.Default); default: - throw new FormatException($"The model {nameof(DurableTaskHubData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyData)} does not support writing '{options.Format}' format."); } } - DurableTaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + RetentionPolicyData 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 DeserializeDurableTaskHubData(document.RootElement, options); + return DeserializeRetentionPolicyData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DurableTaskHubData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(RetentionPolicyData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.cs similarity index 76% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.cs index 6b0d9e518b1e..36aab8b38c9d 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.cs @@ -14,10 +14,10 @@ namespace Azure.ResourceManager.DurableTask { /// - /// A class representing the DurableTaskRetentionPolicy data model. + /// A class representing the RetentionPolicy data model. /// A retention policy resource belonging to the scheduler /// - public partial class DurableTaskRetentionPolicyData : ResourceData + public partial class RetentionPolicyData : ResourceData { /// /// Keeps track of any properties unknown to the library. @@ -51,25 +51,25 @@ public partial class DurableTaskRetentionPolicyData : ResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public DurableTaskRetentionPolicyData() + /// Initializes a new instance of . + public RetentionPolicyData() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. - internal DurableTaskRetentionPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DurableTaskRetentionPolicyProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal RetentionPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RetentionPolicyProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } /// The resource-specific properties for this resource. - public DurableTaskRetentionPolicyProperties Properties { get; set; } + public RetentionPolicyProperties Properties { get; set; } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.Serialization.cs new file mode 100644 index 000000000000..98a8981eb787 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DurableTask +{ + public partial class RetentionPolicyResource : IJsonModel + { + private static RetentionPolicyData s_dataDeserializationInstance; + private static RetentionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + RetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); + + RetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.cs similarity index 65% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.cs index 6b40a58d6c38..f852fb6c1ae8 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.cs @@ -15,14 +15,14 @@ namespace Azure.ResourceManager.DurableTask { /// - /// A Class representing a DurableTaskRetentionPolicy along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDurableTaskRetentionPolicyResource method. - /// Otherwise you can get one from its parent resource using the GetDurableTaskRetentionPolicy method. + /// A Class representing a RetentionPolicy along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetRetentionPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetRetentionPolicy method. /// - public partial class DurableTaskRetentionPolicyResource : ArmResource + public partial class RetentionPolicyResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. /// The schedulerName. @@ -32,35 +32,35 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics; - private readonly RetentionPoliciesRestOperations _durableTaskRetentionPolicyRetentionPoliciesRestClient; - private readonly DurableTaskRetentionPolicyData _data; + private readonly ClientDiagnostics _retentionPolicyClientDiagnostics; + private readonly RetentionPoliciesRestOperations _retentionPolicyRestClient; + private readonly RetentionPolicyData _data; /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers/retentionPolicies"; - /// Initializes a new instance of the class for mocking. - protected DurableTaskRetentionPolicyResource() + /// Initializes a new instance of the class for mocking. + protected RetentionPolicyResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DurableTaskRetentionPolicyResource(ArmClient client, DurableTaskRetentionPolicyData data) : this(client, data.Id) + internal RetentionPolicyResource(ArmClient client, RetentionPolicyData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal DurableTaskRetentionPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal RetentionPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string durableTaskRetentionPolicyRetentionPoliciesApiVersion); - _durableTaskRetentionPolicyRetentionPoliciesRestClient = new RetentionPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, durableTaskRetentionPolicyRetentionPoliciesApiVersion); + _retentionPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string retentionPolicyApiVersion); + _retentionPolicyRestClient = new RetentionPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, retentionPolicyApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -71,7 +71,7 @@ internal DurableTaskRetentionPolicyResource(ArmClient client, ResourceIdentifier /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual DurableTaskRetentionPolicyData Data + public virtual RetentionPolicyData Data { get { @@ -104,21 +104,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Get"); + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Get"); scope.Start(); try { - var response = await _durableTaskRetentionPolicyRetentionPoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + var response = await _retentionPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DurableTaskRetentionPolicyResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new RetentionPolicyResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -144,21 +144,21 @@ public virtual async Task> GetAsync /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Get"); + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Get"); scope.Start(); try { - var response = _durableTaskRetentionPolicyRetentionPoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + var response = _retentionPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DurableTaskRetentionPolicyResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new RetentionPolicyResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToke /// /// /// Resource - /// + /// /// /// /// @@ -192,12 +192,12 @@ public virtual Response Get(CancellationToke /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Delete"); + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Delete"); scope.Start(); try { - var response = await _durableTaskRetentionPolicyRetentionPoliciesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(_durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); + var response = await _retentionPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(_retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Resource - /// + /// /// /// /// @@ -234,12 +234,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Delete"); + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Delete"); scope.Start(); try { - var response = _durableTaskRetentionPolicyRetentionPoliciesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); - var operation = new DurableTaskArmOperation(_durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); + var response = _retentionPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + var operation = new DurableTaskArmOperation(_retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Resource - /// + /// /// /// /// @@ -276,16 +276,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// The resource properties to be updated. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, RetentionPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Update"); + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Update"); scope.Start(); try { - var response = await _durableTaskRetentionPolicyRetentionPoliciesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new DurableTaskRetentionPolicyOperationSource(Client), _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _retentionPolicyRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -314,7 +314,7 @@ public virtual async Task> Upda /// /// /// Resource - /// + /// /// /// /// @@ -322,16 +322,16 @@ public virtual async Task> Upda /// The resource properties to be updated. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, RetentionPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Update"); + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Update"); scope.Start(); try { - var response = _durableTaskRetentionPolicyRetentionPoliciesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); - var operation = new DurableTaskArmOperation(new DurableTaskRetentionPolicyOperationSource(Client), _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _retentionPolicyRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Resource - /// + /// /// /// /// @@ -368,16 +368,16 @@ public virtual ArmOperation Update(WaitUntil /// Resource create parameters. /// The cancellation token to use. /// is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, RetentionPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.CreateOrUpdate"); + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.CreateOrUpdate"); scope.Start(); try { - var response = await _durableTaskRetentionPolicyRetentionPoliciesRestClient.CreateOrReplaceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new DurableTaskRetentionPolicyOperationSource(Client), _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.CreateCreateOrReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _retentionPolicyRestClient.CreateOrReplaceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateCreateOrReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -406,7 +406,7 @@ public virtual async Task> Crea /// /// /// Resource - /// + /// /// /// /// @@ -414,16 +414,16 @@ public virtual async Task> Crea /// Resource create parameters. /// The cancellation token to use. /// is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, RetentionPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.CreateOrUpdate"); + using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.CreateOrUpdate"); scope.Start(); try { - var response = _durableTaskRetentionPolicyRetentionPoliciesRestClient.CreateOrReplace(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); - var operation = new DurableTaskArmOperation(new DurableTaskRetentionPolicyOperationSource(Client), _durableTaskRetentionPolicyRetentionPoliciesClientDiagnostics, Pipeline, _durableTaskRetentionPolicyRetentionPoliciesRestClient.CreateCreateOrReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _retentionPolicyRestClient.CreateOrReplace(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateCreateOrReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs similarity index 66% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerCollection.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs index 2ef792b13768..a5f98a4d96fa 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerCollection.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs @@ -19,28 +19,28 @@ namespace Azure.ResourceManager.DurableTask { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDurableTaskSchedulers method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSchedulers method from an instance of . /// - public partial class DurableTaskSchedulerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class SchedulerCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _durableTaskSchedulerSchedulersClientDiagnostics; - private readonly SchedulersRestOperations _durableTaskSchedulerSchedulersRestClient; + private readonly ClientDiagnostics _schedulerClientDiagnostics; + private readonly SchedulersRestOperations _schedulerRestClient; - /// Initializes a new instance of the class for mocking. - protected DurableTaskSchedulerCollection() + /// Initializes a new instance of the class for mocking. + protected SchedulerCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal DurableTaskSchedulerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal SchedulerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _durableTaskSchedulerSchedulersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", DurableTaskSchedulerResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DurableTaskSchedulerResource.ResourceType, out string durableTaskSchedulerSchedulersApiVersion); - _durableTaskSchedulerSchedulersRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, durableTaskSchedulerSchedulersApiVersion); + _schedulerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", SchedulerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SchedulerResource.ResourceType, out string schedulerApiVersion); + _schedulerRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Resource - /// + /// /// /// /// @@ -79,17 +79,17 @@ 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 schedulerName, DurableTaskSchedulerData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string schedulerName, SchedulerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.CreateOrUpdate"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _durableTaskSchedulerSchedulersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new DurableTaskSchedulerOperationSource(Client), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _schedulerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -118,7 +118,7 @@ public virtual async Task> CreateOrUp /// /// /// Resource - /// + /// /// /// /// @@ -128,17 +128,17 @@ public virtual async Task> CreateOrUp /// 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 schedulerName, DurableTaskSchedulerData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string schedulerName, SchedulerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.CreateOrUpdate"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.CreateOrUpdate"); scope.Start(); try { - var response = _durableTaskSchedulerSchedulersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken); - var operation = new DurableTaskArmOperation(new DurableTaskSchedulerOperationSource(Client), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _schedulerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Resource - /// + /// /// /// /// @@ -175,18 +175,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string schedulerName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Get"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Get"); scope.Start(); try { - var response = await _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken).ConfigureAwait(false); + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(strin /// /// /// Resource - /// + /// /// /// /// @@ -220,18 +220,18 @@ public virtual async Task> GetAsync(strin /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string schedulerName, CancellationToken cancellationToken = default) + public virtual Response Get(string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Get"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Get"); scope.Start(); try { - var response = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken); + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -257,17 +257,17 @@ public virtual Response Get(string schedulerName, /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _durableTaskSchedulerSchedulersRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _durableTaskSchedulerSchedulersRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DurableTaskSchedulerResource(Client, DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(e)), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, "DurableTaskSchedulerCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _schedulerRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), _schedulerClientDiagnostics, Pipeline, "SchedulerCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -287,17 +287,17 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _durableTaskSchedulerSchedulersRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _durableTaskSchedulerSchedulersRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DurableTaskSchedulerResource(Client, DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(e)), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, "DurableTaskSchedulerCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _schedulerRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), _schedulerClientDiagnostics, Pipeline, "SchedulerCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Resource - /// + /// /// /// /// @@ -329,11 +329,11 @@ public virtual async Task> ExistsAsync(string schedulerName, Canc { Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Exists"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Exists"); scope.Start(); try { - var response = await _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string schedulerName, Canc /// /// /// Resource - /// + /// /// /// /// @@ -372,11 +372,11 @@ public virtual Response Exists(string schedulerName, CancellationToken can { Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Exists"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Exists"); scope.Start(); try { - var response = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken); + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -403,7 +403,7 @@ public virtual Response Exists(string schedulerName, CancellationToken can /// /// /// Resource - /// + /// /// /// /// @@ -411,18 +411,18 @@ public virtual Response Exists(string schedulerName, CancellationToken can /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string schedulerName, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.GetIfExists"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.GetIfExists"); scope.Start(); try { - var response = await _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -448,7 +448,7 @@ public virtual async Task> GetIfE /// /// /// Resource - /// + /// /// /// /// @@ -456,18 +456,18 @@ public virtual async Task> GetIfE /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string schedulerName, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.GetIfExists"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.GetIfExists"); scope.Start(); try { - var response = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken); + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -476,7 +476,7 @@ public virtual NullableResponse GetIfExists(string } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -486,7 +486,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs similarity index 72% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.Serialization.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs index 161a238844fc..90b8b33383c0 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs @@ -16,11 +16,11 @@ namespace Azure.ResourceManager.DurableTask { - public partial class DurableTaskSchedulerData : IUtf8JsonSerializable, IJsonModel + public partial class SchedulerData : 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); @@ -31,10 +31,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DurableTaskSchedulerData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerData)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -45,19 +45,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - DurableTaskSchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SchedulerData 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(DurableTaskSchedulerData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDurableTaskSchedulerData(document.RootElement, options); + return DeserializeSchedulerData(document.RootElement, options); } - internal static DurableTaskSchedulerData DeserializeDurableTaskSchedulerData(JsonElement element, ModelReaderWriterOptions options = null) + internal static SchedulerData DeserializeSchedulerData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -65,7 +65,7 @@ internal static DurableTaskSchedulerData DeserializeDurableTaskSchedulerData(Jso { return null; } - DurableTaskSchedulerProperties properties = default; + SchedulerProperties properties = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -82,7 +82,7 @@ internal static DurableTaskSchedulerData DeserializeDurableTaskSchedulerData(Jso { continue; } - properties = DurableTaskSchedulerProperties.DeserializeDurableTaskSchedulerProperties(property.Value, options); + properties = SchedulerProperties.DeserializeSchedulerProperties(property.Value, options); continue; } if (property.NameEquals("tags"u8)) @@ -134,7 +134,7 @@ internal static DurableTaskSchedulerData DeserializeDurableTaskSchedulerData(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new DurableTaskSchedulerData( + return new SchedulerData( id, name, type, @@ -145,35 +145,35 @@ internal static DurableTaskSchedulerData DeserializeDurableTaskSchedulerData(Jso 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, AzureResourceManagerDurableTaskContext.Default); default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerData)} does not support writing '{options.Format}' format."); } } - DurableTaskSchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SchedulerData 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 DeserializeDurableTaskSchedulerData(document.RootElement, options); + return DeserializeSchedulerData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DurableTaskSchedulerData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs similarity index 72% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs index 71ff5eee7745..b0efc6bb0c8b 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs @@ -14,10 +14,10 @@ namespace Azure.ResourceManager.DurableTask { /// - /// A class representing the DurableTaskScheduler data model. + /// A class representing the Scheduler data model. /// A Durable Task Scheduler resource /// - public partial class DurableTaskSchedulerData : TrackedResourceData + public partial class SchedulerData : TrackedResourceData { /// /// Keeps track of any properties unknown to the library. @@ -51,13 +51,13 @@ public partial class DurableTaskSchedulerData : TrackedResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The location. - public DurableTaskSchedulerData(AzureLocation location) : base(location) + public SchedulerData(AzureLocation location) : base(location) { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -66,18 +66,18 @@ public DurableTaskSchedulerData(AzureLocation location) : base(location) /// The location. /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. - internal DurableTaskSchedulerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DurableTaskSchedulerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal SchedulerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SchedulerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DurableTaskSchedulerData() + /// Initializes a new instance of for deserialization. + internal SchedulerData() { } /// The resource-specific properties for this resource. - public DurableTaskSchedulerProperties Properties { get; set; } + public SchedulerProperties Properties { get; set; } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs new file mode 100644 index 000000000000..16d9ffea7d5b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DurableTask +{ + public partial class SchedulerResource : IJsonModel + { + private static SchedulerData s_dataDeserializationInstance; + private static SchedulerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); + + SchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs similarity index 71% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs index 2f34c560d603..b1ab340cb3f9 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs @@ -18,14 +18,14 @@ namespace Azure.ResourceManager.DurableTask { /// - /// A Class representing a DurableTaskScheduler along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDurableTaskSchedulerResource method. - /// Otherwise you can get one from its parent resource using the GetDurableTaskScheduler method. + /// A Class representing a Scheduler along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSchedulerResource method. + /// Otherwise you can get one from its parent resource using the GetScheduler method. /// - public partial class DurableTaskSchedulerResource : ArmResource + public partial class SchedulerResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. /// The schedulerName. @@ -35,35 +35,35 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _durableTaskSchedulerSchedulersClientDiagnostics; - private readonly SchedulersRestOperations _durableTaskSchedulerSchedulersRestClient; - private readonly DurableTaskSchedulerData _data; + private readonly ClientDiagnostics _schedulerClientDiagnostics; + private readonly SchedulersRestOperations _schedulerRestClient; + private readonly SchedulerData _data; /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers"; - /// Initializes a new instance of the class for mocking. - protected DurableTaskSchedulerResource() + /// Initializes a new instance of the class for mocking. + protected SchedulerResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DurableTaskSchedulerResource(ArmClient client, DurableTaskSchedulerData data) : this(client, data.Id) + internal SchedulerResource(ArmClient client, SchedulerData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal DurableTaskSchedulerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal SchedulerResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _durableTaskSchedulerSchedulersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string durableTaskSchedulerSchedulersApiVersion); - _durableTaskSchedulerSchedulersRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, durableTaskSchedulerSchedulersApiVersion); + _schedulerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string schedulerApiVersion); + _schedulerRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -74,7 +74,7 @@ internal DurableTaskSchedulerResource(ArmClient client, ResourceIdentifier id) : /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual DurableTaskSchedulerData Data + public virtual SchedulerData Data { get { @@ -90,11 +90,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of DurableTaskHubResources in the DurableTaskScheduler. - /// An object representing collection of DurableTaskHubResources and their operations over a DurableTaskHubResource. - public virtual DurableTaskHubCollection GetDurableTaskHubs() + /// Gets a collection of SchedulerTaskHubResources in the Scheduler. + /// An object representing collection of SchedulerTaskHubResources and their operations over a SchedulerTaskHubResource. + public virtual SchedulerTaskHubCollection GetSchedulerTaskHubs() { - return GetCachedClient(client => new DurableTaskHubCollection(client, Id)); + return GetCachedClient(client => new SchedulerTaskHubCollection(client, Id)); } /// @@ -114,7 +114,7 @@ public virtual DurableTaskHubCollection GetDurableTaskHubs() /// /// /// Resource - /// + /// /// /// /// @@ -123,9 +123,9 @@ public virtual DurableTaskHubCollection GetDurableTaskHubs() /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDurableTaskHubAsync(string taskHubName, CancellationToken cancellationToken = default) + public virtual async Task> GetSchedulerTaskHubAsync(string taskHubName, CancellationToken cancellationToken = default) { - return await GetDurableTaskHubs().GetAsync(taskHubName, cancellationToken).ConfigureAwait(false); + return await GetSchedulerTaskHubs().GetAsync(taskHubName, cancellationToken).ConfigureAwait(false); } /// @@ -145,7 +145,7 @@ public virtual async Task> GetDurableTaskHubAsy /// /// /// Resource - /// + /// /// /// /// @@ -154,16 +154,16 @@ public virtual async Task> GetDurableTaskHubAsy /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDurableTaskHub(string taskHubName, CancellationToken cancellationToken = default) + public virtual Response GetSchedulerTaskHub(string taskHubName, CancellationToken cancellationToken = default) { - return GetDurableTaskHubs().Get(taskHubName, cancellationToken); + return GetSchedulerTaskHubs().Get(taskHubName, cancellationToken); } - /// Gets an object representing a DurableTaskRetentionPolicyResource along with the instance operations that can be performed on it in the DurableTaskScheduler. - /// Returns a object. - public virtual DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicy() + /// Gets an object representing a RetentionPolicyResource along with the instance operations that can be performed on it in the Scheduler. + /// Returns a object. + public virtual RetentionPolicyResource GetRetentionPolicy() { - return new DurableTaskRetentionPolicyResource(Client, Id.AppendChildResource("retentionPolicies", "default")); + return new RetentionPolicyResource(Client, Id.AppendChildResource("retentionPolicies", "default")); } /// @@ -183,21 +183,21 @@ public virtual DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicy( /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Get"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Get"); scope.Start(); try { - var response = await _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,21 +223,21 @@ public virtual async Task> GetAsync(Cance /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Get"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Get"); scope.Start(); try { - var response = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -263,7 +263,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Resource - /// + /// /// /// /// @@ -271,12 +271,12 @@ public virtual Response Get(CancellationToken canc /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Delete"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Delete"); scope.Start(); try { - var response = await _durableTaskSchedulerSchedulersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(_durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _schedulerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(_schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -305,7 +305,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Resource - /// + /// /// /// /// @@ -313,12 +313,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Delete"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Delete"); scope.Start(); try { - var response = _durableTaskSchedulerSchedulersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DurableTaskArmOperation(_durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _schedulerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DurableTaskArmOperation(_schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -347,7 +347,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Resource - /// + /// /// /// /// @@ -355,16 +355,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// The resource properties to be updated. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DurableTaskSchedulerPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SchedulerPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Update"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Update"); scope.Start(); try { - var response = await _durableTaskSchedulerSchedulersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new DurableTaskSchedulerOperationSource(Client), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = await _schedulerRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -393,7 +393,7 @@ public virtual async Task> UpdateAsyn /// /// /// Resource - /// + /// /// /// /// @@ -401,16 +401,16 @@ public virtual async Task> UpdateAsyn /// The resource properties to be updated. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DurableTaskSchedulerPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, SchedulerPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Update"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Update"); scope.Start(); try { - var response = _durableTaskSchedulerSchedulersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new DurableTaskArmOperation(new DurableTaskSchedulerOperationSource(Client), _durableTaskSchedulerSchedulersClientDiagnostics, Pipeline, _durableTaskSchedulerSchedulersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = _schedulerRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -439,7 +439,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Resource - /// + /// /// /// /// @@ -447,12 +447,12 @@ public virtual ArmOperation Update(WaitUntil waitU /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.AddTag"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.AddTag"); scope.Start(); try { @@ -461,13 +461,13 @@ public virtual async Task> AddTagAsync(st var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DurableTaskSchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DurableTaskSchedulerPatch(); + var patch = new SchedulerPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -501,7 +501,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Resource - /// + /// /// /// /// @@ -509,12 +509,12 @@ public virtual async Task> AddTagAsync(st /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.AddTag"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.AddTag"); scope.Start(); try { @@ -523,13 +523,13 @@ public virtual Response AddTag(string key, string var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new DurableTaskSchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DurableTaskSchedulerPatch(); + var patch = new SchedulerPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -563,18 +563,18 @@ public virtual Response AddTag(string key, string /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.SetTags"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.SetTags"); scope.Start(); try { @@ -584,13 +584,13 @@ public virtual async Task> SetTagsAsync(I var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DurableTaskSchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DurableTaskSchedulerPatch(); + var patch = new SchedulerPatch(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -620,18 +620,18 @@ public virtual async Task> SetTagsAsync(I /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.SetTags"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.SetTags"); scope.Start(); try { @@ -641,13 +641,13 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.RemoveTag"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.RemoveTag"); scope.Start(); try { @@ -697,13 +697,13 @@ public virtual async Task> RemoveTagAsync var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _durableTaskSchedulerSchedulersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DurableTaskSchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DurableTaskSchedulerPatch(); + var patch = new SchedulerPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -737,18 +737,18 @@ public virtual async Task> RemoveTagAsync /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _durableTaskSchedulerSchedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.RemoveTag"); + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.RemoveTag"); scope.Start(); try { @@ -757,13 +757,13 @@ public virtual Response RemoveTag(string key, Canc var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _durableTaskSchedulerSchedulersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new DurableTaskSchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DurableTaskSchedulerPatch(); + var patch = new SchedulerPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubCollection.cs similarity index 65% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubCollection.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubCollection.cs index 00dfffad5bb4..37183cef94e8 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubCollection.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubCollection.cs @@ -18,28 +18,28 @@ namespace Azure.ResourceManager.DurableTask { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDurableTaskHubs method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSchedulerTaskHubs method from an instance of . /// - public partial class DurableTaskHubCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class SchedulerTaskHubCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _durableTaskHubTaskHubsClientDiagnostics; - private readonly TaskHubsRestOperations _durableTaskHubTaskHubsRestClient; + private readonly ClientDiagnostics _schedulerTaskHubTaskHubsClientDiagnostics; + private readonly TaskHubsRestOperations _schedulerTaskHubTaskHubsRestClient; - /// Initializes a new instance of the class for mocking. - protected DurableTaskHubCollection() + /// Initializes a new instance of the class for mocking. + protected SchedulerTaskHubCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal DurableTaskHubCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal SchedulerTaskHubCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _durableTaskHubTaskHubsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", DurableTaskHubResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DurableTaskHubResource.ResourceType, out string durableTaskHubTaskHubsApiVersion); - _durableTaskHubTaskHubsRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, durableTaskHubTaskHubsApiVersion); + _schedulerTaskHubTaskHubsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", SchedulerTaskHubResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SchedulerTaskHubResource.ResourceType, out string schedulerTaskHubTaskHubsApiVersion); + _schedulerTaskHubTaskHubsRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerTaskHubTaskHubsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -47,8 +47,8 @@ internal DurableTaskHubCollection(ArmClient client, ResourceIdentifier id) : bas internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != DurableTaskSchedulerResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DurableTaskSchedulerResource.ResourceType), nameof(id)); + if (id.ResourceType != SchedulerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SchedulerResource.ResourceType), nameof(id)); } /// @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Resource - /// + /// /// /// /// @@ -78,17 +78,17 @@ 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 taskHubName, DurableTaskHubData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string taskHubName, SchedulerTaskHubData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.CreateOrUpdate"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _durableTaskHubTaskHubsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new DurableTaskHubOperationSource(Client), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _schedulerTaskHubTaskHubsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new SchedulerTaskHubOperationSource(Client), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Resource - /// + /// /// /// /// @@ -127,17 +127,17 @@ public virtual async Task> CreateOrUpdateAs /// 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 taskHubName, DurableTaskHubData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string taskHubName, SchedulerTaskHubData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.CreateOrUpdate"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.CreateOrUpdate"); scope.Start(); try { - var response = _durableTaskHubTaskHubsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken); - var operation = new DurableTaskArmOperation(new DurableTaskHubOperationSource(Client), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _schedulerTaskHubTaskHubsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken); + var operation = new DurableTaskArmOperation(new SchedulerTaskHubOperationSource(Client), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Resource - /// + /// /// /// /// @@ -174,18 +174,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string taskHubName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string taskHubName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Get"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.Get"); scope.Start(); try { - var response = await _durableTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken).ConfigureAwait(false); + var response = await _schedulerTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string task /// /// /// Resource - /// + /// /// /// /// @@ -219,18 +219,18 @@ public virtual async Task> GetAsync(string task /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string taskHubName, CancellationToken cancellationToken = default) + public virtual Response Get(string taskHubName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Get"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.Get"); scope.Start(); try { - var response = _durableTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken); + var response = _schedulerTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -256,17 +256,17 @@ public virtual Response Get(string taskHubName, Cancella /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _durableTaskHubTaskHubsRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _durableTaskHubTaskHubsRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DurableTaskHubResource(Client, DurableTaskHubData.DeserializeDurableTaskHubData(e)), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, "DurableTaskHubCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _schedulerTaskHubTaskHubsRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerTaskHubTaskHubsRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SchedulerTaskHubResource(Client, SchedulerTaskHubData.DeserializeSchedulerTaskHubData(e)), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, "SchedulerTaskHubCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -286,17 +286,17 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _durableTaskHubTaskHubsRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _durableTaskHubTaskHubsRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DurableTaskHubResource(Client, DurableTaskHubData.DeserializeDurableTaskHubData(e)), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, "DurableTaskHubCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _schedulerTaskHubTaskHubsRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerTaskHubTaskHubsRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SchedulerTaskHubResource(Client, SchedulerTaskHubData.DeserializeSchedulerTaskHubData(e)), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, "SchedulerTaskHubCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Resource - /// + /// /// /// /// @@ -328,11 +328,11 @@ public virtual async Task> ExistsAsync(string taskHubName, Cancel { Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Exists"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.Exists"); scope.Start(); try { - var response = await _durableTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _schedulerTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string taskHubName, Cancel /// /// /// Resource - /// + /// /// /// /// @@ -371,11 +371,11 @@ public virtual Response Exists(string taskHubName, CancellationToken cance { Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Exists"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.Exists"); scope.Start(); try { - var response = _durableTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken); + var response = _schedulerTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -402,7 +402,7 @@ public virtual Response Exists(string taskHubName, CancellationToken cance /// /// /// Resource - /// + /// /// /// /// @@ -410,18 +410,18 @@ public virtual Response Exists(string taskHubName, CancellationToken cance /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string taskHubName, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string taskHubName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.GetIfExists"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.GetIfExists"); scope.Start(); try { - var response = await _durableTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _schedulerTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsA /// /// /// Resource - /// + /// /// /// /// @@ -455,18 +455,18 @@ public virtual async Task> GetIfExistsA /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string taskHubName, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string taskHubName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.GetIfExists"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.GetIfExists"); scope.Start(); try { - var response = _durableTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken); + var response = _schedulerTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -475,7 +475,7 @@ public virtual NullableResponse GetIfExists(string taskH } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -485,7 +485,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.Serialization.cs similarity index 66% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.Serialization.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.Serialization.cs index bf1a57699f39..807c1b002c81 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.Serialization.cs @@ -16,11 +16,11 @@ namespace Azure.ResourceManager.DurableTask { - public partial class DurableTaskRetentionPolicyData : IUtf8JsonSerializable, IJsonModel + public partial class SchedulerTaskHubData : 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); @@ -31,10 +31,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerTaskHubData)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -45,19 +45,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - DurableTaskRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SchedulerTaskHubData 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(DurableTaskRetentionPolicyData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SchedulerTaskHubData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDurableTaskRetentionPolicyData(document.RootElement, options); + return DeserializeSchedulerTaskHubData(document.RootElement, options); } - internal static DurableTaskRetentionPolicyData DeserializeDurableTaskRetentionPolicyData(JsonElement element, ModelReaderWriterOptions options = null) + internal static SchedulerTaskHubData DeserializeSchedulerTaskHubData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -65,7 +65,7 @@ internal static DurableTaskRetentionPolicyData DeserializeDurableTaskRetentionPo { return null; } - DurableTaskRetentionPolicyProperties properties = default; + SchedulerTaskHubProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -80,7 +80,7 @@ internal static DurableTaskRetentionPolicyData DeserializeDurableTaskRetentionPo { continue; } - properties = DurableTaskRetentionPolicyProperties.DeserializeDurableTaskRetentionPolicyProperties(property.Value, options); + properties = SchedulerTaskHubProperties.DeserializeSchedulerTaskHubProperties(property.Value, options); continue; } if (property.NameEquals("id"u8)) @@ -113,7 +113,7 @@ internal static DurableTaskRetentionPolicyData DeserializeDurableTaskRetentionPo } } serializedAdditionalRawData = rawDataDictionary; - return new DurableTaskRetentionPolicyData( + return new SchedulerTaskHubData( id, name, type, @@ -122,35 +122,35 @@ internal static DurableTaskRetentionPolicyData DeserializeDurableTaskRetentionPo 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, AzureResourceManagerDurableTaskContext.Default); default: - throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerTaskHubData)} does not support writing '{options.Format}' format."); } } - DurableTaskRetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SchedulerTaskHubData 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 DeserializeDurableTaskRetentionPolicyData(document.RootElement, options); + return DeserializeSchedulerTaskHubData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SchedulerTaskHubData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.cs similarity index 78% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.cs index 44f93fcb07a1..be03218e5cb5 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.cs @@ -14,10 +14,10 @@ namespace Azure.ResourceManager.DurableTask { /// - /// A class representing the DurableTaskHub data model. + /// A class representing the SchedulerTaskHub data model. /// A Task Hub resource belonging to the scheduler /// - public partial class DurableTaskHubData : ResourceData + public partial class SchedulerTaskHubData : ResourceData { /// /// Keeps track of any properties unknown to the library. @@ -51,25 +51,25 @@ public partial class DurableTaskHubData : ResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public DurableTaskHubData() + /// Initializes a new instance of . + public SchedulerTaskHubData() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. - internal DurableTaskHubData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DurableTaskHubProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal SchedulerTaskHubData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SchedulerTaskHubProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } /// The resource-specific properties for this resource. - public DurableTaskHubProperties Properties { get; set; } + public SchedulerTaskHubProperties Properties { get; set; } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.Serialization.cs new file mode 100644 index 000000000000..c053d7c70731 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DurableTask +{ + public partial class SchedulerTaskHubResource : IJsonModel + { + private static SchedulerTaskHubData s_dataDeserializationInstance; + private static SchedulerTaskHubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SchedulerTaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); + + SchedulerTaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.cs similarity index 68% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.cs index ab07ad0532bd..ecd957c18421 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.cs @@ -15,14 +15,14 @@ namespace Azure.ResourceManager.DurableTask { /// - /// A Class representing a DurableTaskHub along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDurableTaskHubResource method. - /// Otherwise you can get one from its parent resource using the GetDurableTaskHub method. + /// A Class representing a SchedulerTaskHub along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSchedulerTaskHubResource method. + /// Otherwise you can get one from its parent resource using the GetSchedulerTaskHub method. /// - public partial class DurableTaskHubResource : ArmResource + public partial class SchedulerTaskHubResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. /// The schedulerName. @@ -33,35 +33,35 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _durableTaskHubTaskHubsClientDiagnostics; - private readonly TaskHubsRestOperations _durableTaskHubTaskHubsRestClient; - private readonly DurableTaskHubData _data; + private readonly ClientDiagnostics _schedulerTaskHubTaskHubsClientDiagnostics; + private readonly TaskHubsRestOperations _schedulerTaskHubTaskHubsRestClient; + private readonly SchedulerTaskHubData _data; /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers/taskHubs"; - /// Initializes a new instance of the class for mocking. - protected DurableTaskHubResource() + /// Initializes a new instance of the class for mocking. + protected SchedulerTaskHubResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DurableTaskHubResource(ArmClient client, DurableTaskHubData data) : this(client, data.Id) + internal SchedulerTaskHubResource(ArmClient client, SchedulerTaskHubData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal DurableTaskHubResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal SchedulerTaskHubResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _durableTaskHubTaskHubsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string durableTaskHubTaskHubsApiVersion); - _durableTaskHubTaskHubsRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, durableTaskHubTaskHubsApiVersion); + _schedulerTaskHubTaskHubsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string schedulerTaskHubTaskHubsApiVersion); + _schedulerTaskHubTaskHubsRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerTaskHubTaskHubsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -72,7 +72,7 @@ internal DurableTaskHubResource(ArmClient client, ResourceIdentifier id) : base( /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual DurableTaskHubData Data + public virtual SchedulerTaskHubData Data { get { @@ -105,21 +105,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Get"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Get"); scope.Start(); try { - var response = await _durableTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _schedulerTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -145,21 +145,21 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Get"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Get"); scope.Start(); try { - var response = _durableTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _schedulerTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -185,7 +185,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Resource - /// + /// /// /// /// @@ -193,12 +193,12 @@ public virtual Response Get(CancellationToken cancellati /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Delete"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Delete"); scope.Start(); try { - var response = await _durableTaskHubTaskHubsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(_durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _schedulerTaskHubTaskHubsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(_schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Resource - /// + /// /// /// /// @@ -235,12 +235,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Delete"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Delete"); scope.Start(); try { - var response = _durableTaskHubTaskHubsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DurableTaskArmOperation(_durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _schedulerTaskHubTaskHubsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DurableTaskArmOperation(_schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Resource - /// + /// /// /// /// @@ -277,16 +277,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Resource create parameters. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DurableTaskHubData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SchedulerTaskHubData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Update"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Update"); scope.Start(); try { - var response = await _durableTaskHubTaskHubsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new DurableTaskHubOperationSource(Client), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _schedulerTaskHubTaskHubsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new SchedulerTaskHubOperationSource(Client), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Resource - /// + /// /// /// /// @@ -323,16 +323,16 @@ public virtual async Task> UpdateAsync(Wait /// Resource create parameters. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DurableTaskHubData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, SchedulerTaskHubData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _durableTaskHubTaskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Update"); + using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Update"); scope.Start(); try { - var response = _durableTaskHubTaskHubsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new DurableTaskArmOperation(new DurableTaskHubOperationSource(Client), _durableTaskHubTaskHubsClientDiagnostics, Pipeline, _durableTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _schedulerTaskHubTaskHubsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new DurableTaskArmOperation(new SchedulerTaskHubOperationSource(Client), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubCollection.cs deleted file mode 100644 index e32f9f887ed4..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubCollection.cs +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DurableTask.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DurableTask.Samples -{ - public partial class Sample_DurableTaskHubCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_TaskHubsCreateOrUpdate() - { - // Generated from example definition: 2025-11-01/TaskHubs_CreateOrUpdate.json - // this example is just showing the usage of "TaskHub_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskSchedulerResource created on azure - // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - string schedulerName = "testscheduler"; - ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - - // get the collection of this DurableTaskHubResource - DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); - - // invoke the operation - string taskHubName = "testtaskhub"; - DurableTaskHubData data = new DurableTaskHubData - { - Properties = new DurableTaskHubProperties(), - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, taskHubName, data); - DurableTaskHubResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskHubData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_TaskHubsGet() - { - // Generated from example definition: 2025-11-01/TaskHubs_Get.json - // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskSchedulerResource created on azure - // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - string schedulerName = "testscheduler"; - ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - - // get the collection of this DurableTaskHubResource - DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); - - // invoke the operation - string taskHubName = "testtaskhub"; - DurableTaskHubResource result = await collection.GetAsync(taskHubName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskHubData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_TaskHubsListByScheduler() - { - // Generated from example definition: 2025-11-01/TaskHubs_ListByScheduler.json - // this example is just showing the usage of "TaskHub_ListByScheduler" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskSchedulerResource created on azure - // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - string schedulerName = "testscheduler"; - ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - - // get the collection of this DurableTaskHubResource - DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); - - // invoke the operation and iterate over the result - await foreach (DurableTaskHubResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskHubData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_TaskHubsGet() - { - // Generated from example definition: 2025-11-01/TaskHubs_Get.json - // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskSchedulerResource created on azure - // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - string schedulerName = "testscheduler"; - ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - - // get the collection of this DurableTaskHubResource - DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); - - // invoke the operation - string taskHubName = "testtaskhub"; - bool result = await collection.ExistsAsync(taskHubName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_TaskHubsGet() - { - // Generated from example definition: 2025-11-01/TaskHubs_Get.json - // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskSchedulerResource created on azure - // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - string schedulerName = "testscheduler"; - ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - - // get the collection of this DurableTaskHubResource - DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); - - // invoke the operation - string taskHubName = "testtaskhub"; - NullableResponse response = await collection.GetIfExistsAsync(taskHubName); - DurableTaskHubResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskHubData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubResource.cs deleted file mode 100644 index aba09f676810..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubResource.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DurableTask.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DurableTask.Samples -{ - public partial class Sample_DurableTaskHubResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_TaskHubsGet() - { - // Generated from example definition: 2025-11-01/TaskHubs_Get.json - // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskHubResource created on azure - // for more information of creating DurableTaskHubResource, please refer to the document of DurableTaskHubResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - string schedulerName = "testscheduler"; - string taskHubName = "testtaskhub"; - ResourceIdentifier durableTaskHubResourceId = DurableTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); - DurableTaskHubResource durableTaskHub = client.GetDurableTaskHubResource(durableTaskHubResourceId); - - // invoke the operation - DurableTaskHubResource result = await durableTaskHub.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskHubData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_TaskHubsDelete() - { - // Generated from example definition: 2025-11-01/TaskHubs_Delete.json - // this example is just showing the usage of "TaskHub_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskHubResource created on azure - // for more information of creating DurableTaskHubResource, please refer to the document of DurableTaskHubResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - string schedulerName = "testscheduler"; - string taskHubName = "testtaskhub"; - ResourceIdentifier durableTaskHubResourceId = DurableTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); - DurableTaskHubResource durableTaskHub = client.GetDurableTaskHubResource(durableTaskHubResourceId); - - // invoke the operation - await durableTaskHub.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_TaskHubsCreateOrUpdate() - { - // Generated from example definition: 2025-11-01/TaskHubs_CreateOrUpdate.json - // this example is just showing the usage of "TaskHub_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskHubResource created on azure - // for more information of creating DurableTaskHubResource, please refer to the document of DurableTaskHubResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - string schedulerName = "testscheduler"; - string taskHubName = "testtaskhub"; - ResourceIdentifier durableTaskHubResourceId = DurableTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); - DurableTaskHubResource durableTaskHub = client.GetDurableTaskHubResource(durableTaskHubResourceId); - - // invoke the operation - DurableTaskHubData data = new DurableTaskHubData - { - Properties = new DurableTaskHubProperties(), - }; - ArmOperation lro = await durableTaskHub.UpdateAsync(WaitUntil.Completed, data); - DurableTaskHubResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskHubData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.cs deleted file mode 100644 index b40dc9a828e0..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DurableTask.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DurableTask.Samples -{ - public partial class Sample_DurableTaskRetentionPolicyResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetentionPoliciesGetMaximumSet() - { - // Generated from example definition: 2025-11-01/RetentionPolicies_Get_MaximumSet_Gen.json - // this example is just showing the usage of "RetentionPolicy_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskRetentionPolicyResource created on azure - // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource - string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; - string resourceGroupName = "rgdurabletask"; - string schedulerName = "testscheduler"; - ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); - - // invoke the operation - DurableTaskRetentionPolicyResource result = await durableTaskRetentionPolicy.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskRetentionPolicyData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_RetentionPoliciesDeleteMaximumSet() - { - // Generated from example definition: 2025-11-01/RetentionPolicies_Delete_MaximumSet_Gen.json - // this example is just showing the usage of "RetentionPolicy_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskRetentionPolicyResource created on azure - // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource - string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; - string resourceGroupName = "rgdurabletask"; - string schedulerName = "testcheduler"; - ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); - - // invoke the operation - await durableTaskRetentionPolicy.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_RetentionPoliciesUpdateMaximumSet() - { - // Generated from example definition: 2025-11-01/RetentionPolicies_Update_MaximumSet_Gen.json - // this example is just showing the usage of "RetentionPolicy_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskRetentionPolicyResource created on azure - // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource - string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; - string resourceGroupName = "rgdurabletask"; - string schedulerName = "testscheduler"; - ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); - - // invoke the operation - DurableTaskRetentionPolicyData data = new DurableTaskRetentionPolicyData - { - Properties = new DurableTaskRetentionPolicyProperties - { - RetentionPolicies = {new DurableTaskRetentionPolicyDetails(30), new DurableTaskRetentionPolicyDetails(10) -{ -OrchestrationState = DurableTaskPurgeableOrchestrationState.Failed, -}, new DurableTaskRetentionPolicyDetails(24) -{ -OrchestrationState = DurableTaskPurgeableOrchestrationState.Completed, -}}, - }, - }; - ArmOperation lro = await durableTaskRetentionPolicy.UpdateAsync(WaitUntil.Completed, data); - DurableTaskRetentionPolicyResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskRetentionPolicyData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_RetentionPoliciesCreateOrReplaceMaximumSet() - { - // Generated from example definition: 2025-11-01/RetentionPolicies_CreateOrReplace_MaximumSet_Gen.json - // this example is just showing the usage of "RetentionPolicy_CreateOrReplace" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskRetentionPolicyResource created on azure - // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource - string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; - string resourceGroupName = "rgdurabletask"; - string schedulerName = "testscheduler"; - ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); - - // invoke the operation - DurableTaskRetentionPolicyData data = new DurableTaskRetentionPolicyData - { - Properties = new DurableTaskRetentionPolicyProperties - { - RetentionPolicies = {new DurableTaskRetentionPolicyDetails(30), new DurableTaskRetentionPolicyDetails(10) -{ -OrchestrationState = DurableTaskPurgeableOrchestrationState.Failed, -}}, - }, - }; - ArmOperation lro = await durableTaskRetentionPolicy.CreateOrUpdateAsync(WaitUntil.Completed, data); - DurableTaskRetentionPolicyResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskRetentionPolicyData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerCollection.cs deleted file mode 100644 index d6d0f770a52f..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerCollection.cs +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DurableTask.Models; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.DurableTask.Samples -{ - public partial class Sample_DurableTaskSchedulerCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_SchedulersCreateOrUpdate() - { - // Generated from example definition: 2025-11-01/Schedulers_CreateOrUpdate.json - // this example is just showing the usage of "Scheduler_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DurableTaskSchedulerResource - DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); - - // invoke the operation - string schedulerName = "testscheduler"; - DurableTaskSchedulerData data = new DurableTaskSchedulerData(new AzureLocation("northcentralus")) - { - Properties = new DurableTaskSchedulerProperties(new string[] { "10.0.0.0/8" }, new DurableTaskSchedulerSku(SchedulerSkuName.Dedicated)), - Tags = -{ -["department"] = "research", -["development"] = "true" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, schedulerName, data); - DurableTaskSchedulerResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskSchedulerData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_SchedulersGet() - { - // Generated from example definition: 2025-11-01/Schedulers_Get.json - // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DurableTaskSchedulerResource - DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); - - // invoke the operation - string schedulerName = "testscheduler"; - DurableTaskSchedulerResource result = await collection.GetAsync(schedulerName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskSchedulerData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_SchedulersListByResourceGroup() - { - // Generated from example definition: 2025-11-01/Schedulers_ListByResourceGroup.json - // this example is just showing the usage of "Scheduler_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DurableTaskSchedulerResource - DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); - - // invoke the operation and iterate over the result - await foreach (DurableTaskSchedulerResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskSchedulerData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_SchedulersGet() - { - // Generated from example definition: 2025-11-01/Schedulers_Get.json - // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DurableTaskSchedulerResource - DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); - - // invoke the operation - string schedulerName = "testscheduler"; - bool result = await collection.ExistsAsync(schedulerName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_SchedulersGet() - { - // Generated from example definition: 2025-11-01/Schedulers_Get.json - // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DurableTaskSchedulerResource - DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); - - // invoke the operation - string schedulerName = "testscheduler"; - NullableResponse response = await collection.GetIfExistsAsync(schedulerName); - DurableTaskSchedulerResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskSchedulerData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerResource.cs deleted file mode 100644 index 36a4de417bb9..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerResource.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DurableTask.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DurableTask.Samples -{ - public partial class Sample_DurableTaskSchedulerResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_SchedulersGet() - { - // Generated from example definition: 2025-11-01/Schedulers_Get.json - // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskSchedulerResource created on azure - // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - string schedulerName = "testscheduler"; - ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - - // invoke the operation - DurableTaskSchedulerResource result = await durableTaskScheduler.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskSchedulerData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_SchedulersDelete() - { - // Generated from example definition: 2025-11-01/Schedulers_Delete.json - // this example is just showing the usage of "Scheduler_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskSchedulerResource created on azure - // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - string schedulerName = "testscheduler"; - ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - - // invoke the operation - await durableTaskScheduler.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_SchedulersUpdate() - { - // Generated from example definition: 2025-11-01/Schedulers_Update.json - // this example is just showing the usage of "Scheduler_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DurableTaskSchedulerResource created on azure - // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - string resourceGroupName = "rgopenapi"; - string schedulerName = "testscheduler"; - ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - - // invoke the operation - DurableTaskSchedulerPatch patch = new DurableTaskSchedulerPatch - { - Properties = new DurableTaskSchedulerPatchProperties - { - IPAllowlist = { "10.0.0.0/8" }, - Sku = new DurableTaskSchedulerSkuUpdate - { - Name = SchedulerSkuName.Dedicated, - Capacity = 3, - }, - }, - Tags = -{ -["hello"] = "world" -}, - }; - ArmOperation lro = await durableTaskScheduler.UpdateAsync(WaitUntil.Completed, patch); - DurableTaskSchedulerResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskSchedulerData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs deleted file mode 100644 index 6810cd8ad043..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.DurableTask.Samples -{ - public partial class Sample_SubscriptionResourceExtensions - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDurableTaskSchedulers_SchedulersListBySubscription() - { - // Generated from example definition: 2025-11-01/Schedulers_ListBySubscription.json - // this example is just showing the usage of "Scheduler_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (DurableTaskSchedulerResource item in subscriptionResource.GetDurableTaskSchedulersAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DurableTaskSchedulerData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/RetentionPolicyTests.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/RetentionPolicyTests.cs index 37b299751a2c..c50b95c28e45 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/RetentionPolicyTests.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/RetentionPolicyTests.cs @@ -30,42 +30,42 @@ await TestContext.Error.WriteLineAsync( string resourceName = Recording.GenerateAssetName("resource"); // Create Scheduler - DurableTaskSchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) + SchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) { - Properties = new DurableTaskSchedulerProperties( + Properties = new SchedulerProperties( ipAllowlist: ["0.0.0.0/0"], // all IPs allowed to access the endpoint - sku: new DurableTaskSchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } + sku: new SchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } ) }; - ArmOperation longRunningOperation = - await rg.GetDurableTaskSchedulers().CreateOrUpdateAsync(WaitUntil.Completed, resourceName, createSchedulerData); - DurableTaskSchedulerResource scheduler = longRunningOperation.Value; + ArmOperation longRunningOperation = + await rg.GetSchedulers().CreateOrUpdateAsync(WaitUntil.Completed, resourceName, createSchedulerData); + SchedulerResource scheduler = longRunningOperation.Value; // This is a singleton resource, but it does not yet exist until we create it - DurableTaskRetentionPolicyResource singletonRetentionPolicy = scheduler.GetDurableTaskRetentionPolicy(); + RetentionPolicyResource singletonRetentionPolicy = scheduler.GetRetentionPolicy(); // Construct the retention policy with multiple rules - DurableTaskRetentionPolicyProperties retentionPolicyProperties = new DurableTaskRetentionPolicyProperties(); + RetentionPolicyProperties retentionPolicyProperties = new RetentionPolicyProperties(); retentionPolicyProperties.RetentionPolicies.Add( - new DurableTaskRetentionPolicyDetails() + new RetentionPolicyDetails() { RetentionPeriodInDays = 3, OrchestrationState = DurableTaskPurgeableOrchestrationState.Completed }); retentionPolicyProperties.RetentionPolicies.Add( - new DurableTaskRetentionPolicyDetails() + new RetentionPolicyDetails() { RetentionPeriodInDays = 30, OrchestrationState = DurableTaskPurgeableOrchestrationState.Failed }); retentionPolicyProperties.RetentionPolicies.Add( - new DurableTaskRetentionPolicyDetails() + new RetentionPolicyDetails() { RetentionPeriodInDays = 30, // without OrchestrationState, this policy applies to all states not explicitly mentioned in other policies }); - DurableTaskRetentionPolicyData payload = new DurableTaskRetentionPolicyData() + RetentionPolicyData payload = new RetentionPolicyData() { Properties = retentionPolicyProperties }; @@ -77,7 +77,7 @@ await TestContext.Error.WriteLineAsync( Assert.AreEqual(3, singletonRetentionPolicy.Data.Properties.RetentionPolicies.Count); // Assert the specific policy for Completed orchestrations has the expected retention period - DurableTaskRetentionPolicyDetails completedPolicy = singletonRetentionPolicy.Data.Properties.RetentionPolicies + RetentionPolicyDetails completedPolicy = singletonRetentionPolicy.Data.Properties.RetentionPolicies .SingleOrDefault(p => p.OrchestrationState == DurableTaskPurgeableOrchestrationState.Completed); Assert.NotNull(completedPolicy, "Expected a retention policy with OrchestrationState=Completed."); diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/SchedulerTests.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/SchedulerTests.cs index 2a420c3763ca..ff8d07ed548a 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/SchedulerTests.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/SchedulerTests.cs @@ -46,21 +46,21 @@ await TestContext.Error.WriteLineAsync( string resourceName = Recording.GenerateAssetName("resource"); // Create Scheduler - DurableTaskSchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) + SchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) { - Properties = new DurableTaskSchedulerProperties( + Properties = new SchedulerProperties( ipAllowlist: [IpRange1, IpRange2, IpRange3], - sku: new DurableTaskSchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } + sku: new SchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } ) }; - ArmOperation longRunningOperation = - await rg.GetDurableTaskSchedulers().CreateOrUpdateAsync(WaitUntil.Started, resourceName, createSchedulerData); + ArmOperation longRunningOperation = + await rg.GetSchedulers().CreateOrUpdateAsync(WaitUntil.Started, resourceName, createSchedulerData); // While provisioning is in progress the resource is in first in accepted, then provisioning state - DurableTaskSchedulerResource resource = await rg.GetDurableTaskSchedulerAsync(resourceName); + SchedulerResource resource = await rg.GetSchedulerAsync(resourceName); Assert.NotNull(resource); - Assert.Contains(resource.Data.Properties.ProvisioningState, new[] { DurableTaskProvisioningState.Provisioning, DurableTaskProvisioningState.Accepted }); + Assert.Contains(resource.Data.Properties.ProvisioningState, new[] { ProvisioningState.Provisioning, ProvisioningState.Accepted }); // Keep track of the resource id to delete it later string resourceId = resource.Id; @@ -72,10 +72,10 @@ await TestContext.Error.WriteLineAsync( Assert.Contains(IpRange1, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(IpRange2, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(IpRange3, resource.Data.Properties.IPAllowlist as IList); - Assert.AreEqual(DurableTaskProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); + Assert.AreEqual(ProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); // Get Scheduler - resource = await rg.GetDurableTaskSchedulerAsync(resourceName); + resource = await rg.GetSchedulerAsync(resourceName); Assert.NotNull(resource); Assert.AreEqual(resourceName, resource.Data.Name); Assert.AreEqual(SchedulerSkuName.Dedicated, resource.Data.Properties.Sku.Name); @@ -83,22 +83,22 @@ await TestContext.Error.WriteLineAsync( Assert.Contains(IpRange1, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(IpRange2, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(IpRange3, resource.Data.Properties.IPAllowlist as IList); - Assert.AreEqual(DurableTaskProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); + Assert.AreEqual(ProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); - DurableTaskSchedulerData updateSchedulerData = new(AzureLocation.NorthCentralUS) + SchedulerData updateSchedulerData = new(AzureLocation.NorthCentralUS) { - Properties = new DurableTaskSchedulerProperties( + Properties = new SchedulerProperties( ipAllowlist: [UpdatedIpRange1, UpdatedIpRange2, IpRange3], - sku: new DurableTaskSchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } + sku: new SchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } ), Tags = { { TagKeyOrg, TagValueOrg }, { TagKeyEnv, TagValueEnv } } }; longRunningOperation = - await rg.GetDurableTaskSchedulers().CreateOrUpdateAsync(WaitUntil.Started, resourceName, updateSchedulerData); + await rg.GetSchedulers().CreateOrUpdateAsync(WaitUntil.Started, resourceName, updateSchedulerData); // While the update is in progress the resource is in updating state - resource = await rg.GetDurableTaskSchedulerAsync(resourceName); - Assert.AreEqual(DurableTaskProvisioningState.Updating, resource.Data.Properties.ProvisioningState); + resource = await rg.GetSchedulerAsync(resourceName); + Assert.AreEqual(ProvisioningState.Updating, resource.Data.Properties.ProvisioningState); // Wait for the update to complete resource = await longRunningOperation.WaitForCompletionAsync(); @@ -113,10 +113,10 @@ await TestContext.Error.WriteLineAsync( Assert.That(resource.Data.Tags.Keys, Does.Contain(TagKeyEnv)); Assert.AreEqual(TagValueOrg, resource.Data.Tags[TagKeyOrg]); Assert.AreEqual(TagValueEnv, resource.Data.Tags[TagKeyEnv]); - Assert.AreEqual(DurableTaskProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); + Assert.AreEqual(ProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); // List all schedulers and verify the updated scheduler is present - List schedulers = await rg.GetDurableTaskSchedulers().GetAllAsync().ToEnumerableAsync(); + List schedulers = await rg.GetSchedulers().GetAllAsync().ToEnumerableAsync(); // Look for the scheduler with the ARM resource ID matching our resource resource = schedulers.FirstOrDefault(s => s.Data.Id == resourceId); Assert.NotNull(resource); @@ -131,15 +131,15 @@ await TestContext.Error.WriteLineAsync( Assert.That(resource.Data.Tags.Keys, Does.Contain(TagKeyEnv)); Assert.AreEqual(TagValueOrg, resource.Data.Tags[TagKeyOrg]); Assert.AreEqual(TagValueEnv, resource.Data.Tags[TagKeyEnv]); - Assert.AreEqual(DurableTaskProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); + Assert.AreEqual(ProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); // Update select Scheduler properties (Patch) - DurableTaskSchedulerPatch patchSchedulerData = new() + SchedulerPatch patchSchedulerData = new() { - Properties = new DurableTaskSchedulerPatchProperties + Properties = new SchedulerPatchProperties { IPAllowlist = { PatchIpRange }, - Sku = new DurableTaskSchedulerSkuUpdate + Sku = new SchedulerSkuUpdate { Capacity = 1 } @@ -159,7 +159,7 @@ await TestContext.Error.WriteLineAsync( Assert.AreEqual(1, resource.Data.Tags.Count); Assert.That(resource.Data.Tags.Keys, Does.Contain(TagKeyEnv)); Assert.AreEqual(TagValueEnv, resource.Data.Tags[TagKeyEnv]); - Assert.AreEqual(DurableTaskProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); + Assert.AreEqual(ProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); // Delete Scheduler await resource.DeleteAsync(WaitUntil.Completed); @@ -167,7 +167,7 @@ await TestContext.Error.WriteLineAsync( // Verify the scheduler is deleted try { - await rg.GetDurableTaskSchedulerAsync(resourceName); + await rg.GetSchedulerAsync(resourceName); } catch (RequestFailedException ex) when (ex.Status == StatusCodes.Status404NotFound) { diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/TaskHubTests.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/TaskHubTests.cs index 500b2af1e99b..0d8818211d2f 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/TaskHubTests.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/TaskHubTests.cs @@ -29,27 +29,27 @@ await TestContext.Error.WriteLineAsync( string resourceName = Recording.GenerateAssetName("resource"); // Create Scheduler - DurableTaskSchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) + SchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) { - Properties = new DurableTaskSchedulerProperties( + Properties = new SchedulerProperties( ipAllowlist: ["0.0.0.0/0"], // all IPs allowed to access the endpoint - sku: new DurableTaskSchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } + sku: new SchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } ) }; - ArmOperation longRunningOperation = - await rg.GetDurableTaskSchedulers().CreateOrUpdateAsync(WaitUntil.Completed, resourceName, createSchedulerData); - DurableTaskSchedulerResource scheduler = longRunningOperation.Value; - DurableTaskHubCollection collection = scheduler.GetDurableTaskHubs(); + ArmOperation longRunningOperation = + await rg.GetSchedulers().CreateOrUpdateAsync(WaitUntil.Completed, resourceName, createSchedulerData); + SchedulerResource scheduler = longRunningOperation.Value; + SchedulerTaskHubCollection collection = scheduler.GetSchedulerTaskHubs(); - await collection.CreateOrUpdateAsync(WaitUntil.Completed, "MyHub", new DurableTaskHubData()); + await collection.CreateOrUpdateAsync(WaitUntil.Completed, "MyHub", new SchedulerTaskHubData()); - DurableTaskHubResource hub = await scheduler.GetDurableTaskHubAsync("MyHub"); + SchedulerTaskHubResource hub = await scheduler.GetSchedulerTaskHubAsync("MyHub"); Assert.True(hub.HasData); Assert.True(hub.Data.Properties.DashboardUri.Host.ToLower().Contains("durabletask.io")); Assert.AreEqual("MyHub", hub.Data.Name); // The list endpoint should also return the newly created hub - DurableTaskHubResource listHub = await collection.GetAllAsync().FirstOrDefaultAsync(t => t.Data.Name == "MyHub"); + SchedulerTaskHubResource listHub = await collection.GetAllAsync().FirstOrDefaultAsync(t => t.Data.Name == "MyHub"); Assert.NotNull(listHub); Assert.AreEqual(hub.Data.Name, listHub.Data.Name); @@ -57,7 +57,7 @@ await TestContext.Error.WriteLineAsync( try { - await scheduler.GetDurableTaskHubAsync("MyHub"); + await scheduler.GetSchedulerTaskHubAsync("MyHub"); } catch (RequestFailedException ex) when (ex.Status == StatusCodes.Status404NotFound) { diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml b/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml index 67245a3260e6..68bbbe65866d 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/durabletask/DurableTask.Management -commit: 09da331bca982c314a4a297b6696e523e473c1ef -repo: Azure/azure-rest-api-specs +commit: 0dc219365ad41a267c8d102e24dbc8a9f7a1a117 +repo: berndverst/azure-rest-api-specs