diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java index a0ac5c8b7b5a8..a2db5392212de 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java @@ -44,7 +44,6 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.exception.HttpResponseException; -import com.azure.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import reactor.core.publisher.Mono; @@ -164,7 +163,7 @@ Mono> createCallWithResponseInternal(CreateCallOption return azureCommunicationCallAutomationServiceInternal.createCallWithResponseAsync( request, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), context) .map(response -> { try { @@ -189,7 +188,7 @@ Mono> createGroupCallWithResponseInternal(CreateGroup return azureCommunicationCallAutomationServiceInternal.createCallWithResponseAsync( request, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), context) .map(response -> { try { @@ -340,7 +339,7 @@ Mono> answerCallWithResponseInternal(AnswerCallOption return azureCommunicationCallAutomationServiceInternal.answerCallWithResponseAsync( request, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), context) .map(response -> { try { @@ -404,7 +403,7 @@ Mono> redirectCallWithResponseInternal(RedirectCallOptions redire return azureCommunicationCallAutomationServiceInternal.redirectCallWithResponseAsync( request, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), context); } catch (RuntimeException ex) { return monoError(logger, ex); @@ -451,7 +450,7 @@ Mono> rejectCallWithResponseInternal(RejectCallOptions rejectCall return azureCommunicationCallAutomationServiceInternal.rejectCallWithResponseAsync( request, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), context); } catch (RuntimeException ex) { return monoError(logger, ex); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java index 2cab86363ba6d..d36138ab0e88a 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java @@ -8,7 +8,6 @@ import com.azure.communication.callautomation.models.AddParticipantResult; import com.azure.communication.callautomation.models.CallConnectionProperties; import com.azure.communication.callautomation.models.CallInvite; -import com.azure.communication.callautomation.models.ListParticipantsResult; import com.azure.communication.callautomation.models.MuteParticipantsOptions; import com.azure.communication.callautomation.models.MuteParticipantsResult; import com.azure.communication.callautomation.models.RemoveParticipantOptions; @@ -20,6 +19,7 @@ import com.azure.communication.common.CommunicationIdentifier; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.core.exception.HttpResponseException; @@ -119,9 +119,9 @@ public Response getParticipantWithResponse(CommunicationIdentif * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A list of all participants in the call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListParticipantsResult listParticipants() { - return callConnectionAsync.listParticipants().block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listParticipants() { + return new PagedIterable<>(callConnectionAsync.listParticipants()); } /** @@ -132,9 +132,9 @@ public ListParticipantsResult listParticipants() { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return Response with a list of all participants in the call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listParticipantsWithResponse(Context context) { - return callConnectionAsync.listParticipantsWithResponseInternal(context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listParticipants(Context context) { + return new PagedIterable<>(callConnectionAsync.listParticipantsWithContext(context)); } /** diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java index d6c2842dbb5fc..5ecdbd4f46064 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java @@ -7,7 +7,6 @@ import com.azure.communication.callautomation.implementation.CallMediasImpl; import com.azure.communication.callautomation.implementation.accesshelpers.AddParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.CallConnectionPropertiesConstructorProxy; -import com.azure.communication.callautomation.implementation.accesshelpers.ListParticipantsResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.MuteParticipantsResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.RemoveParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.TransferCallResponseConstructorProxy; @@ -26,7 +25,6 @@ import com.azure.communication.callautomation.models.AddParticipantOptions; import com.azure.communication.callautomation.models.CallConnectionProperties; import com.azure.communication.callautomation.models.CallInvite; -import com.azure.communication.callautomation.models.ListParticipantsResult; import com.azure.communication.callautomation.models.MuteParticipantsOptions; import com.azure.communication.callautomation.models.MuteParticipantsResult; import com.azure.communication.callautomation.models.RemoveParticipantOptions; @@ -41,10 +39,10 @@ import com.azure.communication.common.PhoneNumberIdentifier; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; -import com.azure.core.util.DateTimeRfc1123; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import reactor.core.publisher.Mono; @@ -152,7 +150,7 @@ Mono> hangUpWithResponseInternal(boolean isForEveryone, Context c return (isForEveryone ? callConnectionInternal.terminateCallWithResponseAsync( callConnectionId, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), context) : callConnectionInternal.hangupCallWithResponseAsync(callConnectionId, context)); } catch (RuntimeException ex) { @@ -199,18 +197,6 @@ Mono> getParticipantWithResponseInternal(Communication } } - /** - * Get all participants. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return Result of getting all participants in the call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listParticipants() { - return listParticipantsWithResponse().flatMap(FluxUtil::toMono); - } - /** * Get all participants. * @@ -218,20 +204,26 @@ public Mono listParticipants() { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return Response with result of getting all participants in the call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listParticipantsWithResponse() { - return withContext(this::listParticipantsWithResponseInternal); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listParticipants() { + try { + return new PagedFlux<>( + () -> withContext(context -> this.callConnectionInternal.getParticipantsSinglePageAsync( + callConnectionId, context)), + nextLink -> withContext(context -> this.callConnectionInternal.getParticipantsNextSinglePageAsync( + nextLink, context))) + .mapPage(CallParticipantConverter::convert); + } catch (RuntimeException ex) { + return new PagedFlux<>(() -> monoError(logger, ex)); + } } - Mono> listParticipantsWithResponseInternal(Context context) { + PagedFlux listParticipantsWithContext(Context context) { try { - context = context == null ? Context.NONE : context; - - return callConnectionInternal.getParticipantsWithResponseAsync(callConnectionId, context) - .map(response -> new SimpleResponse<>(response, - ListParticipantsResponseConstructorProxy.create(response.getValue()))); + final Context serviceContext = context == null ? Context.NONE : context; + return callConnectionInternal.getParticipantsAsync(callConnectionId, serviceContext).mapPage(CallParticipantConverter::convert); } catch (RuntimeException ex) { - return monoError(logger, ex); + return new PagedFlux<>(() -> monoError(logger, ex)); } } @@ -291,7 +283,7 @@ Mono> transferCallToParticipantWithResponseInternal callConnectionId, request, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), context).map(response -> new SimpleResponse<>(response, TransferCallResponseConstructorProxy.create(response.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); @@ -350,7 +342,7 @@ Mono> addParticipantWithResponseInternal(AddParti callConnectionId, request, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), context ).map(response -> new SimpleResponse<>(response, AddParticipantResponseConstructorProxy.create(response.getValue()))); } catch (RuntimeException ex) { @@ -396,7 +388,7 @@ Mono> removeParticipantWithResponseInternal(Re callConnectionId, request, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), context).map(response -> new SimpleResponse<>(response, RemoveParticipantResponseConstructorProxy.create(response.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); @@ -439,7 +431,7 @@ Mono> muteParticipantWithResponseInternal(MuteP callConnectionId, request, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), context).map(internalResponse -> new SimpleResponse<>(internalResponse, MuteParticipantsResponseConstructorProxy.create(internalResponse.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); @@ -482,7 +474,7 @@ Mono> unmuteParticipantWithResponseInternal(U callConnectionId, request, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), context).map(internalResponse -> new SimpleResponse<>(internalResponse, UnmuteParticipantsResponseConstructorProxy.create(internalResponse.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecordingAsync.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecordingAsync.java index 3d99c01059b1e..9ef0098900580 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecordingAsync.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecordingAsync.java @@ -37,7 +37,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.BinaryData; import com.azure.core.util.Context; -import com.azure.core.util.DateTimeRfc1123; import com.azure.core.util.logging.ClientLogger; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -124,7 +123,7 @@ Mono> startWithResponseInternal(StartRecordingOpt .startRecordingWithResponseAsync( request, UUID.randomUUID(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), + OffsetDateTime.now(), contextValue) .map(response -> new SimpleResponse<>(response, RecordingStateResponseConstructorProxy.create(response.getValue())) diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImpl.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImpl.java index 3dec9dd428a23..451c612f96621 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImpl.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImpl.java @@ -29,9 +29,11 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.util.Context; +import com.azure.core.util.DateTimeRfc1123; import com.azure.core.util.FluxUtil; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; +import java.time.OffsetDateTime; import java.util.UUID; import reactor.core.publisher.Mono; @@ -112,6 +114,18 @@ public CallMediasImpl getCallMedias() { return this.callMedias; } + /** The CallDialogsImpl object to access its operations. */ + private final CallDialogsImpl callDialogs; + + /** + * Gets the CallDialogsImpl object to access its operations. + * + * @return the CallDialogsImpl object. + */ + public CallDialogsImpl getCallDialogs() { + return this.callDialogs; + } + /** The CallRecordingsImpl object to access its operations. */ private final CallRecordingsImpl callRecordings; @@ -167,6 +181,7 @@ public CallRecordingsImpl getCallRecordings() { this.apiVersion = apiVersion; this.callConnections = new CallConnectionsImpl(this); this.callMedias = new CallMediasImpl(this); + this.callDialogs = new CallDialogsImpl(this); this.callRecordings = new CallRecordingsImpl(this); this.service = RestProxy.create( @@ -189,7 +204,7 @@ Mono> createCall( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID, - @HeaderParam("Repeatability-First-Sent") String repeatabilityFirstSent, + @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent, @BodyParam("application/json") CreateCallRequestInternal createCallRequest, @HeaderParam("Accept") String accept, Context context); @@ -201,7 +216,7 @@ Mono> answerCall( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID, - @HeaderParam("Repeatability-First-Sent") String repeatabilityFirstSent, + @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent, @BodyParam("application/json") AnswerCallRequestInternal answerCallRequest, @HeaderParam("Accept") String accept, Context context); @@ -213,7 +228,7 @@ Mono> redirectCall( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID, - @HeaderParam("Repeatability-First-Sent") String repeatabilityFirstSent, + @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent, @BodyParam("application/json") RedirectCallRequestInternal redirectCallRequest, @HeaderParam("Accept") String accept, Context context); @@ -225,7 +240,7 @@ Mono> rejectCall( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID, - @HeaderParam("Repeatability-First-Sent") String repeatabilityFirstSent, + @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent, @BodyParam("application/json") RejectCallRequestInternal rejectCallRequest, @HeaderParam("Accept") String accept, Context context); @@ -250,15 +265,19 @@ Mono> rejectCall( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createCallWithResponseAsync( - CreateCallRequestInternal createCallRequest, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + CreateCallRequestInternal createCallRequest, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return FluxUtil.withContext( context -> service.createCall( this.getEndpoint(), this.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, createCallRequest, accept, context)); @@ -286,14 +305,16 @@ public Mono> createCallWithResponseAs public Mono> createCallWithResponseAsync( CreateCallRequestInternal createCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return service.createCall( this.getEndpoint(), this.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, createCallRequest, accept, context); @@ -318,7 +339,9 @@ public Mono> createCallWithResponseAs */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createCallAsync( - CreateCallRequestInternal createCallRequest, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + CreateCallRequestInternal createCallRequest, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent) { return createCallWithResponseAsync(createCallRequest, repeatabilityRequestID, repeatabilityFirstSent) .flatMap( (Response res) -> { @@ -352,7 +375,7 @@ public Mono createCallAsync( public Mono createCallAsync( CreateCallRequestInternal createCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return createCallWithResponseAsync(createCallRequest, repeatabilityRequestID, repeatabilityFirstSent, context) .flatMap( @@ -384,7 +407,9 @@ public Mono createCallAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public CallConnectionPropertiesInternal createCall( - CreateCallRequestInternal createCallRequest, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + CreateCallRequestInternal createCallRequest, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent) { return createCallAsync(createCallRequest, repeatabilityRequestID, repeatabilityFirstSent).block(); } @@ -410,7 +435,7 @@ public CallConnectionPropertiesInternal createCall( public Response createCallWithResponse( CreateCallRequestInternal createCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return createCallWithResponseAsync(createCallRequest, repeatabilityRequestID, repeatabilityFirstSent, context) .block(); @@ -435,15 +460,19 @@ public Response createCallWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> answerCallWithResponseAsync( - AnswerCallRequestInternal answerCallRequest, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + AnswerCallRequestInternal answerCallRequest, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return FluxUtil.withContext( context -> service.answerCall( this.getEndpoint(), this.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, answerCallRequest, accept, context)); @@ -471,14 +500,16 @@ public Mono> answerCallWithResponseAs public Mono> answerCallWithResponseAsync( AnswerCallRequestInternal answerCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return service.answerCall( this.getEndpoint(), this.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, answerCallRequest, accept, context); @@ -503,7 +534,9 @@ public Mono> answerCallWithResponseAs */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono answerCallAsync( - AnswerCallRequestInternal answerCallRequest, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + AnswerCallRequestInternal answerCallRequest, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent) { return answerCallWithResponseAsync(answerCallRequest, repeatabilityRequestID, repeatabilityFirstSent) .flatMap( (Response res) -> { @@ -537,7 +570,7 @@ public Mono answerCallAsync( public Mono answerCallAsync( AnswerCallRequestInternal answerCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return answerCallWithResponseAsync(answerCallRequest, repeatabilityRequestID, repeatabilityFirstSent, context) .flatMap( @@ -569,7 +602,9 @@ public Mono answerCallAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public CallConnectionPropertiesInternal answerCall( - AnswerCallRequestInternal answerCallRequest, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + AnswerCallRequestInternal answerCallRequest, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent) { return answerCallAsync(answerCallRequest, repeatabilityRequestID, repeatabilityFirstSent).block(); } @@ -595,7 +630,7 @@ public CallConnectionPropertiesInternal answerCall( public Response answerCallWithResponse( AnswerCallRequestInternal answerCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return answerCallWithResponseAsync(answerCallRequest, repeatabilityRequestID, repeatabilityFirstSent, context) .block(); @@ -622,15 +657,17 @@ public Response answerCallWithResponse( public Mono> redirectCallWithResponseAsync( RedirectCallRequestInternal redirectCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return FluxUtil.withContext( context -> service.redirectCall( this.getEndpoint(), this.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, redirectCallRequest, accept, context)); @@ -658,14 +695,16 @@ public Mono> redirectCallWithResponseAsync( public Mono> redirectCallWithResponseAsync( RedirectCallRequestInternal redirectCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return service.redirectCall( this.getEndpoint(), this.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, redirectCallRequest, accept, context); @@ -692,7 +731,7 @@ public Mono> redirectCallWithResponseAsync( public Mono redirectCallAsync( RedirectCallRequestInternal redirectCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return redirectCallWithResponseAsync(redirectCallRequest, repeatabilityRequestID, repeatabilityFirstSent) .flatMap((Response res) -> Mono.empty()); } @@ -719,7 +758,7 @@ public Mono redirectCallAsync( public Mono redirectCallAsync( RedirectCallRequestInternal redirectCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return redirectCallWithResponseAsync( redirectCallRequest, repeatabilityRequestID, repeatabilityFirstSent, context) @@ -746,7 +785,7 @@ public Mono redirectCallAsync( public void redirectCall( RedirectCallRequestInternal redirectCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { redirectCallAsync(redirectCallRequest, repeatabilityRequestID, repeatabilityFirstSent).block(); } @@ -772,7 +811,7 @@ public void redirectCall( public Response redirectCallWithResponse( RedirectCallRequestInternal redirectCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return redirectCallWithResponseAsync( redirectCallRequest, repeatabilityRequestID, repeatabilityFirstSent, context) @@ -798,15 +837,19 @@ public Response redirectCallWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> rejectCallWithResponseAsync( - RejectCallRequestInternal rejectCallRequest, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + RejectCallRequestInternal rejectCallRequest, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return FluxUtil.withContext( context -> service.rejectCall( this.getEndpoint(), this.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, rejectCallRequest, accept, context)); @@ -834,14 +877,16 @@ public Mono> rejectCallWithResponseAsync( public Mono> rejectCallWithResponseAsync( RejectCallRequestInternal rejectCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return service.rejectCall( this.getEndpoint(), this.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, rejectCallRequest, accept, context); @@ -866,7 +911,9 @@ public Mono> rejectCallWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono rejectCallAsync( - RejectCallRequestInternal rejectCallRequest, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + RejectCallRequestInternal rejectCallRequest, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent) { return rejectCallWithResponseAsync(rejectCallRequest, repeatabilityRequestID, repeatabilityFirstSent) .flatMap((Response res) -> Mono.empty()); } @@ -893,7 +940,7 @@ public Mono rejectCallAsync( public Mono rejectCallAsync( RejectCallRequestInternal rejectCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return rejectCallWithResponseAsync(rejectCallRequest, repeatabilityRequestID, repeatabilityFirstSent, context) .flatMap((Response res) -> Mono.empty()); @@ -917,7 +964,9 @@ public Mono rejectCallAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public void rejectCall( - RejectCallRequestInternal rejectCallRequest, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + RejectCallRequestInternal rejectCallRequest, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent) { rejectCallAsync(rejectCallRequest, repeatabilityRequestID, repeatabilityFirstSent).block(); } @@ -943,7 +992,7 @@ public void rejectCall( public Response rejectCallWithResponse( RejectCallRequestInternal rejectCallRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return rejectCallWithResponseAsync(rejectCallRequest, repeatabilityRequestID, repeatabilityFirstSent, context) .block(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java index 26e0b155ed5ee..4690c7b02a5bb 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java @@ -32,10 +32,16 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.util.Context; +import com.azure.core.util.DateTimeRfc1123; import com.azure.core.util.FluxUtil; +import java.time.OffsetDateTime; import java.util.UUID; import reactor.core.publisher.Mono; @@ -93,7 +99,7 @@ Mono> terminateCall( @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID, - @HeaderParam("Repeatability-First-Sent") String repeatabilityFirstSent, + @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent, @HeaderParam("Accept") String accept, Context context); @@ -105,7 +111,7 @@ Mono> transferToParticipant( @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID, - @HeaderParam("Repeatability-First-Sent") String repeatabilityFirstSent, + @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent, @BodyParam("application/json") TransferToParticipantRequestInternal transferToParticipantRequest, @HeaderParam("Accept") String accept, Context context); @@ -128,7 +134,7 @@ Mono> addParticipant( @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID, - @HeaderParam("Repeatability-First-Sent") String repeatabilityFirstSent, + @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent, @BodyParam("application/json") AddParticipantRequestInternal addParticipantRequest, @HeaderParam("Accept") String accept, Context context); @@ -141,7 +147,7 @@ Mono> removeParticipant( @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID, - @HeaderParam("Repeatability-First-Sent") String repeatabilityFirstSent, + @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent, @BodyParam("application/json") RemoveParticipantRequestInternal removeParticipantRequest, @HeaderParam("Accept") String accept, Context context); @@ -154,7 +160,7 @@ Mono> mute( @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID, - @HeaderParam("Repeatability-First-Sent") String repeatabilityFirstSent, + @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent, @BodyParam("application/json") MuteParticipantsRequestInternal muteParticipantsRequest, @HeaderParam("Accept") String accept, Context context); @@ -167,7 +173,7 @@ Mono> unmute( @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID, - @HeaderParam("Repeatability-First-Sent") String repeatabilityFirstSent, + @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent, @BodyParam("application/json") UnmuteParticipantsRequestInternal unmuteParticipantsRequest, @HeaderParam("Accept") String accept, Context context); @@ -182,6 +188,15 @@ Mono> getParticipant( @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono> getParticipantsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, + Context context); } /** @@ -413,8 +428,10 @@ public Response hangupCallWithResponse(String callConnectionId, Context co */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> terminateCallWithResponseAsync( - String callConnectionId, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + String callConnectionId, UUID repeatabilityRequestID, OffsetDateTime repeatabilityFirstSent) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return FluxUtil.withContext( context -> service.terminateCall( @@ -422,7 +439,7 @@ public Mono> terminateCallWithResponseAsync( callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, accept, context)); } @@ -447,14 +464,19 @@ public Mono> terminateCallWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> terminateCallWithResponseAsync( - String callConnectionId, UUID repeatabilityRequestID, String repeatabilityFirstSent, Context context) { + String callConnectionId, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent, + Context context) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return service.terminateCall( this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, accept, context); } @@ -478,7 +500,7 @@ public Mono> terminateCallWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono terminateCallAsync( - String callConnectionId, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + String callConnectionId, UUID repeatabilityRequestID, OffsetDateTime repeatabilityFirstSent) { return terminateCallWithResponseAsync(callConnectionId, repeatabilityRequestID, repeatabilityFirstSent) .flatMap((Response res) -> Mono.empty()); } @@ -503,7 +525,10 @@ public Mono terminateCallAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono terminateCallAsync( - String callConnectionId, UUID repeatabilityRequestID, String repeatabilityFirstSent, Context context) { + String callConnectionId, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent, + Context context) { return terminateCallWithResponseAsync(callConnectionId, repeatabilityRequestID, repeatabilityFirstSent, context) .flatMap((Response res) -> Mono.empty()); } @@ -525,7 +550,8 @@ public Mono terminateCallAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void terminateCall(String callConnectionId, UUID repeatabilityRequestID, String repeatabilityFirstSent) { + public void terminateCall( + String callConnectionId, UUID repeatabilityRequestID, OffsetDateTime repeatabilityFirstSent) { terminateCallAsync(callConnectionId, repeatabilityRequestID, repeatabilityFirstSent).block(); } @@ -549,7 +575,10 @@ public void terminateCall(String callConnectionId, UUID repeatabilityRequestID, */ @ServiceMethod(returns = ReturnType.SINGLE) public Response terminateCallWithResponse( - String callConnectionId, UUID repeatabilityRequestID, String repeatabilityFirstSent, Context context) { + String callConnectionId, + UUID repeatabilityRequestID, + OffsetDateTime repeatabilityFirstSent, + Context context) { return terminateCallWithResponseAsync(callConnectionId, repeatabilityRequestID, repeatabilityFirstSent, context) .block(); } @@ -577,8 +606,10 @@ public Mono> transferToParticipantWithRes String callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return FluxUtil.withContext( context -> service.transferToParticipant( @@ -586,7 +617,7 @@ public Mono> transferToParticipantWithRes callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, transferToParticipantRequest, accept, context)); @@ -616,15 +647,17 @@ public Mono> transferToParticipantWithRes String callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return service.transferToParticipant( this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, transferToParticipantRequest, accept, context); @@ -653,7 +686,7 @@ public Mono transferToParticipantAsync( String callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return transferToParticipantWithResponseAsync( callConnectionId, transferToParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent) .flatMap( @@ -690,7 +723,7 @@ public Mono transferToParticipantAsync( String callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return transferToParticipantWithResponseAsync( callConnectionId, @@ -731,7 +764,7 @@ public TransferCallResponseInternal transferToParticipant( String callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return transferToParticipantAsync( callConnectionId, transferToParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent) .block(); @@ -761,7 +794,7 @@ public Response transferToParticipantWithResponse( String callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return transferToParticipantWithResponseAsync( callConnectionId, @@ -782,16 +815,25 @@ public Response transferToParticipantWithResponse( * @return participants from a call. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getParticipantsWithResponseAsync(String callConnectionId) { + public Mono> getParticipantsSinglePageAsync(String callConnectionId) { final String accept = "application/json"; return FluxUtil.withContext( - context -> - service.getParticipants( - this.client.getEndpoint(), - callConnectionId, - this.client.getApiVersion(), - accept, - context)); + context -> + service.getParticipants( + this.client.getEndpoint(), + callConnectionId, + this.client.getApiVersion(), + accept, + context)) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getValues(), + res.getValue().getNextLink(), + null)); } /** @@ -805,11 +847,20 @@ public Mono> getParticipantsWithRespon * @return participants from a call. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getParticipantsWithResponseAsync( + public Mono> getParticipantsSinglePageAsync( String callConnectionId, Context context) { final String accept = "application/json"; return service.getParticipants( - this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), accept, context); + this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getValues(), + res.getValue().getNextLink(), + null)); } /** @@ -821,17 +872,11 @@ public Mono> getParticipantsWithRespon * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return participants from a call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getParticipantsAsync(String callConnectionId) { - return getParticipantsWithResponseAsync(callConnectionId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getParticipantsAsync(String callConnectionId) { + return new PagedFlux<>( + () -> getParticipantsSinglePageAsync(callConnectionId), + nextLink -> getParticipantsNextSinglePageAsync(nextLink)); } /** @@ -844,17 +889,11 @@ public Mono getParticipantsAsync(String callCon * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return participants from a call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getParticipantsAsync(String callConnectionId, Context context) { - return getParticipantsWithResponseAsync(callConnectionId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getParticipantsAsync(String callConnectionId, Context context) { + return new PagedFlux<>( + () -> getParticipantsSinglePageAsync(callConnectionId, context), + nextLink -> getParticipantsNextSinglePageAsync(nextLink, context)); } /** @@ -866,9 +905,9 @@ public Mono getParticipantsAsync(String callCon * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return participants from a call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GetParticipantsResponseInternal getParticipants(String callConnectionId) { - return getParticipantsAsync(callConnectionId).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getParticipants(String callConnectionId) { + return new PagedIterable<>(getParticipantsAsync(callConnectionId)); } /** @@ -881,10 +920,9 @@ public GetParticipantsResponseInternal getParticipants(String callConnectionId) * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return participants from a call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getParticipantsWithResponse( - String callConnectionId, Context context) { - return getParticipantsWithResponseAsync(callConnectionId, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getParticipants(String callConnectionId, Context context) { + return new PagedIterable<>(getParticipantsAsync(callConnectionId, context)); } /** @@ -910,8 +948,10 @@ public Mono> addParticipantWithResponse String callConnectionId, AddParticipantRequestInternal addParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return FluxUtil.withContext( context -> service.addParticipant( @@ -919,7 +959,7 @@ public Mono> addParticipantWithResponse callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, addParticipantRequest, accept, context)); @@ -949,15 +989,17 @@ public Mono> addParticipantWithResponse String callConnectionId, AddParticipantRequestInternal addParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return service.addParticipant( this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, addParticipantRequest, accept, context); @@ -986,7 +1028,7 @@ public Mono addParticipantAsync( String callConnectionId, AddParticipantRequestInternal addParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return addParticipantWithResponseAsync( callConnectionId, addParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent) .flatMap( @@ -1023,7 +1065,7 @@ public Mono addParticipantAsync( String callConnectionId, AddParticipantRequestInternal addParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return addParticipantWithResponseAsync( callConnectionId, @@ -1064,7 +1106,7 @@ public AddParticipantResponseInternal addParticipant( String callConnectionId, AddParticipantRequestInternal addParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return addParticipantAsync( callConnectionId, addParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent) .block(); @@ -1094,7 +1136,7 @@ public Response addParticipantWithResponse( String callConnectionId, AddParticipantRequestInternal addParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return addParticipantWithResponseAsync( callConnectionId, @@ -1128,8 +1170,10 @@ public Mono> removeParticipantWithRe String callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return FluxUtil.withContext( context -> service.removeParticipant( @@ -1137,7 +1181,7 @@ public Mono> removeParticipantWithRe callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, removeParticipantRequest, accept, context)); @@ -1167,15 +1211,17 @@ public Mono> removeParticipantWithRe String callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return service.removeParticipant( this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, removeParticipantRequest, accept, context); @@ -1204,7 +1250,7 @@ public Mono removeParticipantAsync( String callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return removeParticipantWithResponseAsync( callConnectionId, removeParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent) .flatMap( @@ -1241,7 +1287,7 @@ public Mono removeParticipantAsync( String callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return removeParticipantWithResponseAsync( callConnectionId, @@ -1282,7 +1328,7 @@ public RemoveParticipantResponseInternal removeParticipant( String callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return removeParticipantAsync( callConnectionId, removeParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent) .block(); @@ -1312,7 +1358,7 @@ public Response removeParticipantWithResponse String callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return removeParticipantWithResponseAsync( callConnectionId, @@ -1346,8 +1392,10 @@ public Mono> muteWithResponseAsync( String callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return FluxUtil.withContext( context -> service.mute( @@ -1355,7 +1403,7 @@ public Mono> muteWithResponseAsync( callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, muteParticipantsRequest, accept, context)); @@ -1385,15 +1433,17 @@ public Mono> muteWithResponseAsync( String callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return service.mute( this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, muteParticipantsRequest, accept, context); @@ -1422,7 +1472,7 @@ public Mono muteAsync( String callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return muteWithResponseAsync( callConnectionId, muteParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent) .flatMap( @@ -1459,7 +1509,7 @@ public Mono muteAsync( String callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return muteWithResponseAsync( callConnectionId, @@ -1500,7 +1550,7 @@ public MuteParticipantsResponseInternal mute( String callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return muteAsync(callConnectionId, muteParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent) .block(); } @@ -1529,7 +1579,7 @@ public Response muteWithResponse( String callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return muteWithResponseAsync( callConnectionId, @@ -1563,8 +1613,10 @@ public Mono> unmuteWithResponseAsyn String callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return FluxUtil.withContext( context -> service.unmute( @@ -1572,7 +1624,7 @@ public Mono> unmuteWithResponseAsyn callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, unmuteParticipantsRequest, accept, context)); @@ -1602,15 +1654,17 @@ public Mono> unmuteWithResponseAsyn String callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return service.unmute( this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, unmuteParticipantsRequest, accept, context); @@ -1639,7 +1693,7 @@ public Mono unmuteAsync( String callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return unmuteWithResponseAsync( callConnectionId, unmuteParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent) .flatMap( @@ -1676,7 +1730,7 @@ public Mono unmuteAsync( String callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return unmuteWithResponseAsync( callConnectionId, @@ -1717,7 +1771,7 @@ public UnmuteParticipantsResponseInternal unmute( String callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return unmuteAsync(callConnectionId, unmuteParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent) .block(); } @@ -1746,7 +1800,7 @@ public Response unmuteWithResponse( String callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return unmuteWithResponseAsync( callConnectionId, @@ -1885,4 +1939,55 @@ public Response getParticipantWithResponse( String callConnectionId, String participantRawId, Context context) { return getParticipantWithResponseAsync(callConnectionId, participantRawId, context).block(); } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response payload for getting participants of the call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getParticipantsNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.getParticipantsNext(nextLink, this.client.getEndpoint(), accept, context)) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getValues(), + res.getValue().getNextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response payload for getting participants of the call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getParticipantsNextSinglePageAsync( + String nextLink, Context context) { + final String accept = "application/json"; + return service.getParticipantsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getValues(), + res.getValue().getNextLink(), + null)); + } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallDialogsImpl.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallDialogsImpl.java new file mode 100644 index 0000000000000..bfdd78cb36bff --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallDialogsImpl.java @@ -0,0 +1,321 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation; + +import com.azure.communication.callautomation.implementation.models.CommunicationErrorResponseException; +import com.azure.communication.callautomation.implementation.models.DialogStateResponse; +import com.azure.communication.callautomation.implementation.models.StartDialogRequest; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CallDialogs. */ +public final class CallDialogsImpl { + /** The proxy service used to perform REST calls. */ + private final CallDialogsService service; + + /** The service client containing this operation class. */ + private final AzureCommunicationCallAutomationServiceImpl client; + + /** + * Initializes an instance of CallDialogsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CallDialogsImpl(AzureCommunicationCallAutomationServiceImpl client) { + this.service = + RestProxy.create(CallDialogsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureCommunicationCallAutomationServiceCallDialogs to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureCommunicationCa") + public interface CallDialogsService { + @Put("/calling/callConnections/{callConnectionId}/dialogs/{dialogId}") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono> startDialog( + @HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, + @PathParam("dialogId") String dialogId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StartDialogRequest startDialogRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Delete("/calling/callConnections/{callConnectionId}/dialogs/{dialogId}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono> stopDialog( + @HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, + @PathParam("dialogId") String dialogId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Start a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @param startDialogRequest The start dialog request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> startDialogWithResponseAsync( + String callConnectionId, String dialogId, StartDialogRequest startDialogRequest) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> + service.startDialog( + this.client.getEndpoint(), + callConnectionId, + dialogId, + this.client.getApiVersion(), + startDialogRequest, + accept, + context)); + } + + /** + * Start a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @param startDialogRequest The start dialog request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> startDialogWithResponseAsync( + String callConnectionId, String dialogId, StartDialogRequest startDialogRequest, Context context) { + final String accept = "application/json"; + return service.startDialog( + this.client.getEndpoint(), + callConnectionId, + dialogId, + this.client.getApiVersion(), + startDialogRequest, + accept, + context); + } + + /** + * Start a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @param startDialogRequest The start dialog request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startDialogAsync( + String callConnectionId, String dialogId, StartDialogRequest startDialogRequest) { + return startDialogWithResponseAsync(callConnectionId, dialogId, startDialogRequest) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Start a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @param startDialogRequest The start dialog request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startDialogAsync( + String callConnectionId, String dialogId, StartDialogRequest startDialogRequest, Context context) { + return startDialogWithResponseAsync(callConnectionId, dialogId, startDialogRequest, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Start a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @param startDialogRequest The start dialog request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DialogStateResponse startDialog( + String callConnectionId, String dialogId, StartDialogRequest startDialogRequest) { + return startDialogAsync(callConnectionId, dialogId, startDialogRequest).block(); + } + + /** + * Start a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @param startDialogRequest The start dialog request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response startDialogWithResponse( + String callConnectionId, String dialogId, StartDialogRequest startDialogRequest, Context context) { + return startDialogWithResponseAsync(callConnectionId, dialogId, startDialogRequest, context).block(); + } + + /** + * Stop a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stopDialogWithResponseAsync(String callConnectionId, String dialogId) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> + service.stopDialog( + this.client.getEndpoint(), + callConnectionId, + dialogId, + this.client.getApiVersion(), + accept, + context)); + } + + /** + * Stop a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stopDialogWithResponseAsync(String callConnectionId, String dialogId, Context context) { + final String accept = "application/json"; + return service.stopDialog( + this.client.getEndpoint(), callConnectionId, dialogId, this.client.getApiVersion(), accept, context); + } + + /** + * Stop a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stopDialogAsync(String callConnectionId, String dialogId) { + return stopDialogWithResponseAsync(callConnectionId, dialogId).flatMap((Response res) -> Mono.empty()); + } + + /** + * Stop a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stopDialogAsync(String callConnectionId, String dialogId, Context context) { + return stopDialogWithResponseAsync(callConnectionId, dialogId, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Stop a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stopDialog(String callConnectionId, String dialogId) { + stopDialogAsync(callConnectionId, dialogId).block(); + } + + /** + * Stop a dialog. + * + * @param callConnectionId The call connection id. + * @param dialogId The dialog id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopDialogWithResponse(String callConnectionId, String dialogId, Context context) { + return stopDialogWithResponseAsync(callConnectionId, dialogId, context).block(); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallRecordingsImpl.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallRecordingsImpl.java index 5b32dbb216a9f..756dbdcb2f6b7 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallRecordingsImpl.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallRecordingsImpl.java @@ -24,7 +24,9 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.util.Context; +import com.azure.core.util.DateTimeRfc1123; import com.azure.core.util.FluxUtil; +import java.time.OffsetDateTime; import java.util.UUID; import reactor.core.publisher.Mono; @@ -61,7 +63,7 @@ Mono> startRecording( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID, - @HeaderParam("Repeatability-First-Sent") String repeatabilityFirstSent, + @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent, @BodyParam("application/json") StartCallRecordingRequestInternal startCallRecording, @HeaderParam("Accept") String accept, Context context); @@ -128,15 +130,17 @@ Mono> resumeRecording( public Mono> startRecordingWithResponseAsync( StartCallRecordingRequestInternal startCallRecording, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return FluxUtil.withContext( context -> service.startRecording( this.client.getEndpoint(), this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, startCallRecording, accept, context)); @@ -164,14 +168,16 @@ public Mono> startRecordingWithResponse public Mono> startRecordingWithResponseAsync( StartCallRecordingRequestInternal startCallRecording, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { final String accept = "application/json"; + DateTimeRfc1123 repeatabilityFirstSentConverted = + repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent); return service.startRecording( this.client.getEndpoint(), this.client.getApiVersion(), repeatabilityRequestID, - repeatabilityFirstSent, + repeatabilityFirstSentConverted, startCallRecording, accept, context); @@ -198,7 +204,7 @@ public Mono> startRecordingWithResponse public Mono startRecordingAsync( StartCallRecordingRequestInternal startCallRecording, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return startRecordingWithResponseAsync(startCallRecording, repeatabilityRequestID, repeatabilityFirstSent) .flatMap( (Response res) -> { @@ -232,7 +238,7 @@ public Mono startRecordingAsync( public Mono startRecordingAsync( StartCallRecordingRequestInternal startCallRecording, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return startRecordingWithResponseAsync( startCallRecording, repeatabilityRequestID, repeatabilityFirstSent, context) @@ -267,7 +273,7 @@ public Mono startRecordingAsync( public RecordingStateResponseInternal startRecording( StartCallRecordingRequestInternal startCallRecording, UUID repeatabilityRequestID, - String repeatabilityFirstSent) { + OffsetDateTime repeatabilityFirstSent) { return startRecordingAsync(startCallRecording, repeatabilityRequestID, repeatabilityFirstSent).block(); } @@ -293,7 +299,7 @@ public RecordingStateResponseInternal startRecording( public Response startRecordingWithResponse( StartCallRecordingRequestInternal startCallRecording, UUID repeatabilityRequestID, - String repeatabilityFirstSent, + OffsetDateTime repeatabilityFirstSent, Context context) { return startRecordingWithResponseAsync( startCallRecording, repeatabilityRequestID, repeatabilityFirstSent, context) diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/ListParticipantsResponseConstructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/ListParticipantsResponseConstructorProxy.java deleted file mode 100644 index ae468531115d3..0000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/ListParticipantsResponseConstructorProxy.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.implementation.accesshelpers; - -import com.azure.communication.callautomation.implementation.models.GetParticipantsResponseInternal; -import com.azure.communication.callautomation.models.ListParticipantsResult; - -public final class ListParticipantsResponseConstructorProxy { - private static ListParticipantsResponseConstructorProxy.ListParticipantsResponseConstructorAccessor accessor; - - private ListParticipantsResponseConstructorProxy() { } - - /** - * Type defining the methods to set the non-public properties of a {@link ListParticipantsResponseConstructorProxy.ListParticipantsResponseConstructorAccessor} - * instance. - */ - public interface ListParticipantsResponseConstructorAccessor { - /** - * Creates a new instance of {@link ListParticipantsResult} backed by an internal instance of - * {@link ListParticipantsResult}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link ListParticipantsResult}. - */ - ListParticipantsResult create(GetParticipantsResponseInternal internalResponse); - } - - /** - * The method called from {@link ListParticipantsResult} to set it's accessor. - * - * @param accessor The accessor. - */ - public static void setAccessor(final ListParticipantsResponseConstructorProxy.ListParticipantsResponseConstructorAccessor accessor) { - ListParticipantsResponseConstructorProxy.accessor = accessor; - } - - /** - * Creates a new instance of {@link ListParticipantsResult} backed by an internal instance of - * {@link ListParticipantsResult}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link ListParticipantsResult}. - */ - public static ListParticipantsResult create(GetParticipantsResponseInternal internalResponse) { - // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the - // application accesses BlobDownloadHeaders which triggers the accessor to be configured. So, if the accessor - // is null this effectively pokes the class to set up the accessor. - if (accessor == null) { - new ListParticipantsResult(); - } - - assert accessor != null; - return accessor.create(internalResponse); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationError.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationError.java index 807674c111298..ee390d3e598f8 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationError.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationError.java @@ -8,41 +8,41 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The CommunicationError model. */ +/** The Communication Services error. */ @Fluent public final class CommunicationError { /* - * The code property. + * The error code. */ - @JsonProperty(value = "code") + @JsonProperty(value = "code", required = true) private String code; /* - * The message property. + * The error message. */ - @JsonProperty(value = "message") + @JsonProperty(value = "message", required = true) private String message; /* - * The target property. + * The error target. */ - @JsonProperty(value = "target") + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) private String target; /* - * The details property. + * Further details about specific errors that led to this error. */ - @JsonProperty(value = "details") + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) private List details; /* - * The innererror property. + * The inner error if any. */ - @JsonProperty(value = "innererror") - private CommunicationError innererror; + @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) + private CommunicationError innerError; /** - * Get the code property: The code property. + * Get the code property: The error code. * * @return the code value. */ @@ -51,7 +51,7 @@ public String getCode() { } /** - * Set the code property: The code property. + * Set the code property: The error code. * * @param code the code value to set. * @return the CommunicationError object itself. @@ -62,7 +62,7 @@ public CommunicationError setCode(String code) { } /** - * Get the message property: The message property. + * Get the message property: The error message. * * @return the message value. */ @@ -71,7 +71,7 @@ public String getMessage() { } /** - * Set the message property: The message property. + * Set the message property: The error message. * * @param message the message value to set. * @return the CommunicationError object itself. @@ -82,7 +82,7 @@ public CommunicationError setMessage(String message) { } /** - * Get the target property: The target property. + * Get the target property: The error target. * * @return the target value. */ @@ -91,18 +91,7 @@ public String getTarget() { } /** - * Set the target property: The target property. - * - * @param target the target value to set. - * @return the CommunicationError object itself. - */ - public CommunicationError setTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the details property: The details property. + * Get the details property: Further details about specific errors that led to this error. * * @return the details value. */ @@ -111,33 +100,11 @@ public List getDetails() { } /** - * Set the details property: The details property. + * Get the innerError property: The inner error if any. * - * @param details the details value to set. - * @return the CommunicationError object itself. + * @return the innerError value. */ - public CommunicationError setDetails(List details) { - this.details = details; - return this; - } - - /** - * Get the innererror property: The innererror property. - * - * @return the innererror value. - */ - public CommunicationError getInnererror() { - return this.innererror; - } - - /** - * Set the innererror property: The innererror property. - * - * @param innererror the innererror value to set. - * @return the CommunicationError object itself. - */ - public CommunicationError setInnererror(CommunicationError innererror) { - this.innererror = innererror; - return this; + public CommunicationError getInnerError() { + return this.innerError; } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationErrorResponse.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationErrorResponse.java index 2508630f6ed42..4403b761aa544 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationErrorResponse.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationErrorResponse.java @@ -7,17 +7,17 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Communication Services error response. */ +/** The Communication Services error. */ @Fluent public final class CommunicationErrorResponse { /* - * The error property. + * The Communication Services error. */ @JsonProperty(value = "error", required = true) private CommunicationError error; /** - * Get the error property: The error property. + * Get the error property: The Communication Services error. * * @return the error value. */ @@ -26,7 +26,7 @@ public CommunicationError getError() { } /** - * Set the error property: The error property. + * Set the error property: The Communication Services error. * * @param error the error value to set. * @return the CommunicationErrorResponse object itself. diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationIdentifierModel.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationIdentifierModel.java index 92e57fdbf6b82..4892a9df8e90a 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationIdentifierModel.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationIdentifierModel.java @@ -7,20 +7,24 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The CommunicationIdentifierModel model. */ +/** + * Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure + * communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set + * which must match the kind enum value. + */ @Fluent public final class CommunicationIdentifierModel { /* - * Full ID of the identifier. + * The identifier kind. Only required in responses. */ - @JsonProperty(value = "rawId") - private String rawId; + @JsonProperty(value = "kind") + private CommunicationIdentifierModelKind kind; /* - * Type of CommunicationIdentifierModel. + * Raw Id of the identifier. Optional in requests, required in responses. */ - @JsonProperty(value = "kind") - private CommunicationIdentifierModelKind kind; + @JsonProperty(value = "rawId") + private String rawId; /* * The communication user. @@ -41,42 +45,42 @@ public final class CommunicationIdentifierModel { private MicrosoftTeamsUserIdentifierModel microsoftTeamsUser; /** - * Get the rawId property: Full ID of the identifier. + * Get the kind property: The identifier kind. Only required in responses. * - * @return the rawId value. + * @return the kind value. */ - public String getRawId() { - return this.rawId; + public CommunicationIdentifierModelKind getKind() { + return this.kind; } /** - * Set the rawId property: Full ID of the identifier. + * Set the kind property: The identifier kind. Only required in responses. * - * @param rawId the rawId value to set. + * @param kind the kind value to set. * @return the CommunicationIdentifierModel object itself. */ - public CommunicationIdentifierModel setRawId(String rawId) { - this.rawId = rawId; + public CommunicationIdentifierModel setKind(CommunicationIdentifierModelKind kind) { + this.kind = kind; return this; } /** - * Get the kind property: Type of CommunicationIdentifierModel. + * Get the rawId property: Raw Id of the identifier. Optional in requests, required in responses. * - * @return the kind value. + * @return the rawId value. */ - public CommunicationIdentifierModelKind getKind() { - return this.kind; + public String getRawId() { + return this.rawId; } /** - * Set the kind property: Type of CommunicationIdentifierModel. + * Set the rawId property: Raw Id of the identifier. Optional in requests, required in responses. * - * @param kind the kind value to set. + * @param rawId the rawId value to set. * @return the CommunicationIdentifierModel object itself. */ - public CommunicationIdentifierModel setKind(CommunicationIdentifierModelKind kind) { - this.kind = kind; + public CommunicationIdentifierModel setRawId(String rawId) { + this.rawId = rawId; return this; } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationUserIdentifierModel.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationUserIdentifierModel.java index 73404beb9c952..181bfb121ae41 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationUserIdentifierModel.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CommunicationUserIdentifierModel.java @@ -7,17 +7,17 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The CommunicationUserIdentifierModel model. */ +/** A user that got created with an Azure Communication Services resource. */ @Fluent public final class CommunicationUserIdentifierModel { /* - * The id property. + * The Id of the communication user. */ @JsonProperty(value = "id", required = true) private String id; /** - * Get the id property: The id property. + * Get the id property: The Id of the communication user. * * @return the id value. */ @@ -26,7 +26,7 @@ public String getId() { } /** - * Set the id property: The id property. + * Set the id property: The Id of the communication user. * * @param id the id value to set. * @return the CommunicationUserIdentifierModel object itself. diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogCompleted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogCompleted.java new file mode 100644 index 0000000000000..f93f4452ef3fc --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogCompleted.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DialogCompleted model. */ +@Fluent +public final class DialogCompleted { + /* + * Call connection ID. + */ + @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY) + private String callConnectionId; + + /* + * Server call ID. + */ + @JsonProperty(value = "serverCallId") + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for + * skype chain ID. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * Used by customers when calling answerCall action to correlate the + * request to the response event. + */ + @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY) + private String operationContext; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY) + private ResultInformation resultInformation; + + /* + * Determines the type of the dialog. + */ + @JsonProperty(value = "dialogInputType") + private DialogInputType dialogInputType; + + /* + * Dialog ID + */ + @JsonProperty(value = "dialogId", access = JsonProperty.Access.WRITE_ONLY) + private String dialogId; + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the DialogCompleted object itself. + */ + public DialogCompleted setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the DialogCompleted object itself. + */ + public DialogCompleted setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to + * the response event. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. + * + * @return the resultInformation value. + */ + public ResultInformation getResultInformation() { + return this.resultInformation; + } + + /** + * Get the dialogInputType property: Determines the type of the dialog. + * + * @return the dialogInputType value. + */ + public DialogInputType getDialogInputType() { + return this.dialogInputType; + } + + /** + * Set the dialogInputType property: Determines the type of the dialog. + * + * @param dialogInputType the dialogInputType value to set. + * @return the DialogCompleted object itself. + */ + public DialogCompleted setDialogInputType(DialogInputType dialogInputType) { + this.dialogInputType = dialogInputType; + return this; + } + + /** + * Get the dialogId property: Dialog ID. + * + * @return the dialogId value. + */ + public String getDialogId() { + return this.dialogId; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogConsent.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogConsent.java new file mode 100644 index 0000000000000..2ba3e70e26a8f --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogConsent.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DialogConsent model. */ +@Fluent +public final class DialogConsent { + /* + * Call connection ID. + */ + @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY) + private String callConnectionId; + + /* + * Server call ID. + */ + @JsonProperty(value = "serverCallId") + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for + * skype chain ID. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * Used by customers when calling answerCall action to correlate the + * request to the response event. + */ + @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY) + private String operationContext; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY) + private ResultInformation resultInformation; + + /* + * Determines the type of the dialog. + */ + @JsonProperty(value = "dialogInputType") + private DialogInputType dialogInputType; + + /* + * UserConsent data from the Conversation Conductor + */ + @JsonProperty(value = "userConsent", access = JsonProperty.Access.WRITE_ONLY) + private UserConsent userConsent; + + /* + * Dialog ID + */ + @JsonProperty(value = "dialogId", access = JsonProperty.Access.WRITE_ONLY) + private String dialogId; + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the DialogConsent object itself. + */ + public DialogConsent setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the DialogConsent object itself. + */ + public DialogConsent setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to + * the response event. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. + * + * @return the resultInformation value. + */ + public ResultInformation getResultInformation() { + return this.resultInformation; + } + + /** + * Get the dialogInputType property: Determines the type of the dialog. + * + * @return the dialogInputType value. + */ + public DialogInputType getDialogInputType() { + return this.dialogInputType; + } + + /** + * Set the dialogInputType property: Determines the type of the dialog. + * + * @param dialogInputType the dialogInputType value to set. + * @return the DialogConsent object itself. + */ + public DialogConsent setDialogInputType(DialogInputType dialogInputType) { + this.dialogInputType = dialogInputType; + return this; + } + + /** + * Get the userConsent property: UserConsent data from the Conversation Conductor. + * + * @return the userConsent value. + */ + public UserConsent getUserConsent() { + return this.userConsent; + } + + /** + * Get the dialogId property: Dialog ID. + * + * @return the dialogId value. + */ + public String getDialogId() { + return this.dialogId; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogFailed.java new file mode 100644 index 0000000000000..53d2bf9a9227c --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogFailed.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DialogFailed model. */ +@Fluent +public final class DialogFailed { + /* + * Call connection ID. + */ + @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY) + private String callConnectionId; + + /* + * Server call ID. + */ + @JsonProperty(value = "serverCallId") + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for + * skype chain ID. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * Used by customers when calling answerCall action to correlate the + * request to the response event. + */ + @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY) + private String operationContext; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY) + private ResultInformation resultInformation; + + /* + * Determines the type of the dialog. + */ + @JsonProperty(value = "dialogInputType") + private DialogInputType dialogInputType; + + /* + * Dialog ID + */ + @JsonProperty(value = "dialogId", access = JsonProperty.Access.WRITE_ONLY) + private String dialogId; + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the DialogFailed object itself. + */ + public DialogFailed setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the DialogFailed object itself. + */ + public DialogFailed setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to + * the response event. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. + * + * @return the resultInformation value. + */ + public ResultInformation getResultInformation() { + return this.resultInformation; + } + + /** + * Get the dialogInputType property: Determines the type of the dialog. + * + * @return the dialogInputType value. + */ + public DialogInputType getDialogInputType() { + return this.dialogInputType; + } + + /** + * Set the dialogInputType property: Determines the type of the dialog. + * + * @param dialogInputType the dialogInputType value to set. + * @return the DialogFailed object itself. + */ + public DialogFailed setDialogInputType(DialogInputType dialogInputType) { + this.dialogInputType = dialogInputType; + return this; + } + + /** + * Get the dialogId property: Dialog ID. + * + * @return the dialogId value. + */ + public String getDialogId() { + return this.dialogId; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogHangup.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogHangup.java new file mode 100644 index 0000000000000..f9da7f8398c72 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogHangup.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DialogHangup model. */ +@Fluent +public final class DialogHangup { + /* + * Call connection ID. + */ + @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY) + private String callConnectionId; + + /* + * Server call ID. + */ + @JsonProperty(value = "serverCallId") + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for + * skype chain ID. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * Used by customers when calling answerCall action to correlate the + * request to the response event. + */ + @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY) + private String operationContext; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY) + private ResultInformation resultInformation; + + /* + * Determines the type of the dialog. + */ + @JsonProperty(value = "dialogInputType") + private DialogInputType dialogInputType; + + /* + * Dialog ID + */ + @JsonProperty(value = "dialogId", access = JsonProperty.Access.WRITE_ONLY) + private String dialogId; + + /* + * Ivr Context + */ + @JsonProperty(value = "ivrContext", access = JsonProperty.Access.WRITE_ONLY) + private Object ivrContext; + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the DialogHangup object itself. + */ + public DialogHangup setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the DialogHangup object itself. + */ + public DialogHangup setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to + * the response event. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. + * + * @return the resultInformation value. + */ + public ResultInformation getResultInformation() { + return this.resultInformation; + } + + /** + * Get the dialogInputType property: Determines the type of the dialog. + * + * @return the dialogInputType value. + */ + public DialogInputType getDialogInputType() { + return this.dialogInputType; + } + + /** + * Set the dialogInputType property: Determines the type of the dialog. + * + * @param dialogInputType the dialogInputType value to set. + * @return the DialogHangup object itself. + */ + public DialogHangup setDialogInputType(DialogInputType dialogInputType) { + this.dialogInputType = dialogInputType; + return this; + } + + /** + * Get the dialogId property: Dialog ID. + * + * @return the dialogId value. + */ + public String getDialogId() { + return this.dialogId; + } + + /** + * Get the ivrContext property: Ivr Context. + * + * @return the ivrContext value. + */ + public Object getIvrContext() { + return this.ivrContext; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogInputType.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogInputType.java new file mode 100644 index 0000000000000..7e3c908a88338 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogInputType.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DialogInputType. */ +public final class DialogInputType extends ExpandableStringEnum { + /** Static value powerVirtualAgents for DialogInputType. */ + public static final DialogInputType POWER_VIRTUAL_AGENTS = fromString("powerVirtualAgents"); + + /** + * Creates or finds a DialogInputType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DialogInputType. + */ + @JsonCreator + public static DialogInputType fromString(String name) { + return fromString(name, DialogInputType.class); + } + + /** @return known DialogInputType values. */ + public static Collection values() { + return values(DialogInputType.class); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogLanguageChange.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogLanguageChange.java new file mode 100644 index 0000000000000..29cb55a4f2a9e --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogLanguageChange.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DialogLanguageChange model. */ +@Fluent +public final class DialogLanguageChange { + /* + * Call connection ID. + */ + @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY) + private String callConnectionId; + + /* + * Server call ID. + */ + @JsonProperty(value = "serverCallId") + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for + * skype chain ID. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * Used by customers when calling answerCall action to correlate the + * request to the response event. + */ + @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY) + private String operationContext; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY) + private ResultInformation resultInformation; + + /* + * Determines the type of the dialog. + */ + @JsonProperty(value = "dialogInputType") + private DialogInputType dialogInputType; + + /* + * Dialog ID + */ + @JsonProperty(value = "dialogId", access = JsonProperty.Access.WRITE_ONLY) + private String dialogId; + + /* + * Selected Language + */ + @JsonProperty(value = "selectedLanguage", access = JsonProperty.Access.WRITE_ONLY) + private String selectedLanguage; + + /* + * Ivr Context + */ + @JsonProperty(value = "ivrContext", access = JsonProperty.Access.WRITE_ONLY) + private Object ivrContext; + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the DialogLanguageChange object itself. + */ + public DialogLanguageChange setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the DialogLanguageChange object itself. + */ + public DialogLanguageChange setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to + * the response event. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. + * + * @return the resultInformation value. + */ + public ResultInformation getResultInformation() { + return this.resultInformation; + } + + /** + * Get the dialogInputType property: Determines the type of the dialog. + * + * @return the dialogInputType value. + */ + public DialogInputType getDialogInputType() { + return this.dialogInputType; + } + + /** + * Set the dialogInputType property: Determines the type of the dialog. + * + * @param dialogInputType the dialogInputType value to set. + * @return the DialogLanguageChange object itself. + */ + public DialogLanguageChange setDialogInputType(DialogInputType dialogInputType) { + this.dialogInputType = dialogInputType; + return this; + } + + /** + * Get the dialogId property: Dialog ID. + * + * @return the dialogId value. + */ + public String getDialogId() { + return this.dialogId; + } + + /** + * Get the selectedLanguage property: Selected Language. + * + * @return the selectedLanguage value. + */ + public String getSelectedLanguage() { + return this.selectedLanguage; + } + + /** + * Get the ivrContext property: Ivr Context. + * + * @return the ivrContext value. + */ + public Object getIvrContext() { + return this.ivrContext; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogOptions.java new file mode 100644 index 0000000000000..10aec7131ed93 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogOptions.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The DialogOptions model. */ +@Fluent +public final class DialogOptions { + /* + * Bot identifier. + */ + @JsonProperty(value = "botAppId", required = true) + private String botAppId; + + /* + * Dialog context. + */ + @JsonProperty(value = "dialogContext", required = true) + private Map dialogContext; + + /** + * Get the botAppId property: Bot identifier. + * + * @return the botAppId value. + */ + public String getBotAppId() { + return this.botAppId; + } + + /** + * Set the botAppId property: Bot identifier. + * + * @param botAppId the botAppId value to set. + * @return the DialogOptions object itself. + */ + public DialogOptions setBotAppId(String botAppId) { + this.botAppId = botAppId; + return this; + } + + /** + * Get the dialogContext property: Dialog context. + * + * @return the dialogContext value. + */ + public Map getDialogContext() { + return this.dialogContext; + } + + /** + * Set the dialogContext property: Dialog context. + * + * @param dialogContext the dialogContext value to set. + * @return the DialogOptions object itself. + */ + public DialogOptions setDialogContext(Map dialogContext) { + this.dialogContext = dialogContext; + return this; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogSensitivityUpdate.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogSensitivityUpdate.java new file mode 100644 index 0000000000000..6c8f2a055558f --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogSensitivityUpdate.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DialogSensitivityUpdate model. */ +@Fluent +public final class DialogSensitivityUpdate { + /* + * Call connection ID. + */ + @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY) + private String callConnectionId; + + /* + * Server call ID. + */ + @JsonProperty(value = "serverCallId") + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for + * skype chain ID. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * Used by customers when calling answerCall action to correlate the + * request to the response event. + */ + @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY) + private String operationContext; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY) + private ResultInformation resultInformation; + + /* + * Determines the type of the dialog. + */ + @JsonProperty(value = "dialogInputType") + private DialogInputType dialogInputType; + + /* + * Dialog ID + */ + @JsonProperty(value = "dialogId", access = JsonProperty.Access.WRITE_ONLY) + private String dialogId; + + /* + * SensitiveFlag data from the Conversation Conductor + */ + @JsonProperty(value = "sensitiveFlag", access = JsonProperty.Access.WRITE_ONLY) + private SensitiveFlag sensitiveFlag; + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the DialogSensitivityUpdate object itself. + */ + public DialogSensitivityUpdate setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the DialogSensitivityUpdate object itself. + */ + public DialogSensitivityUpdate setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to + * the response event. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. + * + * @return the resultInformation value. + */ + public ResultInformation getResultInformation() { + return this.resultInformation; + } + + /** + * Get the dialogInputType property: Determines the type of the dialog. + * + * @return the dialogInputType value. + */ + public DialogInputType getDialogInputType() { + return this.dialogInputType; + } + + /** + * Set the dialogInputType property: Determines the type of the dialog. + * + * @param dialogInputType the dialogInputType value to set. + * @return the DialogSensitivityUpdate object itself. + */ + public DialogSensitivityUpdate setDialogInputType(DialogInputType dialogInputType) { + this.dialogInputType = dialogInputType; + return this; + } + + /** + * Get the dialogId property: Dialog ID. + * + * @return the dialogId value. + */ + public String getDialogId() { + return this.dialogId; + } + + /** + * Get the sensitiveFlag property: SensitiveFlag data from the Conversation Conductor. + * + * @return the sensitiveFlag value. + */ + public SensitiveFlag getSensitiveFlag() { + return this.sensitiveFlag; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogStarted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogStarted.java new file mode 100644 index 0000000000000..198efc8e1326c --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogStarted.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DialogStarted model. */ +@Fluent +public final class DialogStarted { + /* + * Call connection ID. + */ + @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY) + private String callConnectionId; + + /* + * Server call ID. + */ + @JsonProperty(value = "serverCallId") + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for + * skype chain ID. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * Used by customers when calling answerCall action to correlate the + * request to the response event. + */ + @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY) + private String operationContext; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY) + private ResultInformation resultInformation; + + /* + * Determines the type of the dialog. + */ + @JsonProperty(value = "dialogInputType") + private DialogInputType dialogInputType; + + /* + * Dialog ID + */ + @JsonProperty(value = "dialogId", access = JsonProperty.Access.WRITE_ONLY) + private String dialogId; + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the DialogStarted object itself. + */ + public DialogStarted setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the DialogStarted object itself. + */ + public DialogStarted setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to + * the response event. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. + * + * @return the resultInformation value. + */ + public ResultInformation getResultInformation() { + return this.resultInformation; + } + + /** + * Get the dialogInputType property: Determines the type of the dialog. + * + * @return the dialogInputType value. + */ + public DialogInputType getDialogInputType() { + return this.dialogInputType; + } + + /** + * Set the dialogInputType property: Determines the type of the dialog. + * + * @param dialogInputType the dialogInputType value to set. + * @return the DialogStarted object itself. + */ + public DialogStarted setDialogInputType(DialogInputType dialogInputType) { + this.dialogInputType = dialogInputType; + return this; + } + + /** + * Get the dialogId property: Dialog ID. + * + * @return the dialogId value. + */ + public String getDialogId() { + return this.dialogId; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogStateResponse.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogStateResponse.java new file mode 100644 index 0000000000000..ca73d055e82f9 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogStateResponse.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DialogStateResponse model. */ +@Fluent +public final class DialogStateResponse { + /* + * The dialog ID. + */ + @JsonProperty(value = "dialogId") + private String dialogId; + + /* + * Defines options for dialog. + */ + @JsonProperty(value = "dialogOptions") + private DialogOptions dialogOptions; + + /* + * Determines the type of the dialog. + */ + @JsonProperty(value = "dialogInputType") + private DialogInputType dialogInputType; + + /* + * The value to identify context of the operation. + */ + @JsonProperty(value = "operationContext") + private String operationContext; + + /** + * Get the dialogId property: The dialog ID. + * + * @return the dialogId value. + */ + public String getDialogId() { + return this.dialogId; + } + + /** + * Set the dialogId property: The dialog ID. + * + * @param dialogId the dialogId value to set. + * @return the DialogStateResponse object itself. + */ + public DialogStateResponse setDialogId(String dialogId) { + this.dialogId = dialogId; + return this; + } + + /** + * Get the dialogOptions property: Defines options for dialog. + * + * @return the dialogOptions value. + */ + public DialogOptions getDialogOptions() { + return this.dialogOptions; + } + + /** + * Set the dialogOptions property: Defines options for dialog. + * + * @param dialogOptions the dialogOptions value to set. + * @return the DialogStateResponse object itself. + */ + public DialogStateResponse setDialogOptions(DialogOptions dialogOptions) { + this.dialogOptions = dialogOptions; + return this; + } + + /** + * Get the dialogInputType property: Determines the type of the dialog. + * + * @return the dialogInputType value. + */ + public DialogInputType getDialogInputType() { + return this.dialogInputType; + } + + /** + * Set the dialogInputType property: Determines the type of the dialog. + * + * @param dialogInputType the dialogInputType value to set. + * @return the DialogStateResponse object itself. + */ + public DialogStateResponse setDialogInputType(DialogInputType dialogInputType) { + this.dialogInputType = dialogInputType; + return this; + } + + /** + * Get the operationContext property: The value to identify context of the operation. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: The value to identify context of the operation. + * + * @param operationContext the operationContext value to set. + * @return the DialogStateResponse object itself. + */ + public DialogStateResponse setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogTransfer.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogTransfer.java new file mode 100644 index 0000000000000..455210e01ec8a --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogTransfer.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DialogTransfer model. */ +@Fluent +public final class DialogTransfer { + /* + * Call connection ID. + */ + @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY) + private String callConnectionId; + + /* + * Server call ID. + */ + @JsonProperty(value = "serverCallId") + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for + * skype chain ID. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * Used by customers when calling answerCall action to correlate the + * request to the response event. + */ + @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY) + private String operationContext; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY) + private ResultInformation resultInformation; + + /* + * Determines the type of the dialog. + */ + @JsonProperty(value = "dialogInputType") + private DialogInputType dialogInputType; + + /* + * Dialog ID + */ + @JsonProperty(value = "dialogId", access = JsonProperty.Access.WRITE_ONLY) + private String dialogId; + + /* + * Transfer type + */ + @JsonProperty(value = "transferType", access = JsonProperty.Access.WRITE_ONLY) + private String transferType; + + /* + * Transfer destination + */ + @JsonProperty(value = "transferDestination", access = JsonProperty.Access.WRITE_ONLY) + private String transferDestination; + + /* + * IVR context + */ + @JsonProperty(value = "ivrContext", access = JsonProperty.Access.WRITE_ONLY) + private Object ivrContext; + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the DialogTransfer object itself. + */ + public DialogTransfer setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the DialogTransfer object itself. + */ + public DialogTransfer setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to + * the response event. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. + * + * @return the resultInformation value. + */ + public ResultInformation getResultInformation() { + return this.resultInformation; + } + + /** + * Get the dialogInputType property: Determines the type of the dialog. + * + * @return the dialogInputType value. + */ + public DialogInputType getDialogInputType() { + return this.dialogInputType; + } + + /** + * Set the dialogInputType property: Determines the type of the dialog. + * + * @param dialogInputType the dialogInputType value to set. + * @return the DialogTransfer object itself. + */ + public DialogTransfer setDialogInputType(DialogInputType dialogInputType) { + this.dialogInputType = dialogInputType; + return this; + } + + /** + * Get the dialogId property: Dialog ID. + * + * @return the dialogId value. + */ + public String getDialogId() { + return this.dialogId; + } + + /** + * Get the transferType property: Transfer type. + * + * @return the transferType value. + */ + public String getTransferType() { + return this.transferType; + } + + /** + * Get the transferDestination property: Transfer destination. + * + * @return the transferDestination value. + */ + public String getTransferDestination() { + return this.transferDestination; + } + + /** + * Get the ivrContext property: IVR context. + * + * @return the ivrContext value. + */ + public Object getIvrContext() { + return this.ivrContext; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Hangup.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Hangup.java new file mode 100644 index 0000000000000..47a039e0ae782 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Hangup.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Hangup model. */ +@Fluent +public final class Hangup { + /* + * The reason property. + */ + @JsonProperty(value = "reason") + private String reason; + + /** + * Get the reason property: The reason property. + * + * @return the reason value. + */ + public String getReason() { + return this.reason; + } + + /** + * Set the reason property: The reason property. + * + * @param reason the reason value to set. + * @return the Hangup object itself. + */ + public Hangup setReason(String reason) { + this.reason = reason; + return this; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MicrosoftTeamsUserIdentifierModel.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MicrosoftTeamsUserIdentifierModel.java index d54e41c3a280c..3ae62106d1a72 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MicrosoftTeamsUserIdentifierModel.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MicrosoftTeamsUserIdentifierModel.java @@ -7,29 +7,33 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The MicrosoftTeamsUserIdentifierModel model. */ +/** A Microsoft Teams user. */ @Fluent public final class MicrosoftTeamsUserIdentifierModel { /* - * The userId property. + * The Id of the Microsoft Teams user. If not anonymous, this is the AAD + * object Id of the user. */ @JsonProperty(value = "userId", required = true) private String userId; /* - * The isAnonymous property. + * True if the Microsoft Teams user is anonymous. By default false if + * missing. */ @JsonProperty(value = "isAnonymous") private Boolean isAnonymous; /* - * The cloud property. + * The cloud that the Microsoft Teams user belongs to. By default 'public' + * if missing. */ @JsonProperty(value = "cloud") private CommunicationCloudEnvironmentModel cloud; /** - * Get the userId property: The userId property. + * Get the userId property: The Id of the Microsoft Teams user. If not anonymous, this is the AAD object Id of the + * user. * * @return the userId value. */ @@ -38,7 +42,8 @@ public String getUserId() { } /** - * Set the userId property: The userId property. + * Set the userId property: The Id of the Microsoft Teams user. If not anonymous, this is the AAD object Id of the + * user. * * @param userId the userId value to set. * @return the MicrosoftTeamsUserIdentifierModel object itself. @@ -49,7 +54,7 @@ public MicrosoftTeamsUserIdentifierModel setUserId(String userId) { } /** - * Get the isAnonymous property: The isAnonymous property. + * Get the isAnonymous property: True if the Microsoft Teams user is anonymous. By default false if missing. * * @return the isAnonymous value. */ @@ -58,7 +63,7 @@ public Boolean isAnonymous() { } /** - * Set the isAnonymous property: The isAnonymous property. + * Set the isAnonymous property: True if the Microsoft Teams user is anonymous. By default false if missing. * * @param isAnonymous the isAnonymous value to set. * @return the MicrosoftTeamsUserIdentifierModel object itself. @@ -69,7 +74,7 @@ public MicrosoftTeamsUserIdentifierModel setIsAnonymous(Boolean isAnonymous) { } /** - * Get the cloud property: The cloud property. + * Get the cloud property: The cloud that the Microsoft Teams user belongs to. By default 'public' if missing. * * @return the cloud value. */ @@ -78,7 +83,7 @@ public CommunicationCloudEnvironmentModel getCloud() { } /** - * Set the cloud property: The cloud property. + * Set the cloud property: The cloud that the Microsoft Teams user belongs to. By default 'public' if missing. * * @param cloud the cloud value to set. * @return the MicrosoftTeamsUserIdentifierModel object itself. diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PhoneNumberIdentifierModel.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PhoneNumberIdentifierModel.java index 80df59eb6b31a..29e7e249daa50 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PhoneNumberIdentifierModel.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PhoneNumberIdentifierModel.java @@ -7,17 +7,17 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The PhoneNumberIdentifierModel model. */ +/** A phone number. */ @Fluent public final class PhoneNumberIdentifierModel { /* - * The value property. + * The phone number in E.164 format. */ @JsonProperty(value = "value", required = true) private String value; /** - * Get the value property: The value property. + * Get the value property: The phone number in E.164 format. * * @return the value value. */ @@ -26,7 +26,7 @@ public String getValue() { } /** - * Set the value property: The value property. + * Set the value property: The phone number in E.164 format. * * @param value the value value to set. * @return the PhoneNumberIdentifierModel object itself. diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecognitionTypeInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecognitionTypeInternal.java index 527b6afe4384a..cc38c2393bf33 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecognitionTypeInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecognitionTypeInternal.java @@ -16,9 +16,6 @@ public final class RecognitionTypeInternal extends ExpandableStringEnum values; - - static { - ListParticipantsResponseConstructorProxy.setAccessor( - new ListParticipantsResponseConstructorProxy.ListParticipantsResponseConstructorAccessor() { - @Override - public ListParticipantsResult create(GetParticipantsResponseInternal internalHeaders) { - return new ListParticipantsResult(internalHeaders); - } - }); - } - - /** - * Public constructor. - * - */ - public ListParticipantsResult() { - this.values = null; - } - - /** - * Package-private constructor of the class, used internally only. - * - * @param getParticipantsResponseInternal The response from the service. - */ - ListParticipantsResult(GetParticipantsResponseInternal getParticipantsResponseInternal) { - Objects.requireNonNull(getParticipantsResponseInternal, "transferCallResponseInternal must not be null"); - - this.values = getParticipantsResponseInternal - .getValues() - .stream() - .map(CallParticipantConverter::convert).collect(Collectors.toList()); - } - - /** - * Get the values property: The list of participants in the call. - * - * @return The list of participants in the call. - */ - public List getValues() { - return this.values; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncAutomatedLiveTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncAutomatedLiveTests.java index 9d412516d9f76..72f0ece26bf47 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncAutomatedLiveTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncAutomatedLiveTests.java @@ -8,12 +8,12 @@ import com.azure.communication.callautomation.models.AnswerCallOptions; import com.azure.communication.callautomation.models.AnswerCallResult; import com.azure.communication.callautomation.models.CallInvite; +import com.azure.communication.callautomation.models.CallParticipant; import com.azure.communication.callautomation.models.CreateCallResult; import com.azure.communication.callautomation.models.CreateGroupCallOptions; -import com.azure.communication.callautomation.models.ListParticipantsResult; import com.azure.communication.callautomation.models.RemoveParticipantResult; -import com.azure.communication.callautomation.models.events.CallConnected; import com.azure.communication.callautomation.models.events.AddParticipantSucceeded; +import com.azure.communication.callautomation.models.events.CallConnected; import com.azure.communication.callautomation.models.events.RemoveParticipantSucceeded; import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; @@ -128,9 +128,9 @@ public void createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAut assertNotNull(addParticipantSucceeded); // check participant number in the call - ListParticipantsResult listParticipantsResult = createCallResult.getCallConnectionAsync().listParticipants().block(); + List listParticipantsResult = createCallResult.getCallConnectionAsync().listParticipants().log().collectList().block(); assertNotNull(listParticipantsResult); - assertEquals(3, listParticipantsResult.getValues().size()); + assertEquals(3, listParticipantsResult.size()); // remove a participant from the call RemoveParticipantResult removeParticipantResult = createCallResult.getCallConnectionAsync().removeParticipant(receiver).block(); diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncUnitTests.java index 0e46cf22a9d3d..481ca107f68fe 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncUnitTests.java @@ -12,7 +12,6 @@ import com.azure.communication.callautomation.models.CallConnectionProperties; import com.azure.communication.callautomation.models.CallInvite; import com.azure.communication.callautomation.models.CallParticipant; -import com.azure.communication.callautomation.models.ListParticipantsResult; import com.azure.communication.callautomation.models.MuteParticipantsOptions; import com.azure.communication.callautomation.models.MuteParticipantsResult; import com.azure.communication.callautomation.models.RemoveParticipantOptions; @@ -31,6 +30,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -145,32 +145,10 @@ public void listParticipants() { ))) .getCallConnectionAsync(CALL_CONNECTION_ID); - ListParticipantsResult listParticipants = callConnectionAsync.listParticipants().block(); + List listParticipants = callConnectionAsync.listParticipants().log().collectList().block(); assertNotNull(listParticipants); - assertNotNull(listParticipants.getValues()); - assertEquals(CALL_CALLER_ID, ((CommunicationUserIdentifier) listParticipants.getValues().get(0).getIdentifier()).getId()); - } - - @Test - public void listParticipantsWithResponse() { - CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient(new ArrayList<>( - Collections.singletonList( - new SimpleEntry<>(generateListParticipantsResponse(), 200) - ))) - .getCallConnectionAsync(CALL_CONNECTION_ID); - - Response listParticipantsResultResponse = callConnectionAsync.listParticipantsWithResponse().block(); - - assertNotNull(listParticipantsResultResponse); - assertEquals(200, listParticipantsResultResponse.getStatusCode()); - assertNotNull(listParticipantsResultResponse.getValue()); - assertEquals(CALL_TARGET_ID, ((CommunicationUserIdentifier) listParticipantsResultResponse - .getValue() - .getValues() - .get(1) - .getIdentifier()) - .getId()); + assertEquals(CALL_CALLER_ID, ((CommunicationUserIdentifier) listParticipants.get(0).getIdentifier()).getId()); } @Test diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionUnitTests.java index fcf78af1b7d76..5db36cf4b714a 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionUnitTests.java @@ -12,7 +12,6 @@ import com.azure.communication.callautomation.models.CallConnectionProperties; import com.azure.communication.callautomation.models.CallInvite; import com.azure.communication.callautomation.models.CallParticipant; -import com.azure.communication.callautomation.models.ListParticipantsResult; import com.azure.communication.callautomation.models.MuteParticipantsOptions; import com.azure.communication.callautomation.models.MuteParticipantsResult; import com.azure.communication.callautomation.models.RemoveParticipantOptions; @@ -31,6 +30,8 @@ import java.util.AbstractMap.SimpleEntry; import java.util.Collections; import java.util.HashMap; +import java.util.List; +import java.util.stream.Collectors; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -144,32 +145,10 @@ public void listParticipants() { ))) .getCallConnection(CALL_CONNECTION_ID); - ListParticipantsResult listParticipants = callConnection.listParticipants(); + List listParticipants = callConnection.listParticipants().stream().collect(Collectors.toList()); assertNotNull(listParticipants); - assertNotNull(listParticipants.getValues()); - assertEquals(CALL_CALLER_ID, ((CommunicationUserIdentifier) listParticipants.getValues().get(0).getIdentifier()).getId()); - } - - @Test - public void listParticipantsWithResponse() { - CallConnection callConnection = getCallAutomationClient(new ArrayList<>( - Collections.singletonList( - new SimpleEntry<>(generateListParticipantsResponse(), 200) - ))) - .getCallConnection(CALL_CONNECTION_ID); - - Response listParticipantsResultResponse = callConnection.listParticipantsWithResponse(Context.NONE); - - assertNotNull(listParticipantsResultResponse); - assertEquals(200, listParticipantsResultResponse.getStatusCode()); - assertNotNull(listParticipantsResultResponse.getValue()); - assertEquals(CALL_TARGET_ID, ((CommunicationUserIdentifier) listParticipantsResultResponse - .getValue() - .getValues() - .get(1) - .getIdentifier()) - .getId()); + assertEquals(CALL_CALLER_ID, ((CommunicationUserIdentifier) listParticipants.get(0).getIdentifier()).getId()); } @Test diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/session-records/CallConnectionAsyncAutomatedLiveTests.createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest[1].json b/sdk/communication/azure-communication-callautomation/src/test/resources/session-records/CallConnectionAsyncAutomatedLiveTests.createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest[1].json index 7ebd915908de8..aed33f917828a 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/session-records/CallConnectionAsyncAutomatedLiveTests.createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest[1].json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/session-records/CallConnectionAsyncAutomatedLiveTests.createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest[1].json @@ -3,24 +3,23 @@ "Method" : "POST", "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2022-10-01", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.4.4 (18.0.2.1; Windows 11; 10.0)", - "x-ms-client-request-id" : "685bb99b-36cf-4948-998d-28db5c8496fc", - "Content-Type" : "application/json" + "content-type" : "application/json", + "x-ms-client-request-id" : "d218714e-8548-4b22-8068-999edd5b9c59", + "user-agent" : "azsdk-java-azure-communication-identity/1.4.7 (11.0.15; Mac OS X; 13.4)" }, "Response" : { - "x-azure-ref" : "20230420T194656Z-218k3rpek9335bm28rec1mqwmn00000000u000000000e2pg", "X-Cache" : "CONFIG_NOCACHE", "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, 2021-11-01, 2022-06-01, 2022-10-01, 2023-08-01", - "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Thu, 20 Apr 2023 19:46:56 GMT", + "Date" : "Tue, 20 Jun 2023 21:14:10 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "75ms", - "MS-CV" : "FXgjFW7OWUeZArCeNfm1Sg.0", + "X-Processing-Time" : "38ms", + "MS-CV" : "0wvREZxqvkq9A0K2lhTibA.0", + "X-Azure-Ref" : "0oxaSZAAAAADMWynlE+XBTK4boNMigY/iUERYMzFFREdFMDIxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", "Content-Length" : "101", "Body" : "{\"identity\":{\"id\":\"REDACTED\"}}", - "x-ms-client-request-id" : "685bb99b-36cf-4948-998d-28db5c8496fc", + "x-ms-client-request-id" : "d218714e-8548-4b22-8068-999edd5b9c59", "Request-Context" : "appId=", "Content-Type" : "application/json; charset=utf-8" }, @@ -29,24 +28,23 @@ "Method" : "POST", "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2022-10-01", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.4.4 (18.0.2.1; Windows 11; 10.0)", - "x-ms-client-request-id" : "889a5ca0-ce8e-449a-935b-9814ed1b68b8", - "Content-Type" : "application/json" + "content-type" : "application/json", + "x-ms-client-request-id" : "fe2a8cf6-9950-4b38-8b03-7b0d26986326", + "user-agent" : "azsdk-java-azure-communication-identity/1.4.7 (11.0.15; Mac OS X; 13.4)" }, "Response" : { - "x-azure-ref" : "20230420T194657Z-9363m4qqqd79deeh8zpu9nhzdw000000009g000000002t8s", "X-Cache" : "CONFIG_NOCACHE", "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, 2021-11-01, 2022-06-01, 2022-10-01, 2023-08-01", - "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Thu, 20 Apr 2023 19:46:57 GMT", + "Date" : "Tue, 20 Jun 2023 21:14:11 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "82ms", - "MS-CV" : "VEhPw350Akq2qkUHyC/sGw.0", + "X-Processing-Time" : "33ms", + "MS-CV" : "akLwwkz8T0Ws8b2mw6Ui0Q.0", + "X-Azure-Ref" : "0oxaSZAAAAADFo/Zze7QES7nGLyHzg5tKUERYMzFFREdFMDIyMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", "Content-Length" : "101", "Body" : "{\"identity\":{\"id\":\"REDACTED\"}}", - "x-ms-client-request-id" : "889a5ca0-ce8e-449a-935b-9814ed1b68b8", + "x-ms-client-request-id" : "fe2a8cf6-9950-4b38-8b03-7b0d26986326", "Request-Context" : "appId=", "Content-Type" : "application/json; charset=utf-8" }, @@ -55,24 +53,23 @@ "Method" : "POST", "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2022-10-01", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.4.4 (18.0.2.1; Windows 11; 10.0)", - "x-ms-client-request-id" : "78f0325a-2e99-4cf2-9a29-a1d080da495d", - "Content-Type" : "application/json" + "content-type" : "application/json", + "x-ms-client-request-id" : "87772bce-cbdd-46a7-9ca5-520215115760", + "user-agent" : "azsdk-java-azure-communication-identity/1.4.7 (11.0.15; Mac OS X; 13.4)" }, "Response" : { - "x-azure-ref" : "20230420T194657Z-218k3rpek9335bm28rec1mqwmn00000000u000000000e2ts", "X-Cache" : "CONFIG_NOCACHE", "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, 2021-11-01, 2022-06-01, 2022-10-01, 2023-08-01", - "Connection" : "keep-alive", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Thu, 20 Apr 2023 19:46:57 GMT", + "Date" : "Tue, 20 Jun 2023 21:14:11 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "58ms", - "MS-CV" : "BVDakO45V0mHuRn4FZyHoA.0", + "X-Processing-Time" : "16ms", + "MS-CV" : "iCcr4bp8JEqSyjoTwYFSUQ.0", + "X-Azure-Ref" : "0oxaSZAAAAABH/D2H+FiGRo1sIrVa1M2WUERYMzFFREdFMDIxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", "Content-Length" : "101", "Body" : "{\"identity\":{\"id\":\"REDACTED\"}}", - "x-ms-client-request-id" : "78f0325a-2e99-4cf2-9a29-a1d080da495d", + "x-ms-client-request-id" : "87772bce-cbdd-46a7-9ca5-520215115760", "Request-Context" : "appId=", "Content-Type" : "application/json; charset=utf-8" }, @@ -81,22 +78,20 @@ "Method" : "POST", "Uri" : "https://REDACTED.communication.azure.com/calling/callConnections?api-version=2023-01-15-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (18.0.2.1; Windows 11; 10.0)", - "x-ms-client-request-id" : "bdebb185-1662-432b-a79c-0014d45f4087", - "Content-Type" : "application/json" + "content-type" : "application/json", + "x-ms-client-request-id" : "0ad56f92-edd3-46de-a147-c0458485ba7d", + "user-agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (11.0.15; Mac OS X; 13.4)" }, "Response" : { - "x-azure-ref" : "20230420T194702Z-9363m4qqqd79deeh8zpu9nhzdw000000009g000000002tya", "X-Cache" : "CONFIG_NOCACHE", - "Repeatability-Result" : "accepted", - "Connection" : "keep-alive", "retry-after" : "0", - "Content-Length" : "915", + "X-Azure-Ref" : "0qBaSZAAAAACLCoSf3QPrRK078N1FOxObUERYMzFFREdFMDIyMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Content-Length" : "970", "StatusCode" : "201", - "X-Microsoft-Skype-Chain-ID" : "b6228d7f-7151-4217-9818-23c673ab17a5", - "Body" : "{\"callConnectionId\":\"511f3600-65bf-4d4f-bd1f-4952ec25a97b\",\"targets\":[{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}}],\"callConnectionState\":\"connecting\",\"callbackUri\":\"REDACTED\",\"mediaSubscriptionId\":\"d4c4db4a-3c6a-4f10-97b5-bee842bc0503\",\"sourceDisplayName\":\"\",\"sourceIdentity\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}}}", - "Date" : "Thu, 20 Apr 2023 19:47:02 GMT", - "x-ms-client-request-id" : "bdebb185-1662-432b-a79c-0014d45f4087", + "X-Microsoft-Skype-Chain-ID" : "9c8d9b11-237e-4841-9593-98265e7d0e3c", + "Body" : "{\"callConnectionId\":\"411f0b00-fd5f-4570-8754-776ab49691f9\",\"targets\":[{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}}],\"callConnectionState\":\"connecting\",\"callbackUri\":\"REDACTED\",\"mediaSubscriptionId\":\"e18cc852-1710-40e1-9ac2-f74dd4176a4b\",\"sourceDisplayName\":\"\",\"sourceIdentity\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"correlationId\":\"9c8d9b11-237e-4841-9593-98265e7d0e3c\"}", + "Date" : "Tue, 20 Jun 2023 21:14:15 GMT", + "x-ms-client-request-id" : "0ad56f92-edd3-46de-a147-c0458485ba7d", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null @@ -104,46 +99,42 @@ "Method" : "POST", "Uri" : "https://REDACTED.communication.azure.com/calling/callConnections:answer?api-version=2023-01-15-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (18.0.2.1; Windows 11; 10.0)", - "x-ms-client-request-id" : "78e17d21-5664-40e0-b5bb-7b49aec75467", - "Content-Type" : "application/json" + "content-type" : "application/json", + "x-ms-client-request-id" : "47d8acbd-4793-4e87-8513-ca86398ced6e", + "user-agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (11.0.15; Mac OS X; 13.4)" }, "Response" : { - "x-azure-ref" : "20230420T194706Z-218k3rpek9335bm28rec1mqwmn00000000u000000000e42y", "X-Cache" : "CONFIG_NOCACHE", - "Repeatability-Result" : "accepted", - "Connection" : "keep-alive", "retry-after" : "0", + "X-Azure-Ref" : "0qxaSZAAAAACe3ZWzO5HgSrqoMrsSpp+YUERYMzFFREdFMDIxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Content-Length" : "1173", "StatusCode" : "200", - "Date" : "Thu, 20 Apr 2023 19:47:06 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "1122", - "X-Microsoft-Skype-Chain-ID" : "b6228d7f-7151-4217-9818-23c673ab17a5", - "Body" : "{\"callConnectionId\":\"451f3600-c458-4d4e-8210-b9f2bf67e055\",\"serverCallId\":\"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDItc2RmLWFrcy5jb252LnNreXBlLmNvbS9jb252L0wtTUVQSllKR0VhNlk4eW1kQUplR3c/aT0xMC02MC0xLTI1MSZlPTYzODE3NTQzNjc0MTc4MDk0MA==\",\"targets\":[{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}}],\"callConnectionState\":\"unknown\",\"callbackUri\":\"REDACTED\",\"mediaSubscriptionId\":\"0675bfd6-1112-48ef-a085-49c182f3e916\",\"sourceDisplayName\":\"\",\"sourceIdentity\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}}}", - "x-ms-client-request-id" : "78e17d21-5664-40e0-b5bb-7b49aec75467", + "X-Microsoft-Skype-Chain-ID" : "9c8d9b11-237e-4841-9593-98265e7d0e3c", + "Body" : "{\"callConnectionId\":\"411f0b00-4f86-4c3a-8f51-6bf0371b7bbb\",\"serverCallId\":\"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDEtc2RmLWFrcy5jb252LnNreXBlLmNvbS9jb252L1JPVkV2U3kyRVVDa0JMSE0zSkkxVXc/aT0xMC02MC02LTg4JmU9NjM4MjI4MTE4NTEwNTg2MDA4\",\"targets\":[{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}}],\"callConnectionState\":\"unknown\",\"callbackUri\":\"REDACTED\",\"mediaSubscriptionId\":\"97d6d03c-7789-4e3f-a4d7-9361fdd98602\",\"sourceDisplayName\":\"\",\"sourceIdentity\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"correlationId\":\"9c8d9b11-237e-4841-9593-98265e7d0e3c\"}", + "Date" : "Tue, 20 Jun 2023 21:14:18 GMT", + "x-ms-client-request-id" : "47d8acbd-4793-4e87-8513-ca86398ced6e", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/calling/callConnections/511f3600-65bf-4d4f-bd1f-4952ec25a97b/participants:add?api-version=2023-01-15-preview", + "Uri" : "https://REDACTED.communication.azure.com/calling/callConnections/411f0b00-fd5f-4570-8754-776ab49691f9/participants:add?api-version=2023-01-15-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (18.0.2.1; Windows 11; 10.0)", - "x-ms-client-request-id" : "37ab7d8f-5a15-441c-a5f3-bf9bced122f8", - "Content-Type" : "application/json" + "content-type" : "application/json", + "x-ms-client-request-id" : "4e583993-711e-4133-9ea7-c82df2c7ff06", + "user-agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (11.0.15; Mac OS X; 13.4)" }, "Response" : { - "x-azure-ref" : "20230420T194708Z-9363m4qqqd79deeh8zpu9nhzdw000000009g000000002uvt", "X-Cache" : "CONFIG_NOCACHE", "Repeatability-Result" : "accepted", - "Connection" : "keep-alive", "retry-after" : "0", + "X-Azure-Ref" : "0rRaSZAAAAAAdsUFFsaKNSZNQ8UdJNNJTUERYMzFFREdFMDIyMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", "Content-Length" : "274", "StatusCode" : "202", - "X-Microsoft-Skype-Chain-ID" : "b6228d7f-7151-4217-9818-23c673ab17a5", + "X-Microsoft-Skype-Chain-ID" : "9c8d9b11-237e-4841-9593-98265e7d0e3c", "Body" : "{\"participant\":{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false}}", - "Date" : "Thu, 20 Apr 2023 19:47:08 GMT", - "x-ms-client-request-id" : "37ab7d8f-5a15-441c-a5f3-bf9bced122f8", + "Date" : "Tue, 20 Jun 2023 21:14:20 GMT", + "x-ms-client-request-id" : "4e583993-711e-4133-9ea7-c82df2c7ff06", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null @@ -151,89 +142,82 @@ "Method" : "POST", "Uri" : "https://REDACTED.communication.azure.com/calling/callConnections:answer?api-version=2023-01-15-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (18.0.2.1; Windows 11; 10.0)", - "x-ms-client-request-id" : "918ec33d-42ba-41af-b985-3bda905eba6d", - "Content-Type" : "application/json" + "content-type" : "application/json", + "x-ms-client-request-id" : "907c0edf-e3f6-4874-9096-9e494df067c0", + "user-agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (11.0.15; Mac OS X; 13.4)" }, "Response" : { - "x-azure-ref" : "20230420T194711Z-218k3rpek9335bm28rec1mqwmn00000000u000000000e52r", "X-Cache" : "CONFIG_NOCACHE", - "Repeatability-Result" : "accepted", - "Connection" : "keep-alive", "retry-after" : "0", + "X-Azure-Ref" : "0rxaSZAAAAACC3fm+tctmSKrS5QTzC+UcUERYMzFFREdFMDIxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Content-Length" : "1173", "StatusCode" : "200", - "Date" : "Thu, 20 Apr 2023 19:47:12 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "1122", - "X-Microsoft-Skype-Chain-ID" : "b6228d7f-7151-4217-9818-23c673ab17a5", - "Body" : "{\"callConnectionId\":\"451f3600-62d5-40f4-b5ff-e383913e7df5\",\"serverCallId\":\"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDItc2RmLWFrcy5jb252LnNreXBlLmNvbS9jb252L0wtTUVQSllKR0VhNlk4eW1kQUplR3c/aT0xMC02MC0xLTI1MSZlPTYzODE3NTQzNjc0MTc4MDk0MA==\",\"targets\":[{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}}],\"callConnectionState\":\"unknown\",\"callbackUri\":\"REDACTED\",\"mediaSubscriptionId\":\"ec21f134-cc5f-4411-b82a-e8942af36bf3\",\"sourceDisplayName\":\"\",\"sourceIdentity\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}}}", - "x-ms-client-request-id" : "918ec33d-42ba-41af-b985-3bda905eba6d", + "X-Microsoft-Skype-Chain-ID" : "9c8d9b11-237e-4841-9593-98265e7d0e3c", + "Body" : "{\"callConnectionId\":\"411f0b00-b8c0-4f53-afd8-19279d6f2385\",\"serverCallId\":\"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDEtc2RmLWFrcy5jb252LnNreXBlLmNvbS9jb252L1JPVkV2U3kyRVVDa0JMSE0zSkkxVXc/aT0xMC02MC02LTg4JmU9NjM4MjI4MTE4NTEwNTg2MDA4\",\"targets\":[{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}}],\"callConnectionState\":\"unknown\",\"callbackUri\":\"REDACTED\",\"mediaSubscriptionId\":\"31c5212c-ceff-4d37-9a4e-694cb16aca56\",\"sourceDisplayName\":\"\",\"sourceIdentity\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"correlationId\":\"9c8d9b11-237e-4841-9593-98265e7d0e3c\"}", + "Date" : "Tue, 20 Jun 2023 21:14:22 GMT", + "x-ms-client-request-id" : "907c0edf-e3f6-4874-9096-9e494df067c0", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/calling/callConnections/511f3600-65bf-4d4f-bd1f-4952ec25a97b/participants?api-version=2023-01-15-preview", + "Uri" : "https://REDACTED.communication.azure.com/calling/callConnections/411f0b00-fd5f-4570-8754-776ab49691f9/participants?api-version=2023-01-15-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (18.0.2.1; Windows 11; 10.0)", - "x-ms-client-request-id" : "49b429f3-e38f-4f36-89e8-db93d8193154" + "x-ms-client-request-id" : "dba98aef-1fa9-4707-a9e9-5ca33bca2c66", + "user-agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (11.0.15; Mac OS X; 13.4)" }, "Response" : { - "Accept-Ranges" : "bytes", - "x-azure-ref" : "20230420T194714Z-9363m4qqqd79deeh8zpu9nhzdw000000009g000000002vgw", "X-Cache" : "CONFIG_NOCACHE", - "Connection" : "keep-alive", "retry-after" : "0", + "X-Azure-Ref" : "0sRaSZAAAAAAUAX9qN4djTZc6RmWhBLn8UERYMzFFREdFMDIyMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", "Content-Length" : "789", "StatusCode" : "200", - "X-Microsoft-Skype-Chain-ID" : "b6228d7f-7151-4217-9818-23c673ab17a5", + "X-Microsoft-Skype-Chain-ID" : "9c8d9b11-237e-4841-9593-98265e7d0e3c", "Body" : "{\"values\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false}]}", - "Date" : "Thu, 20 Apr 2023 19:47:14 GMT", - "x-ms-client-request-id" : "49b429f3-e38f-4f36-89e8-db93d8193154", + "Date" : "Tue, 20 Jun 2023 21:14:25 GMT", + "x-ms-client-request-id" : "dba98aef-1fa9-4707-a9e9-5ca33bca2c66", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/calling/callConnections/511f3600-65bf-4d4f-bd1f-4952ec25a97b/participants:remove?api-version=2023-01-15-preview", + "Uri" : "https://REDACTED.communication.azure.com/calling/callConnections/411f0b00-fd5f-4570-8754-776ab49691f9/participants:remove?api-version=2023-01-15-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (18.0.2.1; Windows 11; 10.0)", - "x-ms-client-request-id" : "f8d29de3-7c28-4d22-aaef-cb93b471025d", - "Content-Type" : "application/json" + "content-type" : "application/json", + "x-ms-client-request-id" : "dba82adf-3021-426b-bdb8-e2fad05c6976", + "user-agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (11.0.15; Mac OS X; 13.4)" }, "Response" : { - "x-azure-ref" : "20230420T194714Z-218k3rpek9335bm28rec1mqwmn00000000u000000000e5dw", "X-Cache" : "CONFIG_NOCACHE", "Repeatability-Result" : "accepted", - "Connection" : "keep-alive", "retry-after" : "0", + "X-Azure-Ref" : "0sRaSZAAAAACggplNSmf8R5qi2R4IBJzlUERYMzFFREdFMDIxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", "Content-Length" : "2", "StatusCode" : "202", - "X-Microsoft-Skype-Chain-ID" : "b6228d7f-7151-4217-9818-23c673ab17a5", + "X-Microsoft-Skype-Chain-ID" : "9c8d9b11-237e-4841-9593-98265e7d0e3c", "Body" : "{}", - "Date" : "Thu, 20 Apr 2023 19:47:15 GMT", - "x-ms-client-request-id" : "f8d29de3-7c28-4d22-aaef-cb93b471025d", + "Date" : "Tue, 20 Jun 2023 21:14:25 GMT", + "x-ms-client-request-id" : "dba82adf-3021-426b-bdb8-e2fad05c6976", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/calling/callConnections/451f3600-c458-4d4e-8210-b9f2bf67e055:terminate?api-version=2023-01-15-preview", + "Uri" : "https://REDACTED.communication.azure.com/calling/callConnections/411f0b00-4f86-4c3a-8f51-6bf0371b7bbb:terminate?api-version=2023-01-15-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (18.0.2.1; Windows 11; 10.0)", - "x-ms-client-request-id" : "9fb16a61-439a-4cac-b69d-6d40cdf9848e" + "x-ms-client-request-id" : "06eacef2-0ede-4e13-8b01-53e145ebe726", + "user-agent" : "azsdk-java-azure-communication-callautomation/1.0.0-beta.2 (11.0.15; Mac OS X; 13.4)" }, "Response" : { - "x-azure-ref" : "20230420T194715Z-9363m4qqqd79deeh8zpu9nhzdw000000009g000000002vnm", "X-Cache" : "CONFIG_NOCACHE", - "Connection" : "keep-alive", "retry-after" : "0", + "X-Azure-Ref" : "0shaSZAAAAADgVpeBnU/wToDQv4X3G5eaUERYMzFFREdFMDIyMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", "Content-Length" : "53", "StatusCode" : "404", - "X-Microsoft-Skype-Chain-ID" : "75991ecc-51c1-45c0-be1d-28fa867eaac1", + "X-Microsoft-Skype-Chain-ID" : "2fead31e-065b-46b0-84bc-18c9493cb6ec", "Body" : "{\"error\":{\"code\":\"8522\",\"message\":\"Call not found.\"}}", - "Date" : "Thu, 20 Apr 2023 19:47:15 GMT", - "x-ms-client-request-id" : "9fb16a61-439a-4cac-b69d-6d40cdf9848e", + "Date" : "Tue, 20 Jun 2023 21:14:25 GMT", + "x-ms-client-request-id" : "06eacef2-0ede-4e13-8b01-53e145ebe726", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/session-records/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest b/sdk/communication/azure-communication-callautomation/src/test/resources/session-records/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest index 82ec273d454d4..76490e49f68e5 100644 Binary files a/sdk/communication/azure-communication-callautomation/src/test/resources/session-records/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest and b/sdk/communication/azure-communication-callautomation/src/test/resources/session-records/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest differ diff --git a/sdk/communication/azure-communication-callautomation/swagger/README.md b/sdk/communication/azure-communication-callautomation/swagger/README.md index 17766d4af4c1c..0fe8f422e5e2a 100644 --- a/sdk/communication/azure-communication-callautomation/swagger/README.md +++ b/sdk/communication/azure-communication-callautomation/swagger/README.md @@ -28,7 +28,7 @@ autorest README.md --java --v4 --use=@autorest/java@4.0.20 --use=@autorest/model ``` yaml tag: package-2023-01-15-preview require: - - https://github.com/williamzhao87/azure-rest-api-specs/blob/885b18fa094fbb953b1a0cb77c52536a8d745be5/specification/communication/data-plane/CallAutomation/readme.md + - https://github.com/williamzhao87/azure-rest-api-specs/blob/e8612807fcc6148904e2ee316a2086a1db74f71c/specification/communication/data-plane/CallAutomation/readme.md java: true output-folder: ../ license-header: MICROSOFT_MIT_SMALL