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 4fbeaa28c22b..7ce1ce7d26d8 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 @@ -887,7 +887,7 @@ internal RouterQueueStatistics() { } } public partial class RouterWorker { - public RouterWorker() { } + internal RouterWorker() { } public System.Collections.Generic.IReadOnlyList AssignedJobs { get { throw null; } } public bool? AvailableForOffers { get { throw null; } } public System.Collections.Generic.IDictionary ChannelConfigurations { get { throw null; } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterWorker.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterWorker.cs index d617211c28d3..16667760d9e9 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterWorker.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterWorker.cs @@ -14,17 +14,6 @@ namespace Azure.Communication.JobRouter.Models /// An entity for jobs to be routed to. public partial class RouterWorker { - /// Initializes a new instance of RouterWorker. - public RouterWorker() - { - _queueAssignments = new ChangeTrackingDictionary(); - _labels = new ChangeTrackingDictionary(); - _tags = new ChangeTrackingDictionary(); - _channelConfigurations = new ChangeTrackingDictionary(); - Offers = new ChangeTrackingList(); - AssignedJobs = new ChangeTrackingList(); - } - /// Initializes a new instance of RouterWorker. /// /// The current state of the worker. diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs index 36ddcd04f866..02308191eaf7 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs @@ -47,6 +47,7 @@ internal IDictionary _labels /// Initializes a new instance of JobQueue. internal RouterQueue() { + _labels = new ChangeTrackingDictionary(); } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs index 47774d33b16c..ee5f7148c08c 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs @@ -11,6 +11,17 @@ namespace Azure.Communication.JobRouter.Models [CodeGenModel("RouterWorker")] public partial class RouterWorker { + /// Initializes a new instance of RouterWorker. + internal RouterWorker() + { + _queueAssignments = new ChangeTrackingDictionary(); + _labels = new ChangeTrackingDictionary(); + _tags = new ChangeTrackingDictionary(); + _channelConfigurations = new ChangeTrackingDictionary(); + Offers = new ChangeTrackingList(); + AssignedJobs = new ChangeTrackingList(); + } + /// /// A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. /// diff --git a/sdk/communication/Azure.Communication.JobRouter/src/autorest.md b/sdk/communication/Azure.Communication.JobRouter/src/autorest.md index 015bdf524cd0..9fb1dbc8b78f 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/autorest.md +++ b/sdk/communication/Azure.Communication.JobRouter/src/autorest.md @@ -2,10 +2,8 @@ When a new version of the swagger needs to be updated: 1. Go to sdk\communication\Azure.Communication.JobRouter\src, and run `dotnet msbuild /t:GenerateCode` to generate code. -2. Upload the Azure.Communication.JobRouter.dll to the apiview.dev tool. -If any of the new objects needs to be overwritten, add the required changes to the 'Models' folder. - -3. Repeat 2 and 3 until the decided interface is reflected in the apiview.dev +2. In root folder, run `eng\scripts\Export-API.ps1 -ServiceDirectory communication/Azure.Communication.JobRouter` +3. In root folder, run `eng\scripts\Update-Snippets.ps1 -ServiceDirectory communication/Azure.Communication.JobRouter` > see [https://aka.ms/autorest](https://aka.ms/autorest)