|
12 | 12 | import com.azure.communication.callautomation.implementation.models.CancelAddParticipantResponse; |
13 | 13 | import com.azure.communication.callautomation.implementation.models.CommunicationErrorResponseException; |
14 | 14 | import com.azure.communication.callautomation.implementation.models.GetParticipantsResponseInternal; |
| 15 | +import com.azure.communication.callautomation.implementation.models.MoveParticipantsRequest; |
| 16 | +import com.azure.communication.callautomation.implementation.models.MoveParticipantsResponse; |
15 | 17 | import com.azure.communication.callautomation.implementation.models.MuteParticipantsRequestInternal; |
16 | 18 | import com.azure.communication.callautomation.implementation.models.MuteParticipantsResultInternal; |
17 | 19 | import com.azure.communication.callautomation.implementation.models.RemoveParticipantRequestInternal; |
@@ -169,6 +171,16 @@ Mono<Response<CancelAddParticipantResponse>> cancelAddParticipant(@HostParam("en |
169 | 171 | @HeaderParam("repeatability-request-id") String repeatabilityRequestId, |
170 | 172 | @HeaderParam("repeatability-first-sent") String repeatabilityFirstSent, Context context); |
171 | 173 |
|
| 174 | + @Post("/calling/callConnections/{callConnectionId}/participants:moveHere") |
| 175 | + @ExpectedResponses({ 202 }) |
| 176 | + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) |
| 177 | + Mono<Response<MoveParticipantsResponse>> moveParticipants(@HostParam("endpoint") String endpoint, |
| 178 | + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, |
| 179 | + @BodyParam("application/json") MoveParticipantsRequest moveParticipantRequest, |
| 180 | + @HeaderParam("Accept") String accept, |
| 181 | + @HeaderParam("repeatability-request-id") String repeatabilityRequestId, |
| 182 | + @HeaderParam("repeatability-first-sent") String repeatabilityFirstSent, Context context); |
| 183 | + |
172 | 184 | @Get("/calling/callConnections/{callConnectionId}/participants/{participantRawId}") |
173 | 185 | @ExpectedResponses({ 200 }) |
174 | 186 | @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) |
@@ -1230,6 +1242,113 @@ public CancelAddParticipantResponse cancelAddParticipant(String callConnectionId |
1230 | 1242 | return cancelAddParticipantWithResponse(callConnectionId, cancelAddParticipantRequest, Context.NONE).getValue(); |
1231 | 1243 | } |
1232 | 1244 |
|
| 1245 | + /** |
| 1246 | + * Add a participant to the call. |
| 1247 | + * |
| 1248 | + * @param callConnectionId The call connection Id. |
| 1249 | + * @param moveParticipantRequest The move participants request. |
| 1250 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 1251 | + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. |
| 1252 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 1253 | + * @return the response payload for moving participants to the call along with {@link Response} on successful |
| 1254 | + * completion of {@link Mono}. |
| 1255 | + */ |
| 1256 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 1257 | + public Mono<Response<MoveParticipantsResponse>> moveParticipantsWithResponseAsync(String callConnectionId, |
| 1258 | + MoveParticipantsRequest moveParticipantRequest) { |
| 1259 | + return FluxUtil.withContext( |
| 1260 | + context -> moveParticipantsWithResponseAsync(callConnectionId, moveParticipantRequest, context)); |
| 1261 | + } |
| 1262 | + |
| 1263 | + /** |
| 1264 | + * Add a participant to the call. |
| 1265 | + * |
| 1266 | + * @param callConnectionId The call connection Id. |
| 1267 | + * @param moveParticipantRequest The move participants request. |
| 1268 | + * @param context The context to associate with this operation. |
| 1269 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 1270 | + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. |
| 1271 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 1272 | + * @return the response payload for moving participants to the call along with {@link Response} on successful |
| 1273 | + * completion of {@link Mono}. |
| 1274 | + */ |
| 1275 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 1276 | + public Mono<Response<MoveParticipantsResponse>> moveParticipantsWithResponseAsync(String callConnectionId, |
| 1277 | + MoveParticipantsRequest moveParticipantRequest, Context context) { |
| 1278 | + final String accept = "application/json"; |
| 1279 | + return service.moveParticipants(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), |
| 1280 | + moveParticipantRequest, accept, CoreUtils.randomUuid().toString(), |
| 1281 | + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), context); |
| 1282 | + } |
| 1283 | + |
| 1284 | + /** |
| 1285 | + * Add a participant to the call. |
| 1286 | + * |
| 1287 | + * @param callConnectionId The call connection Id. |
| 1288 | + * @param moveParticipantRequest The move participants request. |
| 1289 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 1290 | + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. |
| 1291 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 1292 | + * @return the response payload for moving participants to the call on successful completion of {@link Mono}. |
| 1293 | + */ |
| 1294 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 1295 | + public Mono<MoveParticipantsResponse> moveParticipantsAsync(String callConnectionId, |
| 1296 | + MoveParticipantsRequest moveParticipantRequest) { |
| 1297 | + return moveParticipantsWithResponseAsync(callConnectionId, moveParticipantRequest) |
| 1298 | + .flatMap(res -> Mono.justOrEmpty(res.getValue())); |
| 1299 | + } |
| 1300 | + |
| 1301 | + /** |
| 1302 | + * Add a participant to the call. |
| 1303 | + * |
| 1304 | + * @param callConnectionId The call connection Id. |
| 1305 | + * @param moveParticipantRequest The move participants request. |
| 1306 | + * @param context The context to associate with this operation. |
| 1307 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 1308 | + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. |
| 1309 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 1310 | + * @return the response payload for moving participants to the call on successful completion of {@link Mono}. |
| 1311 | + */ |
| 1312 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 1313 | + public Mono<MoveParticipantsResponse> moveParticipantsAsync(String callConnectionId, |
| 1314 | + MoveParticipantsRequest moveParticipantRequest, Context context) { |
| 1315 | + return moveParticipantsWithResponseAsync(callConnectionId, moveParticipantRequest, context) |
| 1316 | + .flatMap(res -> Mono.justOrEmpty(res.getValue())); |
| 1317 | + } |
| 1318 | + |
| 1319 | + /** |
| 1320 | + * Add a participant to the call. |
| 1321 | + * |
| 1322 | + * @param callConnectionId The call connection Id. |
| 1323 | + * @param moveParticipantRequest The move participants request. |
| 1324 | + * @param context The context to associate with this operation. |
| 1325 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 1326 | + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. |
| 1327 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 1328 | + * @return the response payload for moving participants to the call along with {@link Response}. |
| 1329 | + */ |
| 1330 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 1331 | + public Response<MoveParticipantsResponse> moveParticipantsWithResponse(String callConnectionId, |
| 1332 | + MoveParticipantsRequest moveParticipantRequest, Context context) { |
| 1333 | + return moveParticipantsWithResponseAsync(callConnectionId, moveParticipantRequest, context).block(); |
| 1334 | + } |
| 1335 | + |
| 1336 | + /** |
| 1337 | + * Add a participant to the call. |
| 1338 | + * |
| 1339 | + * @param callConnectionId The call connection Id. |
| 1340 | + * @param moveParticipantRequest The move participants request. |
| 1341 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 1342 | + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. |
| 1343 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 1344 | + * @return the response payload for moving participants to the call. |
| 1345 | + */ |
| 1346 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 1347 | + public MoveParticipantsResponse moveParticipants(String callConnectionId, |
| 1348 | + MoveParticipantsRequest moveParticipantRequest) { |
| 1349 | + return moveParticipantsWithResponse(callConnectionId, moveParticipantRequest, Context.NONE).getValue(); |
| 1350 | + } |
| 1351 | + |
1233 | 1352 | /** |
1234 | 1353 | * Get participant from a call. |
1235 | 1354 | * |
|
0 commit comments