Skip to content

Commit 108f886

Browse files
authored
Updates to README and tsp-location (Azure#37566)
* updates * Updates * updates * Updates * updates * updates * Update RouterValue * Re-generated with latest typespec. * Complete, close, reclassify job methods * Fix build * Fix build * Add comments * Fix build * Fix build * Remove unused imports * Address comments * Fix build * Re-generate from latest typespec * Fix module-info.java * Fix ClassificationPolicy * Regenerate * Update TestProxy assests * Fix close, complete, reclassify, declineJobOffer * Fix build * Updates * More updates * Regenerate * Fixes * Add tsp-location.yaml * Add TokenCredential to AdminClientBuilder * Fix typespec diff * Fix
1 parent 49e0e57 commit 108f886

File tree

113 files changed

+7121
-5773
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+7121
-5773
lines changed

sdk/communication/azure-communication-jobrouter/CHANGELOG.md

Lines changed: 155 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,144 @@
11
# Release History
22

3+
## 1.0.0
4+
5+
### Features Added
6+
7+
### Breaking Changes
8+
9+
#### RouterAdministrationClient
10+
-
11+
- `listQueues` returns `PagedIterable<RouterQueue>` rather than `PagedIterable<RouterQueueItem>`
12+
- `listDistributionPolicies` returns `PagedIterable<DistributionPolicy>` rather than `PagedIterable<DistributionPolicyItem>`
13+
- `listClassificationPolicies` returns `PagedIterable<ClassificationPolicy>` rather than `PagedIterable<ClassificationPolicyItem>`
14+
- `listExceptionPolicies` returns `PagedIterable<ExceptionPolicy>` rather than `PagedIterable<ExceptionPolicyItem>`
15+
16+
- Response objects of create, update, get and list methods are changed to return BinaryData.
17+
- update, get, list and delete methods are updated to take RequestOptions in request instead of entity options classes like UpdateClassificationPolicyOptions.
18+
19+
#### RouterClient
20+
- `listJobs` returns `PagedIterable<RouterJob>` rather than `PagedIterable<RouterJobItem>`
21+
- `listWorkers` returns `PagedIterable<RouterWorker>` rather than `PagedIterable<RouterJobWorker>`
22+
23+
- Response objects of create, update, get and list methods are changed to return BinaryData.
24+
- update, get, list and delete methods are updated to take RequestOptions in request instead of entity options classes like UpdateWorkerOptions.
25+
26+
##### RouterJobNote
27+
- Changed constructor from `RouterJobNote()` to `RouterJobNote(string message)`
28+
- Removed setter from `Message`
29+
30+
#### RouterWorker && CreateWorkerOptions
31+
- Rename property `QueueAssignments` -> `Queues`
32+
- `Queues` - Changed `Map<String, RouterQueueAssignment>` -> `List<String>`
33+
- Rename property `TotalCapacity` -> `Capacity`
34+
- Rename property `ChannelConfigurations` -> `Channels`
35+
- `Channels` - Changed `Map<String, ChannelConfiguration>` -> `List<RouterChannel>`
36+
37+
#### ClassificationPolicy && CreateClassificationPolicyOptions
38+
- Property `List<QueueSelectorAttachment> QueueSelectors` changed to `List<QueueSelectorAttachment> QueueSelectorAttachments`
39+
- Property `List<WorkerSelectorAttachment> WorkerSelectors` changed to `List<WorkerSelectorAttachment> WorkerSelectorAttachments`
40+
41+
#### ExceptionPolicy && CreateExceptionPolicyOptions
42+
- Property `ExceptionRules` - Changed from `Map<String, ExceptionRule>` -> `List<ExceptionRule>`
43+
44+
##### ExceptionRule
45+
- `Actions` - Changed `Map<String, ExceptionAction>` -> `List<ExceptionAction>`
46+
47+
##### CancelExceptionAction
48+
- Changed constructor from `CancelExceptionAction(String note = null, String dispositionCode = null)` to `CancelExceptionAction()`
49+
50+
##### ReclassifyExceptionAction
51+
- Changed constructor from `ReclassifyExceptionAction(String classificationPolicyId, Map<String, LabelValue> labelsToUpsert = null)` to `ReclassifyExceptionAction()`
52+
- Removed setter from `LabelsToUpsert`
53+
54+
#### BestWorkerMode
55+
- Removed constructor `BestWorkerMode(RouterRule scoringRule = null, List<ScoringRuleParameterSelector> scoringParameterSelectors = null, bool allowScoringBatchOfWorkers = false, int? batchSize = null, bool descendingOrder = true, bool bypassSelectors = false)`
56+
57+
##### ScoringRuleOptions
58+
- Rename property `AllowScoringBatchOfWorkers` -> `IsBatchScoringEnabled`
59+
60+
#### FunctionRouterRuleCredential
61+
- Removed properties `AppKey` and `FunctionKey`
62+
63+
#### OAuth2WebhookClientCredential
64+
- Removed property `ClientSecret`
65+
66+
#### RouterQueueStatistics
67+
- Changed `Map<String, Double> EstimatedWaitTimeMinutes` to `Map<Integer, TimeSpan> EstimatedWaitTimes`
68+
69+
#### LabelOperator
70+
- Renamed `GreaterThanEqual` to `GreaterThanOrEqual`
71+
- Renamed `LessThanEqual` to `LessThanOrEqual`
72+
73+
#### Renames
74+
- `ChannelConfiguration` -> `RouterChannel`
75+
- `Oauth2ClientCredential` -> `OAuth2WebhookClientCredential`
76+
- `LabelValue` -> `RouterValue`
77+
78+
#### Deletions
79+
- `ClassificationPolicyItem`
80+
- `DistributionPolicyItem`
81+
- `ExceptionPolicyItem`
82+
- `RouterQueueItem`
83+
- `RouterWorkerItem`
84+
- `RouterJobItem`
85+
- `RouterQueueAssignment`
86+
- `UpdateClassificationPolicyOptions`
87+
- `UpdateDistributionPolicyOptions`
88+
- `UpdateExceptionPolicyOptions`
89+
- `UpdateQueueOptions`
90+
- `UpdateWorkerOptions`
91+
- `UpdateJobOptions`
92+
93+
### Other Changes
94+
95+
#### ClassificationPolicy
96+
- Add `ETag`
97+
- Added constructor `ClassificationPolicy(string classificationPolicyId)`
98+
- Added setters to `FallbackQueueId`, `Name`, and `PrioritizationRule`
99+
100+
#### DistributionPolicy
101+
- Add `ETag`
102+
- Added constructor `DistributionPolicy(string distributionPolicyId)`
103+
- Added setters to `Mode` and `Name`
104+
105+
#### ExceptionPolicy
106+
- Added `ETag`
107+
- Added constructor `ExceptionPolicy(string exceptionPolicyId)`
108+
- Added setter to `Name`
109+
110+
##### ExceptionRule
111+
- Added `Id`
112+
113+
##### ExceptionAction
114+
- Added `Id`. Property is read-only. If not provided, it will be generated by the service.
115+
116+
##### ReclassifyExceptionAction
117+
- Added setter to `ClassificationPolicyId`
118+
119+
#### RouterChannel
120+
- Added `ChannelId`
121+
122+
#### RouterJob
123+
- Added `ETag`
124+
- Added constructor `RouterJob(string jobId)`
125+
- Added setters for `ChannelId`, `ChannelReference`, `ClassificationPolicyId`, `DispositionCode`, `MatchingMode`, `Priority`, `QueueId`
126+
127+
#### RouterQueue
128+
- Added `ETag`
129+
- Added constructor `RouterQueue(string queueId)`
130+
- Added setters for `DistributionPolicyId`, `ExceptionPolicyId` and `Name`
131+
132+
#### RouterWorker
133+
- Added `ETag`
134+
- Added constructor `RouterWorker(string workerId)`
135+
136+
#### BestWorkerMode
137+
- Added setters to `ScoringRule` and `ScoringRuleOptions`
138+
139+
#### OAuth2WebhookClientCredential
140+
- Added constructor `OAuth2WebhookClientCredential(string clientId, string clientSecret)`
141+
3142
## 1.0.0-beta.2 (Unreleased)
4143

5144
### Features Added
@@ -17,23 +156,23 @@ This is a public preview version, so breaking changes are possible in subsequent
17156

18157
### Features Added
19158
- Using `JobRouterAdministrationClient`
20-
- Create, update, get, list and delete `DistributionPolicy`.
21-
- Create, update, get, list and delete `RouterQueue`.
22-
- Create, update, get, list and delete `ClassificationPolicy`.
23-
- Create, update, get, list and delete `ExceptionPolicy`.
159+
- Create, update, get, list and delete `DistributionPolicy`.
160+
- Create, update, get, list and delete `RouterQueue`.
161+
- Create, update, get, list and delete `ClassificationPolicy`.
162+
- Create, update, get, list and delete `ExceptionPolicy`.
24163
- Using `JobRouterClient`
25-
- Create, update, get, list and delete `RouterJob`.
26-
- `RouterJob` can be created and updated with different matching modes: `QueueAndMatchMode`, `ScheduleAndSuspendMode` and `SuspendMode`.
27-
- Re-classify a `RouterJob`.
28-
- Close a `RouterJob`.
29-
- Complete a `RouterJob`.
30-
- Cancel a `RouterJob`.
31-
- Un-assign a `RouterJob`, with option to suspend matching.
32-
- Get the position of a `RouterJob` in a queue.
33-
- Create, update, get, list and delete `RouterWorker`.
34-
- Accept an offer.
35-
- Decline an offer.
36-
- Get queue statistics.
164+
- Create, update, get, list and delete `RouterJob`.
165+
- `RouterJob` can be created and updated with different matching modes: `QueueAndMatchMode`, `ScheduleAndSuspendMode` and `SuspendMode`.
166+
- Re-classify a `RouterJob`.
167+
- Close a `RouterJob`.
168+
- Complete a `RouterJob`.
169+
- Cancel a `RouterJob`.
170+
- Un-assign a `RouterJob`, with option to suspend matching.
171+
- Get the position of a `RouterJob` in a queue.
172+
- Create, update, get, list and delete `RouterWorker`.
173+
- Accept an offer.
174+
- Decline an offer.
175+
- Get queue statistics.
37176

38177
### Breaking Changes
39178

sdk/communication/azure-communication-jobrouter/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,36 +181,38 @@ RouterJob routerJob = jobRouterClient.createJob(createJobOptions);
181181
### Create a Worker
182182

183183
```java
184-
Map<String, LabelValue> labels = new HashMap<String, LabelValue>() {
184+
Map<String, RouterValue> labels = new HashMap<String, RouterValue>() {
185185
{
186-
put("Label", new LabelValue("Value"));
186+
put("Label", new RouterValue("Value"));
187187
}
188188
};
189189

190-
Map<String, LabelValue> tags = new HashMap<String, LabelValue>() {
190+
Map<String, RouterValue> tags = new HashMap<String, RouterValue>() {
191191
{
192-
put("Tag", new LabelValue("Value"));
192+
put("Tag", new RouterValue("Value"));
193193
}
194194
};
195195

196-
Map<String, ChannelConfiguration> channelConfigurations = new HashMap<String, ChannelConfiguration>() {
196+
RouterChannel channel = new RouterChannel("router-channel", 1);
197+
198+
List<RouterChannel> channels = new ArrayList<RouterChannel>() {
197199
{
198-
put("channel1", new ChannelConfiguration().setCapacityCostPerJob(1));
200+
add(channel);
199201
}
200202
};
201203

202-
Map<String, RouterQueueAssignment> queueAssignments = new HashMap<String, RouterQueueAssignment>() {
204+
List<String> queues = new ArrayList<String>() {
203205
{
204-
put(jobQueue.getId(), new RouterQueueAssignment());
206+
add(jobQueue.getId());
205207
}
206208
};
207209

208210
CreateWorkerOptions createWorkerOptions = new CreateWorkerOptions(workerId, 10)
209211
.setLabels(labels)
210212
.setTags(tags)
211213
.setAvailableForOffers(true)
212-
.setChannelConfigurations(channelConfigurations)
213-
.setQueueAssignments(queueAssignments);
214+
.setChannels(channels)
215+
.setQueues(queues);
214216

215217
RouterWorker routerWorker = jobRouterClient.createWorker(createWorkerOptions);
216218
```

sdk/communication/azure-communication-jobrouter/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "java",
44
"TagPrefix": "java/communication/azure-communication-jobrouter",
5-
"Tag": "java/communication/azure-communication-jobrouter_7760fda1a6"
5+
"Tag": "java/communication/azure-communication-jobrouter_1b40113072"
66
}

sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/AzureCommunicationRoutingServiceVersion.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) AutoRest Code Generator.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

55
package com.azure.communication.jobrouter;
66

77
import com.azure.core.util.ServiceVersion;
88

9-
/** Service version of AzureCommunicationRoutingServiceClient. */
9+
/**
10+
* Service version of AzureCommunicationRoutingServiceClient.
11+
*/
1012
public enum AzureCommunicationRoutingServiceVersion implements ServiceVersion {
11-
/** Enum value 2023-11-01. */
13+
/**
14+
* Enum value 2023-11-01.
15+
*/
1216
V2023_11_01("2023-11-01");
1317

1418
private final String version;
@@ -17,15 +21,17 @@ public enum AzureCommunicationRoutingServiceVersion implements ServiceVersion {
1721
this.version = version;
1822
}
1923

20-
/** {@inheritDoc} */
24+
/**
25+
* {@inheritDoc}
26+
*/
2127
@Override
2228
public String getVersion() {
2329
return this.version;
2430
}
2531

2632
/**
2733
* Gets the latest service version supported by this client library.
28-
*
34+
*
2935
* @return The latest {@link AzureCommunicationRoutingServiceVersion}.
3036
*/
3137
public static AzureCommunicationRoutingServiceVersion getLatest() {

0 commit comments

Comments
 (0)