From 4eb3310424b85a7f8b9585467ad6a4c3e232243a Mon Sep 17 00:00:00 2001 From: Rajarshi Sarkar Date: Wed, 12 Jul 2023 15:30:48 -0700 Subject: [PATCH 1/5] missing usage of Azure.Etag in RouterQueueItem --- ...zure.Communication.JobRouter.netstandard2.0.cs | 3 +-- .../CommunicationJobRouterModelFactory.cs | 9 --------- .../src/Generated/Models/RouterQueueItem.cs | 4 +--- .../src/Models/RouterQueueItem.cs | 15 +++++++++++++++ 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs b/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs index 6d9d83e1d382..5de9e988e71b 100644 --- a/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs @@ -768,7 +768,6 @@ public static partial class CommunicationJobRouterModelFactory public static Azure.Communication.JobRouter.Models.AcceptJobOfferResult AcceptJobOfferResult(string assignmentId = null, string jobId = null, string workerId = null) { throw null; } public static Azure.Communication.JobRouter.Models.RouterJobAssignment RouterJobAssignment(string assignmentId = null, string workerId = null, System.DateTimeOffset assignedAt = default(System.DateTimeOffset), System.DateTimeOffset? completedAt = default(System.DateTimeOffset?), System.DateTimeOffset? closedAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.Communication.JobRouter.Models.RouterJobOffer RouterJobOffer(string offerId = null, string jobId = null, int capacityCost = 0, System.DateTimeOffset? offeredAt = default(System.DateTimeOffset?), System.DateTimeOffset? expiresAt = default(System.DateTimeOffset?)) { throw null; } - public static Azure.Communication.JobRouter.Models.RouterQueueItem RouterQueueItem(Azure.Communication.JobRouter.Models.RouterQueue queue = null, string etag = null) { throw null; } public static Azure.Communication.JobRouter.Models.RouterQueueStatistics RouterQueueStatistics(string queueId = null, int length = 0, System.Collections.Generic.IReadOnlyDictionary estimatedWaitTimeMinutes = null, double? longestJobWaitTimeMinutes = default(double?)) { throw null; } public static Azure.Communication.JobRouter.Models.RouterWorkerAssignment RouterWorkerAssignment(string assignmentId = null, string jobId = null, int capacityCost = 0, System.DateTimeOffset assignedAt = default(System.DateTimeOffset)) { throw null; } public static Azure.Communication.JobRouter.Models.UnassignJobResult UnassignJobResult(string jobId = null, int unassignmentCount = 0) { throw null; } @@ -912,7 +911,7 @@ internal RouterQueue() { } public partial class RouterQueueItem { internal RouterQueueItem() { } - public string Etag { get { throw null; } } + public Azure.ETag ETag { get { throw null; } } public Azure.Communication.JobRouter.Models.RouterQueue Queue { get { throw null; } } } public partial class RouterQueueStatistics diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CommunicationJobRouterModelFactory.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CommunicationJobRouterModelFactory.cs index 31906d9af2f7..fdde257d0563 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CommunicationJobRouterModelFactory.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CommunicationJobRouterModelFactory.cs @@ -64,15 +64,6 @@ public static AcceptJobOfferResult AcceptJobOfferResult(string assignmentId = nu return new AcceptJobOfferResult(assignmentId, jobId, workerId); } - /// Initializes a new instance of RouterQueueItem. - /// A queue that can contain jobs to be routed. - /// (Optional) The Concurrency Token. - /// A new instance for mocking. - public static RouterQueueItem RouterQueueItem(RouterQueue queue = null, string etag = null) - { - return new RouterQueueItem(queue, etag); - } - /// Initializes a new instance of RouterQueueStatistics. /// Id of the queue these details are about. /// Length of the queue: total number of enqueued jobs. diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterQueueItem.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterQueueItem.cs index 5d8b29a49114..500f148cb411 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterQueueItem.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterQueueItem.cs @@ -21,12 +21,10 @@ internal RouterQueueItem() internal RouterQueueItem(RouterQueue queue, string etag) { Queue = queue; - Etag = etag; + _etag = etag; } /// A queue that can contain jobs to be routed. public RouterQueue Queue { get; } - /// (Optional) The Concurrency Token. - public string Etag { get; } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueueItem.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueueItem.cs index 24eb8cefeccd..74e300c47ab1 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueueItem.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueueItem.cs @@ -8,5 +8,20 @@ namespace Azure.Communication.JobRouter.Models [CodeGenModel("RouterQueueItem")] public partial class RouterQueueItem { + [CodeGenMember("Etag")] + internal string _etag + { + get + { + return ETag.ToString(); + } + set + { + ETag = new ETag(value); + } + } + + /// (Optional) The Concurrency Token. + public ETag ETag { get; internal set; } } } From cb3cd4d8e123b97c4e1b85042c28c171d9c0fabf Mon Sep 17 00:00:00 2001 From: Rajarshi Sarkar Date: Thu, 13 Jul 2023 11:44:11 -0700 Subject: [PATCH 2/5] add features added section in changelog for pre-release script --- .../CHANGELOG.md | 25 +++++++++++++++++-- .../src/Azure.Communication.JobRouter.csproj | 2 +- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md b/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md index 338e066f2ba6..83114184d1f4 100644 --- a/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md +++ b/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md @@ -1,10 +1,31 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2023-07-19) This is the beta release of Azure Communication Router .NET SDK. For more information, please see the [README][read_me]. -This is a private Preview version, so breaking changes are possible in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for .NET GitHub repo][issues]. +This is a Public Preview version, so breaking changes are possible in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for .NET GitHub repo][issues]. + +### Features Added +- Using `JobRouterAdministrationClient` + - Create, update, get, list and delete `DistributionPolicy`. + - Create, update, get, list and delete `RouterQueue`. + - Create, update, get, list and delete `ClassificationPolicy`. + - Create, update, get, list and delete `ExceptionPolicy`. +- Using `JobRouterClient` + - Create, update, get, list and delete `RouterJob`. + - `RouterJob` can be created and updated with different matching modes: `QueueAndMatchMode`, `ScheduleAndSuspendMode` and `SuspendMode`. + - Re-classify a `RouterJob`. + - Close a `RouterJob`. + - Complete a `RouterJob`. + - Cancel a `RouterJob`. + - Un-assign a `RouterJob`, with option to suspend matching. + - Get the position of a `RouterJob` in a queue. + - Create, update, get, list and delete `RouterWorker`. + - Accept an offer. + - Decline an offer. + - Get queue statistics. + [read_me]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/communication/Azure.Communication.JobRouter/README.md diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Azure.Communication.JobRouter.csproj b/sdk/communication/Azure.Communication.JobRouter/src/Azure.Communication.JobRouter.csproj index c389a543af70..9376916a096d 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Azure.Communication.JobRouter.csproj +++ b/sdk/communication/Azure.Communication.JobRouter/src/Azure.Communication.JobRouter.csproj @@ -1,4 +1,4 @@ - + From fc974cbe378c9edbacb7ae0d33464a6f35adf39b Mon Sep 17 00:00:00 2001 From: williamzhao87 Date: Thu, 13 Jul 2023 14:54:35 -0400 Subject: [PATCH 3/5] Pre-release --- sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md b/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md index 83114184d1f4..44fe1dec9c0b 100644 --- a/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md +++ b/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.1 (2023-07-19) +## 1.0.0-beta.1 (2023-07-28) This is the beta release of Azure Communication Router .NET SDK. For more information, please see the [README][read_me]. From 8bab7f0f4dfea546105f86c44cb41f56f22d8dbe Mon Sep 17 00:00:00 2001 From: Rajarshi Sarkar Date: Thu, 13 Jul 2023 15:28:30 -0700 Subject: [PATCH 4/5] fix typo --- sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md b/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md index 44fe1dec9c0b..03521cf3ad32 100644 --- a/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md +++ b/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md @@ -2,7 +2,7 @@ ## 1.0.0-beta.1 (2023-07-28) -This is the beta release of Azure Communication Router .NET SDK. For more information, please see the [README][read_me]. +This is the beta release of Azure Communication Job Router .NET SDK. For more information, please see the [README][read_me]. This is a Public Preview version, so breaking changes are possible in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for .NET GitHub repo][issues]. From c5286ef65a437d4741c1caee1bb673a982ea2ae0 Mon Sep 17 00:00:00 2001 From: Rajarshi Sarkar Date: Wed, 19 Jul 2023 15:52:57 -0700 Subject: [PATCH 5/5] update changelog --- sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md b/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md index 03521cf3ad32..a4008bb81eb5 100644 --- a/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md +++ b/sdk/communication/Azure.Communication.JobRouter/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.1 (2023-07-28) +## 1.0.0-beta.1 (Unreleased) This is the beta release of Azure Communication Job Router .NET SDK. For more information, please see the [README][read_me].