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 4b251f6df360..6d9d83e1d382 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 @@ -746,10 +746,10 @@ internal CancelJobResult() { } public partial class ClassificationPolicy { internal ClassificationPolicy() { } - public string FallbackQueueId { get { throw null; } set { } } + public string FallbackQueueId { get { throw null; } } public string Id { get { throw null; } } - public string Name { get { throw null; } set { } } - public Azure.Communication.JobRouter.RouterRule PrioritizationRule { get { throw null; } set { } } + public string Name { get { throw null; } } + public Azure.Communication.JobRouter.RouterRule PrioritizationRule { get { throw null; } } public System.Collections.Generic.List QueueSelectors { get { throw null; } } public System.Collections.Generic.List WorkerSelectors { get { throw null; } } } @@ -785,8 +785,8 @@ public partial class DistributionPolicy { internal DistributionPolicy() { } public string Id { get { throw null; } } - public Azure.Communication.JobRouter.DistributionMode Mode { get { throw null; } set { } } - public string Name { get { throw null; } set { } } + public Azure.Communication.JobRouter.DistributionMode Mode { get { throw null; } } + public string Name { get { throw null; } } public System.TimeSpan? OfferExpiresAfter { get { throw null; } set { } } } public partial class DistributionPolicyItem @@ -800,7 +800,7 @@ public partial class ExceptionPolicy internal ExceptionPolicy() { } public System.Collections.Generic.IDictionary ExceptionRules { get { throw null; } } public string Id { get { throw null; } } - public string Name { get { throw null; } set { } } + public string Name { get { throw null; } } } public partial class ExceptionPolicyItem { @@ -817,17 +817,17 @@ public partial class RouterJob internal RouterJob() { } public System.Collections.Generic.IReadOnlyDictionary Assignments { get { throw null; } } public System.Collections.Generic.IReadOnlyList AttachedWorkerSelectors { get { throw null; } } - public string ChannelId { get { throw null; } set { } } - public string ChannelReference { get { throw null; } set { } } - public string ClassificationPolicyId { get { throw null; } set { } } - public string DispositionCode { get { throw null; } set { } } + public string ChannelId { get { throw null; } } + public string ChannelReference { get { throw null; } } + public string ClassificationPolicyId { get { throw null; } } + public string DispositionCode { get { throw null; } } public System.DateTimeOffset? EnqueuedAt { get { throw null; } } public string Id { get { throw null; } } public System.Collections.Generic.Dictionary Labels { get { throw null; } } - public Azure.Communication.JobRouter.JobMatchingMode MatchingMode { get { throw null; } set { } } + public Azure.Communication.JobRouter.JobMatchingMode MatchingMode { get { throw null; } } public System.Collections.Generic.List Notes { get { throw null; } } - public int? Priority { get { throw null; } set { } } - public string QueueId { get { throw null; } set { } } + public int? Priority { get { throw null; } } + public string QueueId { get { throw null; } } public System.Collections.Generic.List RequestedWorkerSelectors { get { throw null; } } public System.DateTimeOffset? ScheduledAt { get { throw null; } } public Azure.Communication.JobRouter.Models.RouterJobStatus? Status { get { throw null; } } @@ -903,11 +903,11 @@ internal RouterJobPositionDetails() { } public partial class RouterQueue { internal RouterQueue() { } - public string DistributionPolicyId { get { throw null; } set { } } - public string ExceptionPolicyId { get { throw null; } set { } } + public string DistributionPolicyId { get { throw null; } } + public string ExceptionPolicyId { get { throw null; } } public string Id { get { throw null; } } public System.Collections.Generic.IDictionary Labels { get { throw null; } } - public string Name { get { throw null; } set { } } + public string Name { get { throw null; } } } public partial class RouterQueueItem { @@ -927,7 +927,7 @@ public partial class RouterWorker { public RouterWorker() { } public System.Collections.Generic.IReadOnlyList AssignedJobs { get { throw null; } } - public bool? AvailableForOffers { get { throw null; } set { } } + public bool? AvailableForOffers { get { throw null; } } public System.Collections.Generic.IDictionary ChannelConfigurations { get { throw null; } } public string Id { get { throw null; } } public System.Collections.Generic.IDictionary Labels { get { throw null; } } @@ -936,7 +936,7 @@ public RouterWorker() { } public System.Collections.Generic.IDictionary QueueAssignments { get { throw null; } } public Azure.Communication.JobRouter.RouterWorkerState? State { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } - public int? TotalCapacity { get { throw null; } set { } } + public int? TotalCapacity { get { throw null; } } } public partial class RouterWorkerAssignment { diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/ClassificationPolicy.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/ClassificationPolicy.cs index 48b55a27fc05..cb984d54490a 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/ClassificationPolicy.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/ClassificationPolicy.cs @@ -51,21 +51,5 @@ internal ClassificationPolicy(string id, string name, string fallbackQueueId, IL /// Unique identifier of this policy. public string Id { get; } - /// Friendly name of this policy. - public string Name { get; set; } - /// The fallback queue to select if the queue selector doesn't find a match. - public string FallbackQueueId { get; set; } - /// - /// A rule of one of the following types: - /// - /// StaticRule: A rule providing static rules that always return the same result, regardless of input. - /// DirectMapRule: A rule that return the same labels as the input labels. - /// ExpressionRule: A rule providing inline expression rules. - /// AzureFunctionRule: A rule providing a binding to an HTTP Triggered Azure Function. - /// WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public RouterRule PrioritizationRule { get; set; } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/DistributionPolicy.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/DistributionPolicy.cs index a90b35a264c0..db3ac9175cdb 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/DistributionPolicy.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/DistributionPolicy.cs @@ -31,13 +31,5 @@ internal DistributionPolicy(string id, string name, double? offerExpiresAfterSec /// The unique identifier of the policy. public string Id { get; } - /// The human readable name of the policy. - public string Name { get; set; } - /// - /// Abstract base class for defining a distribution mode - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public DistributionMode Mode { get; set; } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/ExceptionPolicy.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/ExceptionPolicy.cs index a64ee098ef56..7e5330581818 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/ExceptionPolicy.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/ExceptionPolicy.cs @@ -27,7 +27,5 @@ internal ExceptionPolicy(string id, string name, IDictionary The Id of the exception policy. public string Id { get; } - /// (Optional) The name of the exception policy. - public string Name { get; set; } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterJob.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterJob.cs index fd2140fbc1f4..9f9f34901fe6 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterJob.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterJob.cs @@ -59,22 +59,10 @@ internal RouterJob(string id, string channelReference, RouterJobStatus? status, /// The id of the job. public string Id { get; } - /// Reference to an external parent context, eg. call ID. - public string ChannelReference { get; set; } /// The status of the Job. public RouterJobStatus? Status { get; } /// The time a job was queued in UTC. public DateTimeOffset? EnqueuedAt { get; } - /// The channel identifier. eg. voice, chat, etc. - public string ChannelId { get; set; } - /// The Id of the Classification policy used for classifying a job. - public string ClassificationPolicyId { get; set; } - /// The Id of the Queue that this job is queued to. - public string QueueId { get; set; } - /// The priority of this job. - public int? Priority { get; set; } - /// Reason code for cancelled or closed jobs. - public string DispositionCode { get; set; } /// A collection of label selectors attached by a classification policy, which a worker must satisfy in order to process this job. public IReadOnlyList AttachedWorkerSelectors { get; } /// @@ -84,7 +72,5 @@ internal RouterJob(string id, string channelReference, RouterJobStatus? status, public IReadOnlyDictionary Assignments { get; } /// If set, job will be scheduled to be enqueued at a given time. public DateTimeOffset? ScheduledAt { get; } - /// Gets or sets the matching mode. - public JobMatchingMode MatchingMode { get; set; } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterQueue.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterQueue.cs index 3f47cc25a301..0345ead4dbb1 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterQueue.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterQueue.cs @@ -30,11 +30,5 @@ internal RouterQueue(string id, string name, string distributionPolicyId, IDicti /// The Id of this queue. public string Id { get; } - /// The name of this queue. - public string Name { get; set; } - /// The ID of the distribution policy that will determine how a job is distributed to workers. - public string DistributionPolicyId { get; set; } - /// (Optional) The ID of the exception policy that determines various job escalation rules. - public string ExceptionPolicyId { get; set; } } } 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 dcdc778e7948..d617211c28d3 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterWorker.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Models/RouterWorker.cs @@ -56,15 +56,11 @@ internal RouterWorker(string id, RouterWorkerState? state, IDictionary The current state of the worker. public RouterWorkerState? State { get; } - /// The total capacity score this worker has to manage multiple concurrent jobs. - public int? TotalCapacity { get; set; } /// A list of active offers issued to this worker. public IReadOnlyList Offers { get; } /// A list of assigned jobs attached to this worker. public IReadOnlyList AssignedJobs { get; } /// A value indicating the workers capacity. A value of '1' means all capacity is consumed. A value of '0' means no capacity is currently consumed. public double? LoadRatio { get; } - /// A flag indicating this worker is open to receive offers or not. - public bool? AvailableForOffers { get; set; } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClient.cs b/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClient.cs index b989ccd55f55..802113e62711 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClient.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClient.cs @@ -337,7 +337,8 @@ public virtual async Task> UpdateJobAsync( scope.Start(); try { - var request = new RouterJob { + var request = new RouterJob + { ChannelId = options.ChannelId, ClassificationPolicyId = options.ClassificationPolicyId, ChannelReference = options.ChannelReference, diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/ClassificationPolicy.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/ClassificationPolicy.cs index e58519202009..9e7142773d44 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/ClassificationPolicy.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/ClassificationPolicy.cs @@ -53,5 +53,23 @@ internal IList _workerSelectors /// The worker label selectors to attach to a given job. public List WorkerSelectors { get; } = new List(); + + /// (Optional) The name of the classification policy. + public string Name { get; internal set; } + + /// The fallback queue to select if the queue selector doesn't find a match. + public string FallbackQueueId { get; internal set; } + /// + /// A rule of one of the following types: + /// + /// StaticRule: A rule providing static rules that always return the same result, regardless of input. + /// DirectMapRule: A rule that return the same labels as the input labels. + /// ExpressionRule: A rule providing inline expression rules. + /// AzureFunctionRule: A rule providing a binding to an HTTP Triggered Azure Function. + /// WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + public RouterRule PrioritizationRule { get; internal set; } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/DistributionPolicy.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/DistributionPolicy.cs index 814c88cf1a06..cae7d75a200d 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/DistributionPolicy.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/DistributionPolicy.cs @@ -39,5 +39,15 @@ internal double? _offerExpiresAfterSeconds OfferExpiresAfter = value != null ? TimeSpan.FromSeconds(value.Value) : null; } } + + /// (Optional) The name of the distribution policy. + public string Name { get; internal set; } + + /// + /// Abstract base class for defining a distribution mode + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public DistributionMode Mode { get; internal set; } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/ExceptionPolicy.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/ExceptionPolicy.cs index 6adb72911bf9..45167fcde3e7 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/ExceptionPolicy.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/ExceptionPolicy.cs @@ -39,5 +39,8 @@ internal IDictionary _exceptionRules /// (Optional) A dictionary collection of exception rules on the exception policy. Key is the Id of each exception rule. public IDictionary ExceptionRules { get; } = new Dictionary(); + + /// (Optional) The name of the exception policy. + public string Name { get; internal set; } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterJob.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterJob.cs index 8a7ab365137a..825a9962f8ee 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterJob.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterJob.cs @@ -39,6 +39,27 @@ internal RouterJob() /// A collection of notes attached to a job. public List Notes { get; } = new List(); + /// Reference to an external parent context, eg. call ID. + public string ChannelReference { get; internal set; } + + /// The channel identifier. eg. voice, chat, etc. + public string ChannelId { get; internal set; } + + /// The Id of the Classification policy used for classifying a job. + public string ClassificationPolicyId { get; internal set; } + + /// The Id of the Queue that this job is queued to. + public string QueueId { get; internal set; } + + /// The priority of this job. + public int? Priority { get; internal set; } + + /// Reason code for cancelled or closed jobs. + public string DispositionCode { get; internal set; } + + /// Gets or sets the matching mode. + public JobMatchingMode MatchingMode { get; internal set; } + [CodeGenMember("Labels")] internal IDictionary _labels { diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs index 7dbc47711ba6..8956a5f77586 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs @@ -35,6 +35,15 @@ internal IDictionary _labels /// public IDictionary Labels { get; } = new Dictionary(); + /// The name of this queue. + public string Name { get; internal set; } + + /// The ID of the distribution policy that will determine how a job is distributed to workers. + public string DistributionPolicyId { get; internal set; } + + /// (Optional) The ID of the exception policy that determines various job escalation rules. + public string ExceptionPolicyId { get; internal set; } + /// Initializes a new instance of JobQueue. internal RouterQueue() { diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs index 84a6f8ca770c..74cb9d1c32d3 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs @@ -27,6 +27,12 @@ public partial class RouterWorker /// The queue(s) that this worker can receive work from. public IDictionary QueueAssignments { get; } = new Dictionary(); + /// The total capacity score this worker has to manage multiple concurrent jobs. + public int? TotalCapacity { get; internal set; } + + /// A flag indicating this worker is open to receive offers or not. + public bool? AvailableForOffers { get; internal set; } + [CodeGenMember("Labels")] internal IDictionary _labels {